One good practice (for everyone) it to use list backed beans or collection backed bean.

#1. When you use mutlirow, beans need to iterate (Collection) so your design has to have it anyway.
#2. You can more easily change the DAO implementation of the DAO interface, if you only use it as a list/collection. If your DAO proves not scalable in real production, this is very nice.
#3. You can get SQL data, or XML, or MQ, or CORBA, etc, and just put it in the list via your DAO.
#4. You can create a prototype by just hard coding a list when you declare it (List l = {Bush, President}, {Collin, General};) , and not implement the DAO until later in the project. Or teach Struts, without going into model. But if you want to go model later, most DAO's return a list/collection. Did that even make sense?


So consider using list/collection based beans. Ex:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/bP/WEB-INF/src/war/org/apache/scaffoldingLib/base
Note that I use iBatis.com DAO, a good and fast SQL based DAO.

2nd, consider moving up lessons on Tiles, Menu, etc. I found success on projects when presentation was done up front as a prototype with action just doing nothing but returning "success" to a tile. And the action being called from a struts menu.

3rd consider teaching JSTL for tags.

But I repeat, Excellent!

I hope that we get a lot less newbie questions on the list thanks to Rick, eveyone, even old hats should take it.

.V

ps: Rick, I will make sure you get a pass to see/hear Ted Husted's live presentation via WebCast/Webex this Saturday.

pps: I still think RowSet is best practice, but list/collection is a veery, very good practice and should work for most cases.



Rick Reumann wrote:
On Tue, 11 Mar 2003 06:49:54 -0500
Vic Cekvenich <[EMAIL PROTECTED]> wrote:


Excellent!!!

I will take the tutorial.
I am wondering what are you doing for your Data Base, is it JDBC or something else.


Thank you Vic.

Actually since the lessons are very basic they don't even really touch
the Model layer. They stop with a simple dummy call to service methods
like:

EmployeeDTO insertEmployee( EmployeeDTO employee ) { return employee; }
My goal eventually is to build up to some model layer
approaches on Database connectivity etc, but of course would have to run
that stuff by you gurus :) as I'm still very weak in that area myself.


Tentative lessons I'd like to see:

Lesson IV -
   Tiles
   internationalization

Lesson V -
Accessing your model layer ( proper use of factories, services, DAOs
etc.) nested tags


It would be cool if someone wanted to create any of the above lessons
following the same pattern of dealing with inserting/updating an
employee. If each lesson follows the same functionality (with just added
components/features) it makes it much easier for a new person to follow.



Struttin' with Struts:

http://www.reumann.net/do/struts/main







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



Reply via email to