New Code Igniter tutorial series |
[eluser]Dam1an[/eluser]
Hi everyone, I'm currently working on a tutorial series for code igniter, of which the first part is now online (direct link) You can also find the links to all the parts as they appear here If you like my blog, feel free to subscribe to my RSS . Thanks guys
[eluser]Drew Barontini[/eluser]
Looks good, man! I'm a relatively new PHP/CI programmer and I'm looking forward to reading through these. Keep it up!
[eluser]Taff[/eluser]
Thanks Dam1an. I have read a fair bit here on the forums about changing the file structure. Your tutorial shows me how. Taff
[eluser]wiredesignz[/eluser]
Ellislab are pretty staunch about the name CodeIgniter being used rather than Code Igniter. Also your Controller example does not initialize itself, it may work in the example but is misleading for a newbie if they then try to $this->load something. Other than that.. nice work.
[eluser]Dam1an[/eluser]
I'll be sure to call it CodeIgniter from now on, honest! Also, I intentionally neglected to mention the constructor, as its not needed at this early stage, but as soon as I start showing how to load libraries/helpers/models etc, I'll obviously introduce it, end explain what/why its used. Thanks for the comments so far Be as harsh as you can, as the more you point out, with regard to Codeigniter and the style of the tutorial, the better it will be for everyone. Cheers
[eluser]Derek Allard[/eluser]
Dam1an, welcome into CodeIgniter - thrilled to see your series, looks like a great start.
[eluser]Dam1an[/eluser]
Got part 2 up now, its a quick intro to .htaccess, and how to use it to get clean URL's Direct link The series I'll hopefully get part 3 up which will start talking about views in the next few days, assuming I'm not too busy with exams
[eluser]Daniel Moore[/eluser]
Dam1an, Always great to see tutorials up that are needed to help people get up to speed on CodeIgniter. If I may quote you, you said, "Be as harsh as you can, as the more you point out, with regard to Codeigniter and the style of the tutorial, the better it will be for everyone." (If I can't quote you, well you still said it.) As I assume you are looking for "constructive" criticism so that you can make it the best possible tutorial for all users, I have noticed something in your .htaccess tutorial that could use addressing. Your .htaccess tutorial will not work for all installations for CodeIgniter. Everyone I work with, and many people in the hard core programming world, prefer the added security of placing the /system directory outside the web root, and some have multiple code igniter applications at a particular site. You have written the following rewrite rule: Code: RewriteRule ^(.*)$ /index.php/$1 [L] Code: RewriteRule ^(.*)$ ./index.php/$1 [L,QSA] I work on multiple servers, with multiple versions of apache. Some older versions do not behave well with the .htaccess you have, and and this issued has been solved across all apache servers by using the following .htaccess file: Code: DirectoryIndex index.php Good luck with the tutorial series!
[eluser]Dam1an[/eluser]
Thanks for pointing that out with regard to the .htaccess rewrite rules, I'll go make the update on the blog now. Also you mention that all hard core programmers keep the system folder out of the web root, I specifically mentioned this in part 1, so that all that is in the web root in index.php, and the contents of the application folder (models, views, controllers etc). I have been doing this all along, and never noticed any problems with that. Also, I did overlook needing the '.' in front of /index.php, as normally, when I work on multiple sites, I just hard code the folder name (having forgotten it would be relative to the current directory). Once again, thanks for pointing it out =)
[eluser]onejaguar[/eluser]
[quote author="wiredesignz" date="1211203944"] Also your Controller example does not initialize itself, it may work in the example but is misleading for a newbie if they then try to $this->load something. [/quote] What do you mean "initialize" itself? Doesn't that happen automatically? You only need to do your own constructor if you want to do something special EXTENDING the default initialization. You can do all the $this-> you want simply because you are extending the base controller. |
Welcome Guest, Not a member yet? Register Sign In |