Hi all, Sorry if this is another dumb post, but I get the feeling that the tutorials and docs are written with experienced Cake people in mind, rather than Cake novices.
For example, after completing the Blog tutorial, it suggests reading up on Layouts, which I did next. At http://book.cakephp.org/2.0/en/views.html#view-layouts it says, "When you create a layout, you need to tell CakePHP where to place the code for your views. To do so, make sure your layout includes a place for $this->fetch('content')". So I replace my /app/View/Layouts/ default.ctp (that I copied from the /lib/Cake/View/Layouts) with the suggested layout shown on that page, and now my Blog app craps out. Then I revert to the good version and it works again. Ok, not to worry, I'll go on. So, I take a look at /app/View/Layouts/default.ctp (that I copied from the /lib/Cake/View/Layouts) and search for the essential part, $this- >fetch('content'). But, it's nowhere to be seen. In fact, fetch() does not seem to be defined anywhere at all in the whole bundle, and I can't find a definition for fetch() in the PHP docs either? So, now I'm wondering if the docs are BS as default.ctp that comes bundled with Cake doesn't even have any mention of this seemingly essential line? Then I take another look at /app/View/Layouts/default.ctp to see if I can figure it out what it does. The very first line is $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework'); There are no comments at all to go with it. So I try to look up what __d() does and I get this from the docs: __d Allows you to override the current domain for a single message lookup. Clear as mud. No explanation of what's meant by domain or message. Are we talking about dotcoms here, or a set of values? The latter, I assume, but I can only imagine how many non-English speakers scratch their head til it bleeds after reading that. And still I'm really not sure what __d() does. I'm sorry if this reads very negatively, and I greatly appreciate the work done by the CakePHP teams and volunteers, but I'm sure Cake would be adopted a lot more widely if it was friendlier to novices (I'm certainly not a PHP novice, but I'm new to Cake). 99% of the tutorials out there are written for the last version of Cake, and don't work for Cake 2 (no doubt they can easily be adapted for Cake 2, but for a novice, they should work 100% when copying and pasting... A novice can't be expected to adapt someone else's code, just when they're learning it). I think I would advise noobs to start off with Cake 1, as there's a lot more stuff out there for it, and it's very hard to figure out what's going on in Cake 2, especially if you wander astray for a moment, and Google won't help much either. I know no one buys a book to learn this stuff anymore, but even if you wanted to, you couldn't. Just some initial thoughts, I hope it starts to get better... Glen. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
