porting CI3 base controller to CI4 -- __construct vs initController |
12-11-2020, 02:53 AM
(This post was last modified: 12-11-2020, 03:00 AM by tgix. Edit Reason: Updated github link )
Thank you for an interesting and delightful discussion!
(12-10-2020, 01:58 PM)sneakyimp Wrote: Thank you for the clarification. I've read that page on Filters and am not sure I'm convinced that using filters for authentication is all that great. (12-10-2020, 01:58 PM)sneakyimp Wrote: I'm curious to see how CI4's OOP is "cleaner." So far, I see a lot of cumbersome namespacing and a lot of ways it breaks your CI3 project. While enjoying my morning coffee I put together a more detailed description of my CI4 back-end and how I have implemented the filters. I am not a blog-artist so it's here in github - https://github.com/tangix/ci4-zen-zone/t...ng-filters Maybe a start as a blogger, who knows? I have been living in PHP 5.x for too long and since CI3 didn't "force" me to use OOP I didn't. I have come to appreciate traits, interfaces and namespacing as it makes the code cleaner and more robust. For my development i use PHPStorm and find many of the code-navigation and -completion functions very helpful. (12-10-2020, 01:58 PM)sneakyimp Wrote: I really appreciate your explaining this, but it'll take me some time to absorb. In my CI3 project, I didn't hesitate to make model classes that combine the atomic, db-based model classes using Aggregation/Composition/Association. I basically had two types of model classes:In my project described above I am using Entities extensively to transform data between front- and back-end. Many of the UI elements for example use JSON arrays for multi-pickers. I have created by own BaseEntity handling casts between arrays (from the front-end) and comma separated strings (stored in the database). The map directly (12-10-2020, 01:58 PM)sneakyimp Wrote: Do it! The world can always use more discourse and illustrations of coding techniques.First step taken - https://github.com/tangix/ci4-zen-zone |
Messages In This Thread |
porting CI3 base controller to CI4 -- __construct vs initController - by sneakyimp - 12-08-2020, 10:27 AM
RE: porting CI3 base controller to CI4 -- __construct vs initController - by tgix - 12-08-2020, 01:11 PM
RE: porting CI3 base controller to CI4 -- __construct vs initController - by sneakyimp - 12-09-2020, 02:29 PM
RE: porting CI3 base controller to CI4 -- __construct vs initController - by tgix - 12-09-2020, 10:54 PM
RE: porting CI3 base controller to CI4 -- __construct vs initController - by sneakyimp - 12-10-2020, 01:58 PM
RE: porting CI3 base controller to CI4 -- __construct vs initController - by tgix - 12-11-2020, 02:53 AM
RE: porting CI3 base controller to CI4 -- __construct vs initController - by InsiteFX - 12-09-2020, 09:49 PM
|