Subject: Re: Struts 1.1 DB sample post
From: Vic C <[EMAIL PROTECTED]>
 ===
Name removed (from a private post):
"I saw your email on the struts-user list.  I do have some issues with 
the pet store example.  If I want to search on some objects, but not 
return all the details, what happens? How do you do this?  Hopefully 
this webPIM has some examples of this.  At this point, for the small 
applications that I'm doing, *I'm thinking that the sql tags in the jslt 
might be the best bet*. Well see ..."

Using JSTL is a good idea in adition to HTML tags. But USING SQL TAGS IS 
A VERY BAD IDEA AND YOU WILL LOSE PRODUCTIVITY. By doing things right 
and by using MVC you will save lot of time and lots of effort, if you do 
it right.
In this case you should allways separate the data layer or the model 
from the rest of the application. Yes, do look at my practical 
production ready and simple design. There is just a bean and a DAO, and 
it is unit testable and simple and it works and needs very little 
coding. Just IDE based getters and setters.
JSP pages could be downloaded by users in some cases and you do not want 
the hackers to see your sql. Also, any changes to the db are reflected. 
Also with SQL tags it gets complex to do E/R and Master Detail 
relationship, they have to be coded in presentation. With a bean, the 
relationships are hidden behind the bean, as are any complex joins.
And what if the presentation layer changes?
Or you want to implement SOAP?
Or you want to unit test?
MVC is superior. (I am not big on Dynabeans because they are not as 
clear Model separation).
Now PetStore is not realistic and is a technology in search of a 
problem: http://www.softwarereality.com/programming/ejb/index.jsp
I would argue even against CASE tools (as proposed by Java Server Faces) 
as inpractical. As soon as you have problems you have to go back to IDE 
to solve it.
Folks, I am out there consulting on project recovery. Some clients that 
do PetStore just say forget this and go to .NOT vaporware. At least some 
are looking at SQL tags, but they are both bad MVC. KISS when designing! 
Bean w/ DAO! That is why I go out of my way to demo a simplest possible 
Master Detail DB application with tiles, menu and validation.
Only newbies design complex design.
my 2 c.
Vic


> Hi Vic ,
>               Can you send me the password to the zip file
> regards,
> Sudhir
> ----- Original Message -----
> From: "Struts Newsgroup" <@[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, May 23, 2002 00:25
> Subject: Struts 1.1 DB sample post
> 
> 
> 
>>Subject: Struts 1.1 DB sample post
>>From: Vic C <[EMAIL PROTECTED]>
>> ===
>>I have posted a upgraded Struts 1.1 DB sample at StrutsPlus.com. (also
>>the host of news.baseBeans.com news groups)
>>
>>Changes to the webPIM app include:
>>
>>It uses new Struts jars, with patches to do Validation and multi row
>>validation. This is the latest possible ALL inclusive Struts jars with
>>working validation patches. (Muti row updates and master detail
>>processing is typically on any Web App.)(Vote for patche 8798  at
>>http://nagoya.apache.org/bugzilla/query.cgi#chart )
>>
>>The update is now fixed to automatically generate SQL update, insert,
>>etc.  string based on rows and columns, using meta data. It is a good
>>DAO practice.
>>
>>It also includes the soft copy of the 9 month old FastTrack book which
>>is no longer available. (I still own all the copyrights and you can't
>>reproduce it or take it to Kinko's)
>>
>>As always it uses Struts Menu (navigation is the most often needed
>>componetn) and Tiles (which demos how to use Layout), Options
>>collection, MasterDetail, CRUD, etc. and most things needed to build a
>>realistic webApp.
>>This is the only Struts DB or a full working Struts 1.1 post beta sample
>>I know of.
>>
>>This is (not the latest, I have to make a $ somehow) version  I do my
>>public training on (I have been booked solid for months doing Struts
>>project recovery and mentoring, very cool) Next patch will be private to
>>http://www.basebeans.com:8081/mailman/listinfo/mvc-programmers
>>and include http://edhill.its.uiowa.edu/display/ and demo of the drop
>>down Struts menu, and other cool thing. This same list is where you can
>>keep track of upcoming classes, like the one in Europe in mid June. You
>>mised a NY and LA class already.)
>>
>>There are some 5 new Struts books coming out, including Ted and Craigs,
>>O Rieley, etc. I encourage new authors to do a case study of a running
>>Struts application designs, things that do master detail processing,
>>and not theoretical designs that only work in lab conditions, but
>>practical designs. Mostly because I think " that which is complex is
>>useless and the only practical things are simple." (Dr. Kalisnikov) So
>>in order for Java to get better, it is ok to show some scalability isses
>>with EQL relative to SQL or Stored Procedures.
>>
>>The zip file is password protected, the password is the 2 letter
>>initials of the person quoted in Chapter 1 of FastTrack to Struts manual:
>>
>>"Nothing in this world can take the place of persistence. Talent will
>>not; nothing is more common than unsuccessful people with talent. Genius
>>will not; un-rewarded genius is almost a proverb. Education will not;
>>the world is full of educated derelicts."
>>
>>Let me know if you have a question on a design I implemented or if you
>>can't deploy it or have comments. (I use it with CodeGuide IDE, Resin
>>app server, Linux, JDK1.4, and DBExpers PostGreSQL, but it works on
>>anything, trust me)
>>
>>Vic
>>
>>
>>--
>>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]>
> 


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

Reply via email to