views:

57

answers:

3

I'd like to learn PHP with a view to using CodeIgniter to make a few apps. Does this alter what or how I should approach PHP to start with?

I'm a designer with good front-end skills. I used Coldfusion in University but want to build stuff in a language more widely supported (and respected?). CodeIgniter seems great but I'd like to know how good a grounding in PHP I'll need. Any tutorial/book suggestions much appreciated.

A: 

yes there is one major thing you need to learn or understand first. It's the MVC model that codeigniter uses, it stands for Model, view & controller. Basicly you need to split your code into 3 layers, the model is to query the database, the controller is also called the business logic layer, you will need to check if a query can be executed or not and finally the view which is the presentation layer, what the user will see. For the rest general php knwoledge is required for codeigniter.

Here are some articles about MVC structure:

http://net.tutsplus.com/tutorials/other/mvc-for-noobs/

http://net.tutsplus.com/tutorials/php/hvmc-an-introduction-and-application/

and here is a list of 15 video tutorials about codeigniter written by authors of nettuts:

http://net.tutsplus.com/tutorials/php/codeigniter-from-scratch-profiling-benchmarking-hooks/ (this is the last tutorial of the list but it's the only one that links to all other tutorials)

EDIT: OOP (object oriënted programming) is also something you might want to have a look at. http://net.tutsplus.com/tutorials/php/oop-in-php/

krike
Business logic should be in the model. Fat models, skinny controllers.http://stackoverflow.com/questions/235233/asp-net-mvc-should-business-logic-exist-in-controllers
stillstanding
Thanks for your answer, I'll take a look at those articles
Tom
@tom you are welcome
krike
+1  A: 

Here' s a post from Derek Allard about learning php with codeigniter (it's short, only a couple paragraphs):

http://www.derekallard.com/blog/post/learning-php-with-codeigniter/

Matthew
That's great- thanks v.much.
Tom
A: 

My take: first learn PHP, then learn a framework like CI. Trust me, that is the correct order.

Ferdy