Alex Tech Adventures The webs best tutorials!

Better model design and preparation for assertions.

E-mail Print PDF
(0 votes, average 0 out of 5)
As much as this video is designed to be a preparation for the next one on ACL assertions, anyone can benefit from my techniques described here on separating business logic in models from controller and viewer.  Watch this if you are not clear on how to best utilize your models vs. controller vs.viewer.


Key notes in the presentation:
  • Move business logic code (book lister) from controller to model.  Controller is then used only for linking variables between model and view, not generating anything on its own.
  • Create a separate model dedicated to book gathering from DB and ...
  • ... a model / class for a book thus making book an object.
  • Looking at an advantage of further utilizing OOP by having each set of related data, in our case a book, as a complete object rather than a linear array.

Download source

Last Updated ( Thursday, 17 December 2009 02:27 )  
Discuss (4 posts)
Better model design and preparation for assertions.
Jan 03 2010 10:51:15
Hi there, I do your tutorial step by step and everything seems to be ok till comments. I try my codo looks like yours and it is but I have "Message: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound"

I read that it is connected rather with PDO (I use MAMP on Mac) than with Zend code itself. Do you have any idea how to manage with that problem?

PS. Great tutorial. I do realy like starting day with your code
#301
Re:Better model design and preparation for assertions.
Jan 13 2010 18:38:12
I don't think I can tell you much more than what's on forums already but i noticed it could be related to old php version as someone said "this appears to be not an issue in php 5.2.8"
#320
solved: db schema
Jan 14 2010 16:42:01
I realized I had the old schema so I got the updates from the videos. Cheers.
#323
Better model design and preparation for assertions.
Feb 12 2010 14:51:51
Hi Alex,
Just got to see this video, nice one.
About leaving the errors to my point of view it gets a bit confusing sometimes ...
thx again
#537

You need to login or register to post comments.
Discuss...
You are here: Home Development Zend Framework Better model design and preparation for assertions.

Statistics

Members : 571
Content : 36
Web Links : 1
Content View Hits : 40316

Who's Online

We have 36 guests online