Welcome Guest, Not a member yet? Register   Sign In
First Impression: My day working with CodeIgniter 4.
#1

I spent most of today working with CodeIgniter 4 instead of CodeIgniter 3 for the first and thought sharing my first impression with the community would be a nice way to finish up. 

Installation was a breeze and had no issues, I chose to clone from the GitHub repository (no particular reason for this choice other than it was the first method on the list). I already had the required PHP extensions installed.

LibCurl is required so I downloaded the source code and compiled, built and installed within a couple of minutes. 

Configuration was again very simple and similar to CodeIgniter 3, it has to be said though all this easiness is thanks to the quality of the documentation the CodeIgniter development team provide. One very nice feature is the separation of the applications base code and the 
publicly accessible document root, this is something I do as standard, but to see it used as the default configuration in something as popular as CodeIgniter is great progress for web security. I will never understand why anyone would put there admin folder or configuration files with passwords in the public web directory when there are simple ways to avoid it.

I have to be honest and say I found the changes in the layout a little frustrating to begin with and the odd little changes caught me out once or twice, for example the way the view method is used has changed from

PHP Code:
$this->load->view(); 

and now it is used as follows:

PHP Code:
echo view(); 

This seems simple but when you do something almost on autopilot for years you really have to stop and think. Other changes include the syntax of routes added and tiny little things like using a capital letter where you have never done before. but once you break habit the true genius of the new way starts to come to light. After working on version 4 for maybe 6 hours I switched back to version 3 and version 4 started to make so much sense.   

Some of the more important changes involve security and the improvements are more than welcome. I can now handle things in the CodeIgniter application that previously are handled all over the servers configuration. One of the things that interested me the most has to be the Restful server implementation and handling I have not got round to exploring this yet but having a way of making secure and correctly configured RESTul API's is long overdue.

I personally can not wait for the production ready version 4. I had a great day and I really enjoyed using it and now I have had a taste I will explore more the next time I have some free time. I recommend having a day out experimenting with what will be the future of PHP framework. 

I would love to read what you think if any of you have spent any real working with it.
Reply
#2

Great write up! Thanks for taking the time to share your experience. It sounds like you & I had very similar transitions from 3 - I found myself nodded in remembrance at many of your observations.
Reply
#3

Its not my first day but not far off it . i've returned to CI because   my old framework looks like its getting neglected by the developers.

My thinking is , start re-learning CI4  now and by the time i've half a clue CI4 should be ready for production.

What i've done is set up apache virtual host (slackware) so i have a dir "andrew.com"  at /srv/httpd/htdocs/andrew.com/

in there i've put a scss dir and gulpfile.js also installed bootstrap via npm (needs nodejs) when i run gulp   it does  concat ->css into css dir inside public .

So far i've got gulp working , font awesome and the basics of a view.Next to test bootstrap  flexbox works ,  then i guess breakpoints On my last effort i had one page, no header nor footer and used file_get_contents() to read a html fragment and basically inject that into my one template page. Thats about it so far
Reply




Theme © iAndrew 2016 - Forum software by © MyBB