Fri
5
Jan '07
Difficult start with cakephp
by Frank Spychalski filed under Cakephp, PHP, Work
a cake
by andy47

I’m slowly learning to work with cakephp, but it’s damn hard.
The manual is confusing. I nearly gave up, when I found the blog tutorial in the appendix. Dear authors, this should be chapter 1 or 2! The wiki was removed, but at least some of the content can still be found in the google cache. The Bakery is a mess of articles. some of them cluttered with broken links.[1]

So far I found only two pages with “Rails-quality” documentation: Learning from the CakePHP source code – Part I and Part II.

I someone knows other good documentation for cakephp, please leave a comment.

Update:
I forgot to mention that it isn’t even decided yet, that I will use cakephp for my upcoming project. I’d love to hear more about other Rails-like frameworks in PHP. Right now I’m investigating Symfony, which looks promising.

[1] these broken links should let you download code, but the code is provided in the box below, so it’s only an annoyance.


17 Responses to “Difficult start with cakephp”

  1. 1

    BTW, I don’t know if the previous comment got posted. Your comment system needs to provide a little feedback :-)

    Richard@Home (January 5th, 2007 at 11:39)
  2. 2

    Tried to post my comment a couple of times but its not working for some reason. I’m guessing it doesn’t like urls?

    I also struggled to ‘get going’ with CakePHP. I can heartily recommend the following series of articles from IBM: www-128.ibm.com/developerworks/edu/os-dw-os-php-cake1.html

    (Convert the \ to / in the above url)

    You will need to register with the IBM site (free) to read the articles, but they pretty much cover everything (even the dreaded ACL) you need to get started.

    Richard@Home (January 5th, 2007 at 11:41)
  3. 3

    Success! :-)

    Richard@Home (January 5th, 2007 at 11:41)
  4. 4

    Thank you Richard for the link. I haven’t had any complaints about the comments so far, but I don’t have a lot of comments either. So perhaps other people are having problems, too :-( It’s the default wordpress comment behaviour, but I will see if there is a wordpress plugin which improves it.

    Frank Spychalski (January 5th, 2007 at 11:51)
  5. 5

    Hey Frank, I’m glad too see you are trying to become a baker ; ). About the documentation: What kind of information are you looking for? The manual is kind of for how to do the things CakePHP offers. The two articles by that you mentioned are trying to explain what is going on under the hood of CakePHP. So do you think this kind of information should be in the manual as well? Is it the automatic stuff that slows you down because you don’t know how it works? Give me some feedback and I’ll talk with John (the guy who does the manual) in order to see how we can improve things.

    Felix Geisendörfer (January 5th, 2007 at 12:40)
  6. 6

    Hi, I’m working also with cakephp, it’s not as clean as rails. I can highly suggest to investigate how cakephp returns your model-instances. They do it using arrays and they use different formats. It’s a difference if you only fetch one instance, all instances, and if it’s an has-many-relation.

    seb (January 5th, 2007 at 14:59)
  7. 7

    Felix, I can’t really give you any specific questions. I’m familiar with Rails, so it’s definitely not the automatic stuff. Actually, the automatic stuff is why I want to use such a framework.

    So far I accomplished everything I wanted, but still I feel lost somehow. I think the whole structure of the manual could be improved. I liked the blog tutorial but it should apeard much earlier.

    The chapter “Scaffolding” starts with a paragraph about how cool scaffolding is, but withouth explaining what scaffolding means. In the later pages (I think, I haven’t checked all pages) scaffolding isn’t mentioned again. The chapters “Models”, “Controllers”, “Views” are huge and could use a small TOC on the top.

    For the last 30 minutes or so I’m reading the symfony manual (http://www.symfony-project.com/get/trunk/symfony-book.pdf) which is (no offense) much more to my liking.

    Frank Spychalski (January 5th, 2007 at 15:39)
  8. 8

    As the documentation slave for the CakePHP project, maybe I can throw in my two cents here.

    First, if you’re having a hard time, we’re always available via the CakePHP mailling list/group, or our IRC channel. Its no excuse for crappy documentation, but these resources can help quite a bit.

    We get really mixed review on the documentation for the project, and since your qualms don’t come with any specifics, let me just say this: we’re working to improve the structure. The manual for v1.2 is completely restructured, and I’ve already finished the first two units. The blog tutorial is mentioned earlier, and we really try to cover the basics more.

    Our documentation process has been somewhat organic up to this point, and we hope that with 1.2 we can start anew. If you end up
    wanting to give us some more specific criticisms, please log a ticket at trac.cakephp.org, or stop by IRC and holler at us.

    Or jump in and help. :)

    – J

    John David Anderson (January 5th, 2007 at 22:04)
  9. 9

    You might want to have a look at the frameworks compared here: http://www.phpit.net/article/ten-different-php-frameworks/

    Of particular interest to me were Seagull and CodeIgniter. Watching the screencast for CodeIgniter really brought back some memories of the first rails screencasts (http://www.codeigniter.com/watch/)

    Hope you find what you need.

    nkryptic (January 6th, 2007 at 02:18)
  10. 10

    John, please don’t get me wrong. I still think that cakephp is a pretty good project. Finally, I have a specific question :-) I haven’t found anything about unittests in the manual. Is there built-in support?

    nkryptic, thanks for the link, the only overview I found was http://www.phphacks.com/content/view/53/33/.

    Frank Spychalski (January 7th, 2007 at 12:35)
  11. 11

    I am trying to use CakePHP, but is really hard to knlow the basic use… I am really lost…

    josepzin (January 18th, 2007 at 23:50)
  12. 12

    I suggest releasing the source code of bigger and more complex websites. The blog tutorial is just too simple.

    Bart (January 20th, 2007 at 01:02)
  13. 13

    @bart
    did look @ cakeforge ? bakery ? There are many projects in CakePHP with released source – for example look @ cheesecake photoblog

    @Frank
    Unit testing isn’t officially supported in 1.1. there are plans to support/use it in 1.2

    kabturekj (January 26th, 2007 at 18:50)
  14. 14

    @kabturekj finally :-) I hope the integration will be as smooth as in Rails. Currently I’m using Selenium and some JUnit/HttpUnit tests. The results are OK, but it feels awkward.

    Frank Spychalski (January 27th, 2007 at 11:18)
  15. 15

    I am trying to use CakePHP, but is really hard to knlow the basic use… I am really lost…Is anybody help me..?

    sruthi krishna (March 10th, 2007 at 10:30)
  16. 16

    I’ll have to agree with you guys on the documentation thing. There is no mid level documentation out there. Everything is either too simple or way to complex for what you’re trying to do.

    Here’s my first step to fixing that problem:
    http://www.webdevelopment2.com/cakephp-installation-guide-just-add-water-and-2-medium-eggs/

    If anyone knows of specific turorials or the like that they’d want to see up, just let me know.

    Baz L (August 27th, 2007 at 19:29)
  17. 17

    Thanks Baz, I could have used your post when I was a noob ;-)

    Frank Spychalski (August 28th, 2007 at 10:53)

Any comments? Or questions? Just leave a Reply: