A template for the default view has already been created. This is going to be customised very simply to just output the entries using "print_r" (it is an exercise for the reader to make a decent layout).
Scorpio Framework - {$oMap->getDescription()} guestbook
{$entries|printr}
And the form:
Scorpio Framework - {$oMap->getDescription()} post to guestbook
{if $oModel->getErrorMessage()}Error: {$oModel->getErrorMessage()}{/if}
Now all that is left to do is update the controllerMap file in the base site or dev.base site so that you can access the guestbook and to then preview it in your browser.
You should be able to list and then post to the guestbook, and had the error messages echo'd out to the posting page.
This is all very simple and a lot more could be done (e.g. make it using ajax, better error checking etc.) but this should give a good idea of how you can very rapidly prototype components for a site and how you can re-use the logic in different contexts.
Posted by: Dave Redfern (Writer), in Tutorials on 12 Apr 2008 @ 13:51
Tags: dao, generator, guestbook, mvcgenerator, scorpio, tutorial,
Contents:
Related Articles
This
work is licenced under a
Creative Commons Licence.