Thanks
Akshay
At 03:25 PM 1/10/2003 +1100, you wrote:
On Fri, 10 Jan 2003 14:18, you wrote: > Thanks to all the responses that came in today. > > I have already read the Turbine docs and do understand the details of > the system flow. My question was more on the design approach. Anyway, > what I do conclude now is that let Action classes come into play only > when there has been a form submit. and screen class handle the view > code.Yes. Typical Action classes process the form data and perform inserts and updates on the database. Your Screen classes should never need to modify the database. Typical Screen classes perform security checks and set up the context for the view templates. This is known as the "push" model. Another approach is the "pull model" using the Turbine Pull Service: http://jakarta.apache.org/turbine/turbine-22/pullmodel.html http://jakarta.apache.org/turbine/turbine-22/services/pull-service.html In the pull model, Screen classes are generally only used to perform security checks, _not_ to set up the context. A typical pull tool is used like so: --BACK END-- pullTool <-- service (abstracts access to database) <-- database ------------ --TEMPLATE-- #set ($modelObjectOne = $pullTool.modelObjectOne) #set ($modelObjectTwo = $pullTool.modelObjectTwo) ... #foreach ($item in $modelObjectOne) ... #end This is your $modelObjectTwo ------------ In both push and pull, it is generally best to put much of your logic within a Turbine Service with a well defined interface. This will allow you to call the methods of your service from any action, screen or pull tool within your application. Hope that helps, -- Rodney -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
