views:

371

answers:

6

I'm new to OO PHP and I have read that using Frameworks can really help me with my projects.

Can anyone suggest a site where I can learn how to start with CakePHP or tell me what I need to do so that I could use the framework CakePHP?

I have no idea X.x

Thanks

A: 

http://www.cakephp.org/

You get all the information you need there plus a tutorial on how to build a small blog in around 15 minutes (located in the documentation)

lamas
A: 

I think you should read this article: 10 confusions with their solutions before you start using CakePHP.

leandro
+2  A: 

If you just got started with OOP in PHP, I suggest not to use any frameworks at all, especially not CakePHP. Last time I checked, CakePHP was backwards compatible with PHP4. OOP in PHP4 is different from OOP in PHP5. PHP4 is officially dead.

While I am not saying CakePHP is a bad framework (I've been quite productive with it on one occasion myself), I've seen code reviews by experts that do question CakePHPs code quality and have ranted about it on more than one occasion.

Also, keep in mind that frameworks have to be learned too. And while they will make you more productive eventually, you are less likely to learn OOP concepts and Design Patterns from them, because you are focused on how to use the specific framework over understanding why the framework works a certain way. The point of a framework is not to teach you OOP, but to ease and solve certain common problems in web application coding.

To cut a long story short, if you want to learn OOP, start simple. For a start, try Sitepoint, TuxRadar or buy a good book. Once you've learned the fundamental concepts and the most important Design Patterns, move on to frameworks.

Gordon
+5  A: 

Do this: http://book.cakephp.org/view/219/Blog. Don't just read it, go through the whole thing, installing cake (building your webserver setup if needs be) writing the code etc. Then start customising it to the way you think a blog should work. Use it as your own blog.

Join the Google cakephp group: http://groups.google.co.uk/group/cake-php?hl=en . Read and ask!

Never be afraid to look stupid - don't be afraid to ask. And don't let people tell you it's slower than...not as good as...or anything else. Above all, avoid writing procedural code to get you out of a corner. You just don't need to.

Leo
On the matter of learning OO - I've been programming OO for 17 years. The initial curve was so steep it was overhanging, but CakePHP provides the perfect learn-by-example environment. Sure, you won't learn pure PHP, in fact you'll probably forget a little - but that's part of what a framework does.Whichever framework you choose, stick with it at least until you know it - they're all pretty much the same. And don't worry about the PHP 4/5 issue - it's not an issue and Cake has it pretty well covered.
Leo
With 17 yrs OOP under the belt, you probably had a firm grasp on OO concepts by the time Cake arrived in 2005; 10 yrs after PHP came into existence. Imho, the tutorial you linked is a great example of why not to start with a framework and Cake. The tutorial just tells you how to use Cake. It covers no OOP concepts whatsoever and assumes the user knows what `extends` does or how objects are created or why to use `$this`. Even worse, the code doesn't use visibility for properties and methods just to stay compatible with officially discontinued PHP4. What's a newbie to learn from this?
Gordon
Of course, but the great thing about Cake is that you can work in OO without needing to worry about it. Whichever route is followed there are key things to learn. I don't suggest for a moment that Cake is used in isolation - rule one: RTFM - and definitely not as a way of learning a language, but it is great for learning by doing.
Leo
A: 

Follow the Cake Cookbook examples at http://book.cakephp.org/ step-for-step, as mentioned above.

Martin Bean
A: 

If u want to get started with MVC this blog post will be helpfull

http://nuts-and-bolts-of-cakephp.com/2009/01/06/another-way-to-think-about-mvc/

I think u will love it because it explained with cakePHP ;-)

Happy Baking

RSK