struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "joni santoso" <>
Subject Re: The best way for learning struts (stupid question)
Date Thu, 16 Jan 2003 06:58:42 GMT
On Wed, 15 Jan 2003 22:56:31 -0600
  "Hookom, Jacob John" <> wrote:
>I agree with Andrew about jumping into it.  Really 
>though, you should become familiar with J2EE Design 
>Patterns, there are quite a few books out there to pick 
>up.  Once you know the patterns, then things just come 
>easier when you see people talk about Service Layers and 
>MVC, etc.

Actually, I read and tried some tutorials out there 
already. Something like creating an ActionForm and Action. 
It's just then I realised I should learn it (read : new 
technology) in a systematic manner. (What do you think?)

I think up writing a very obvious and ubiquitous 
application : input data, display it, give a link/button 
for editing/deleting, and page it using DB and XML. 

This is easy if done using JSP/Servlet or other Web dev 

Can anyone suggest me how to do that using Struts in a 
simple language :).

>One good practice to look at right away is the concept of 
>layering in your application.  Struts describes the 
>Model, View, and Controller (see documentation for 
>clarification).  But if you are writing applications with 
>hopes of easy maintainability, then you need to add 
>additional application or service layers.
>That means that your Action really doesn't have any 
>"logic" in it persay, but you call methods on another 
>layer or object that handles logic for you.  One of the 
>best ways to implement layers is via the Bridge Pattern 
>with the Factory Pattern where you do up interfaces that 
>describe the layer or service.

does this have anything to do with Desing Patterns? Now, I 
wonder too how to determine that this framework employing 
which DP? And, what DP I should use to tackle a certain 

>An example would be writing a persistence layer that 
>stores your Employee Objects.  Well, what if you want to 
>store Employee data in XML files initially, but switch to 
>a DB later?  By layering your application, you can swap 
>the XML implementation with a DB implementation without 
>changing any of your Struts code because you've isolated 
>persistence to a seperate layer.  Others will thank you 
>later by incorporating layers of logic that allow for 
>changes later (anyone who's worked with a fickle (sp) 
>client knows it's going to change about 10 times before 
>it's finalized).

Yes, I have experienced that too.

>As for Struts specific technologies, just start out with 
>Action/ActionForms and error handling.  That means first, 
>try manually checking for errors in your ActionForm 
>object or at the Action, then try dipping into the 
>Validator Libraries, which will handle validation for you 
>by isolating the logic to a seperate XML file.  The Tiles 
>technology is nice, but for me, I would rather stick with 
>straight JSTL and JSP includes.
>I hope this gives you some ideas,

Thank you
Meriahkan Hari Valentine Anda dan Ikuti Lomba Desain Kartu Eletronik dengan Tema Valentine
Ikuti Polling Pemilihan Pemenang Lomba Desain Kartu Elektronik Natal dan Tahun Baru 2003 di
KSI PlasaCom - Reuni Alumni STTTelkom 

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message