Apologies for the somewhat newbie-esque nature of this post, but I hope 
you can clear up some confusion:

I'm developing my first struts application.  In theory it's very simple 
(at least, I could write in in no time in perl!).  The key elements are:

- User creation / login / session tracking
- Logged in user can edit a tree-like structure stored in a mySQL 
database.

I'm comfortable(ish) with the role of the controller servlet, and the 
presentation JSP custom tags all look easy to use.  I can even cope with 
form beans to validate and pass around form submission data.  My 
confusion is in how to structure the business-logic side of the 
application.

I *think* that my action servlets should use a "business-logic 
javabean", rather than doing any database manipulation themselves.  Here 
I am struggling with the concept of a javabean, since every tutorial I 
come across talks about them in the context of GUI development.

Am I right in thinking that it's just a normal class that follows some 
naming conventions?  In which case, should I have a class which 
represents a 'User' and a class that represents my 'Database', which has 
an addUser(myUser) method?  I imagine the Database class to be a 
front-end to the SQL.

Any thoughts would be appreciated, particularly if I'm way off the mark!


   Ric Searle
   Web Application Developer
   --
   Dialogue Communications Ltd, Sheffield, UK

   http://www.dialogue.co.uk
   +44 (0) 114 221 0307


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

Reply via email to