Jump to content
Larry Ullman's Book Forums

What Part Of Code In Ch5 Is Part Of The Cms Project?

Recommended Posts

Hi Larry,


In chapter 4 you started a CMS project that I am eager to learn more about. I was introduced to genereat scripts with the amazing zii module.


Then, in chapter 5 you discuss various things regarding models, you also show by real world example code how it can be done.


Now my question: Shall I implement all code snippets in ch5 in the scripts generated in ch4 in order to follow you towards the end of the CMS project?


Maybe you could be clearer about when you show code that could/should be omplemented in the CMS projects and not.


Great book, anyway!

Link to post
Share on other sites

The YII book requires sound knowledge of PHP in general. You should be able to figure out the requirements for yourself for a book on this level. A this point, code is not snippets or chunks of code, but a modular set of classes tied together by the Model-View-Controller programming pattern. I suggest you re-read some of the theory about that, as it should be pretty obvious what's missing with the right knowledge.


Get the basic principles down before anything else. You cannot really use software like YII without those.

  • Upvote 1
Link to post
Share on other sites

Thanks for the reply. I understand that most of the code (or whatever you prefer to call it) might fit in i in Larrys CMS project. But since I haven't got any detaild info about the CMS yet, I am not sure what code will end up in the final result of the project. If I remove code like some suggested snippets is doing in ch5, will MY version of the CMNS project be able to work later on?


Sorry but I am not familiar with yii yet, this Is why I bought this book. Also I havent clearly understand OOP yet even thoug iäve been struggeling with class Pet and other examples througout Larrys earlier books.


I am a slow learner especialy from books, but when I implemented Larrys procedural CMS in his earlier books and then started to make changes myself, I learnd it, Maybe something is wrong with me, but this is the way I things.


Maybe Larry could answer this?

Link to post
Share on other sites

The real answer is that I'm not sure yet myself. I'm using the CMS example throughout the book because it's a useful example with lots of possibilities for real-world discussions. But an actual CMS will be implemented in one of the final chapters, and that code will undoubtedly be somewhat different from that discussed to that point. Could be 10% different or 25%.

Link to post
Share on other sites

Thanks for your answer Larry. I am just spoiled with your other books where it is more clear. My favorite way of learning is downloding your scripts and play with them while reading the book. I actualy found your ch5 scripts and downloaded them. So now my battle to understand OOP and MVC continue. I also look back to your new "PHP Advanced.." book in order to, like you say, "hammer it home".

Link to post
Share on other sites

You're welcome. Something that I haven't perhaps made clear enough with this book involves how books are written. With a traditional book, I write the first draft, which goes through the editing process, and then I rewrite the entire book before it's published. Normally the first draft results in things like: Oh, in Chapter 10, I do this, so I need to make sure Ch 5 does this. That will probably happen to some degree with this book, too: once I've written the whole thing, I'll go back and tweak a bit.


Let us know if you have more questions.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...