Welcome Guest, Not a member yet? Register   Sign In
Not sure to migrate to CI4
#2

(This post was last modified: 05-12-2020, 09:23 PM by bivanbi.)

I understand your struggle. When I first switched to CI4, I thought it would be a matter of few touch-ups and my application would work right away. Wrong.

But throughout upgrading - or better put, rewriting - my code base for CI4, my coding style changed for the better. It was totally worth it. Of course you could do it with any other modern truly object-oriented framework.

While I cannot give you specific advice as I have not used techniques like filtering yet, what sometimes helped me to simplify multi-table-operation is defining views and functions in database itself. Since models and entities per definition relate to a single table (or view, that is), I found myself creating higher order model and entity classes that simplified the operation of controllers by hiding the multi-table structure from the rest of the app.

I also have a faint feeling that your models might violate the single responsibility principle, if those models get to decide when and where to redirect the users, so it might help to re-think where you put that logic.
Reply


Messages In This Thread
Not sure to migrate to CI4 - by imabot - 05-12-2020, 08:11 AM
RE: Not sure to migrate to CI4 - by bivanbi - 05-12-2020, 09:21 PM
RE: Not sure to migrate to CI4 - by imabot - 05-13-2020, 01:52 AM
RE: Not sure to migrate to CI4 - by John_Betong - 05-13-2020, 02:27 AM
RE: Not sure to migrate to CI4 - by imabot - 05-13-2020, 04:12 AM
RE: Not sure to migrate to CI4 - by John_Betong - 05-13-2020, 02:52 PM
RE: Not sure to migrate to CI4 - by admin0 - 05-14-2020, 08:07 AM
RE: Not sure to migrate to CI4 - by imabot - 05-14-2020, 08:13 AM
RE: Not sure to migrate to CI4 - by includebeer - 05-15-2020, 03:05 PM
RE: Not sure to migrate to CI4 - by albertleao - 05-14-2020, 09:37 AM
RE: Not sure to migrate to CI4 - by imabot - 05-18-2020, 02:09 AM
RE: Not sure to migrate to CI4 - by includebeer - 05-18-2020, 04:49 AM
RE: Not sure to migrate to CI4 - by bivanbi - 05-18-2020, 05:19 AM
RE: Not sure to migrate to CI4 - by 68thorby68 - 06-10-2020, 01:25 PM
RE: Not sure to migrate to CI4 - by jreklund - 06-13-2020, 08:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB