Jon,

I've read your document on the Pull MVC model and have been experimenting
with this method, and it is great in terms of breaking the dependency
between screens and classes.

However there is one issue: error handling.  Using the old method, if an
exception is thrown in a doBuildTemplate(), it is easy to catch and the
error handling code can direct the user to a particular screen to report the
error.  Using the Pull MVC model, what do you do when your template.vm calls
your PullTool and it throws an exception?

Thanks,
-Myron

> -----Original Message-----
> From: Jon Stevens [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 14, 2001 4:08 PM
> To: Turbine-user
> Subject: Re: Reasons For Action Classes
>
>

<SNIP>

>
> You create a PullTool which puts an object into the Context. This
> object has
> the ability to execute code which would be the results of the
> tables as say
> a Vector. If you use Torque, it makes it even easier since the BO's are
> created for you.
>
> In other words, you have TableA.java. TableAPeer.java will return
> a list of
> TableA objects in the doSelect() method. You then write a Pull
> Tool and add
> it to the context through the configuration in the TR.props file.
>
> #set ( $tableData = $tool.TableA)
> #foreach ( $tableRow in $tableData )
> <tr><td>$tableRow.Column</td></tr>
> #end
>
> This way, your template is not tied to any code in order to place
> the table
> data into the context. Instead it is retrieved directly through the $tool.
> The nice thing is that the $tool can do things like cache the data behind
> the scenes using the Global Cache Service...
>
> -jon


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to