RE: DAO or ... ? [Scanned for known viruses]

2002-10-15 Thread Kevin . Bedell





Not sure - I didn't really look at that in the design. I liked how this
approach allowed me to modify the form bean and/or the Value Object without
having to make any changes to the Action class.

I was trying to create an instructive example, not so much create the
ultimate design. We had covered DynaActionForms elsewhere and I didn't want
to do too much at once. The real goal was definition of the facade and
model components.

The biggest value is using this pattern to define a clean break between the
Action class and the Model components - i.e., the facade in front of the
web service. By doing this, you create a design where changing the back-end
system - a little or a lot - has little to no effect on the Action class.

I do like your idea of a reusable class. Expecially if I had a bunch of
forms to process.





Dan Cancro <[EMAIL PROTECTED]> on 10/15/2002 02:47:59 PM

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:"'Struts Users Mailing List'" <[EMAIL PROTECTED]>
cc:     (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:RE: DAO or ... ? [Scanned for known viruses]


Would it better/worse to move the getValueObject() method out of
CustomerForm.java, so you could use DynaActionForms and not have to write
CustomerForm.java?  Maybe it could go in a reusable class that knows how to
get various ValueObjects from various DynaActionForms.

Thanks,
Dan

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 11:13 AM
> To: Struts Users Mailing List
> Subject: RE: DAO or ... ? [Scanned for known viruses]
>
>
>
>
>
>
> James -
>
> I've attached a few files from my upcoming book Struts Kick Start that
> provide a basic design pattern that sounds like it may be
> similar to what
> your describing.
>
> What I do is:
>
>  - Create a Value Object that encapsulates data communicated
> with the Model
> component.
>
>  - Create a facade class that accepts and returns value
> objects through
> 'business methods'. By defining the facade to work at a
> 'business method'
> level, it helps keep any code related to a particular
> persistence layer or
> back-end system out of the Action class. This also addresses
> the issues you
> described of 'designing to test' - the clean seperation
> between the Action
> class and the Model components that the Facade provides
> simplifies testing.
>
>  - Create the form bean to provide set/get methods that also
> accept and
> return value objects - this greatly simplifies the Action class and
> isolates it from changes.
>
> The Action class (a bit simplified - I've taken out detailed
> comments and
> exception handling) goes something like:
>
>   // cast the form bean
>   CustomerForm cf = (CustomerForm) form;
>
>   // Create a facade to interface to the back-end system
>   CustomerWSFacade facade = new CustomerWSFacade();
>
>   // Extract the value object from the form bean
>   CustomerValueObject cvo = cf.getValueObject();
>
>   // Pass the value object to the facade. It returns an
> update value object
>   cvo = facade.addressChange( cvo );
>
>   // Use the returned value object to update the values
> in the form bean.
>   cf.setValueObject(cvo);
>
> These particular classes come from the chapter on providing
> integration
> with Axis for Web Services. Another chapter uses the identical set of
> classes to communicate with JBoss using a Session Bean - all I did was
> write a different facade class. The point of this was to demonstrate a
> design that made it very simple to perform maintenance or
> changes on the
> back-end or persistence layer.
>
>
>
> Regarding testing - I'd recommend you take a look at the
> StrutsTestCase
> project at sourceforge - it provides some great templates for
> both JUnit
> and Cactus tests that are designed for Struts. Makes
> JUnit/Cactus testing
> pretty straightforward. A copy of this and detailed
> directions also come
> with the book.
>
>   http://strutstestcase.sourceforge.net/
>
>
> Best of luck -
> Kevin
>
>
> Author, Struts Kick Start
>
> (See attached file: customer.zip)
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> "Couball, James" <[EMAIL PROTECTED]> on
> 10/14/2002 01:19:16 PM
>
> Please respond to "Struts Users Mailing List"
><[EMAIL PROTECTED]>
>
> To:"'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
> S

RE: DAO or ... ? [Scanned for known viruses]

2002-10-15 Thread Dan Cancro

Would it better/worse to move the getValueObject() method out of
CustomerForm.java, so you could use DynaActionForms and not have to write
CustomerForm.java?  Maybe it could go in a reusable class that knows how to
get various ValueObjects from various DynaActionForms.

Thanks,
Dan

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 11:13 AM
> To: Struts Users Mailing List
> Subject: RE: DAO or ... ? [Scanned for known viruses]
> 
> 
> 
> 
> 
> 
> James -
> 
> I've attached a few files from my upcoming book Struts Kick Start that
> provide a basic design pattern that sounds like it may be 
> similar to what
> your describing.
> 
> What I do is:
> 
>  - Create a Value Object that encapsulates data communicated 
> with the Model
> component.
> 
>  - Create a facade class that accepts and returns value 
> objects through
> 'business methods'. By defining the facade to work at a 
> 'business method'
> level, it helps keep any code related to a particular 
> persistence layer or
> back-end system out of the Action class. This also addresses 
> the issues you
> described of 'designing to test' - the clean seperation 
> between the Action
> class and the Model components that the Facade provides 
> simplifies testing.
> 
>  - Create the form bean to provide set/get methods that also 
> accept and
> return value objects - this greatly simplifies the Action class and
> isolates it from changes.
> 
> The Action class (a bit simplified - I've taken out detailed 
> comments and
> exception handling) goes something like:
> 
>   // cast the form bean
>   CustomerForm cf = (CustomerForm) form;
> 
>   // Create a facade to interface to the back-end system
>   CustomerWSFacade facade = new CustomerWSFacade();
> 
>   // Extract the value object from the form bean
>   CustomerValueObject cvo = cf.getValueObject();
> 
>   // Pass the value object to the facade. It returns an 
> update value object
>   cvo = facade.addressChange( cvo );
> 
>   // Use the returned value object to update the values 
> in the form bean.
>   cf.setValueObject(cvo);
> 
> These particular classes come from the chapter on providing 
> integration
> with Axis for Web Services. Another chapter uses the identical set of
> classes to communicate with JBoss using a Session Bean - all I did was
> write a different facade class. The point of this was to demonstrate a
> design that made it very simple to perform maintenance or 
> changes on the
> back-end or persistence layer.
> 
> 
> 
> Regarding testing - I'd recommend you take a look at the 
> StrutsTestCase
> project at sourceforge - it provides some great templates for 
> both JUnit
> and Cactus tests that are designed for Struts. Makes 
> JUnit/Cactus testing
> pretty straightforward. A copy of this and detailed 
> directions also come
> with the book.
> 
>   http://strutstestcase.sourceforge.net/
> 
> 
> Best of luck -
> Kevin
> 
> 
> Author, Struts Kick Start
> 
> (See attached file: customer.zip)
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> "Couball, James" <[EMAIL PROTECTED]> on 
> 10/14/2002 01:19:16 PM
> 
> Please respond to "Struts Users Mailing List"
><[EMAIL PROTECTED]>
> 
> To:"'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
> Subject:RE: DAO or ... ?
> 
> 
> I recommend taking a look at the Session Façade pattern in 
> the Java Blue
> Prints.  No matter if you use EJBs or not, this pattern 
> encapsulates the
> ideas that Simon was mentioning.
> 
> Does anyone know the name of the more general pattern that 
> doesn't involve
> Session Beans specifically?
> 
> One of my general concerns is "design to test".  I like to be 
> able to test
> the (business/persistence) layer that the actions will call 
> independently
> of
> struts, actions, etc.  Encapsulating that layer in an API (or 
> wrapping with
> a session bean) makes this possible.
> 
> Sincerely,
> James.
> 
> > -Original Message-
> > From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 14, 2002 8:16 AM
> > To: Struts Users Mailing List
> > Subject: RE: DAO or ... ?
> >
> > But you still call the API from the action right - is this 
> not invoking
> > the
> > functionality that persists your dat

RE: [OT][OLD FOLKS ONLY][OT ECLIPSE] RE: DAO or ... ?

2002-10-15 Thread Chappell, Simon P

Thankyou. Thankyou. Thankyou.

>-Original Message-
>From: Emmanuel Boudrant [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, October 15, 2002 10:39 AM
>To: Struts Users Mailing List
>Subject: RE: [OT][OLD FOLKS ONLY][OT ECLIPSE] RE: DAO or ... ?
>
>
> 
>> Unfortunately, Eclipse uses SWT and that is not available 
>for OS X yet, but the rumour mill says
>> that they are working on it.
>
>Right, since Eclipse 2.1 mac os support will be available, 
>
>here a Mac Os build : 
>
>http://download.eclipse.org/downloads/drops/S-M1-200209201351/index.php
>
>-emmanuel
>
>___
>Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
>Yahoo! Mail : http://fr.mail.yahoo.com
>
>--
>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]>




RE: [OT][OLD FOLKS ONLY][OT ECLIPSE] RE: DAO or ... ?

2002-10-15 Thread Emmanuel Boudrant

 
> Unfortunately, Eclipse uses SWT and that is not available for OS X yet, but the 
>rumour mill says
> that they are working on it.

Right, since Eclipse 2.1 mac os support will be available, 

here a Mac Os build : 

http://download.eclipse.org/downloads/drops/S-M1-200209201351/index.php

-emmanuel

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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




RE: [OT][OLD FOLKS ONLY] RE: DAO or ... ?

2002-10-15 Thread Chappell, Simon P

I have successfully run a number of Java programs under OS X: the list includes (this 
is off the top of my head, so I might miss something):

JBoss 3.0.0
jEdit 4.0
Struts 1.0 (haven't tried 1.1 on the Mac yet, it's my home machine)
Mozilla 1.0 (not Java but runs great)
ant 1.5.1
NetBeans 3.4
HSQLDB 1.7.0

Unfortunately, Eclipse uses SWT and that is not available for OS X yet, but the rumour 
mill says that they are working on it.

Simon

>-Original Message-
>From: V. Cekvenich [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, October 15, 2002 10:23 AM
>To: [EMAIL PROTECTED]
>Subject: Re: [OT][OLD FOLKS ONLY] RE: DAO or ... ?
>
>
>I am getting a PowerBook (as soon as I have RC basicPortal out as a 
>reward to me).
>I assume you are runing Struts, maybe Eclipse, Resin, pgSQL, 
>OpenOffice, 
>Mozilla are they all OK with Mac VM?
>
>.V
>
>Chappell, Simon P wrote:
>> Apple ][ ... my first dream machine.
>> Commodore Pet 8000 ... my second dream machine.
>> 
>> I never owned a dream machine until last year when I finally 
>got a dual processor Mac running OS X. Now, that's a dream machine!
>> 
>> Anyone remember "Your Sinclair" magazine? Man, I copied a 
>ton of listings out of that thing.
>> 
>> Simon
>> 
>> 
>>>-Original Message-----
>>>From: John Owen [mailto:[EMAIL PROTECTED]]
>>>Sent: Tuesday, October 15, 2002 9:01 AM
>>>To: Struts Users Mailing List
>>>Subject: Re: DAO or ... ?
>>>
>>>
>>>Being 8 years old when I did this for my Apple II (using 
>>>Compute! and Nibble
>>>magazines), I can't say that I remember patterns. ;)
>>>- Original Message -
>>>From: "Dan Trevino" <[EMAIL PROTECTED]>
>>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>>Sent: Tuesday, October 15, 2002 5:08 AM
>>>Subject: RE: DAO or ... ?
>>>
>>>
>>>
>>>>I remember learning about patterns while programming my 
>Sinclair ZX81
>>>>and copying programs out of Compute! magazine for my C64.  LOL.
>>>>
>>>>On Mon, 2002-10-14 at 16:02, Jerry Jalenak wrote:
>>>>
>>>>>You guys have it lucky to even know what a pattern is.  I 
>>>>
>>>graduated with
>>>a
>>>
>>>>>C.S. degree in 1983 - object oriented programming barely 
>>>>
>>>existed then,
>>>let
>>>
>>>>>alone taught.  Matter of fact we were required to learn 
>>>>
>>>IBM Assembler,
>>>and
>>>
>>>>>either COBOL or PL/1 as a graduation requirement!  If I 
>>>>
>>>remember right,
>>>my
>>>
>>>>>"Software Engineering" class dealt with writing a basic 
>>>>
>>>compiler for a
>>>
>>>>>COBOL-type language (written in assembler, or course).  
>>>>
>>>You ought to be
>>>
>>>>>where I am trying to play catch-up on all of this Java / 
>>>>
>>>web / struts /
>>>
>>>
>>>>>stuff while trying to deliver projects on time and budget!
>>>>>
>>>>>Jerry
>>>>>
>>>>>
>>>>>>-Original Message-
>>>>>>From: John Owen [mailto:[EMAIL PROTECTED]]
>>>>>>Sent: Monday, October 14, 2002 2:45 PM
>>>>>>To: Struts Users Mailing List
>>>>>>Subject: Re: DAO or ... ?
>>>>>>
>>>>>>
>>>>>>We were taught algorithms and finite state machines, but I
>>>>>>don't remember
>>>>>>any design pattern coverage. I graduated in 1994 and other
>>>>>>than that, they
>>>>>>perfectly prepared me for my future as a developer. We
>>>>>>covered many software
>>>>>>design principles in my Software Engineering classes, but the
>>>>>>memory is so
>>>>>>vague that I can't recall if anything was categorized 
>>>>>
>>>into patterns.
>>>
>>>>>>- Original Message -
>>>>>>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>>>>>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>>>>>Sent: Monday, October 14, 2002 2:33 PM
>>>>>>Subject: RE: DAO or ... ?
>>>>>>
>>>>>>
>>>>>>I have no idea whethe

Re: [OT][OLD FOLKS ONLY] RE: DAO or ... ?

2002-10-15 Thread V. Cekvenich

I am getting a PowerBook (as soon as I have RC basicPortal out as a 
reward to me).
I assume you are runing Struts, maybe Eclipse, Resin, pgSQL, OpenOffice, 
Mozilla are they all OK with Mac VM?

.V

Chappell, Simon P wrote:
> Apple ][ ... my first dream machine.
> Commodore Pet 8000 ... my second dream machine.
> 
> I never owned a dream machine until last year when I finally got a dual processor 
>Mac running OS X. Now, that's a dream machine!
> 
> Anyone remember "Your Sinclair" magazine? Man, I copied a ton of listings out of 
>that thing.
> 
> Simon
> 
> 
>>-Original Message-
>>From: John Owen [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, October 15, 2002 9:01 AM
>>To: Struts Users Mailing List
>>Subject: Re: DAO or ... ?
>>
>>
>>Being 8 years old when I did this for my Apple II (using 
>>Compute! and Nibble
>>magazines), I can't say that I remember patterns. ;)
>>- Original Message -
>>From: "Dan Trevino" <[EMAIL PROTECTED]>
>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>Sent: Tuesday, October 15, 2002 5:08 AM
>>Subject: RE: DAO or ... ?
>>
>>
>>
>>>I remember learning about patterns while programming my Sinclair ZX81
>>>and copying programs out of Compute! magazine for my C64.  LOL.
>>>
>>>On Mon, 2002-10-14 at 16:02, Jerry Jalenak wrote:
>>>
>>>>You guys have it lucky to even know what a pattern is.  I 
>>>
>>graduated with
>>a
>>
>>>>C.S. degree in 1983 - object oriented programming barely 
>>>
>>existed then,
>>let
>>
>>>>alone taught.  Matter of fact we were required to learn 
>>>
>>IBM Assembler,
>>and
>>
>>>>either COBOL or PL/1 as a graduation requirement!  If I 
>>>
>>remember right,
>>my
>>
>>>>"Software Engineering" class dealt with writing a basic 
>>>
>>compiler for a
>>
>>>>COBOL-type language (written in assembler, or course).  
>>>
>>You ought to be
>>
>>>>where I am trying to play catch-up on all of this Java / 
>>>
>>web / struts /
>>
>>
>>>>stuff while trying to deliver projects on time and budget!
>>>>
>>>>Jerry
>>>>
>>>>
>>>>>-Original Message-
>>>>>From: John Owen [mailto:[EMAIL PROTECTED]]
>>>>>Sent: Monday, October 14, 2002 2:45 PM
>>>>>To: Struts Users Mailing List
>>>>>Subject: Re: DAO or ... ?
>>>>>
>>>>>
>>>>>We were taught algorithms and finite state machines, but I
>>>>>don't remember
>>>>>any design pattern coverage. I graduated in 1994 and other
>>>>>than that, they
>>>>>perfectly prepared me for my future as a developer. We
>>>>>covered many software
>>>>>design principles in my Software Engineering classes, but the
>>>>>memory is so
>>>>>vague that I can't recall if anything was categorized 
>>>>
>>into patterns.
>>
>>>>>- Original Message -
>>>>>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>>>>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>>>>Sent: Monday, October 14, 2002 2:33 PM
>>>>>Subject: RE: DAO or ... ?
>>>>>
>>>>>
>>>>>I have no idea whether they teach patterns in University. I
>>>>>graduated in
>>>>>1990 and we didn't even have the Internet back then let alone
>>>>>Patterns!
>>>>>
>>>>>Jacob: How about it my friend? Do they teach patterns in the UW?
>>>>>
>>>>>Simon
>>>>>
>>>>>
>>>>>>-Original Message-
>>>>>>From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
>>>>>>Sent: Monday, October 14, 2002 2:29 PM
>>>>>>To: 'Struts Users Mailing List'
>>>>>>Subject: RE: DAO or ... ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>>It's called experience  it's why they pay us old guys
>>>>>>
>>>>>>more than you
>>>>>>young bucks! ;-)
>>>>>>
>>>>>>LOL!  It's also called being absolutely CERTAIN that someone
>>>>>>has solv

Re: DAO or ... ? [Scanned for known viruses]

2002-10-15 Thread Kevin . Bedell




Exactly.





"V. Cekvenich" <[EMAIL PROTECTED]>@main.gmane.org> on 10/15/2002
11:20:55 AM

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

Sent by:news <[EMAIL PROTECTED]>


To:[EMAIL PROTECTED]
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:Re: DAO or ... ? [Scanned for known viruses]


OK, so your formBean would be called via 
>
> Model 1? I assume you're referring to the practice of posting directly to
a
> jsp page instead of through an Action servlet - the "model 1" that was
> proposed in the original JSP 0.92 spec.
>
> (For those who haven't reviewed it, the JSP 0.92 specificiation was the
> first place I believe the terms 'Model 1' and 'Model 2' originated. At
> least that's the earliest I remember seeing it. Here's a link to an old
> copy of it: http://www.kirkdorffer.com/jspspecs/jsp092.html . It still
> provides one of the best explanations of the difference between Model 1
and
> Model 2 that I've come across.).
>
> Not sure. I'd suppose you'd create a bean (and access it using a classic
> jsp:usebean) that is essentially your 'Model' component. This would have
to
> be the equivalent of the 'Form Bean'.
>
> You set all the properties on this 'form bean' (using a scriptlet
> potentially) and then execute some method on it that would invoke this
> whole back-end process. (there are other potential ways of doing it -
this
> is just one.) The facade and the other statements would be invoked from
> your bean. Once this processing was done, you could either extract
> properties from the same bean to populate the 'View', or you could
extract
> another bean (that was a Value Object) from the first bean and drive the
> display results from it.
>
> This actually demonstrates the strength of Struts - the model 1 solution
is
> more complex lends itself to embedding scriptlets faster. Also, a big
> problem is what do you do when things go wrong communicating to the back
> end? In Model 1, you have to trap the error and do a jsp:forward or just
> put conditional processing in the JSP directly - using Struts you simply
> catch the exception and forward to a different ActionForward.
>
> Kevin
>
>
>
>
>
>
>
>
>
> "V. Cekvenich" <[EMAIL PROTECTED]>@main.gmane.org> on 10/15/2002
> 08:43:46 AM
>
> Please respond to "Struts Users Mailing List"
><[EMAIL PROTECTED]>
>
> Sent by:news <[EMAIL PROTECTED]>
>
>
> To:[EMAIL PROTECTED]
> cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
> Subject:Re: DAO or ... ? [Scanned for known viruses]
>
>
> Q: How would you re-use this in Model 1?
>
> .V
>
>
>
> [EMAIL PROTECTED] wrote:
>
>>
>>
>>James -
>>
>>I've attached a few files from my upcoming book Struts Kick Start that
>>provide a basic design pattern that sounds like it may be similar to what
>>your describing.
>>
>>What I do is:
>>
>> - Create a Value Object that encapsulates data communicated with the
>
> Model
>
>>component.
>>
>> - Create a facade class that accepts and returns value objects through
>>'business methods'. By defining the facade to work at a 'business method'
>>level, it helps keep any code related to a particular persistence layer
>
> or
>
>>back-end system out of the Action class. This also addresses the issues
>
> you
>
>>described of 'designing to test' - the clean seperation between the
>
> Action
>
>>class and the Model components that the Facade provides simplifies
>
> testing.
>
>> - Create the form bean to provide set/get methods that also accept and
>>return value objects - this greatly simplifies the Action class and
>>isolates it from changes.
>>
>>The Action class (a bit simplified - I've taken out detailed comments and
>>exception handling) goes something like:
>>
>>  // cast the form bean
>>  CustomerForm cf = (CustomerForm) form;
>>
>>  // Create a facade to interface to the back-end system
>>  CustomerWSFacade facade = new CustomerWSFacade();
>>
>>  // Extract the value object from the form bean
>>  CustomerValueObject cvo = cf.getValueObject();
>>
>>  // Pass the value object to the facade. It returns an update value
>
> object
>
>>  cvo = facade.addressChange( cvo );
>>
>>  // Use the returned value object to update the values in the form
>
> bean.
>
>>  cf.setValueOb

Re: DAO or ... ? [Scanned for known viruses]

2002-10-15 Thread V. Cekvenich

OK, so your formBean would be called via  
> 
> Model 1? I assume you're referring to the practice of posting directly to a
> jsp page instead of through an Action servlet - the "model 1" that was
> proposed in the original JSP 0.92 spec.
> 
> (For those who haven't reviewed it, the JSP 0.92 specificiation was the
> first place I believe the terms 'Model 1' and 'Model 2' originated. At
> least that's the earliest I remember seeing it. Here's a link to an old
> copy of it: http://www.kirkdorffer.com/jspspecs/jsp092.html . It still
> provides one of the best explanations of the difference between Model 1 and
> Model 2 that I've come across.).
> 
> Not sure. I'd suppose you'd create a bean (and access it using a classic
> jsp:usebean) that is essentially your 'Model' component. This would have to
> be the equivalent of the 'Form Bean'.
> 
> You set all the properties on this 'form bean' (using a scriptlet
> potentially) and then execute some method on it that would invoke this
> whole back-end process. (there are other potential ways of doing it - this
> is just one.) The facade and the other statements would be invoked from
> your bean. Once this processing was done, you could either extract
> properties from the same bean to populate the 'View', or you could extract
> another bean (that was a Value Object) from the first bean and drive the
> display results from it.
> 
> This actually demonstrates the strength of Struts - the model 1 solution is
> more complex lends itself to embedding scriptlets faster. Also, a big
> problem is what do you do when things go wrong communicating to the back
> end? In Model 1, you have to trap the error and do a jsp:forward or just
> put conditional processing in the JSP directly - using Struts you simply
> catch the exception and forward to a different ActionForward.
> 
> Kevin
> 
> 
> 
> 
> 
> 
> 
> 
> 
> "V. Cekvenich" <[EMAIL PROTECTED]>@main.gmane.org> on 10/15/2002
> 08:43:46 AM
> 
> Please respond to "Struts Users Mailing List"
><[EMAIL PROTECTED]>
> 
> Sent by:news <[EMAIL PROTECTED]>
> 
> 
> To:[EMAIL PROTECTED]
> cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
> Subject:Re: DAO or ... ? [Scanned for known viruses]
> 
> 
> Q: How would you re-use this in Model 1?
> 
> .V
> 
> 
> 
> [EMAIL PROTECTED] wrote:
> 
>>
>>
>>James -
>>
>>I've attached a few files from my upcoming book Struts Kick Start that
>>provide a basic design pattern that sounds like it may be similar to what
>>your describing.
>>
>>What I do is:
>>
>> - Create a Value Object that encapsulates data communicated with the
> 
> Model
> 
>>component.
>>
>> - Create a facade class that accepts and returns value objects through
>>'business methods'. By defining the facade to work at a 'business method'
>>level, it helps keep any code related to a particular persistence layer
> 
> or
> 
>>back-end system out of the Action class. This also addresses the issues
> 
> you
> 
>>described of 'designing to test' - the clean seperation between the
> 
> Action
> 
>>class and the Model components that the Facade provides simplifies
> 
> testing.
> 
>> - Create the form bean to provide set/get methods that also accept and
>>return value objects - this greatly simplifies the Action class and
>>isolates it from changes.
>>
>>The Action class (a bit simplified - I've taken out detailed comments and
>>exception handling) goes something like:
>>
>>  // cast the form bean
>>  CustomerForm cf = (CustomerForm) form;
>>
>>  // Create a facade to interface to the back-end system
>>  CustomerWSFacade facade = new CustomerWSFacade();
>>
>>  // Extract the value object from the form bean
>>  CustomerValueObject cvo = cf.getValueObject();
>>
>>  // Pass the value object to the facade. It returns an update value
> 
> object
> 
>>  cvo = facade.addressChange( cvo );
>>
>>  // Use the returned value object to update the values in the form
> 
> bean.
> 
>>  cf.setValueObject(cvo);
>>
>>These particular classes come from the chapter on providing integration
>>with Axis for Web Services. Another chapter uses the identical set of
>>classes to communicate with JBoss using a Session Bean - all I did was
>>write a different facade class. The point of this was to demonstrate a
>>

[OT][OLD FOLKS ONLY] RE: DAO or ... ?

2002-10-15 Thread Chappell, Simon P

Apple ][ ... my first dream machine.
Commodore Pet 8000 ... my second dream machine.

I never owned a dream machine until last year when I finally got a dual processor Mac 
running OS X. Now, that's a dream machine!

Anyone remember "Your Sinclair" magazine? Man, I copied a ton of listings out of that 
thing.

Simon

>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, October 15, 2002 9:01 AM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>Being 8 years old when I did this for my Apple II (using 
>Compute! and Nibble
>magazines), I can't say that I remember patterns. ;)
>- Original Message -
>From: "Dan Trevino" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Tuesday, October 15, 2002 5:08 AM
>Subject: RE: DAO or ... ?
>
>
>> I remember learning about patterns while programming my Sinclair ZX81
>> and copying programs out of Compute! magazine for my C64.  LOL.
>>
>> On Mon, 2002-10-14 at 16:02, Jerry Jalenak wrote:
>> > You guys have it lucky to even know what a pattern is.  I 
>graduated with
>a
>> > C.S. degree in 1983 - object oriented programming barely 
>existed then,
>let
>> > alone taught.  Matter of fact we were required to learn 
>IBM Assembler,
>and
>> > either COBOL or PL/1 as a graduation requirement!  If I 
>remember right,
>my
>> > "Software Engineering" class dealt with writing a basic 
>compiler for a
>> > COBOL-type language (written in assembler, or course).  
>You ought to be
>> > where I am trying to play catch-up on all of this Java / 
>web / struts /
>
>> > stuff while trying to deliver projects on time and budget!
>> >
>> > Jerry
>> >
>> > > -Original Message-
>> > > From: John Owen [mailto:[EMAIL PROTECTED]]
>> > > Sent: Monday, October 14, 2002 2:45 PM
>> > > To: Struts Users Mailing List
>> > > Subject: Re: DAO or ... ?
>> > >
>> > >
>> > > We were taught algorithms and finite state machines, but I
>> > > don't remember
>> > > any design pattern coverage. I graduated in 1994 and other
>> > > than that, they
>> > > perfectly prepared me for my future as a developer. We
>> > > covered many software
>> > > design principles in my Software Engineering classes, but the
>> > > memory is so
>> > > vague that I can't recall if anything was categorized 
>into patterns.
>> > > - Original Message -
>> > > From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>> > > Sent: Monday, October 14, 2002 2:33 PM
>> > > Subject: RE: DAO or ... ?
>> > >
>> > >
>> > > I have no idea whether they teach patterns in University. I
>> > > graduated in
>> > > 1990 and we didn't even have the Internet back then let alone
>> > > Patterns!
>> > >
>> > > Jacob: How about it my friend? Do they teach patterns in the UW?
>> > >
>> > > Simon
>> > >
>> > > >-Original Message-
>> > > >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
>> > > >Sent: Monday, October 14, 2002 2:29 PM
>> > > >To: 'Struts Users Mailing List'
>> > > >Subject: RE: DAO or ... ?
>> > > >
>> > > >
>> > > >> It's called experience  it's why they pay us old guys
>> > > >more than you
>> > > >young bucks! ;-)
>> > > >
>> > > >LOL!  It's also called being absolutely CERTAIN that someone
>> > > >has solved this
>> > > >problem before, and not going off reinventing the wheel.  As
>> > > >an aside, are
>> > > >patterns being taught in computer science?  I'm working on a
>> > > >degree and the
>> > > >senior-level course I'm taking this semester has been the
>> > > >first time I've
>> > > >seen a lecture about them.  And then he only covered 
>three (Factory,
>> > > >Abstract Factory and Singleton) and not very in depth at that.
>> > > >
>> > > >I like Applied Java Patterns by Stephen Stelting & Olav
>> > > >Maassen.  While the
>> > > >GoF book is surely timeless, I'm gues

Re: DAO or ... ? [Scanned for known viruses]

2002-10-15 Thread Kevin . Bedell




Model 1? I assume you're referring to the practice of posting directly to a
jsp page instead of through an Action servlet - the "model 1" that was
proposed in the original JSP 0.92 spec.

(For those who haven't reviewed it, the JSP 0.92 specificiation was the
first place I believe the terms 'Model 1' and 'Model 2' originated. At
least that's the earliest I remember seeing it. Here's a link to an old
copy of it: http://www.kirkdorffer.com/jspspecs/jsp092.html . It still
provides one of the best explanations of the difference between Model 1 and
Model 2 that I've come across.).

Not sure. I'd suppose you'd create a bean (and access it using a classic
jsp:usebean) that is essentially your 'Model' component. This would have to
be the equivalent of the 'Form Bean'.

You set all the properties on this 'form bean' (using a scriptlet
potentially) and then execute some method on it that would invoke this
whole back-end process. (there are other potential ways of doing it - this
is just one.) The facade and the other statements would be invoked from
your bean. Once this processing was done, you could either extract
properties from the same bean to populate the 'View', or you could extract
another bean (that was a Value Object) from the first bean and drive the
display results from it.

This actually demonstrates the strength of Struts - the model 1 solution is
more complex lends itself to embedding scriptlets faster. Also, a big
problem is what do you do when things go wrong communicating to the back
end? In Model 1, you have to trap the error and do a jsp:forward or just
put conditional processing in the JSP directly - using Struts you simply
catch the exception and forward to a different ActionForward.

Kevin









"V. Cekvenich" <[EMAIL PROTECTED]>@main.gmane.org> on 10/15/2002
08:43:46 AM

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

Sent by:news <[EMAIL PROTECTED]>


To:[EMAIL PROTECTED]
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:Re: DAO or ... ? [Scanned for known viruses]


Q: How would you re-use this in Model 1?

.V



[EMAIL PROTECTED] wrote:
>
>
>
> James -
>
> I've attached a few files from my upcoming book Struts Kick Start that
> provide a basic design pattern that sounds like it may be similar to what
> your describing.
>
> What I do is:
>
>  - Create a Value Object that encapsulates data communicated with the
Model
> component.
>
>  - Create a facade class that accepts and returns value objects through
> 'business methods'. By defining the facade to work at a 'business method'
> level, it helps keep any code related to a particular persistence layer
or
> back-end system out of the Action class. This also addresses the issues
you
> described of 'designing to test' - the clean seperation between the
Action
> class and the Model components that the Facade provides simplifies
testing.
>
>  - Create the form bean to provide set/get methods that also accept and
> return value objects - this greatly simplifies the Action class and
> isolates it from changes.
>
> The Action class (a bit simplified - I've taken out detailed comments and
> exception handling) goes something like:
>
>   // cast the form bean
>   CustomerForm cf = (CustomerForm) form;
>
>   // Create a facade to interface to the back-end system
>   CustomerWSFacade facade = new CustomerWSFacade();
>
>   // Extract the value object from the form bean
>   CustomerValueObject cvo = cf.getValueObject();
>
>   // Pass the value object to the facade. It returns an update value
object
>   cvo = facade.addressChange( cvo );
>
>   // Use the returned value object to update the values in the form
bean.
>   cf.setValueObject(cvo);
>
> These particular classes come from the chapter on providing integration
> with Axis for Web Services. Another chapter uses the identical set of
> classes to communicate with JBoss using a Session Bean - all I did was
> write a different facade class. The point of this was to demonstrate a
> design that made it very simple to perform maintenance or changes on the
> back-end or persistence layer.
>
>
>
> Regarding testing - I'd recommend you take a look at the StrutsTestCase
> project at sourceforge - it provides some great templates for both JUnit
> and Cactus tests that are designed for Struts. Makes JUnit/Cactus testing
> pretty straightforward. A copy of this and detailed directions also come
> with the book.
>
>   http://strutstestcase.sourceforge.net/
>
>
> Best of luck -
> Kevin
>
>
> Author, Struts Kick Start
>
> (See attac

Re: DAO or ... ?

2002-10-15 Thread John Owen

Being 8 years old when I did this for my Apple II (using Compute! and Nibble
magazines), I can't say that I remember patterns. ;)
- Original Message -
From: "Dan Trevino" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, October 15, 2002 5:08 AM
Subject: RE: DAO or ... ?


> I remember learning about patterns while programming my Sinclair ZX81
> and copying programs out of Compute! magazine for my C64.  LOL.
>
> On Mon, 2002-10-14 at 16:02, Jerry Jalenak wrote:
> > You guys have it lucky to even know what a pattern is.  I graduated with
a
> > C.S. degree in 1983 - object oriented programming barely existed then,
let
> > alone taught.  Matter of fact we were required to learn IBM Assembler,
and
> > either COBOL or PL/1 as a graduation requirement!  If I remember right,
my
> > "Software Engineering" class dealt with writing a basic compiler for a
> > COBOL-type language (written in assembler, or course).  You ought to be
> > where I am trying to play catch-up on all of this Java / web / struts /

> > stuff while trying to deliver projects on time and budget!
> >
> > Jerry
> >
> > > -Original Message-
> > > From: John Owen [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, October 14, 2002 2:45 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: DAO or ... ?
> > >
> > >
> > > We were taught algorithms and finite state machines, but I
> > > don't remember
> > > any design pattern coverage. I graduated in 1994 and other
> > > than that, they
> > > perfectly prepared me for my future as a developer. We
> > > covered many software
> > > design principles in my Software Engineering classes, but the
> > > memory is so
> > > vague that I can't recall if anything was categorized into patterns.
> > > - Original Message -
> > > From: "Chappell, Simon P" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > Sent: Monday, October 14, 2002 2:33 PM
> > > Subject: RE: DAO or ... ?
> > >
> > >
> > > I have no idea whether they teach patterns in University. I
> > > graduated in
> > > 1990 and we didn't even have the Internet back then let alone
> > > Patterns!
> > >
> > > Jacob: How about it my friend? Do they teach patterns in the UW?
> > >
> > > Simon
> > >
> > > >-Original Message-
> > > >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> > > >Sent: Monday, October 14, 2002 2:29 PM
> > > >To: 'Struts Users Mailing List'
> > > >Subject: RE: DAO or ... ?
> > > >
> > > >
> > > >> It's called experience  it's why they pay us old guys
> > > >more than you
> > > >young bucks! ;-)
> > > >
> > > >LOL!  It's also called being absolutely CERTAIN that someone
> > > >has solved this
> > > >problem before, and not going off reinventing the wheel.  As
> > > >an aside, are
> > > >patterns being taught in computer science?  I'm working on a
> > > >degree and the
> > > >senior-level course I'm taking this semester has been the
> > > >first time I've
> > > >seen a lecture about them.  And then he only covered three (Factory,
> > > >Abstract Factory and Singleton) and not very in depth at that.
> > > >
> > > >I like Applied Java Patterns by Stephen Stelting & Olav
> > > >Maassen.  While the
> > > >GoF book is surely timeless, I'm guessing the examples are not
> > > >written in
> > > >Java.  With Applied Java Patterns (and Core J2EE Patterns) I
> > > >can cut and
> > > >paste and have a head start on the implementation.
> > > >
> > > >--
> > > >Wendy Smoak
> > > >Applications Systems Analyst, Sr.
> > > >Arizona State University PA Information Resources Management
> > > >
> > >
> > > --
> > > 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]>
> >
> >
> > This transmission (and any information attached to it) may be
confidential and is intended solely for the use of the individual or entity
to which it is addressed. If you are not the intended recipient or the
person responsible for delivering the transmission to the intended
recipient, be advised that you have received this transmission in error and
that any use, dissemination, forwarding, printing, or copying of this
information is strictly prohibited. If you have received this transmission
in error, please immediately notify LabOne at (800)388-4675.
> >
> >
> >
> > --
> > 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]>




Re: DAO or ... ? [Scanned for known viruses]

2002-10-15 Thread V. Cekvenich

Q: How would you re-use this in Model 1?

.V



[EMAIL PROTECTED] wrote:
> 
> 
> 
> James -
> 
> I've attached a few files from my upcoming book Struts Kick Start that
> provide a basic design pattern that sounds like it may be similar to what
> your describing.
> 
> What I do is:
> 
>  - Create a Value Object that encapsulates data communicated with the Model
> component.
> 
>  - Create a facade class that accepts and returns value objects through
> 'business methods'. By defining the facade to work at a 'business method'
> level, it helps keep any code related to a particular persistence layer or
> back-end system out of the Action class. This also addresses the issues you
> described of 'designing to test' - the clean seperation between the Action
> class and the Model components that the Facade provides simplifies testing.
> 
>  - Create the form bean to provide set/get methods that also accept and
> return value objects - this greatly simplifies the Action class and
> isolates it from changes.
> 
> The Action class (a bit simplified - I've taken out detailed comments and
> exception handling) goes something like:
> 
>   // cast the form bean
>   CustomerForm cf = (CustomerForm) form;
> 
>   // Create a facade to interface to the back-end system
>   CustomerWSFacade facade = new CustomerWSFacade();
> 
>   // Extract the value object from the form bean
>   CustomerValueObject cvo = cf.getValueObject();
> 
>   // Pass the value object to the facade. It returns an update value object
>   cvo = facade.addressChange( cvo );
> 
>   // Use the returned value object to update the values in the form bean.
>   cf.setValueObject(cvo);
> 
> These particular classes come from the chapter on providing integration
> with Axis for Web Services. Another chapter uses the identical set of
> classes to communicate with JBoss using a Session Bean - all I did was
> write a different facade class. The point of this was to demonstrate a
> design that made it very simple to perform maintenance or changes on the
> back-end or persistence layer.
> 
> 
> 
> Regarding testing - I'd recommend you take a look at the StrutsTestCase
> project at sourceforge - it provides some great templates for both JUnit
> and Cactus tests that are designed for Struts. Makes JUnit/Cactus testing
> pretty straightforward. A copy of this and detailed directions also come
> with the book.
> 
>   http://strutstestcase.sourceforge.net/
> 
> 
> Best of luck -
> Kevin
> 
> 
> Author, Struts Kick Start
> 
> (See attached file: customer.zip)
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> "Couball, James" <[EMAIL PROTECTED]> on 10/14/2002 01:19:16 PM
> 
> Please respond to "Struts Users Mailing List"
><[EMAIL PROTECTED]>
> 
> To:"'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
> Subject:RE: DAO or ... ?
> 
> 
> I recommend taking a look at the Session Façade pattern in the Java Blue
> Prints.  No matter if you use EJBs or not, this pattern encapsulates the
> ideas that Simon was mentioning.
> 
> Does anyone know the name of the more general pattern that doesn't involve
> Session Beans specifically?
> 
> One of my general concerns is "design to test".  I like to be able to test
> the (business/persistence) layer that the actions will call independently
> of
> struts, actions, etc.  Encapsulating that layer in an API (or wrapping with
> a session bean) makes this possible.
> 
> Sincerely,
> James.
> 
> 
>>-Original Message-
>>From: Andrew Hill [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 8:16 AM
>>To: Struts Users Mailing List
>>Subject: RE: DAO or ... ?
>>
>>But you still call the API from the action right - is this not invoking
>>the
>>functionality that persists your data?
>>
>>Seems a bit like semantic juggling to me... (after all the persistance
>>layer
>>is just an abstraction API on top of writing to db/disk/punchcard
>>itself...)
>>;-)
>>
>>I would however agree that there ought to be some sort of abstracting
>>layer
>>between the view and the implementation specific details of the p-tier...
>>
>>-Original Message-
>>From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 23:04
>>To: Struts Users Mailing List; [EMAIL PROTECTED]
>>Subject

[OT] RE: DAO or ... ?

2002-10-15 Thread James Higginbotham

I'm still learning about patterns on my C=128 and Run Magazines that I
picked up at a Goodwill for $20.. Oh, man - 80 col mode... 

Is it Friday yet?

James

> -Original Message-
> From: Dan Trevino [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, October 15, 2002 5:08 AM
> To: Struts Users Mailing List
> Subject: RE: DAO or ... ?
> 
> 
> I remember learning about patterns while programming my 
> Sinclair ZX81 and copying programs out of Compute! magazine 
> for my C64.  LOL.
> 
> On Mon, 2002-10-14 at 16:02, Jerry Jalenak wrote:
> > You guys have it lucky to even know what a pattern is.  I graduated 
> > with a C.S. degree in 1983 - object oriented programming barely 
> > existed then, let alone taught.  Matter of fact we were required to 
> > learn IBM Assembler, and either COBOL or PL/1 as a graduation 
> > requirement!  If I remember right, my "Software Engineering" class 
> > dealt with writing a basic compiler for a COBOL-type 
> language (written 
> > in assembler, or course).  You ought to be where I am 
> trying to play 
> > catch-up on all of this Java / web / struts /  stuff 
> while trying 
> > to deliver projects on time and budget!
> > 
> > Jerry
> > 
> > > -Original Message-
> > > From: John Owen [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, October 14, 2002 2:45 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: DAO or ... ?
> > > 
> > > 
> > > We were taught algorithms and finite state machines, but I
> > > don't remember
> > > any design pattern coverage. I graduated in 1994 and other 
> > > than that, they
> > > perfectly prepared me for my future as a developer. We 
> > > covered many software
> > > design principles in my Software Engineering classes, but the 
> > > memory is so
> > > vague that I can't recall if anything was categorized 
> into patterns.
> > > - Original Message -
> > > From: "Chappell, Simon P" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > Sent: Monday, October 14, 2002 2:33 PM
> > > Subject: RE: DAO or ... ?
> > > 
> > > 
> > > I have no idea whether they teach patterns in University. I
> > > graduated in
> > > 1990 and we didn't even have the Internet back then let alone 
> > > Patterns!
> > > 
> > > Jacob: How about it my friend? Do they teach patterns in the UW?
> > > 
> > > Simon
> > > 
> > > >-Original Message-
> > > >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> > > >Sent: Monday, October 14, 2002 2:29 PM
> > > >To: 'Struts Users Mailing List'
> > > >Subject: RE: DAO or ... ?
> > > >
> > > >
> > > >> It's called experience  it's why they pay us old guys
> > > >more than you
> > > >young bucks! ;-)
> > > >
> > > >LOL!  It's also called being absolutely CERTAIN that someone has 
> > > >solved this problem before, and not going off reinventing the 
> > > >wheel.  As an aside, are
> > > >patterns being taught in computer science?  I'm working on a
> > > >degree and the
> > > >senior-level course I'm taking this semester has been the
> > > >first time I've
> > > >seen a lecture about them.  And then he only covered 
> three (Factory,
> > > >Abstract Factory and Singleton) and not very in depth at that.
> > > >
> > > >I like Applied Java Patterns by Stephen Stelting & Olav 
> Maassen.  
> > > >While the GoF book is surely timeless, I'm guessing the examples 
> > > >are not written in
> > > >Java.  With Applied Java Patterns (and Core J2EE Patterns) I
> > > >can cut and
> > > >paste and have a head start on the implementation.
> > > >
> > > >--
> > > >Wendy Smoak
> > > >Applications Systems Analyst, Sr.
> > > >Arizona State University PA Information Resources Management
> > > >
> > > 
> > > --
> > > 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: 
>

Design patterns book (was RE: DAO or ... ?)

2002-10-15 Thread Daniel H. F. e Silva

Hi all,
 An excellent book with clear examples is James Cooper's Java Design Patterns. You can 
find it in
PDF format to download here : http://www.patterndepot.com/put/8/JavaPatterns.htm
 I think it is much more clear in explaining patterns and its examples are very good 
to improve
learning patterns.
 I recommend it!

Best regards,
 Daniel Silva.

--- Wendy Smoak <[EMAIL PROTECTED]> wrote:
> > It's called experience  it's why they pay us old guys more than you
> young bucks! ;-)
> 
> LOL!  It's also called being absolutely CERTAIN that someone has solved this
> problem before, and not going off reinventing the wheel.  As an aside, are
> patterns being taught in computer science?  I'm working on a degree and the
> senior-level course I'm taking this semester has been the first time I've
> seen a lecture about them.  And then he only covered three (Factory,
> Abstract Factory and Singleton) and not very in depth at that.
> 
> I like Applied Java Patterns by Stephen Stelting & Olav Maassen.  While the
> GoF book is surely timeless, I'm guessing the examples are not written in
> Java.  With Applied Java Patterns (and Core J2EE Patterns) I can cut and
> paste and have a head start on the implementation.
> 
> -- 
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
> 


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

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




RE: DAO or ... ?

2002-10-15 Thread Dan Trevino

I remember learning about patterns while programming my Sinclair ZX81
and copying programs out of Compute! magazine for my C64.  LOL.

On Mon, 2002-10-14 at 16:02, Jerry Jalenak wrote:
> You guys have it lucky to even know what a pattern is.  I graduated with a
> C.S. degree in 1983 - object oriented programming barely existed then, let
> alone taught.  Matter of fact we were required to learn IBM Assembler, and
> either COBOL or PL/1 as a graduation requirement!  If I remember right, my
> "Software Engineering" class dealt with writing a basic compiler for a
> COBOL-type language (written in assembler, or course).  You ought to be
> where I am trying to play catch-up on all of this Java / web / struts / 
> stuff while trying to deliver projects on time and budget!
> 
> Jerry
> 
> > -Original Message-
> > From: John Owen [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 14, 2002 2:45 PM
> > To: Struts Users Mailing List
> > Subject: Re: DAO or ... ?
> > 
> > 
> > We were taught algorithms and finite state machines, but I 
> > don't remember
> > any design pattern coverage. I graduated in 1994 and other 
> > than that, they
> > perfectly prepared me for my future as a developer. We 
> > covered many software
> > design principles in my Software Engineering classes, but the 
> > memory is so
> > vague that I can't recall if anything was categorized into patterns.
> > - Original Message -
> > From: "Chappell, Simon P" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Monday, October 14, 2002 2:33 PM
> > Subject: RE: DAO or ... ?
> > 
> > 
> > I have no idea whether they teach patterns in University. I 
> > graduated in
> > 1990 and we didn't even have the Internet back then let alone 
> > Patterns!
> > 
> > Jacob: How about it my friend? Do they teach patterns in the UW?
> > 
> > Simon
> > 
> > >-Original Message-
> > >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> > >Sent: Monday, October 14, 2002 2:29 PM
> > >To: 'Struts Users Mailing List'
> > >Subject: RE: DAO or ... ?
> > >
> > >
> > >> It's called experience  it's why they pay us old guys
> > >more than you
> > >young bucks! ;-)
> > >
> > >LOL!  It's also called being absolutely CERTAIN that someone
> > >has solved this
> > >problem before, and not going off reinventing the wheel.  As
> > >an aside, are
> > >patterns being taught in computer science?  I'm working on a
> > >degree and the
> > >senior-level course I'm taking this semester has been the
> > >first time I've
> > >seen a lecture about them.  And then he only covered three (Factory,
> > >Abstract Factory and Singleton) and not very in depth at that.
> > >
> > >I like Applied Java Patterns by Stephen Stelting & Olav
> > >Maassen.  While the
> > >GoF book is surely timeless, I'm guessing the examples are not
> > >written in
> > >Java.  With Applied Java Patterns (and Core J2EE Patterns) I
> > >can cut and
> > >paste and have a head start on the implementation.
> > >
> > >--
> > >Wendy Smoak
> > >Applications Systems Analyst, Sr.
> > >Arizona State University PA Information Resources Management
> > >
> > 
> > --
> > 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]>
> 
> 
> This transmission (and any information attached to it) may be confidential and is 
>intended solely for the use of the individual or entity to which it is addressed. If 
>you are not the intended recipient or the person responsible for delivering the 
>transmission to the intended recipient, be advised that you have received this 
>transmission in error and that any use, dissemination, forwarding, printing, or 
>copying of this information is strictly prohibited. If you have received this 
>transmission in error, please immediately notify LabOne at (800)388-4675.
> 
> 
> 
> --
> 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]>




[OT] RE: DAO or ... ?

2002-10-14 Thread micael

Troy,

I think it is incredible that you can go that far in your computer 
engineering education without even "touching on" patterns.  I was involved 
in some discussions with a publisher regarding putting out a 
beginning/intermediate Java textbook that would teach OO with patterns from 
day one, but I am too busy.  Someone should do that.  Someone should also 
include the idea of component programming just about as early, in my opinion.

At 03:20 PM 10/14/2002 -0600, you wrote:
>They teach patterns at the University of Utah. In our advanced software
>engineering course we touched on patterns and anti-patterns.
>
>
>On Mon, 2002-10-14 at 13:33, Chappell, Simon P wrote:
> > I have no idea whether they teach patterns in University. I graduated 
> in 1990 and we didn't even have the Internet back then let alone Patterns!
> >
> > Jacob: How about it my friend? Do they teach patterns in the UW?
> >
> > Simon
> >
> > >-Original Message-
> > >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> > >Sent: Monday, October 14, 2002 2:29 PM
> > >To: 'Struts Users Mailing List'
> > >Subject: RE: DAO or ... ?
> > >
> > >
> > >> It's called experience  it's why they pay us old guys
> > >more than you
> > >young bucks! ;-)
> > >
> > >LOL!  It's also called being absolutely CERTAIN that someone
> > >has solved this
> > >problem before, and not going off reinventing the wheel.  As
> > >an aside, are
> > >patterns being taught in computer science?  I'm working on a
> > >degree and the
> > >senior-level course I'm taking this semester has been the
> > >first time I've
> > >seen a lecture about them.  And then he only covered three (Factory,
> > >Abstract Factory and Singleton) and not very in depth at that.
> > >
> > >I like Applied Java Patterns by Stephen Stelting & Olav
> > >Maassen.  While the
> > >GoF book is surely timeless, I'm guessing the examples are not
> > >written in
> > >Java.  With Applied Java Patterns (and Core J2EE Patterns) I
> > >can cut and
> > >paste and have a head start on the implementation.
> > >
> > >--
> > >Wendy Smoak
> > >Applications Systems Analyst, Sr.
> > >Arizona State University PA Information Resources Management
> > >
> >
> > --
> > 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]>

Micael

---

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank you 



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




RE: DAO or ... ?

2002-10-14 Thread Troy Hart

They teach patterns at the University of Utah. In our advanced software
engineering course we touched on patterns and anti-patterns.


On Mon, 2002-10-14 at 13:33, Chappell, Simon P wrote:
> I have no idea whether they teach patterns in University. I graduated in 1990 and we 
>didn't even have the Internet back then let alone Patterns!
> 
> Jacob: How about it my friend? Do they teach patterns in the UW?
> 
> Simon
> 
> >-Original Message-
> >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, October 14, 2002 2:29 PM
> >To: 'Struts Users Mailing List'
> >Subject: RE: DAO or ... ?
> >
> >
> >> It's called experience  it's why they pay us old guys 
> >more than you
> >young bucks! ;-)
> >
> >LOL!  It's also called being absolutely CERTAIN that someone 
> >has solved this
> >problem before, and not going off reinventing the wheel.  As 
> >an aside, are
> >patterns being taught in computer science?  I'm working on a 
> >degree and the
> >senior-level course I'm taking this semester has been the 
> >first time I've
> >seen a lecture about them.  And then he only covered three (Factory,
> >Abstract Factory and Singleton) and not very in depth at that.
> >
> >I like Applied Java Patterns by Stephen Stelting & Olav 
> >Maassen.  While the
> >GoF book is surely timeless, I'm guessing the examples are not 
> >written in
> >Java.  With Applied Java Patterns (and Core J2EE Patterns) I 
> >can cut and
> >paste and have a head start on the implementation.
> >
> >-- 
> >Wendy Smoak
> >Applications Systems Analyst, Sr.
> >Arizona State University PA Information Resources Management
> >
> 
> --
> 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]>




RE: DAO or ... ?

2002-10-14 Thread Assenza, Chris

Speaking of Mr. Fowler, he has his next book online (proof) on his web site.
Another excellent "Patterns" book that is worth reading. :)

http://martinfowler.com/isa/index.html

-Chris

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 4:37 PM
To: Struts Users Mailing List
Subject: RE: DAO or ... ?


For patterns stick with the GoF book, just remember that the names are not
always the best.

Try Martin Fowler's Refactoring book. Absolutely wonderful. (most of the
examples are in Java)

Start using Ant for your project builds (The Ant book by Hatcher and
Loughran published by Manning is magnificent.)

Junit. http://junit.org/ Test first, test often! :-)

Failing that, this new fangled Internet thing has some useful stuff on it. I
have distilled a short list of very good links and posted on my website. Try
http://www.simonpeter.com/techie/java/links.html and see if that is useful
to you.

Simon

>-Original Message-
>From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 3:29 PM
>To: 'Struts Users Mailing List'
>Subject: RE: DAO or ... ?
>
>
>Thanks - it's nice to know somebody out there respects me!  :-)
>
>Seriously though, I agree with you 100%. Technology changes to 
>quickly to be
>able to rest on your laurels - just look at this list and evolution of
>Struts in the past 90 days! Fortunately for me, I managed to 
>find this list
>when I first started learning Java (about 6 months ago) - and 
>I can tell you
>it has been the absolute best resource, and not just for 
>struts and java.
>I'm now to a point where I'm trying to refine my coding 
>techniques, hence my
>interest in patterns.  Besides the GoF book, are the any 
>really great books
>on patterns that are Java and web development specific?  It 
>would be nice to
>have all of this stuff in one location..
>
>Jerry
>
>> -Original Message-
>> From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, October 14, 2002 3:12 PM
>> To: Struts Users Mailing List
>> Subject: RE: DAO or ... ?
>> 
>> 
>> You have my sympathy and my respect.
>> 
>> While I graduated after you, they still hadn't invented the 
>> World Wide Web and Java was a way off yet. Almost everything 
>> skill that I use to earn my living today is something that I 
>> have taught myself. I spotted Java and learned it back when 
>> it first came out, and I have read enough material since I 
>> graduated to sink a small aircraft carrier. It seems to me 
>> that those that get anywhere in this industry are self-taught 
>> self-starters. Sure, we start with a CS degree, but 
>> everything goes out of date so quick in this industry, that 
>> you can't sit back on your laurels and wait for people to 
>> throw money at you. You have to go go and learn stuff 
>outside of work.
>> 
>> As for patterns, I was associated with some Smalltalkers for 
>> a while and heard them talking about patterns and saw the 
>> GoF, bought a copy for myself and have been using them ever 
>> since (just not calling them the right names! ;-)
>> 
>> Simon
>> 
>> >-Original Message-
>> >From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
>> >Sent: Monday, October 14, 2002 3:02 PM
>> >To: 'Struts Users Mailing List'
>> >Subject: RE: DAO or ... ?
>> >
>> >
>> >You guys have it lucky to even know what a pattern is.  I 
>> >graduated with a
>> >C.S. degree in 1983 - object oriented programming barely 
>> >existed then, let
>> >alone taught.  Matter of fact we were required to learn IBM 
>> >Assembler, and
>> >either COBOL or PL/1 as a graduation requirement!  If I 
>> >remember right, my
>> >"Software Engineering" class dealt with writing a basic 
>> compiler for a
>> >COBOL-type language (written in assembler, or course).  You 
>> ought to be
>> >where I am trying to play catch-up on all of this Java / web / 
>> >struts / 
>> >stuff while trying to deliver projects on time and budget!
>> >
>> >Jerry
>> >
>> >> -Original Message-
>> >> From: John Owen [mailto:[EMAIL PROTECTED]]
>> >> Sent: Monday, October 14, 2002 2:45 PM
>> >> To: Struts Users Mailing List
>> >> Subject: Re: DAO or ... ?
>> >> 
>> >> 
>> >> We were taught algorithms and finite state machines, but I 
>> >> don't remember
>> >> any design pattern coverage. I graduated in 1994 

RE: DAO or ... ?

2002-10-14 Thread Assenza, Chris

Though not a Patterns book, Refactoring (by Martin Fowler) is another
must-read for all OO developers. :-) 

Chris

-Original Message-
From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 4:29 PM
To: 'Struts Users Mailing List'
Subject: RE: DAO or ... ?


Thanks - it's nice to know somebody out there respects me!  :-)

Seriously though, I agree with you 100%. Technology changes to quickly to be
able to rest on your laurels - just look at this list and evolution of
Struts in the past 90 days! Fortunately for me, I managed to find this list
when I first started learning Java (about 6 months ago) - and I can tell you
it has been the absolute best resource, and not just for struts and java.
I'm now to a point where I'm trying to refine my coding techniques, hence my
interest in patterns.  Besides the GoF book, are the any really great books
on patterns that are Java and web development specific?  It would be nice to
have all of this stuff in one location..

Jerry

> -Original Message-
> From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 3:12 PM
> To: Struts Users Mailing List
> Subject: RE: DAO or ... ?
> 
> 
> You have my sympathy and my respect.
> 
> While I graduated after you, they still hadn't invented the 
> World Wide Web and Java was a way off yet. Almost everything 
> skill that I use to earn my living today is something that I 
> have taught myself. I spotted Java and learned it back when 
> it first came out, and I have read enough material since I 
> graduated to sink a small aircraft carrier. It seems to me 
> that those that get anywhere in this industry are self-taught 
> self-starters. Sure, we start with a CS degree, but 
> everything goes out of date so quick in this industry, that 
> you can't sit back on your laurels and wait for people to 
> throw money at you. You have to go go and learn stuff outside of work.
> 
> As for patterns, I was associated with some Smalltalkers for 
> a while and heard them talking about patterns and saw the 
> GoF, bought a copy for myself and have been using them ever 
> since (just not calling them the right names! ;-)
> 
> Simon
> 
> >-Original Message-
> >From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, October 14, 2002 3:02 PM
> >To: 'Struts Users Mailing List'
> >Subject: RE: DAO or ... ?
> >
> >
> >You guys have it lucky to even know what a pattern is.  I 
> >graduated with a
> >C.S. degree in 1983 - object oriented programming barely 
> >existed then, let
> >alone taught.  Matter of fact we were required to learn IBM 
> >Assembler, and
> >either COBOL or PL/1 as a graduation requirement!  If I 
> >remember right, my
> >"Software Engineering" class dealt with writing a basic 
> compiler for a
> >COBOL-type language (written in assembler, or course).  You 
> ought to be
> >where I am trying to play catch-up on all of this Java / web / 
> >struts / ....
> >stuff while trying to deliver projects on time and budget!
> >
> >Jerry
> >
> >> -Original Message-
> >> From: John Owen [mailto:[EMAIL PROTECTED]]
> >> Sent: Monday, October 14, 2002 2:45 PM
> >> To: Struts Users Mailing List
> >> Subject: Re: DAO or ... ?
> >> 
> >> 
> >> We were taught algorithms and finite state machines, but I 
> >> don't remember
> >> any design pattern coverage. I graduated in 1994 and other 
> >> than that, they
> >> perfectly prepared me for my future as a developer. We 
> >> covered many software
> >> design principles in my Software Engineering classes, but the 
> >> memory is so
> >> vague that I can't recall if anything was categorized into 
> patterns.
> >> - Original Message -
> >> From: "Chappell, Simon P" <[EMAIL PROTECTED]>
> >> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >> Sent: Monday, October 14, 2002 2:33 PM
> >> Subject: RE: DAO or ... ?
> >> 
> >> 
> >> I have no idea whether they teach patterns in University. I 
> >> graduated in
> >> 1990 and we didn't even have the Internet back then let alone 
> >> Patterns!
> >> 
> >> Jacob: How about it my friend? Do they teach patterns in the UW?
> >> 
> >> Simon
> >> 
> >> >-Original Message-
> >> >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> >> >Sent: Monday, October 14, 2002 2:29 PM
> >> >To: 'Struts Users Mailing List&

RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

For patterns stick with the GoF book, just remember that the names are not always the 
best.

Try Martin Fowler's Refactoring book. Absolutely wonderful. (most of the examples are 
in Java)

Start using Ant for your project builds (The Ant book by Hatcher and Loughran 
published by Manning is magnificent.)

Junit. http://junit.org/ Test first, test often! :-)

Failing that, this new fangled Internet thing has some useful stuff on it. I have 
distilled a short list of very good links and posted on my website. Try 
http://www.simonpeter.com/techie/java/links.html and see if that is useful to you.

Simon

>-Original Message-
>From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 3:29 PM
>To: 'Struts Users Mailing List'
>Subject: RE: DAO or ... ?
>
>
>Thanks - it's nice to know somebody out there respects me!  :-)
>
>Seriously though, I agree with you 100%. Technology changes to 
>quickly to be
>able to rest on your laurels - just look at this list and evolution of
>Struts in the past 90 days! Fortunately for me, I managed to 
>find this list
>when I first started learning Java (about 6 months ago) - and 
>I can tell you
>it has been the absolute best resource, and not just for 
>struts and java.
>I'm now to a point where I'm trying to refine my coding 
>techniques, hence my
>interest in patterns.  Besides the GoF book, are the any 
>really great books
>on patterns that are Java and web development specific?  It 
>would be nice to
>have all of this stuff in one location..
>
>Jerry
>
>> -Original Message-
>> From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, October 14, 2002 3:12 PM
>> To: Struts Users Mailing List
>> Subject: RE: DAO or ... ?
>> 
>> 
>> You have my sympathy and my respect.
>> 
>> While I graduated after you, they still hadn't invented the 
>> World Wide Web and Java was a way off yet. Almost everything 
>> skill that I use to earn my living today is something that I 
>> have taught myself. I spotted Java and learned it back when 
>> it first came out, and I have read enough material since I 
>> graduated to sink a small aircraft carrier. It seems to me 
>> that those that get anywhere in this industry are self-taught 
>> self-starters. Sure, we start with a CS degree, but 
>> everything goes out of date so quick in this industry, that 
>> you can't sit back on your laurels and wait for people to 
>> throw money at you. You have to go go and learn stuff 
>outside of work.
>> 
>> As for patterns, I was associated with some Smalltalkers for 
>> a while and heard them talking about patterns and saw the 
>> GoF, bought a copy for myself and have been using them ever 
>> since (just not calling them the right names! ;-)
>> 
>> Simon
>> 
>> >-Original Message-
>> >From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
>> >Sent: Monday, October 14, 2002 3:02 PM
>> >To: 'Struts Users Mailing List'
>> >Subject: RE: DAO or ... ?
>> >
>> >
>> >You guys have it lucky to even know what a pattern is.  I 
>> >graduated with a
>> >C.S. degree in 1983 - object oriented programming barely 
>> >existed then, let
>> >alone taught.  Matter of fact we were required to learn IBM 
>> >Assembler, and
>> >either COBOL or PL/1 as a graduation requirement!  If I 
>> >remember right, my
>> >"Software Engineering" class dealt with writing a basic 
>> compiler for a
>> >COBOL-type language (written in assembler, or course).  You 
>> ought to be
>> >where I am trying to play catch-up on all of this Java / web / 
>> >struts / 
>> >stuff while trying to deliver projects on time and budget!
>> >
>> >Jerry
>> >
>> >> -Original Message-
>> >> From: John Owen [mailto:[EMAIL PROTECTED]]
>> >> Sent: Monday, October 14, 2002 2:45 PM
>> >> To: Struts Users Mailing List
>> >> Subject: Re: DAO or ... ?
>> >> 
>> >> 
>> >> We were taught algorithms and finite state machines, but I 
>> >> don't remember
>> >> any design pattern coverage. I graduated in 1994 and other 
>> >> than that, they
>> >> perfectly prepared me for my future as a developer. We 
>> >> covered many software
>> >> design principles in my Software Engineering classes, but the 
>> >> memory is so
>> >> vague that I can't recall if anything was cat

RE: DAO or ... ?

2002-10-14 Thread Jerry Jalenak

Thanks - it's nice to know somebody out there respects me!  :-)

Seriously though, I agree with you 100%. Technology changes to quickly to be
able to rest on your laurels - just look at this list and evolution of
Struts in the past 90 days! Fortunately for me, I managed to find this list
when I first started learning Java (about 6 months ago) - and I can tell you
it has been the absolute best resource, and not just for struts and java.
I'm now to a point where I'm trying to refine my coding techniques, hence my
interest in patterns.  Besides the GoF book, are the any really great books
on patterns that are Java and web development specific?  It would be nice to
have all of this stuff in one location..

Jerry

> -Original Message-
> From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 3:12 PM
> To: Struts Users Mailing List
> Subject: RE: DAO or ... ?
> 
> 
> You have my sympathy and my respect.
> 
> While I graduated after you, they still hadn't invented the 
> World Wide Web and Java was a way off yet. Almost everything 
> skill that I use to earn my living today is something that I 
> have taught myself. I spotted Java and learned it back when 
> it first came out, and I have read enough material since I 
> graduated to sink a small aircraft carrier. It seems to me 
> that those that get anywhere in this industry are self-taught 
> self-starters. Sure, we start with a CS degree, but 
> everything goes out of date so quick in this industry, that 
> you can't sit back on your laurels and wait for people to 
> throw money at you. You have to go go and learn stuff outside of work.
> 
> As for patterns, I was associated with some Smalltalkers for 
> a while and heard them talking about patterns and saw the 
> GoF, bought a copy for myself and have been using them ever 
> since (just not calling them the right names! ;-)
> 
> Simon
> 
> >-Original Message-
> >From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, October 14, 2002 3:02 PM
> >To: 'Struts Users Mailing List'
> >Subject: RE: DAO or ... ?
> >
> >
> >You guys have it lucky to even know what a pattern is.  I 
> >graduated with a
> >C.S. degree in 1983 - object oriented programming barely 
> >existed then, let
> >alone taught.  Matter of fact we were required to learn IBM 
> >Assembler, and
> >either COBOL or PL/1 as a graduation requirement!  If I 
> >remember right, my
> >"Software Engineering" class dealt with writing a basic 
> compiler for a
> >COBOL-type language (written in assembler, or course).  You 
> ought to be
> >where I am trying to play catch-up on all of this Java / web / 
> >struts / 
> >stuff while trying to deliver projects on time and budget!
> >
> >Jerry
> >
> >> -Original Message-
> >> From: John Owen [mailto:[EMAIL PROTECTED]]
> >> Sent: Monday, October 14, 2002 2:45 PM
> >> To: Struts Users Mailing List
> >> Subject: Re: DAO or ... ?
> >> 
> >> 
> >> We were taught algorithms and finite state machines, but I 
> >> don't remember
> >> any design pattern coverage. I graduated in 1994 and other 
> >> than that, they
> >> perfectly prepared me for my future as a developer. We 
> >> covered many software
> >> design principles in my Software Engineering classes, but the 
> >> memory is so
> >> vague that I can't recall if anything was categorized into 
> patterns.
> >> - Original Message -
> >> From: "Chappell, Simon P" <[EMAIL PROTECTED]>
> >> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >> Sent: Monday, October 14, 2002 2:33 PM
> >> Subject: RE: DAO or ... ?
> >> 
> >> 
> >> I have no idea whether they teach patterns in University. I 
> >> graduated in
> >> 1990 and we didn't even have the Internet back then let alone 
> >> Patterns!
> >> 
> >> Jacob: How about it my friend? Do they teach patterns in the UW?
> >> 
> >> Simon
> >> 
> >> >-Original Message-
> >> >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> >> >Sent: Monday, October 14, 2002 2:29 PM
> >> >To: 'Struts Users Mailing List'
> >> >Subject: RE: DAO or ... ?
> >> >
> >> >
> >> >> It's called experience  it's why they pay us old guys
> >> >more than you
> >> >young bucks! ;-)
> >> >
> >> >LOL!  It's als

Origin of MVC design pattern - was RE: DAO or ... ?

2002-10-14 Thread Kevin . Bedell




Interestingly enough - MVC was already around even back then.

Below is an e-mail I received from a Professor Trygve Reenskaug who is
based in Norway now but who is widely credited as being the inventor of the
MVC pattern while at the Xerox PARC in the 70's.  I traded e-mails with him
while researching the origins of MVC for my book.



Dear Kevin Bedell,
I was visiting scientist with the Learning Research Group (Alan Kay's
Small talk group) in 1978/79. My main project was to create a human
friendly interface to an activity network. The example was the activity
network for the building of a 400.000 tons tanker at a Norwegian
shipyard.

The popular idea at that time was to make objects visible on the screen
so that the user could manipulate them directly. This was clearly not
practicable with some 450 activity objects. Further, the users were
used
to seeing their plan from several perspectives: individual activities,
activity networks, timing diagrams, resource loading diagrams, etc.

My first idea was to separate presentation from information because the
information structure is reasonably stable while the way we need to see
it and manipulate it varies with the task. (This idea stems from around
1970 when I first became interested in distributed systems.)

My second idea, or hope, was to create general editors that edited
certain aspects of an information objects. E.g. a general graph editor,
a table (property) editor, a text editor, etc. The information objects
would then have to support the various interfaces needed by the
editors.

The third idea was the concept of a *tool*, whatever the user applies
to
accomplish a certain task. In practice, this meant something that
managed and coordinated several editors. (A window with its panes)

The naming of these three concepts was the subject of long discussions,
particularly with Adele Goldberg. Model-Editor-Tool was one
possibility.
We finally ended with Model-View-Controller. TI implemented the first
MVC in Smalltalk-76 as part of my activity network experiments, and
have
later used it for other projects, writing the code in Smalltalk-78 and
Smalltalk-80.

It is worth noting that MVC was modified by Adele Goldberg and her
group
when they developed the Smalltalk-80 library. The original View was an
editor with both input and output. The Smalltalk-80 View is output
only.
The original Controller (Tool) is missing from Smalltalk-80, while the
Controller now is the input device.

There is also some of the MVC background in
http://www.ifi.uio.no/~trygver/documents/9607OOUserInterface/960711-column.pdf


MVC could profitably be split into several patterns. An MVC pattern
language may be needed. Patterns could e.g., be
  Tool - for decoupling user and model (as described above)
  View - for inspecting and editing a model object
  DirectManipulationInterface - refining the View
  Controller - for coordinating a number of views
  Mediator - for loose coupling between View and Model
  Observer - for keeping Model and View in synch
  Facade - for complex models consisting of many objects
etc.

These are just initial thoughts, I may refine them some day. Or may be
somebody else will do it.

I apologize for taking so long with my answer. I hope it still may may
be useful to you.

Best regards
--Trygve

Kevin Bedell wrote:
>
> Distinguished Professor:
>
> I am writing a book now on STRUTS, which is a
> MVC-based framework for developing web applications.
> Struts is an open source project under the Apache
> Software Foundation.
>
> In researching the origins of the MVC design pattern I
> came across a posting to comp.lang.smalltalk from 1994
> in which an Engineer named Carl Swensson mentioned you
> as being "generally cited as being the creator of the
> MVC concept" while working at the XEROX PARC in the
> late 1970's.
>
> Can you share some short thoughts on your memories of
> the original designs? I'm very interested in what
> original problem you used this pattern to solve. Do
> you remember much about the team that you worked with?
>
> Also, did the MVC pattern evolve in parallel with
> Smalltalk? Or did it to some extent drive the
> development of Smalltalk itself?
>
> I appreciate very much any response you have time to
> write.
>
> Thank you very much,
>
> Kevin Bedell
>
> Author of the upcoming book from SAMS, "Struts: Rapid
> Working Knowledge"
>
--

Trygve Reenskaug  mailto: [EMAIL PROTECTED]
Morgedalsvn. 5A   http://www.ifi.uio.no/~trygver
N-0378 Oslo   Tel: (+47) 22 49 57 27
Norway









"Jerry Jalenak" <[EMAIL PROTECTED]> on 10/14/2002 04:02:17 PM

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:"'Struts Users Mailing List'" <[EMAIL PROTECTED]>
cc: (bcc: Kevin

RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

You have my sympathy and my respect.

While I graduated after you, they still hadn't invented the World Wide Web and Java 
was a way off yet. Almost everything skill that I use to earn my living today is 
something that I have taught myself. I spotted Java and learned it back when it first 
came out, and I have read enough material since I graduated to sink a small aircraft 
carrier. It seems to me that those that get anywhere in this industry are self-taught 
self-starters. Sure, we start with a CS degree, but everything goes out of date so 
quick in this industry, that you can't sit back on your laurels and wait for people to 
throw money at you. You have to go go and learn stuff outside of work.

As for patterns, I was associated with some Smalltalkers for a while and heard them 
talking about patterns and saw the GoF, bought a copy for myself and have been using 
them ever since (just not calling them the right names! ;-)

Simon

>-Original Message-
>From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 3:02 PM
>To: 'Struts Users Mailing List'
>Subject: RE: DAO or ... ?
>
>
>You guys have it lucky to even know what a pattern is.  I 
>graduated with a
>C.S. degree in 1983 - object oriented programming barely 
>existed then, let
>alone taught.  Matter of fact we were required to learn IBM 
>Assembler, and
>either COBOL or PL/1 as a graduation requirement!  If I 
>remember right, my
>"Software Engineering" class dealt with writing a basic compiler for a
>COBOL-type language (written in assembler, or course).  You ought to be
>where I am trying to play catch-up on all of this Java / web / 
>struts / 
>stuff while trying to deliver projects on time and budget!
>
>Jerry
>
>> -Original Message-
>> From: John Owen [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, October 14, 2002 2:45 PM
>> To: Struts Users Mailing List
>> Subject: Re: DAO or ... ?
>> 
>> 
>> We were taught algorithms and finite state machines, but I 
>> don't remember
>> any design pattern coverage. I graduated in 1994 and other 
>> than that, they
>> perfectly prepared me for my future as a developer. We 
>> covered many software
>> design principles in my Software Engineering classes, but the 
>> memory is so
>> vague that I can't recall if anything was categorized into patterns.
>> - Original Message -
>> From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>> Sent: Monday, October 14, 2002 2:33 PM
>> Subject: RE: DAO or ... ?
>> 
>> 
>> I have no idea whether they teach patterns in University. I 
>> graduated in
>> 1990 and we didn't even have the Internet back then let alone 
>> Patterns!
>> 
>> Jacob: How about it my friend? Do they teach patterns in the UW?
>> 
>> Simon
>> 
>> >-Original Message-
>> >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
>> >Sent: Monday, October 14, 2002 2:29 PM
>> >To: 'Struts Users Mailing List'
>> >Subject: RE: DAO or ... ?
>> >
>> >
>> >> It's called experience  it's why they pay us old guys
>> >more than you
>> >young bucks! ;-)
>> >
>> >LOL!  It's also called being absolutely CERTAIN that someone
>> >has solved this
>> >problem before, and not going off reinventing the wheel.  As
>> >an aside, are
>> >patterns being taught in computer science?  I'm working on a
>> >degree and the
>> >senior-level course I'm taking this semester has been the
>> >first time I've
>> >seen a lecture about them.  And then he only covered three (Factory,
>> >Abstract Factory and Singleton) and not very in depth at that.
>> >
>> >I like Applied Java Patterns by Stephen Stelting & Olav
>> >Maassen.  While the
>> >GoF book is surely timeless, I'm guessing the examples are not
>> >written in
>> >Java.  With Applied Java Patterns (and Core J2EE Patterns) I
>> >can cut and
>> >paste and have a head start on the implementation.
>> >
>> >--
>> >Wendy Smoak
>> >Applications Systems Analyst, Sr.
>> >Arizona State University PA Information Resources Management
>> >
>> 
>> --
>> To unsubscribe, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>> 
>> 
>> --
>> To unsubscribe, e-mail:   
><mailto:[EMAIL PROT

Re: DAO or ... ?

2002-10-14 Thread John Owen

Maybe, but I'd prefer to make him strike up conversations with the 45
year-old professional student outside the Union and make requests for some
original poetry.
- Original Message -
From: "Chappell, Simon P" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 2:56 PM
Subject: RE: DAO or ... ?


Wow, you're mean! Even I wouldn't make him do that. How about one night
pulling security at the Student Union?

>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:46 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>I'd say one week working the printout desk will suffice!
>- Original Message -
>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 2:36 PM
>Subject: RE: DAO or ... ?
>
>
>It's a good job that you have all of us supplementing your
>education then!
>I'll be having a stern word or two with your professors,
>concerning this
>lamentable oversight on their part! ;-)
>
>Simon
>
>-----Original Message-
>From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:30 PM
>To: Struts Users Mailing List
>Subject: RE: DAO or ... ?
>
>
>I'm working on finishing up a paper comparing Adapter, Bridge,
>and State
>Patterns in OO, but I don't remember reading/hearing anything
>about the GoF
>:-P
>
>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Mon 10/14/2002 2:26 PM
>To: Struts Users Mailing List
>Cc:
>Subject: Re: DAO or ... ?
>
>
>
>To be truthful, I hadn't heard of them until about 2 years
>ago. I had been
>mired in a job that did not allow me to pursue my design and
>professional
>goals. Once I got out of there and found a place that needed
>an experienced
>developer that was familiar with Java and C++, I was lucky
>enough to work
>with peers who got me back on track. ;)
>- Original Message -
>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 2:20 PM
>Subject: RE: DAO or ... ?
>
>
>Thanks John. These youngsters ... what do you do with them!? ;-)
>
>>-Original Message-
>>From: John Owen [ mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 2:16 PM
>>To: Struts Users Mailing List
>>Subject: Re: DAO or ... ?
>>
>>
>>That's the book he was referring to when he said GoF. They are
>>called the
>>Gang of Four.
>>- Original Message -
>>From: "Hookom, Jacob John" <[EMAIL PROTECTED]>
>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>Sent: Monday, October 14, 2002 2:12 PM
>>Subject: RE: DAO or ... ?
>>
>>
>>you should pick up "Design Patterns - Elements of Reusable
>>Object-Oriented
>>Software" by Gamma, Helm, Johnshon and Vlissides under Addison-Wesley
>>Publishing
>>
>>it's the bible for design patterns
>>
>>-Original Message-
>>From: Chappell, Simon P [ mailto:[EMAIL PROTECTED]]
>>Sent: Mon 10/14/2002 2:10 PM
>>To: Struts Users Mailing List
>>Cc:
>>Subject: RE: DAO or ... ?
>>
>>
>>
>>I'm sure that if I was an accademic chap sitting in my Ivory
>>tower, I'd be
>>able to remember the "official" names, but some days I'm too
>>busy using the
>>actual patterns to get beyond thinking "I need a wrapper
>here" and "I'd
>>better hide that behind an API".
>>
>>Maybe I need a cheat sheet so that I can look up
>>
>>API = Facade
>>Wrapper = Proxy
>>etc etc
>>
>>Some days I REALLY need one of those.
>>
>>Simon
>>
>>
>>>-Original Message-
>>>From: John Owen [ mailto:[EMAIL PROTECTED]]
>>>Sent: Monday, October 14, 2002 1:58 PM
>>>To: Struts Users Mailing List
>>>Subject: Re: DAO or ... ?
>>>
>>>
>>>The funny thing is that they gave them these names so we
>>>(developers) could
>>>communicate better. ;) It was one of the reasons for the book.
>>>- Original Message -
>>>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>>Sent: Monday, October 14, 2002 1:53 PM
&

RE: DAO or ... ?

2002-10-14 Thread Hookom, Jacob John

we are taught patterns in programming through example, which means we learn about it 
one day in lecture, then we get an absurdly complex assignment to make sure we not 
only know the pattern, but to also make sure that we have no social life.  I can't 
complain though, the program is nationally accreditted :-) 

-Original Message- 
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] 
Sent: Mon 10/14/2002 3:00 PM 
To: Struts Users Mailing List 
Cc: 
Subject: RE: DAO or ... ?



Yup, we learned algoritms and state machines. I know that we didn't learn 
patterns.

I am so glad that we did learn about state machines, because they are 
wonderful for web applications.

Simon

>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:45 PM
>To: Struts Users Mailing List
        >Subject: Re: DAO or ... ?
>
>
>We were taught algorithms and finite state machines, but I
>don't remember
>any design pattern coverage. I graduated in 1994 and other
>than that, they
>perfectly prepared me for my future as a developer. We covered
>many software
>design principles in my Software Engineering classes, but the
>memory is so
>vague that I can't recall if anything was categorized into patterns.
>- Original Message -
>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 2:33 PM
>Subject: RE: DAO or ... ?
>
>
>I have no idea whether they teach patterns in University. I
>graduated in
>1990 and we didn't even have the Internet back then let alone Patterns!
>
>Jacob: How about it my friend? Do they teach patterns in the UW?
>
>Simon
>
>>-Original Message-
>>From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 2:29 PM
>>To: 'Struts Users Mailing List'
>>Subject: RE: DAO or ... ?
>>
>>
>>> It's called experience  it's why they pay us old guys
>>more than you
>>young bucks! ;-)
>>
>>LOL!  It's also called being absolutely CERTAIN that someone
>>has solved this
>>problem before, and not going off reinventing the wheel.  As
>>an aside, are
>>patterns being taught in computer science?  I'm working on a
>>degree and the
>>senior-level course I'm taking this semester has been the
>>first time I've
>>seen a lecture about them.  And then he only covered three (Factory,
>>Abstract Factory and Singleton) and not very in depth at that.
>>
>>I like Applied Java Patterns by Stephen Stelting & Olav
>>Maassen.  While the
>>GoF book is surely timeless, I'm guessing the examples are not
>>written in
>>Java.  With Applied Java Patterns (and Core J2EE Patterns) I
>>can cut and
>>paste and have a head start on the implementation.
>>
>>--
>>Wendy Smoak
>>Applications Systems Analyst, Sr.
>>Arizona State University PA Information Resources Management
>>
>
>--
>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]>




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


RE: DAO or ... ?

2002-10-14 Thread René Eigenheer

does anybody remember the "read ahead" rule - wasn't that something like a
pattern?

I'm not sure, but I think this rule origins from Jackson (70s or 80s)

> -Original Message-
> From: John Owen [mailto:[EMAIL PROTECTED]]
> Sent: Montag, 14. Oktober 2002 21:45
> To: Struts Users Mailing List
> Subject: Re: DAO or ... ?
>
>
> We were taught algorithms and finite state machines, but I
> don't remember
> any design pattern coverage. I graduated in 1994 and other
> than that, they
> perfectly prepared me for my future as a developer. We
> covered many software
> design principles in my Software Engineering classes, but the
> memory is so
> vague that I can't recall if anything was categorized into patterns.
> - Original Message -
> From: "Chappell, Simon P" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, October 14, 2002 2:33 PM
> Subject: RE: DAO or ... ?
>
>
> I have no idea whether they teach patterns in University. I
> graduated in
> 1990 and we didn't even have the Internet back then let alone
> Patterns!
>
> Jacob: How about it my friend? Do they teach patterns in the UW?
>
> Simon
>
> >-----Original Message-
> >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, October 14, 2002 2:29 PM
> >To: 'Struts Users Mailing List'
> >Subject: RE: DAO or ... ?
> >
> >
> >> It's called experience  it's why they pay us old guys
> >more than you
> >young bucks! ;-)
> >
> >LOL!  It's also called being absolutely CERTAIN that someone
> >has solved this
> >problem before, and not going off reinventing the wheel.  As
> >an aside, are
> >patterns being taught in computer science?  I'm working on a
> >degree and the
> >senior-level course I'm taking this semester has been the
> >first time I've
> >seen a lecture about them.  And then he only covered three (Factory,
> >Abstract Factory and Singleton) and not very in depth at that.
> >
> >I like Applied Java Patterns by Stephen Stelting & Olav
> >Maassen.  While the
> >GoF book is surely timeless, I'm guessing the examples are not
> >written in
> >Java.  With Applied Java Patterns (and Core J2EE Patterns) I
> >can cut and
> >paste and have a head start on the implementation.
> >
> >--
> >Wendy Smoak
> >Applications Systems Analyst, Sr.
> >Arizona State University PA Information Resources Management
> >
>
> --
> 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]>




RE: DAO or ... ?

2002-10-14 Thread Jerry Jalenak

You guys have it lucky to even know what a pattern is.  I graduated with a
C.S. degree in 1983 - object oriented programming barely existed then, let
alone taught.  Matter of fact we were required to learn IBM Assembler, and
either COBOL or PL/1 as a graduation requirement!  If I remember right, my
"Software Engineering" class dealt with writing a basic compiler for a
COBOL-type language (written in assembler, or course).  You ought to be
where I am trying to play catch-up on all of this Java / web / struts / 
stuff while trying to deliver projects on time and budget!

Jerry

> -Original Message-
> From: John Owen [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 2:45 PM
> To: Struts Users Mailing List
> Subject: Re: DAO or ... ?
> 
> 
> We were taught algorithms and finite state machines, but I 
> don't remember
> any design pattern coverage. I graduated in 1994 and other 
> than that, they
> perfectly prepared me for my future as a developer. We 
> covered many software
> design principles in my Software Engineering classes, but the 
> memory is so
> vague that I can't recall if anything was categorized into patterns.
> - Original Message -
> From: "Chappell, Simon P" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, October 14, 2002 2:33 PM
> Subject: RE: DAO or ... ?
> 
> 
> I have no idea whether they teach patterns in University. I 
> graduated in
> 1990 and we didn't even have the Internet back then let alone 
> Patterns!
> 
> Jacob: How about it my friend? Do they teach patterns in the UW?
> 
> Simon
> 
> >-Original Message-
> >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, October 14, 2002 2:29 PM
> >To: 'Struts Users Mailing List'
> >Subject: RE: DAO or ... ?
> >
> >
> >> It's called experience  it's why they pay us old guys
> >more than you
> >young bucks! ;-)
> >
> >LOL!  It's also called being absolutely CERTAIN that someone
> >has solved this
> >problem before, and not going off reinventing the wheel.  As
> >an aside, are
> >patterns being taught in computer science?  I'm working on a
> >degree and the
> >senior-level course I'm taking this semester has been the
> >first time I've
> >seen a lecture about them.  And then he only covered three (Factory,
> >Abstract Factory and Singleton) and not very in depth at that.
> >
> >I like Applied Java Patterns by Stephen Stelting & Olav
> >Maassen.  While the
> >GoF book is surely timeless, I'm guessing the examples are not
> >written in
> >Java.  With Applied Java Patterns (and Core J2EE Patterns) I
> >can cut and
> >paste and have a head start on the implementation.
> >
> >--
> >Wendy Smoak
> >Applications Systems Analyst, Sr.
> >Arizona State University PA Information Resources Management
> >
> 
> --
> 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]>


This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



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




RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

Yup, we learned algoritms and state machines. I know that we didn't learn patterns.

I am so glad that we did learn about state machines, because they are wonderful for 
web applications.

Simon

>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:45 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>We were taught algorithms and finite state machines, but I 
>don't remember
>any design pattern coverage. I graduated in 1994 and other 
>than that, they
>perfectly prepared me for my future as a developer. We covered 
>many software
>design principles in my Software Engineering classes, but the 
>memory is so
>vague that I can't recall if anything was categorized into patterns.
>- Original Message -
>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 2:33 PM
>Subject: RE: DAO or ... ?
>
>
>I have no idea whether they teach patterns in University. I 
>graduated in
>1990 and we didn't even have the Internet back then let alone Patterns!
>
>Jacob: How about it my friend? Do they teach patterns in the UW?
>
>Simon
>
>>-Original Message-
>>From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 2:29 PM
>>To: 'Struts Users Mailing List'
>>Subject: RE: DAO or ... ?
>>
>>
>>> It's called experience  it's why they pay us old guys
>>more than you
>>young bucks! ;-)
>>
>>LOL!  It's also called being absolutely CERTAIN that someone
>>has solved this
>>problem before, and not going off reinventing the wheel.  As
>>an aside, are
>>patterns being taught in computer science?  I'm working on a
>>degree and the
>>senior-level course I'm taking this semester has been the
>>first time I've
>>seen a lecture about them.  And then he only covered three (Factory,
>>Abstract Factory and Singleton) and not very in depth at that.
>>
>>I like Applied Java Patterns by Stephen Stelting & Olav
>>Maassen.  While the
>>GoF book is surely timeless, I'm guessing the examples are not
>>written in
>>Java.  With Applied Java Patterns (and Core J2EE Patterns) I
>>can cut and
>>paste and have a head start on the implementation.
>>
>>--
>>Wendy Smoak
>>Applications Systems Analyst, Sr.
>>Arizona State University PA Information Resources Management
>>
>
>--
>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]>




RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

Wow, you're mean! Even I wouldn't make him do that. How about one night pulling 
security at the Student Union?

>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:46 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>I'd say one week working the printout desk will suffice!
>- Original Message -
>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 2:36 PM
>Subject: RE: DAO or ... ?
>
>
>It's a good job that you have all of us supplementing your 
>education then!
>I'll be having a stern word or two with your professors, 
>concerning this
>lamentable oversight on their part! ;-)
>
>Simon
>
>-Original Message-
>From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:30 PM
>To: Struts Users Mailing List
>Subject: RE: DAO or ... ?
>
>
>I'm working on finishing up a paper comparing Adapter, Bridge, 
>and State
>Patterns in OO, but I don't remember reading/hearing anything 
>about the GoF
>:-P
>
>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Mon 10/14/2002 2:26 PM
>To: Struts Users Mailing List
>Cc:
>Subject: Re: DAO or ... ?
>
>
>
>To be truthful, I hadn't heard of them until about 2 years 
>ago. I had been
>mired in a job that did not allow me to pursue my design and 
>professional
>goals. Once I got out of there and found a place that needed 
>an experienced
>developer that was familiar with Java and C++, I was lucky 
>enough to work
>with peers who got me back on track. ;)
>- Original Message -
>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 2:20 PM
>Subject: RE: DAO or ... ?
>
>
>Thanks John. These youngsters ... what do you do with them!? ;-)
>
>>-Original Message-
>>From: John Owen [ mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 2:16 PM
>>To: Struts Users Mailing List
>>Subject: Re: DAO or ... ?
>>
>>
>>That's the book he was referring to when he said GoF. They are
>>called the
>>Gang of Four.
>>- Original Message -
>>From: "Hookom, Jacob John" <[EMAIL PROTECTED]>
>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>Sent: Monday, October 14, 2002 2:12 PM
>>Subject: RE: DAO or ... ?
>>
>>
>>you should pick up "Design Patterns - Elements of Reusable
>>Object-Oriented
>>Software" by Gamma, Helm, Johnshon and Vlissides under Addison-Wesley
>>Publishing
>>
>>it's the bible for design patterns
>>
>>-Original Message-
>>From: Chappell, Simon P [ mailto:[EMAIL PROTECTED]]
>>Sent: Mon 10/14/2002 2:10 PM
>>To: Struts Users Mailing List
>>Cc:
>>Subject: RE: DAO or ... ?
>>
>>
>>
>>I'm sure that if I was an accademic chap sitting in my Ivory
>>tower, I'd be
>>able to remember the "official" names, but some days I'm too
>>busy using the
>>actual patterns to get beyond thinking "I need a wrapper 
>here" and "I'd
>>better hide that behind an API".
>>
>>Maybe I need a cheat sheet so that I can look up
>>
>>API = Facade
>>Wrapper = Proxy
>>etc etc
>>
>>Some days I REALLY need one of those.
>>
>>Simon
>>
>>
>>>-Original Message-
>>>From: John Owen [ mailto:[EMAIL PROTECTED]]
>>>Sent: Monday, October 14, 2002 1:58 PM
>>>To: Struts Users Mailing List
>>>Subject: Re: DAO or ... ?
>>>
>>>
>>>The funny thing is that they gave them these names so we
>>>(developers) could
>>>communicate better. ;) It was one of the reasons for the book.
>>>- Original Message -
>>>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>>Sent: Monday, October 14, 2002 1:53 PM
>>>Subject: RE: DAO or ... ?
>>>
>>>
>>>You know, patterns are wonderful, but am I the only person who
>>>thinks that
>>>the names that were selected by the GoF are terrible? I may
>>just be old
>>>fashioned, but I think in terms like wrapper, API and
>>>controller, not facade
>>>and command.
>>>
>>

Re: DAO or ... ?

2002-10-14 Thread John Owen

I'd say one week working the printout desk will suffice!
- Original Message -
From: "Chappell, Simon P" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 2:36 PM
Subject: RE: DAO or ... ?


It's a good job that you have all of us supplementing your education then!
I'll be having a stern word or two with your professors, concerning this
lamentable oversight on their part! ;-)

Simon

-Original Message-
From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 2:30 PM
To: Struts Users Mailing List
Subject: RE: DAO or ... ?


I'm working on finishing up a paper comparing Adapter, Bridge, and State
Patterns in OO, but I don't remember reading/hearing anything about the GoF
:-P

-Original Message-
From: John Owen [mailto:[EMAIL PROTECTED]]
Sent: Mon 10/14/2002 2:26 PM
To: Struts Users Mailing List
Cc:
Subject: Re: DAO or ... ?



To be truthful, I hadn't heard of them until about 2 years ago. I had been
mired in a job that did not allow me to pursue my design and professional
goals. Once I got out of there and found a place that needed an experienced
developer that was familiar with Java and C++, I was lucky enough to work
with peers who got me back on track. ;)
- Original Message -
From: "Chappell, Simon P" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 2:20 PM
Subject: RE: DAO or ... ?


Thanks John. These youngsters ... what do you do with them!? ;-)

>-Original Message-
>From: John Owen [ mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:16 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>That's the book he was referring to when he said GoF. They are
>called the
>Gang of Four.
>- Original Message -
>From: "Hookom, Jacob John" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 2:12 PM
>Subject: RE: DAO or ... ?
>
>
>you should pick up "Design Patterns - Elements of Reusable
>Object-Oriented
>Software" by Gamma, Helm, Johnshon and Vlissides under Addison-Wesley
>Publishing
>
>it's the bible for design patterns
>
>-Original Message-
>From: Chappell, Simon P [ mailto:[EMAIL PROTECTED]]
>Sent: Mon 10/14/2002 2:10 PM
>To: Struts Users Mailing List
>Cc:
>Subject: RE: DAO or ... ?
>
>
>
>I'm sure that if I was an accademic chap sitting in my Ivory
>tower, I'd be
>able to remember the "official" names, but some days I'm too
>busy using the
>actual patterns to get beyond thinking "I need a wrapper here" and "I'd
>better hide that behind an API".
>
>Maybe I need a cheat sheet so that I can look up
>
>API = Facade
>Wrapper = Proxy
>etc etc
>
>Some days I REALLY need one of those.
>
>Simon
>
>
>>-Original Message-
>>From: John Owen [ mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 1:58 PM
>>To: Struts Users Mailing List
>>Subject: Re: DAO or ... ?
>>
>>
>>The funny thing is that they gave them these names so we
>>(developers) could
>>communicate better. ;) It was one of the reasons for the book.
>>- Original Message -
>>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>Sent: Monday, October 14, 2002 1:53 PM
>>Subject: RE: DAO or ... ?
>>
>>
>>You know, patterns are wonderful, but am I the only person who
>>thinks that
>>the names that were selected by the GoF are terrible? I may
>just be old
>>fashioned, but I think in terms like wrapper, API and
>>controller, not facade
>>and command.
>>
>>Oh well. At least I can use patterns even I can't remember for
>>the life of
>>me what the official name for it is! :-)
>>
>>Simon
>>
>>-
>>Simon P. Chappell [EMAIL PROTECTED]
>>Java Programming Specialist  www.landsend.com
>>Lands' End, Inc.   (608) 935-4526
>>
>>
>>>-Original Message-
>>>From: Couball, James [ mailto:[EMAIL PROTECTED]]
>>>Sent: Monday, October 14, 2002 1:21 PM
>>>To: 'Struts Users Mailing List'
>>>Subject: RE: DAO or ... ?
>>>
>>>
>>>That was it, the Command pattern was what I was thinking of...
>>>but Session
>>&

Re: DAO or ... ?

2002-10-14 Thread John Owen

We were taught algorithms and finite state machines, but I don't remember
any design pattern coverage. I graduated in 1994 and other than that, they
perfectly prepared me for my future as a developer. We covered many software
design principles in my Software Engineering classes, but the memory is so
vague that I can't recall if anything was categorized into patterns.
- Original Message -
From: "Chappell, Simon P" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 2:33 PM
Subject: RE: DAO or ... ?


I have no idea whether they teach patterns in University. I graduated in
1990 and we didn't even have the Internet back then let alone Patterns!

Jacob: How about it my friend? Do they teach patterns in the UW?

Simon

>-Original Message-
>From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:29 PM
>To: 'Struts Users Mailing List'
>Subject: RE: DAO or ... ?
>
>
>> It's called experience  it's why they pay us old guys
>more than you
>young bucks! ;-)
>
>LOL!  It's also called being absolutely CERTAIN that someone
>has solved this
>problem before, and not going off reinventing the wheel.  As
>an aside, are
>patterns being taught in computer science?  I'm working on a
>degree and the
>senior-level course I'm taking this semester has been the
>first time I've
>seen a lecture about them.  And then he only covered three (Factory,
>Abstract Factory and Singleton) and not very in depth at that.
>
>I like Applied Java Patterns by Stephen Stelting & Olav
>Maassen.  While the
>GoF book is surely timeless, I'm guessing the examples are not
>written in
>Java.  With Applied Java Patterns (and Core J2EE Patterns) I
>can cut and
>paste and have a head start on the implementation.
>
>--
>Wendy Smoak
>Applications Systems Analyst, Sr.
>Arizona State University PA Information Resources Management
>

--
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]>




RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

It's a good job that you have all of us supplementing your education then! I'll be 
having a stern word or two with your professors, concerning this lamentable oversight 
on their part! ;-)
 
Simon

-Original Message-
From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 2:30 PM
To: Struts Users Mailing List
Subject: RE: DAO or ... ?


I'm working on finishing up a paper comparing Adapter, Bridge, and State Patterns in 
OO, but I don't remember reading/hearing anything about the GoF :-P

-Original Message- 
From: John Owen [mailto:[EMAIL PROTECTED]] 
Sent: Mon 10/14/2002 2:26 PM 
To: Struts Users Mailing List 
Cc: 
Subject: Re: DAO or ... ?



To be truthful, I hadn't heard of them until about 2 years ago. I had been
mired in a job that did not allow me to pursue my design and professional
goals. Once I got out of there and found a place that needed an experienced
developer that was familiar with Java and C++, I was lucky enough to work
with peers who got me back on track. ;)
- Original Message -
From: "Chappell, Simon P" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 2:20 PM
Subject: RE: DAO or ... ?


Thanks John. These youngsters ... what do you do with them!? ;-)

>-Original Message-
>From: John Owen [ mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:16 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>That's the book he was referring to when he said GoF. They are
>called the
>Gang of Four.
>- Original Message -
>From: "Hookom, Jacob John" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 2:12 PM
>Subject: RE: DAO or ... ?
>
>
>you should pick up "Design Patterns - Elements of Reusable
>Object-Oriented
>Software" by Gamma, Helm, Johnshon and Vlissides under Addison-Wesley
>Publishing
>
>it's the bible for design patterns
>
>-Original Message-
>From: Chappell, Simon P [ mailto:[EMAIL PROTECTED]]
>Sent: Mon 10/14/2002 2:10 PM
>To: Struts Users Mailing List
>Cc:
>Subject: RE: DAO or ... ?
>
>
>
>I'm sure that if I was an accademic chap sitting in my Ivory
>tower, I'd be
>able to remember the "official" names, but some days I'm too
>busy using the
>actual patterns to get beyond thinking "I need a wrapper here" and "I'd
>better hide that behind an API".
>
>Maybe I need a cheat sheet so that I can look up
>
>API = Facade
>Wrapper = Proxy
>etc etc
>
>Some days I REALLY need one of those.
>
>Simon
>
>
>>-Original Message-
>>From: John Owen [ mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 1:58 PM
>>To: Struts Users Mailing List
>>Subject: Re: DAO or ... ?
>>
>>
>>The funny thing is that they gave them these names so we
>>(developers) could
>>communicate better. ;) It was one of the reasons for the book.
>>- Original Message -
>>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>Sent: Monday, October 14, 2002 1:53 PM
>>Subject: RE: DAO or ... ?
>>
>>
>>You know, patterns are wonderful, but am I the only person who
>>thinks that
>>the names that were selected by the GoF are terrible? I may
>just be old
>>fashioned, but I think in terms like wrapper, API and
>>controller, not facade
>>and command.
>>
>>Oh well. At least I can use patterns even I can't remember for
>>the life of
>>me what the official name for it is! :-)
>>
>>Simon
>>
>>-
>>Simon P. Chappell [EMAIL PROTECTED]
>>Java Programming Specialist  www.landsend.com
>>Lands' End, Inc.               (608) 935-4526
>>
>>
>>>-Original Message-
>>>From: Couball, James [ mailto:[EMAIL PROTECTED]]
>>>Sent: Monday, October 14, 2002 1:21 PM
>>>To: 'Struts Users Mailing List'
>>>Subject: RE: DAO or ... ?
>>>
>>>
>>>That was it, the Command pattern was what I was thinking of...
>>>but Session
>>>Façade had a bit more to it.
>>>
>>>Thanks for the info.
>>>
>>>James.
>>>
>>>> -Original Message-
>>>> From: Jamie M [ mailto:[EMAIL PROTECTED]]
>>>> Sent: Monday, October 14, 2002 1

RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

I have no idea whether they teach patterns in University. I graduated in 1990 and we 
didn't even have the Internet back then let alone Patterns!

Jacob: How about it my friend? Do they teach patterns in the UW?

Simon

>-Original Message-
>From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:29 PM
>To: 'Struts Users Mailing List'
>Subject: RE: DAO or ... ?
>
>
>> It's called experience  it's why they pay us old guys 
>more than you
>young bucks! ;-)
>
>LOL!  It's also called being absolutely CERTAIN that someone 
>has solved this
>problem before, and not going off reinventing the wheel.  As 
>an aside, are
>patterns being taught in computer science?  I'm working on a 
>degree and the
>senior-level course I'm taking this semester has been the 
>first time I've
>seen a lecture about them.  And then he only covered three (Factory,
>Abstract Factory and Singleton) and not very in depth at that.
>
>I like Applied Java Patterns by Stephen Stelting & Olav 
>Maassen.  While the
>GoF book is surely timeless, I'm guessing the examples are not 
>written in
>Java.  With Applied Java Patterns (and Core J2EE Patterns) I 
>can cut and
>paste and have a head start on the implementation.
>
>-- 
>Wendy Smoak
>Applications Systems Analyst, Sr.
>Arizona State University PA Information Resources Management
>

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




RE: DAO or ... ?

2002-10-14 Thread Hookom, Jacob John

I'm working on finishing up a paper comparing Adapter, Bridge, and State Patterns in 
OO, but I don't remember reading/hearing anything about the GoF :-P

-Original Message- 
From: John Owen [mailto:[EMAIL PROTECTED]] 
Sent: Mon 10/14/2002 2:26 PM 
To: Struts Users Mailing List 
Cc: 
    Subject: Re: DAO or ... ?



To be truthful, I hadn't heard of them until about 2 years ago. I had been
mired in a job that did not allow me to pursue my design and professional
goals. Once I got out of there and found a place that needed an experienced
developer that was familiar with Java and C++, I was lucky enough to work
with peers who got me back on track. ;)
- Original Message -
From: "Chappell, Simon P" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 2:20 PM
Subject: RE: DAO or ... ?


Thanks John. These youngsters ... what do you do with them!? ;-)

>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:16 PM
        >To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>That's the book he was referring to when he said GoF. They are
>called the
>Gang of Four.
>- Original Message -
>From: "Hookom, Jacob John" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 2:12 PM
>Subject: RE: DAO or ... ?
>
>
>you should pick up "Design Patterns - Elements of Reusable
>Object-Oriented
>Software" by Gamma, Helm, Johnshon and Vlissides under Addison-Wesley
>Publishing
>
>it's the bible for design patterns
>
>-Original Message-----
    >From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
>Sent: Mon 10/14/2002 2:10 PM
>To: Struts Users Mailing List
>Cc:
>Subject: RE: DAO or ... ?
>
>
>
>I'm sure that if I was an accademic chap sitting in my Ivory
>tower, I'd be
>able to remember the "official" names, but some days I'm too
>busy using the
>actual patterns to get beyond thinking "I need a wrapper here" and "I'd
>better hide that behind an API".
>
>Maybe I need a cheat sheet so that I can look up
>
>API = Facade
>Wrapper = Proxy
>etc etc
>
        >Some days I REALLY need one of those.
>
>Simon
>
>
>>-Original Message-
>>From: John Owen [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 1:58 PM
>>To: Struts Users Mailing List
>>Subject: Re: DAO or ... ?
>>
>>
>>The funny thing is that they gave them these names so we
>>(developers) could
>>communicate better. ;) It was one of the reasons for the book.
>>- Original Message -
>>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>Sent: Monday, October 14, 2002 1:53 PM
>>Subject: RE: DAO or ... ?
>>
>>
>>You know, patterns are wonderful, but am I the only person who
>>thinks that
>>the names that were selected by the GoF are terrible? I may
>just be old
>>fashioned, but I think in terms like wrapper, API and
>>controller, not facade
>>and command.
>>
>>Oh well. At least I can use patterns even I can't remember for
>>the life of
>>me what the official name for it is! :-)
>>
>>Simon
>>
    >>-
>>Simon P. Chappell [EMAIL PROTECTED]
>>Java Programming Specialist  www.landsend.com
>>Lands' End, Inc.   (608) 935-4526
>>
>>
>>>-Original Message-
>>>From: Couball, James [mailto:[EMAIL PROTECTED]]
>>>Sent: Monday, October 14, 2002 1:2

RE: DAO or ... ?

2002-10-14 Thread Wendy Smoak

> It's called experience  it's why they pay us old guys more than you
young bucks! ;-)

LOL!  It's also called being absolutely CERTAIN that someone has solved this
problem before, and not going off reinventing the wheel.  As an aside, are
patterns being taught in computer science?  I'm working on a degree and the
senior-level course I'm taking this semester has been the first time I've
seen a lecture about them.  And then he only covered three (Factory,
Abstract Factory and Singleton) and not very in depth at that.

I like Applied Java Patterns by Stephen Stelting & Olav Maassen.  While the
GoF book is surely timeless, I'm guessing the examples are not written in
Java.  With Applied Java Patterns (and Core J2EE Patterns) I can cut and
paste and have a head start on the implementation.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management



Re: DAO or ... ?

2002-10-14 Thread John Owen

To be truthful, I hadn't heard of them until about 2 years ago. I had been
mired in a job that did not allow me to pursue my design and professional
goals. Once I got out of there and found a place that needed an experienced
developer that was familiar with Java and C++, I was lucky enough to work
with peers who got me back on track. ;)
- Original Message -
From: "Chappell, Simon P" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 2:20 PM
Subject: RE: DAO or ... ?


Thanks John. These youngsters ... what do you do with them!? ;-)

>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:16 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>That's the book he was referring to when he said GoF. They are
>called the
>Gang of Four.
>- Original Message -
>From: "Hookom, Jacob John" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 2:12 PM
>Subject: RE: DAO or ... ?
>
>
>you should pick up "Design Patterns - Elements of Reusable
>Object-Oriented
>Software" by Gamma, Helm, Johnshon and Vlissides under Addison-Wesley
>Publishing
>
>it's the bible for design patterns
>
>-Original Message-
>From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
>Sent: Mon 10/14/2002 2:10 PM
>To: Struts Users Mailing List
>Cc:
>Subject: RE: DAO or ... ?
>
>
>
>I'm sure that if I was an accademic chap sitting in my Ivory
>tower, I'd be
>able to remember the "official" names, but some days I'm too
>busy using the
>actual patterns to get beyond thinking "I need a wrapper here" and "I'd
>better hide that behind an API".
>
>Maybe I need a cheat sheet so that I can look up
>
>    API     = Facade
>Wrapper = Proxy
>etc etc
>
>Some days I REALLY need one of those.
>
>Simon
>
>
>>-Original Message-
>>From: John Owen [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 1:58 PM
>>To: Struts Users Mailing List
>>Subject: Re: DAO or ... ?
>>
>>
>>The funny thing is that they gave them these names so we
>>(developers) could
>>communicate better. ;) It was one of the reasons for the book.
>>- Original Message -
>>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>Sent: Monday, October 14, 2002 1:53 PM
>>Subject: RE: DAO or ... ?
>>
>>
>>You know, patterns are wonderful, but am I the only person who
>>thinks that
>>the names that were selected by the GoF are terrible? I may
>just be old
>>fashioned, but I think in terms like wrapper, API and
>>controller, not facade
>>and command.
>>
>>Oh well. At least I can use patterns even I can't remember for
>>the life of
>>me what the official name for it is! :-)
>>
>>Simon
>>
>>-
>>Simon P. Chappell [EMAIL PROTECTED]
>>Java Programming Specialist  www.landsend.com
>>Lands' End, Inc.   (608) 935-4526
>>
>>
>>>-Original Message-
>>>From: Couball, James [mailto:[EMAIL PROTECTED]]
>>>Sent: Monday, October 14, 2002 1:21 PM
>>>To: 'Struts Users Mailing List'
>>>Subject: RE: DAO or ... ?
>>>
>>>
>>>That was it, the Command pattern was what I was thinking of...
>>>but Session
>>>Façade had a bit more to it.
>>>
>>>Thanks for the info.
>>>
>>>James.
>>>
>>>> -Original Message-
>>>> From: Jamie M [mailto:[EMAIL PROTECTED]]
>>>> Sent: Monday, October 14, 2002 10:37 AM
>>>> To: Struts Users Mailing List
>>>> Subject: RE: DAO or ... ?
>>>>
>>>> How about the Command Pattern:
>>>>
>>>> http://www.javaworld.com/javaworld/javatips/jw-javatip68.html
>>>>
>>>> An EJB version is mentioned in 'EJB Design Patterns'
>>>> (http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp)
>>>> too.
>>>>
>>>> jamie
>>>>
>>>> --- "Couball, James" <[EMAIL PROTECTED]>
>>>> wrote:
>>>> > I recommend taking a look at the Session Façade
>>>> > pattern 

RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

It's called experience  it's why they pay us old guys more than you young bucks! 
;-)

-Original Message-
From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 2:19 PM
To: Struts Users Mailing List
Subject: RE: DAO or ... ?


is there a newsletter for geeks that i'm missing?

-Original Message- 
From: John Owen [mailto:[EMAIL PROTECTED]] 
Sent: Mon 10/14/2002 2:16 PM 
To: Struts Users Mailing List 
Cc: 
Subject: Re: DAO or ... ?



That's the book he was referring to when he said GoF. They are called the
Gang of Four.
- Original Message -
From: "Hookom, Jacob John" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 2:12 PM
Subject: RE: DAO or ... ?


you should pick up "Design Patterns - Elements of Reusable Object-Oriented
Software" by Gamma, Helm, Johnshon and Vlissides under Addison-Wesley
Publishing

it's the bible for design patterns

-Original Message-
From: Chappell, Simon P [ mailto:[EMAIL PROTECTED]]
Sent: Mon 10/14/2002 2:10 PM
To: Struts Users Mailing List
Cc:
Subject: RE: DAO or ... ?



I'm sure that if I was an accademic chap sitting in my Ivory tower, I'd be
able to remember the "official" names, but some days I'm too busy using the
actual patterns to get beyond thinking "I need a wrapper here" and "I'd
better hide that behind an API".

Maybe I need a cheat sheet so that I can look up

API = Facade
Wrapper = Proxy
etc etc

Some days I REALLY need one of those.

Simon


>-Original Message-
>From: John Owen [ mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 1:58 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>The funny thing is that they gave them these names so we
>(developers) could
>communicate better. ;) It was one of the reasons for the book.
>- Original Message -
>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 1:53 PM
>Subject: RE: DAO or ... ?
>
>
>You know, patterns are wonderful, but am I the only person who
>thinks that
>the names that were selected by the GoF are terrible? I may just be old
>fashioned, but I think in terms like wrapper, API and
>controller, not facade
>and command.
>
>Oh well. At least I can use patterns even I can't remember for
>the life of
>me what the official name for it is! :-)
>
>Simon
>
>-
>Simon P. Chappell [EMAIL PROTECTED]
>Java Programming Specialist  www.landsend.com
>Lands' End, Inc.   (608) 935-4526
>
>
>>-Original Message-
>>From: Couball, James [ mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 1:21 PM
>>To: 'Struts Users Mailing List'
>>Subject: RE: DAO or ... ?
>>
>>
>>That was it, the Command pattern was what I was thinking of...
>>but Session
>>Façade had a bit more to it.
>>
>>Thanks for the info.
>>
>>James.
>>
>>> -Original Message-
>>> From: Jamie M [ mailto:[EMAIL PROTECTED]]
>>> Sent: Monday, October 14, 2002 10:37 AM
>>> To: Struts Users Mailing List
>>> Subject: RE: DAO or ... ?
>>>
>>> How about the Command Pattern:
>>>
>>> http://www.javaworld.com/javaworld/javatips/jw-javatip68.html
>>>
>>> An EJB version is mentioned in 'EJB Design Patterns'
>>> ( http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp)
>>> too.
>>>
>>> jamie
>>>
>>> --- "Couball, James" <[EMAIL PROTECTED]>
>>> wrote:
>>> > I recommend taking a look at the Session Façade
>>> > pattern in the Java Blue
>>> > Prints.  No matter if you use EJBs or not, this
>>> > pattern encapsulates the
>>> > ideas that Simon was mentioning.
>>> >
>>> > Does anyone know the name of the more general
>>> > pattern that doesn't involve
>>> > Session Beans specifically?
>>> >
>>> > One of my general concerns is "design to test".  I
>>> > like to be able to test
>>> > the (business/persistence) layer that the actions
>>> > will call independently of
>>> > struts, actions, etc.  Encapsulating that layer in
>>> > an API (or wrapping with
>>> > a session bean) makes this possible.
>>> >
>>>

RE: DAO or ... ?

2002-10-14 Thread Hookom, Jacob John

is there a newsletter for geeks that i'm missing?

-Original Message- 
From: John Owen [mailto:[EMAIL PROTECTED]] 
Sent: Mon 10/14/2002 2:16 PM 
To: Struts Users Mailing List 
Cc: 
Subject: Re: DAO or ... ?



That's the book he was referring to when he said GoF. They are called the
Gang of Four.
- Original Message -
From: "Hookom, Jacob John" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 2:12 PM
Subject: RE: DAO or ... ?


you should pick up "Design Patterns - Elements of Reusable Object-Oriented
Software" by Gamma, Helm, Johnshon and Vlissides under Addison-Wesley
Publishing

it's the bible for design patterns

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Mon 10/14/2002 2:10 PM
To: Struts Users Mailing List
Cc:
Subject: RE: DAO or ... ?



I'm sure that if I was an accademic chap sitting in my Ivory tower, I'd be
able to remember the "official" names, but some days I'm too busy using the
actual patterns to get beyond thinking "I need a wrapper here" and "I'd
better hide that behind an API".

Maybe I need a cheat sheet so that I can look up

API = Facade
Wrapper = Proxy
etc etc

Some days I REALLY need one of those.

Simon


>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
    >Sent: Monday, October 14, 2002 1:58 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>The funny thing is that they gave them these names so we
>(developers) could
>communicate better. ;) It was one of the reasons for the book.
>- Original Message -
>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 1:53 PM
>Subject: RE: DAO or ... ?
>
>
>You know, patterns are wonderful, but am I the only person who
>thinks that
>the names that were selected by the GoF are terrible? I may just be old
>fashioned, but I think in terms like wrapper, API and
>controller, not facade
>and command.
>
>Oh well. At least I can use patterns even I can't remember for
>the life of
>me what the official name for it is! :-)
>
>Simon
>
>-
>Simon P. Chappell [EMAIL PROTECTED]
>Java Programming Specialist  www.landsend.com
>Lands' End, Inc.           (608) 935-4526
>
>
>>-Original Message-
>>From: Couball, James [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 1:21 PM
>>To: 'Struts Users Mailing List'
>>Subject: RE: DAO or ... ?
>>
>>
>>That was it, the Command pattern was what I was thinking of...
>>but Session
    >>Façade had a bit more to it.
>>
>>Thanks for the info.
>>
>>James.
>>
>>> -Original Message-
>>> From: Jamie M [mailto:[EMAIL PROTECTED]]
>>> Sent: Monday, October 14, 2002 10:37 AM
>>> To: Struts Users Mailing List
>>> Subject: RE: DAO or ... ?
>>>
>>> How about the Command Pattern:
>>>
>>> http://www.javaworld.com/javaworld/javatips/jw-javatip68.html
>>>
>>> An EJB version is mentioned in 'EJB Design Patterns'
>>> (http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp)
>>> too.
>>>
>>> jamie
>>>
>>> --- "Couball, James" <[EMAIL PROTECTED]>
>>> wrote:
>>> > I recommend taking a look at the Session Façade
>>> > pattern in the Java Blue
>>> > Prints.  No matter if you use EJBs or not, this
>>> > pattern encap

RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

Thanks John. These youngsters ... what do you do with them!? ;-)

>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 2:16 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>That's the book he was referring to when he said GoF. They are 
>called the
>Gang of Four.
>- Original Message -
>From: "Hookom, Jacob John" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 2:12 PM
>Subject: RE: DAO or ... ?
>
>
>you should pick up "Design Patterns - Elements of Reusable 
>Object-Oriented
>Software" by Gamma, Helm, Johnshon and Vlissides under Addison-Wesley
>Publishing
>
>it's the bible for design patterns
>
>-Original Message-
>From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
>Sent: Mon 10/14/2002 2:10 PM
>To: Struts Users Mailing List
>Cc:
>Subject: RE: DAO or ... ?
>
>
>
>I'm sure that if I was an accademic chap sitting in my Ivory 
>tower, I'd be
>able to remember the "official" names, but some days I'm too 
>busy using the
>actual patterns to get beyond thinking "I need a wrapper here" and "I'd
>better hide that behind an API".
>
>Maybe I need a cheat sheet so that I can look up
>
>API = Facade
>Wrapper = Proxy
>etc etc
>
>Some days I REALLY need one of those.
>
>Simon
>
>
>>-Original Message-
>>From: John Owen [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 1:58 PM
>>To: Struts Users Mailing List
>>Subject: Re: DAO or ... ?
>>
>>
>>The funny thing is that they gave them these names so we
>>(developers) could
>>communicate better. ;) It was one of the reasons for the book.
>>- Original Message -
>>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>Sent: Monday, October 14, 2002 1:53 PM
>>Subject: RE: DAO or ... ?
>>
>>
>>You know, patterns are wonderful, but am I the only person who
>>thinks that
>>the names that were selected by the GoF are terrible? I may 
>just be old
>>fashioned, but I think in terms like wrapper, API and
>>controller, not facade
>>and command.
>>
>>Oh well. At least I can use patterns even I can't remember for
>>the life of
>>me what the official name for it is! :-)
>>
>>Simon
>>
>>-
>>Simon P. Chappell [EMAIL PROTECTED]
>>Java Programming Specialist  www.landsend.com
>>Lands' End, Inc.   (608) 935-4526
>>
>>
>>>-----Original Message-
>>>From: Couball, James [mailto:[EMAIL PROTECTED]]
>>>Sent: Monday, October 14, 2002 1:21 PM
>>>To: 'Struts Users Mailing List'
>>>Subject: RE: DAO or ... ?
>>>
>>>
>>>That was it, the Command pattern was what I was thinking of...
>>>but Session
>>>Façade had a bit more to it.
>>>
>>>Thanks for the info.
>>>
>>>James.
>>>
>>>> -Original Message-
>>>> From: Jamie M [mailto:[EMAIL PROTECTED]]
>>>> Sent: Monday, October 14, 2002 10:37 AM
>>>> To: Struts Users Mailing List
>>>> Subject: RE: DAO or ... ?
>>>>
>>>> How about the Command Pattern:
>>>>
>>>> http://www.javaworld.com/javaworld/javatips/jw-javatip68.html
>>>>
>>>> An EJB version is mentioned in 'EJB Design Patterns'
>>>> (http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp)
>>>> too.
>>>>
>>>> jamie
>>>>
>>>> --- "Couball, James" <[EMAIL PROTECTED]>
>>>> wrote:
>>>> > I recommend taking a look at the Session Façade
>>>> > pattern in the Java Blue
>>>> > Prints.  No matter if you use EJBs or not, this
>>>> > pattern encapsulates the
>>>> > ideas that Simon was mentioning.
>>>> >
>>>> > Does anyone know the name of the more general
>>>> > pattern that doesn't involve
>>>> > Session Beans specifically?
>>>> >
>>>> > One of my general concerns is "design to test".  I
>>>> > like to be able to test
>>>> > the (business/persiste

RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

Jacob,
 
I have the GoF book (you did realise that GoF is it's nickname right?). I have read it 
quite a few times and it sits on my shelf less than 36 inches from my keyboard. The 
book is wonderful and the patterns are even more wonderful. This does not stop me from 
thinking that they names that they chose are sub-optimal or non-intuitive.
 
Simon

-Original Message-
From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 2:12 PM
To: Struts Users Mailing List
Subject: RE: DAO or ... ?


you should pick up "Design Patterns - Elements of Reusable Object-Oriented Software" 
by Gamma, Helm, Johnshon and Vlissides under Addison-Wesley Publishing
 
it's the bible for design patterns

-Original Message- 
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] 
Sent: Mon 10/14/2002 2:10 PM 
To: Struts Users Mailing List 
Cc: 
Subject: RE: DAO or ... ?



I'm sure that if I was an accademic chap sitting in my Ivory tower, I'd be able to 
remember the "official" names, but some days I'm too busy using the actual patterns to 
get beyond thinking "I need a wrapper here" and "I'd better hide that behind an API".

Maybe I need a cheat sheet so that I can look up

API = Facade
Wrapper = Proxy
etc etc

Some days I REALLY need one of those.

Simon


>-Original Message-
>From: John Owen [ mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 1:58 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>The funny thing is that they gave them these names so we
>(developers) could
>communicate better. ;) It was one of the reasons for the book.
>- Original Message -
>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 1:53 PM
>Subject: RE: DAO or ... ?
>
>
>You know, patterns are wonderful, but am I the only person who
>thinks that
>the names that were selected by the GoF are terrible? I may just be old
>fashioned, but I think in terms like wrapper, API and
>controller, not facade
>and command.
>
>Oh well. At least I can use patterns even I can't remember for
>the life of
>me what the official name for it is! :-)
>
>Simon
>
>-
>Simon P. Chappell [EMAIL PROTECTED]
>Java Programming Specialist  www.landsend.com
>Lands' End, Inc.               (608) 935-4526
>
>
>>-Original Message-
>>From: Couball, James [ mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 1:21 PM
>>To: 'Struts Users Mailing List'
>>Subject: RE: DAO or ... ?
>>
>>
>>That was it, the Command pattern was what I was thinking of...
>>but Session
>>Façade had a bit more to it.
>>
>>Thanks for the info.
>>
>>James.
>>
>>> -Original Message-
>>> From: Jamie M [ mailto:[EMAIL PROTECTED]]
>>> Sent: Monday, October 14, 2002 10:37 AM
>>> To: Struts Users Mailing List
>>> Subject: RE: DAO or ... ?
>>>
>>> How about the Command Pattern:
>>>
>>> http://www.javaworld.com/javaworld/javatips/jw-javatip68.html
>>>
>>> An EJB version is mentioned in 'EJB Design Patterns'
>>> ( http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp)
>>> too.
>>>
>>> jamie
>>>
>>> --- "Couball, James" <[EMAIL PROTECTED]>
>>> wrote:
>>> > I recommend taking a look at the Session Façade
>>> > pattern in the Java Blue
>>> > Prints.  No matter if you use EJBs or not, this
>>> > pattern encapsulates the
>>> > ideas that Simon was mentioning.
>>> >
>>> > Does anyone know the name of the more general
>>> > pattern that doesn't involve
>>> > Session Beans specifically?
>>> >
>>> > One of my general concerns is "design to test".  I
>>> > like to be able to test
>>> > the (business/persistence) layer that the actions
>>> > will call independently of
>>> > struts, actions, etc.  Encapsulating that layer in
>>> > an API (or wrapping with
>>> > a session bean) makes this possible.
>>> >
>>> > Sincerely,
>>> > James.
>>> >
>>> > > -Original Message-
>>> > > From: Andrew Hill
>>> > [ mailto:[EMAIL PROTECTED]]
>>> > > Sent: Monday, October 14, 2002 8:16 AM
>>&g

Re: DAO or ... ?

2002-10-14 Thread John Owen

That's the book he was referring to when he said GoF. They are called the
Gang of Four.
- Original Message -
From: "Hookom, Jacob John" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 2:12 PM
Subject: RE: DAO or ... ?


you should pick up "Design Patterns - Elements of Reusable Object-Oriented
Software" by Gamma, Helm, Johnshon and Vlissides under Addison-Wesley
Publishing

it's the bible for design patterns

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Mon 10/14/2002 2:10 PM
To: Struts Users Mailing List
Cc:
Subject: RE: DAO or ... ?



I'm sure that if I was an accademic chap sitting in my Ivory tower, I'd be
able to remember the "official" names, but some days I'm too busy using the
actual patterns to get beyond thinking "I need a wrapper here" and "I'd
better hide that behind an API".

Maybe I need a cheat sheet so that I can look up

API = Facade
Wrapper = Proxy
etc etc

Some days I REALLY need one of those.

Simon


>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 1:58 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>The funny thing is that they gave them these names so we
>(developers) could
>communicate better. ;) It was one of the reasons for the book.
>- Original Message -
>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 1:53 PM
>Subject: RE: DAO or ... ?
>
>
>You know, patterns are wonderful, but am I the only person who
>thinks that
>the names that were selected by the GoF are terrible? I may just be old
>fashioned, but I think in terms like wrapper, API and
>controller, not facade
>and command.
>
>Oh well. At least I can use patterns even I can't remember for
>the life of
>me what the official name for it is! :-)
>
>Simon
>
>-
>Simon P. Chappell [EMAIL PROTECTED]
>Java Programming Specialist  www.landsend.com
>Lands' End, Inc.   (608) 935-4526
>
>
>>-Original Message-
>>From: Couball, James [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 1:21 PM
>>To: 'Struts Users Mailing List'
>>Subject: RE: DAO or ... ?
>>
>>
>>That was it, the Command pattern was what I was thinking of...
>>but Session
>>Façade had a bit more to it.
>>
>>Thanks for the info.
>>
>>James.
>>
>>> -Original Message-
>>> From: Jamie M [mailto:[EMAIL PROTECTED]]
>>> Sent: Monday, October 14, 2002 10:37 AM
>>> To: Struts Users Mailing List
>>> Subject: RE: DAO or ... ?
>>>
>>> How about the Command Pattern:
>>>
>>> http://www.javaworld.com/javaworld/javatips/jw-javatip68.html
>>>
>>> An EJB version is mentioned in 'EJB Design Patterns'
>>> (http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp)
>>> too.
>>>
>>> jamie
>>>
>>> --- "Couball, James" <[EMAIL PROTECTED]>
>>> wrote:
>>> > I recommend taking a look at the Session Façade
>>> > pattern in the Java Blue
>>> > Prints.  No matter if you use EJBs or not, this
>>> > pattern encapsulates the
>>> > ideas that Simon was mentioning.
>>> >
>>> > Does anyone know the name of the more general
>>> > pattern that doesn't involve
>>> > Session Beans specifically?
>>> >
>>> > One of my general concerns is "design to test".  I
>>> > like to be able to test
>>> > the (business/persistence) layer that the actions
>>> > will call independently of
>>> > struts, actions, etc.  Encapsulating that layer in
>>> > an API (or wrapping with
>>> > a session bean) makes this possible.
>>> >
>>> > Sincerely,
>>> > James.
>>> >
>>> > > -Original Message-
>>> > > From: Andrew Hill
>>> > [mailto:[EMAIL PROTECTED]]
>>> > > Sent: Monday, October 14, 2002 8:16 AM
>>> > > To: Struts Users Mailing List
>>> > > Subject: RE: DAO or ... ?
>>> > >
>>> > > But you still call the API from the action right -
>>> > is this not invoking
>

RE: DAO or ... ?

2002-10-14 Thread Hookom, Jacob John

you should pick up "Design Patterns - Elements of Reusable Object-Oriented Software" 
by Gamma, Helm, Johnshon and Vlissides under Addison-Wesley Publishing
 
it's the bible for design patterns

-Original Message- 
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] 
Sent: Mon 10/14/2002 2:10 PM 
To: Struts Users Mailing List 
Cc: 
        Subject: RE: DAO or ... ?



I'm sure that if I was an accademic chap sitting in my Ivory tower, I'd be 
able to remember the "official" names, but some days I'm too busy using the actual 
patterns to get beyond thinking "I need a wrapper here" and "I'd better hide that 
behind an API".

Maybe I need a cheat sheet so that I can look up

API = Facade
Wrapper = Proxy
etc etc

Some days I REALLY need one of those.

Simon


>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 1:58 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>The funny thing is that they gave them these names so we
>(developers) could
>communicate better. ;) It was one of the reasons for the book.
>- Original Message -
>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 1:53 PM
>Subject: RE: DAO or ... ?
>
>
>You know, patterns are wonderful, but am I the only person who
>thinks that
>the names that were selected by the GoF are terrible? I may just be old
>fashioned, but I think in terms like wrapper, API and
>controller, not facade
>and command.
>
>Oh well. At least I can use patterns even I can't remember for
>the life of
>me what the official name for it is! :-)
>
>Simon
>
>-
>Simon P. Chappell [EMAIL PROTECTED]
>Java Programming Specialist  www.landsend.com
>Lands' End, Inc.   (608) 935-4526
>
        >
>>-Original Message-
>>From: Couball, James [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 1:21 PM
>>To: 'Struts Users Mailing List'
>>Subject: RE: DAO or ... ?
>>
>>
>>That was it, the Command pattern was what I was thinking of...
>>but Session
>>Façade had a bit more to it.
        >>
>>Thanks for the info.
>>
>>James.
>>
>>> -Original Message-
>>> From: Jamie M [mailto:[EMAIL PROTECTED]]
>>> Sent: Monday, October 14, 2002 10:37 AM
>>> To: Struts Users Mailing List
>>> Subject: RE: DAO or ... ?
>>>
>>> How about the Command Pattern:
>>>
>>> http://www.javaworld.com/javaworld/javatips/jw-javatip68.html
>>>
>>> An EJB version is mentioned in 'EJB Design Patterns'
>>> (http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp)
>>> too.
>>>
>>> jamie
>>>
>>> --- "Couball, James" <[EMAIL PROTECTED]>
>>> wrote:
>>> > I recommend taking a look at the Session Façade
>>> > pattern in the Java Blue
>>> > Prints.  No matter if you use EJBs or not, this
>>> > pattern encapsulates the
>>> > ideas that Simon was mentioning.
>>> >
>>> > Does anyone know the name of the more general
>>> > pattern that doesn't involve
>>> > Session Beans specifically?
>>> >
>>> > One of my general concerns is "design to test".  I
>>> > like to be able to test
>>> > the (business/persistence) layer that the actions
>>> > will call independently of
>>> > struts, actions, etc.  Encapsulating that layer in
>>> > an API (or wrapping with
>>> > a session bean) makes th

RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

I'm sure that if I was an accademic chap sitting in my Ivory tower, I'd be able to 
remember the "official" names, but some days I'm too busy using the actual patterns to 
get beyond thinking "I need a wrapper here" and "I'd better hide that behind an API".

Maybe I need a cheat sheet so that I can look up

API = Facade
Wrapper = Proxy
etc etc

Some days I REALLY need one of those.

Simon


>-Original Message-
>From: John Owen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 1:58 PM
>To: Struts Users Mailing List
>Subject: Re: DAO or ... ?
>
>
>The funny thing is that they gave them these names so we 
>(developers) could
>communicate better. ;) It was one of the reasons for the book.
>- Original Message -
>From: "Chappell, Simon P" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, October 14, 2002 1:53 PM
>Subject: RE: DAO or ... ?
>
>
>You know, patterns are wonderful, but am I the only person who 
>thinks that
>the names that were selected by the GoF are terrible? I may just be old
>fashioned, but I think in terms like wrapper, API and 
>controller, not facade
>and command.
>
>Oh well. At least I can use patterns even I can't remember for 
>the life of
>me what the official name for it is! :-)
>
>Simon
>
>-
>Simon P. Chappell [EMAIL PROTECTED]
>Java Programming Specialist  www.landsend.com
>Lands' End, Inc.           (608) 935-4526
>
>
>>-Original Message-
>>From: Couball, James [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 14, 2002 1:21 PM
>>To: 'Struts Users Mailing List'
>>Subject: RE: DAO or ... ?
>>
>>
>>That was it, the Command pattern was what I was thinking of...
>>but Session
>>Façade had a bit more to it.
>>
>>Thanks for the info.
>>
>>James.
>>
>>> -Original Message-
>>> From: Jamie M [mailto:[EMAIL PROTECTED]]
>>> Sent: Monday, October 14, 2002 10:37 AM
>>> To: Struts Users Mailing List
>>> Subject: RE: DAO or ... ?
>>>
>>> How about the Command Pattern:
>>>
>>> http://www.javaworld.com/javaworld/javatips/jw-javatip68.html
>>>
>>> An EJB version is mentioned in 'EJB Design Patterns'
>>> (http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp)
>>> too.
>>>
>>> jamie
>>>
>>> --- "Couball, James" <[EMAIL PROTECTED]>
>>> wrote:
>>> > I recommend taking a look at the Session Façade
>>> > pattern in the Java Blue
>>> > Prints.  No matter if you use EJBs or not, this
>>> > pattern encapsulates the
>>> > ideas that Simon was mentioning.
>>> >
>>> > Does anyone know the name of the more general
>>> > pattern that doesn't involve
>>> > Session Beans specifically?
>>> >
>>> > One of my general concerns is "design to test".  I
>>> > like to be able to test
>>> > the (business/persistence) layer that the actions
>>> > will call independently of
>>> > struts, actions, etc.  Encapsulating that layer in
>>> > an API (or wrapping with
>>> > a session bean) makes this possible.
>>> >
>>> > Sincerely,
>>> > James.
>>> >
>>> > > -Original Message-
>>> > > From: Andrew Hill
>>> > [mailto:[EMAIL PROTECTED]]
>>> > > Sent: Monday, October 14, 2002 8:16 AM
>>> > > To: Struts Users Mailing List
>>> > > Subject: RE: DAO or ... ?
>>> > >
>>> > > But you still call the API from the action right -
>>> > is this not invoking
>>> > > the
>>> > > functionality that persists your data?
>>> > >
>>> > > Seems a bit like semantic juggling to me... (after
>>> > all the persistance
>>> > > layer
>>> > > is just an abstraction API on top of writing to
>>> > db/disk/punchcard
>>> > > itself...)
>>> > > ;-)
>>> > >
>>> > > I would however agree that there ought to be some
>>> > sort of abstracting
>>> > > layer
>>> > > between the view and the implementation specific
>>&

Re: DAO or ... ?

2002-10-14 Thread John Owen

The funny thing is that they gave them these names so we (developers) could
communicate better. ;) It was one of the reasons for the book.
- Original Message -
From: "Chappell, Simon P" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 1:53 PM
Subject: RE: DAO or ... ?


You know, patterns are wonderful, but am I the only person who thinks that
the names that were selected by the GoF are terrible? I may just be old
fashioned, but I think in terms like wrapper, API and controller, not facade
and command.

Oh well. At least I can use patterns even I can't remember for the life of
me what the official name for it is! :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


>-Original Message-
>From: Couball, James [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 1:21 PM
>To: 'Struts Users Mailing List'
>Subject: RE: DAO or ... ?
>
>
>That was it, the Command pattern was what I was thinking of...
>but Session
>Façade had a bit more to it.
>
>Thanks for the info.
>
>James.
>
>> -Original Message-
>> From: Jamie M [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, October 14, 2002 10:37 AM
>> To: Struts Users Mailing List
>> Subject: RE: DAO or ... ?
>>
>> How about the Command Pattern:
>>
>> http://www.javaworld.com/javaworld/javatips/jw-javatip68.html
>>
>> An EJB version is mentioned in 'EJB Design Patterns'
>> (http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp)
>> too.
>>
>> jamie
>>
>> --- "Couball, James" <[EMAIL PROTECTED]>
>> wrote:
>> > I recommend taking a look at the Session Façade
>> > pattern in the Java Blue
>> > Prints.  No matter if you use EJBs or not, this
>> > pattern encapsulates the
>> > ideas that Simon was mentioning.
>> >
>> > Does anyone know the name of the more general
>> > pattern that doesn't involve
>> > Session Beans specifically?
>> >
>> > One of my general concerns is "design to test".  I
>> > like to be able to test
>> > the (business/persistence) layer that the actions
>> > will call independently of
>> > struts, actions, etc.  Encapsulating that layer in
>> > an API (or wrapping with
>> > a session bean) makes this possible.
>> >
>> > Sincerely,
>> > James.
>> >
>> > > -Original Message-
>> > > From: Andrew Hill
>> > [mailto:[EMAIL PROTECTED]]
>> > > Sent: Monday, October 14, 2002 8:16 AM
>> > > To: Struts Users Mailing List
>> > > Subject: RE: DAO or ... ?
>> > >
>> > > But you still call the API from the action right -
>> > is this not invoking
>> > > the
>> > > functionality that persists your data?
>> > >
>> > > Seems a bit like semantic juggling to me... (after
>> > all the persistance
>> > > layer
>> > > is just an abstraction API on top of writing to
>> > db/disk/punchcard
>> > > itself...)
>> > > ;-)
>> > >
>> > > I would however agree that there ought to be some
>> > sort of abstracting
>> > > layer
>> > > between the view and the implementation specific
>> > details of the p-tier...
>> > >
>> > > -Original Message-
>> > > From: Chappell, Simon P
>> > [mailto:[EMAIL PROTECTED]]
>> > > Sent: Monday, October 14, 2002 23:04
>> > > To: Struts Users Mailing List;
>> > [EMAIL PROTECTED]
>> > > Subject: RE: DAO or ... ?
>> > >
>> > >
>> > > You invoke your persistence code in the same place
>> > that you would invoke
>> > > any
>> > > other code ... not in the Action!
>> > >
>> > > Write all your core application code (business
>> > rules, persistence,
>> > > communications etc) in a way that has no
>> > connection to the view portion of
>> > > your system and then create a API to it. This way
>> > you can have any client
>> > > you like call into your core code and your core
>> > code doesn't need to worry
>> > > about what calls it, only about acting upon
>> > requests.
>&g

RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

You know, patterns are wonderful, but am I the only person who thinks that the names 
that were selected by the GoF are terrible? I may just be old fashioned, but I think 
in terms like wrapper, API and controller, not facade and command.

Oh well. At least I can use patterns even I can't remember for the life of me what the 
official name for it is! :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


>-Original Message-
>From: Couball, James [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 1:21 PM
>To: 'Struts Users Mailing List'
>Subject: RE: DAO or ... ?
>
>
>That was it, the Command pattern was what I was thinking of... 
>but Session
>Façade had a bit more to it.
>
>Thanks for the info.
>
>James.
>
>> -Original Message-
>> From: Jamie M [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, October 14, 2002 10:37 AM
>> To: Struts Users Mailing List
>> Subject: RE: DAO or ... ?
>> 
>> How about the Command Pattern:
>> 
>> http://www.javaworld.com/javaworld/javatips/jw-javatip68.html
>> 
>> An EJB version is mentioned in 'EJB Design Patterns'
>> (http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp)
>> too.
>> 
>> jamie
>> 
>> --- "Couball, James" <[EMAIL PROTECTED]>
>> wrote:
>> > I recommend taking a look at the Session Façade
>> > pattern in the Java Blue
>> > Prints.  No matter if you use EJBs or not, this
>> > pattern encapsulates the
>> > ideas that Simon was mentioning.
>> >
>> > Does anyone know the name of the more general
>> > pattern that doesn't involve
>> > Session Beans specifically?
>> >
>> > One of my general concerns is "design to test".  I
>> > like to be able to test
>> > the (business/persistence) layer that the actions
>> > will call independently of
>> > struts, actions, etc.  Encapsulating that layer in
>> > an API (or wrapping with
>> > a session bean) makes this possible.
>> >
>> > Sincerely,
>> > James.
>> >
>> > > -Original Message-
>> > > From: Andrew Hill
>> > [mailto:[EMAIL PROTECTED]]
>> > > Sent: Monday, October 14, 2002 8:16 AM
>> > > To: Struts Users Mailing List
>> > > Subject: RE: DAO or ... ?
>> > >
>> > > But you still call the API from the action right -
>> > is this not invoking
>> > > the
>> > > functionality that persists your data?
>> > >
>> > > Seems a bit like semantic juggling to me... (after
>> > all the persistance
>> > > layer
>> > > is just an abstraction API on top of writing to
>> > db/disk/punchcard
>> > > itself...)
>> > > ;-)
>> > >
>> > > I would however agree that there ought to be some
>> > sort of abstracting
>> > > layer
>> > > between the view and the implementation specific
>> > details of the p-tier...
>> > >
>> > > -Original Message-
>> > > From: Chappell, Simon P
>> > [mailto:[EMAIL PROTECTED]]
>> > > Sent: Monday, October 14, 2002 23:04
>> > > To: Struts Users Mailing List;
>> > [EMAIL PROTECTED]
>> > > Subject: RE: DAO or ... ?
>> > >
>> > >
>> > > You invoke your persistence code in the same place
>> > that you would invoke
>> > > any
>> > > other code ... not in the Action!
>> > >
>> > > Write all your core application code (business
>> > rules, persistence,
>> > > communications etc) in a way that has no
>> > connection to the view portion of
>> > > your system and then create a API to it. This way
>> > you can have any client
>> > > you like call into your core code and your core
>> > code doesn't need to worry
>> > > about what calls it, only about acting upon
>> > requests.
>> > >
>> > > Then use the actions to call into the API and pass
>> > the API return values
>> > > to
>> > > the JSPs. Works great.
>> > >
>> > > /--\/---\   /\
>> > > |Client|--> |API|-->|Core|
>> > > |Code  ||   |   |

RE: DAO or ... ?

2002-10-14 Thread Couball, James

That was it, the Command pattern was what I was thinking of... but Session
Façade had a bit more to it.

Thanks for the info.

James.

> -Original Message-
> From: Jamie M [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 10:37 AM
> To: Struts Users Mailing List
> Subject: RE: DAO or ... ?
> 
> How about the Command Pattern:
> 
> http://www.javaworld.com/javaworld/javatips/jw-javatip68.html
> 
> An EJB version is mentioned in 'EJB Design Patterns'
> (http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp)
> too.
> 
> jamie
> 
> --- "Couball, James" <[EMAIL PROTECTED]>
> wrote:
> > I recommend taking a look at the Session Façade
> > pattern in the Java Blue
> > Prints.  No matter if you use EJBs or not, this
> > pattern encapsulates the
> > ideas that Simon was mentioning.
> >
> > Does anyone know the name of the more general
> > pattern that doesn't involve
> > Session Beans specifically?
> >
> > One of my general concerns is "design to test".  I
> > like to be able to test
> > the (business/persistence) layer that the actions
> > will call independently of
> > struts, actions, etc.  Encapsulating that layer in
> > an API (or wrapping with
> > a session bean) makes this possible.
> >
> > Sincerely,
> > James.
> >
> > > -Original Message-
> > > From: Andrew Hill
> > [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, October 14, 2002 8:16 AM
> > > To: Struts Users Mailing List
> > > Subject: RE: DAO or ... ?
> > >
> > > But you still call the API from the action right -
> > is this not invoking
> > > the
> > > functionality that persists your data?
> > >
> > > Seems a bit like semantic juggling to me... (after
> > all the persistance
> > > layer
> > > is just an abstraction API on top of writing to
> > db/disk/punchcard
> > > itself...)
> > > ;-)
> > >
> > > I would however agree that there ought to be some
> > sort of abstracting
> > > layer
> > > between the view and the implementation specific
> > details of the p-tier...
> > >
> > > -Original Message-
> > > From: Chappell, Simon P
> > [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, October 14, 2002 23:04
> > > To: Struts Users Mailing List;
> > [EMAIL PROTECTED]
> > > Subject: RE: DAO or ... ?
> > >
> > >
> > > You invoke your persistence code in the same place
> > that you would invoke
> > > any
> > > other code ... not in the Action!
> > >
> > > Write all your core application code (business
> > rules, persistence,
> > > communications etc) in a way that has no
> > connection to the view portion of
> > > your system and then create a API to it. This way
> > you can have any client
> > > you like call into your core code and your core
> > code doesn't need to worry
> > > about what calls it, only about acting upon
> > requests.
> > >
> > > Then use the actions to call into the API and pass
> > the API return values
> > > to
> > > the JSPs. Works great.
> > >
> > > /--\/---\   /\
> > > |Client|--> |API|-->|Core|
> > > |Code  |    |   |   |Code|
> > > \--/\---/   \/
> > >
> > > The API is now your fire break. Nothing on the
> > Core Code side has to worry
> > > about displaying anything and nothing in the
> > Client Code has to worry
> > > about
> > > calculating anything.
> > >
> > > Simon
> > >
> > >
> >
> -
> > > Simon P. Chappell
> > [EMAIL PROTECTED]
> > > Java Programming Specialist
> > www.landsend.com
> > > Lands' End, Inc.
> > (608) 935-4526
> > >
> > >
> > > >-Original Message-
> > > >From: Andrew Hill
> > [mailto:[EMAIL PROTECTED]]
> > > >Sent: Monday, October 14, 2002 9:57 AM
> > > >To: Struts Users Mailing List
> > > >Subject: RE: DAO or ... ?
> > > >
> > > >
> > > >So where should one invoke the persistance layer?
> > > >
> > > >-Original Message-
> > > >From: Lacerda, Wellington (AFIS)
> > [mailto:[EMAIL PROTECTED]]
> > > >Sent: Monday, October 14, 2002 22:51
>

RE: DAO or ... ? [Scanned for known viruses]

2002-10-14 Thread Kevin . Bedell





James -

I've attached a few files from my upcoming book Struts Kick Start that
provide a basic design pattern that sounds like it may be similar to what
your describing.

What I do is:

 - Create a Value Object that encapsulates data communicated with the Model
component.

 - Create a facade class that accepts and returns value objects through
'business methods'. By defining the facade to work at a 'business method'
level, it helps keep any code related to a particular persistence layer or
back-end system out of the Action class. This also addresses the issues you
described of 'designing to test' - the clean seperation between the Action
class and the Model components that the Facade provides simplifies testing.

 - Create the form bean to provide set/get methods that also accept and
return value objects - this greatly simplifies the Action class and
isolates it from changes.

The Action class (a bit simplified - I've taken out detailed comments and
exception handling) goes something like:

  // cast the form bean
  CustomerForm cf = (CustomerForm) form;

  // Create a facade to interface to the back-end system
  CustomerWSFacade facade = new CustomerWSFacade();

  // Extract the value object from the form bean
  CustomerValueObject cvo = cf.getValueObject();

  // Pass the value object to the facade. It returns an update value object
  cvo = facade.addressChange( cvo );

  // Use the returned value object to update the values in the form bean.
  cf.setValueObject(cvo);

These particular classes come from the chapter on providing integration
with Axis for Web Services. Another chapter uses the identical set of
classes to communicate with JBoss using a Session Bean - all I did was
write a different facade class. The point of this was to demonstrate a
design that made it very simple to perform maintenance or changes on the
back-end or persistence layer.



Regarding testing - I'd recommend you take a look at the StrutsTestCase
project at sourceforge - it provides some great templates for both JUnit
and Cactus tests that are designed for Struts. Makes JUnit/Cactus testing
pretty straightforward. A copy of this and detailed directions also come
with the book.

  http://strutstestcase.sourceforge.net/


Best of luck -
Kevin


Author, Struts Kick Start

(See attached file: customer.zip)























"Couball, James" <[EMAIL PROTECTED]> on 10/14/2002 01:19:16 PM

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:"'Struts Users Mailing List'" <[EMAIL PROTECTED]>
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:RE: DAO or ... ?


I recommend taking a look at the Session Façade pattern in the Java Blue
Prints.  No matter if you use EJBs or not, this pattern encapsulates the
ideas that Simon was mentioning.

Does anyone know the name of the more general pattern that doesn't involve
Session Beans specifically?

One of my general concerns is "design to test".  I like to be able to test
the (business/persistence) layer that the actions will call independently
of
struts, actions, etc.  Encapsulating that layer in an API (or wrapping with
a session bean) makes this possible.

Sincerely,
James.

> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 8:16 AM
> To: Struts Users Mailing List
> Subject: RE: DAO or ... ?
>
> But you still call the API from the action right - is this not invoking
> the
> functionality that persists your data?
>
> Seems a bit like semantic juggling to me... (after all the persistance
> layer
> is just an abstraction API on top of writing to db/disk/punchcard
> itself...)
> ;-)
>
> I would however agree that there ought to be some sort of abstracting
> layer
> between the view and the implementation specific details of the p-tier...
>
> -----Original Message-
> From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 23:04
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: DAO or ... ?
>
>
> You invoke your persistence code in the same place that you would invoke
> any
> other code ... not in the Action!
>
> Write all your core application code (business rules, persistence,
> communications etc) in a way that has no connection to the view portion
of
> your system and then create a API to it. This way you can have any client
> you like call into your core code and your core code doesn't need to
worry
> about what calls it, only about acting upon requests.
>
> Then use the actions to call into the API and pass the API return values
> to
> the JSPs. Works great.
>
> /--\/---\   /\
> |Client|--> |API|-->

RE: DAO or ... ?

2002-10-14 Thread Jamie M

How about the Command Pattern:

http://www.javaworld.com/javaworld/javatips/jw-javatip68.html

An EJB version is mentioned in 'EJB Design Patterns'
(http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp)
too.

jamie

--- "Couball, James" <[EMAIL PROTECTED]>
wrote:
> I recommend taking a look at the Session Façade
> pattern in the Java Blue
> Prints.  No matter if you use EJBs or not, this
> pattern encapsulates the
> ideas that Simon was mentioning.  
> 
> Does anyone know the name of the more general
> pattern that doesn't involve
> Session Beans specifically?
> 
> One of my general concerns is "design to test".  I
> like to be able to test
> the (business/persistence) layer that the actions
> will call independently of
> struts, actions, etc.  Encapsulating that layer in
> an API (or wrapping with
> a session bean) makes this possible.  
> 
> Sincerely,
> James. 
> 
> > -Original Message-
> > From: Andrew Hill
> [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 14, 2002 8:16 AM
> > To: Struts Users Mailing List
> > Subject: RE: DAO or ... ?
> > 
> > But you still call the API from the action right -
> is this not invoking
> > the
> > functionality that persists your data?
> > 
> > Seems a bit like semantic juggling to me... (after
> all the persistance
> > layer
> > is just an abstraction API on top of writing to
> db/disk/punchcard
> > itself...)
> > ;-)
> > 
> > I would however agree that there ought to be some
> sort of abstracting
> > layer
> > between the view and the implementation specific
> details of the p-tier...
> > 
> > -Original Message-
> > From: Chappell, Simon P
> [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 14, 2002 23:04
> > To: Struts Users Mailing List;
> [EMAIL PROTECTED]
> > Subject: RE: DAO or ... ?
> > 
> > 
> > You invoke your persistence code in the same place
> that you would invoke
> > any
> > other code ... not in the Action!
> > 
> > Write all your core application code (business
> rules, persistence,
> > communications etc) in a way that has no
> connection to the view portion of
> > your system and then create a API to it. This way
> you can have any client
> > you like call into your core code and your core
> code doesn't need to worry
> > about what calls it, only about acting upon
> requests.
> > 
> > Then use the actions to call into the API and pass
> the API return values
> > to
> > the JSPs. Works great.
> > 
> > /--\/---\   /\
> > |Client|--> |API|-->|Core|
> > |Code  ||   |   |Code|
> > \--/\---/   \/
> > 
> > The API is now your fire break. Nothing on the
> Core Code side has to worry
> > about displaying anything and nothing in the
> Client Code has to worry
> > about
> > calculating anything.
> > 
> > Simon
> > 
> >
>
-
> > Simon P. Chappell
> [EMAIL PROTECTED]
> > Java Programming Specialist 
> www.landsend.com
> > Lands' End, Inc.          
> (608) 935-4526
> > 
> > 
> > >-Original Message-
> > >From: Andrew Hill
> [mailto:[EMAIL PROTECTED]]
> > >Sent: Monday, October 14, 2002 9:57 AM
> > >To: Struts Users Mailing List
> > >Subject: RE: DAO or ... ?
> > >
> > >
> > >So where should one invoke the persistance layer?
> > >
> > >-Original Message-
> > >From: Lacerda, Wellington (AFIS)
> [mailto:[EMAIL PROTECTED]]
> > >Sent: Monday, October 14, 2002 22:51
> > >To: 'Struts Users Mailing List'
> > >Subject: RE: DAO or ... ?
> > >Importance: High
> > >
> > >
> > >Hi Kevin
> > >
> > >Avoid persistence in Action code as much as you
> can.
> > >
> > >This is the general recommendation.
> > >
> > >Wellington Silva
> > >Author of "JSP and Tag Libraries for Web
> Development"
> > >FAO of the UN - Consultant
> > >
> > >-Original Message-
> > >From: Kevin Viet [mailto:[EMAIL PROTECTED]]
> > >Sent: Monday, October 14, 2002 4:45 PM
> > >To: struts-user
> > >Subject: DAO or ... ?
> > >
> > >
> > >My question is a web app design question.
> > >What pattern you guys follow when yo

Re: DAO or ... ?

2002-10-14 Thread John Owen

The generic pattern is just the facade pattern. A unified interface to a set
of interfaces in a subsystem. You may incorporate the usage of a Proxy
pattern or Mediator pattern to produce layering such as the facade->DAO
does.
- Original Message -
From: "Couball, James" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 12:19 PM
Subject: RE: DAO or ... ?


I recommend taking a look at the Session Façade pattern in the Java Blue
Prints.  No matter if you use EJBs or not, this pattern encapsulates the
ideas that Simon was mentioning.

Does anyone know the name of the more general pattern that doesn't involve
Session Beans specifically?

One of my general concerns is "design to test".  I like to be able to test
the (business/persistence) layer that the actions will call independently of
struts, actions, etc.  Encapsulating that layer in an API (or wrapping with
a session bean) makes this possible.

Sincerely,
James.

> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 8:16 AM
> To: Struts Users Mailing List
> Subject: RE: DAO or ... ?
>
> But you still call the API from the action right - is this not invoking
> the
> functionality that persists your data?
>
> Seems a bit like semantic juggling to me... (after all the persistance
> layer
> is just an abstraction API on top of writing to db/disk/punchcard
> itself...)
> ;-)
>
> I would however agree that there ought to be some sort of abstracting
> layer
> between the view and the implementation specific details of the p-tier...
>
> -Original Message-
> From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 23:04
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: DAO or ... ?
>
>
> You invoke your persistence code in the same place that you would invoke
> any
> other code ... not in the Action!
>
> Write all your core application code (business rules, persistence,
> communications etc) in a way that has no connection to the view portion of
> your system and then create a API to it. This way you can have any client
> you like call into your core code and your core code doesn't need to worry
> about what calls it, only about acting upon requests.
>
> Then use the actions to call into the API and pass the API return values
> to
> the JSPs. Works great.
>
> /--\/---\   /\
> |Client|--> |API|-->|Core|
> |Code  ||   |   |Code|
> \--/\---/   \/
>
> The API is now your fire break. Nothing on the Core Code side has to worry
> about displaying anything and nothing in the Client Code has to worry
> about
> calculating anything.
>
> Simon
>
> -
> Simon P. Chappell [EMAIL PROTECTED]
> Java Programming Specialist  www.landsend.com
> Lands' End, Inc.   (608) 935-4526
>
>
> >-Original Message-
> >From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, October 14, 2002 9:57 AM
> >To: Struts Users Mailing List
> >Subject: RE: DAO or ... ?
> >
> >
> >So where should one invoke the persistance layer?
> >
> >-Original Message-
> >From: Lacerda, Wellington (AFIS) [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, October 14, 2002 22:51
> >To: 'Struts Users Mailing List'
> >Subject: RE: DAO or ... ?
> >Importance: High
> >
> >
> >Hi Kevin
> >
> >Avoid persistence in Action code as much as you can.
> >
> >This is the general recommendation.
> >
> >Wellington Silva
> >Author of "JSP and Tag Libraries for Web Development"
> >FAO of the UN - Consultant
> >
> >-Original Message-
> >From: Kevin Viet [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, October 14, 2002 4:45 PM
> >To: struts-user
> >Subject: DAO or ... ?
> >
> >
> >My question is a web app design question.
> >What pattern you guys follow when you want to save a domain object in
> >the database ?:
> >
> >- use the DAO pattern of java blueprint  (persistence layer is called
> >into classes)
> >- call to persistence statements into action code :
> >
> > // store example
> > try {
> > PeristenceLayer pl = getPerstitenceLayer();
> > pl.save(domainObject);
> > }
> > catch (Exception
> >
> >
> >--
> >Kevin Viet <[EMAIL PROTECTED]>
> >ActiVia Networks
> >
> >
> >
> >
> >--

RE: DAO or ... ?

2002-10-14 Thread Couball, James

I recommend taking a look at the Session Façade pattern in the Java Blue
Prints.  No matter if you use EJBs or not, this pattern encapsulates the
ideas that Simon was mentioning.  

Does anyone know the name of the more general pattern that doesn't involve
Session Beans specifically?

One of my general concerns is "design to test".  I like to be able to test
the (business/persistence) layer that the actions will call independently of
struts, actions, etc.  Encapsulating that layer in an API (or wrapping with
a session bean) makes this possible.  

Sincerely,
James. 

> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 8:16 AM
> To: Struts Users Mailing List
> Subject: RE: DAO or ... ?
> 
> But you still call the API from the action right - is this not invoking
> the
> functionality that persists your data?
> 
> Seems a bit like semantic juggling to me... (after all the persistance
> layer
> is just an abstraction API on top of writing to db/disk/punchcard
> itself...)
> ;-)
> 
> I would however agree that there ought to be some sort of abstracting
> layer
> between the view and the implementation specific details of the p-tier...
> 
> -Original Message-
> From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 23:04
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: DAO or ... ?
> 
> 
> You invoke your persistence code in the same place that you would invoke
> any
> other code ... not in the Action!
> 
> Write all your core application code (business rules, persistence,
> communications etc) in a way that has no connection to the view portion of
> your system and then create a API to it. This way you can have any client
> you like call into your core code and your core code doesn't need to worry
> about what calls it, only about acting upon requests.
> 
> Then use the actions to call into the API and pass the API return values
> to
> the JSPs. Works great.
> 
> /--\/---\   /\
> |Client|--> |API|-->|Core|
> |Code  ||   |   |Code|
> \--/\---/   \/
> 
> The API is now your fire break. Nothing on the Core Code side has to worry
> about displaying anything and nothing in the Client Code has to worry
> about
> calculating anything.
> 
> Simon
> 
> -
> Simon P. Chappell [EMAIL PROTECTED]
> Java Programming Specialist  www.landsend.com
> Lands' End, Inc.               (608) 935-4526
> 
> 
> >-Original Message-
> >From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, October 14, 2002 9:57 AM
> >To: Struts Users Mailing List
> >Subject: RE: DAO or ... ?
> >
> >
> >So where should one invoke the persistance layer?
> >
> >-Original Message-
> >From: Lacerda, Wellington (AFIS) [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, October 14, 2002 22:51
> >To: 'Struts Users Mailing List'
> >Subject: RE: DAO or ... ?
> >Importance: High
> >
> >
> >Hi Kevin
> >
> >Avoid persistence in Action code as much as you can.
> >
> >This is the general recommendation.
> >
> >Wellington Silva
> >Author of "JSP and Tag Libraries for Web Development"
> >FAO of the UN - Consultant
> >
> >-Original Message-
> >From: Kevin Viet [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, October 14, 2002 4:45 PM
> >To: struts-user
> >Subject: DAO or ... ?
> >
> >
> >My question is a web app design question.
> >What pattern you guys follow when you want to save a domain object in
> >the database ?:
> >
> >- use the DAO pattern of java blueprint  (persistence layer is called
> >into classes)
> >- call to persistence statements into action code :
> >
> > // store example
> > try {
> > PeristenceLayer pl = getPerstitenceLayer();
> > pl.save(domainObject);
> > }
> > catch (Exception
> >
> >
> >--
> >Kevin Viet <[EMAIL PROTECTED]>
> >ActiVia Networks
> >
> >
> >
> >
> >--
> >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]>
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:struts-user-
> [EMAIL PROTECTED]>

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




RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

Andrew,

>-Original Message-
>From: Andrew Hill [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 10:16 AM
>To: Struts Users Mailing List
>Subject: RE: DAO or ... ?
>
>
>But you still call the API from the action right - is this not 
>invoking the
>functionality that persists your data?

Yes. In fact, we only ever communicate from the Actions to the Core code via the API. 
This gives us wonderfully straight-forward actions (extract data from form, call 
appropriate API method, load form with returned data). The actions in our application 
are the conduits between Struts and our core code.

>Seems a bit like semantic juggling to me... (after all the 
>persistance layer
>is just an abstraction API on top of writing to 
>db/disk/punchcard itself...)
>;-)

Yoda might say: "Everything a layer is".

The problem is not that something is or is not a layer, but is it useful and does the 
extra abstraction help or hinder?! In our project we found the concept of a solid API 
to work wonderfully for us. YMMV. :-)

>I would however agree that there ought to be some sort of 
>abstracting layer
>between the view and the implementation specific details of 
>the p-tier...

I'd say that you'd want at least two layers between V and P. How about V -> C - > M -> 
P. We have a couple of sub-layers in the M and P layers as well. We split some of the 
core code facilities into sub-systems, to facilitate converting them to services at a 
later date.

Every system is different and has unique constraints. Ours, had the risk that they 
would take Struts away from us, so we HAD to be interface agnostic. In the end they 
approved Struts (with some muttering and grumbling ... well, lots of muttering 
actually :-), so we had no interface rework, but it was a VERY real possibility for 
the first 50% of the project. Under such circumstances, layers are your friend!

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526

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




RE: DAO or ... ?

2002-10-14 Thread Kevin Viet

Le lun 14/10/2002 à 17:10, Wendy Smoak a écrit :
> > PeristenceLayer pl = getPerstitenceLayer();
> > pl.save(domainObject);
> > But I'v read that the domain  objects needn't know that are persitent,
> > if you implement a save method that means that ur object know it can be
> > persisted
> 
> In that example, the domainObject still doesn't have to know if/how it's
> being persisted.
> 
> I've implemented the whole DAO pattern, excepting the last bit that makes it
> easy to switch databases since it's highly unlikely that will happen here.
> 
> In 'EditContactAction' I have:
> 
>DAOFactory udFactory = DAOFactory.getDAOFactory(); 
>ContactDAO contactDAO = udFactory.getContactDAO();
>Contact contact = contactDAO.createContact();
> 
> Later, in 'ProcessContactAction' there's:
> 
>contactDAO.updateContact( contact );
> 
> So while the Actions know that persistence is happening, they have no idea
> how it occurs.
> 

so domainObject doesn't know about the DAO existence, and DAO's
represent ur persistence layer that is called into the struts action.
so if I can implement a generic DAO (that workd for all domain objects)
i will have

GenericDAO gd = // obtain a reference

Contact contact = session.getAttribute("contact");
gd.update(contact);


 

> -- 
> Wendy Smoak
> http://sourceforge.net/projects/unidbtags
-- 
Kevin Viet <[EMAIL PROTECTED]>
ActiVia Networks




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




RE: DAO or ... ?

2002-10-14 Thread Andrew Hill

But you still call the API from the action right - is this not invoking the
functionality that persists your data?

Seems a bit like semantic juggling to me... (after all the persistance layer
is just an abstraction API on top of writing to db/disk/punchcard itself...)
;-)

I would however agree that there ought to be some sort of abstracting layer
between the view and the implementation specific details of the p-tier...

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 23:04
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: DAO or ... ?


You invoke your persistence code in the same place that you would invoke any
other code ... not in the Action!

Write all your core application code (business rules, persistence,
communications etc) in a way that has no connection to the view portion of
your system and then create a API to it. This way you can have any client
you like call into your core code and your core code doesn't need to worry
about what calls it, only about acting upon requests.

Then use the actions to call into the API and pass the API return values to
the JSPs. Works great.

/--\/---\   /\
|Client|--> |API|-->|Core|
|Code  ||   |   |Code|
\--/\---/   \/

The API is now your fire break. Nothing on the Core Code side has to worry
about displaying anything and nothing in the Client Code has to worry about
calculating anything.

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


>-Original Message-
>From: Andrew Hill [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 9:57 AM
>To: Struts Users Mailing List
>Subject: RE: DAO or ... ?
>
>
>So where should one invoke the persistance layer?
>
>-Original Message-
>From: Lacerda, Wellington (AFIS) [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 22:51
>To: 'Struts Users Mailing List'
>Subject: RE: DAO or ... ?
>Importance: High
>
>
>Hi Kevin
>
>Avoid persistence in Action code as much as you can.
>
>This is the general recommendation.
>
>Wellington Silva
>Author of "JSP and Tag Libraries for Web Development"
>FAO of the UN - Consultant
>
>-Original Message-
>From: Kevin Viet [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 4:45 PM
>To: struts-user
>Subject: DAO or ... ?
>
>
>My question is a web app design question.
>What pattern you guys follow when you want to save a domain object in
>the database ?:
>
>- use the DAO pattern of java blueprint  (persistence layer is called
>into classes)
>- call to persistence statements into action code :
>
>   // store example
>   try {
>   PeristenceLayer pl = getPerstitenceLayer();
>   pl.save(domainObject);
>   }
>   catch (Exception
>
>
>--
>Kevin Viet <[EMAIL PROTECTED]>
>ActiVia Networks
>
>
>
>
>--
>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]>


--
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]>




RE: DAO or ... ?

2002-10-14 Thread Wendy Smoak

> PeristenceLayer pl = getPerstitenceLayer();
> pl.save(domainObject);
> But I'v read that the domain  objects needn't know that are persitent,
> if you implement a save method that means that ur object know it can be
> persisted

In that example, the domainObject still doesn't have to know if/how it's
being persisted.

I've implemented the whole DAO pattern, excepting the last bit that makes it
easy to switch databases since it's highly unlikely that will happen here.

In 'EditContactAction' I have:

   DAOFactory udFactory = DAOFactory.getDAOFactory(); 
   ContactDAO contactDAO = udFactory.getContactDAO();
   Contact contact = contactDAO.createContact();

Later, in 'ProcessContactAction' there's:

   contactDAO.updateContact( contact );

So while the Actions know that persistence is happening, they have no idea
how it occurs.

-- 
Wendy Smoak
http://sourceforge.net/projects/unidbtags 



RE: DAO or ... ?

2002-10-14 Thread Andrew Hill

Dont know that I like the idea of tying the form bean to the persistance
layer so tightly.
(Although admitedly my own formbeans know a wee bit more than they ought to
about the persistance stuff!)

-Original Message-
From: news [mailto:[EMAIL PROTECTED]]On Behalf Of V. Cekvenich
Sent: Monday, October 14, 2002 22:55
To: [EMAIL PROTECTED]
Subject: Re: DAO or ... ?


"Avoid persistence in Action code as much as you can."
Yes.
And a way to do that is to say in action something like:

formBean.save()

where the formBean has something like this in save() {getDAO().update()}

and the DAo does the save for the bean.

.V

Lacerda, Wellington (AFIS) wrote:
> Hi Kevin
>
> Avoid persistence in Action code as much as you can.
>
> This is the general recommendation.
>
> Wellington Silva
> Author of "JSP and Tag Libraries for Web Development"
> FAO of the UN - Consultant
>
> -Original Message-
> From: Kevin Viet [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 4:45 PM
> To: struts-user
> Subject: DAO or ... ?
>
>
> My question is a web app design question.
> What pattern you guys follow when you want to save a domain object in
> the database ?:
>
> - use the DAO pattern of java blueprint  (persistence layer is called
> into classes)
> - call to persistence statements into action code :
>
>   // store example
>   try {
>   PeristenceLayer pl = getPerstitenceLayer();
>   pl.save(domainObject);
>   }
>   catch (Exception
>
>




--
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]>




RE: DAO or ... ?

2002-10-14 Thread Chappell, Simon P

You invoke your persistence code in the same place that you would invoke any other 
code ... not in the Action!

Write all your core application code (business rules, persistence, communications etc) 
in a way that has no connection to the view portion of your system and then create a 
API to it. This way you can have any client you like call into your core code and your 
core code doesn't need to worry about what calls it, only about acting upon requests.

Then use the actions to call into the API and pass the API return values to the JSPs. 
Works great.

/--\/---\   /\
|Client|--> |API|-->|Core|
|Code  ||   |   |Code|
\--/\---/   \/

The API is now your fire break. Nothing on the Core Code side has to worry about 
displaying anything and nothing in the Client Code has to worry about calculating 
anything.

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


>-Original Message-
>From: Andrew Hill [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 9:57 AM
>To: Struts Users Mailing List
>Subject: RE: DAO or ... ?
>
>
>So where should one invoke the persistance layer?
>
>-Original Message-
>From: Lacerda, Wellington (AFIS) [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 22:51
>To: 'Struts Users Mailing List'
>Subject: RE: DAO or ... ?
>Importance: High
>
>
>Hi Kevin
>
>Avoid persistence in Action code as much as you can.
>
>This is the general recommendation.
>
>Wellington Silva
>Author of "JSP and Tag Libraries for Web Development"
>FAO of the UN - Consultant
>
>-Original Message-
>From: Kevin Viet [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 14, 2002 4:45 PM
>To: struts-user
>Subject: DAO or ... ?
>
>
>My question is a web app design question.
>What pattern you guys follow when you want to save a domain object in
>the database ?:
>
>- use the DAO pattern of java blueprint  (persistence layer is called
>into classes)
>- call to persistence statements into action code :
>
>   // store example
>   try {
>   PeristenceLayer pl = getPerstitenceLayer();
>   pl.save(domainObject);
>   }
>   catch (Exception
>
>
>--
>Kevin Viet <[EMAIL PROTECTED]>
>ActiVia Networks
>
>
>
>
>--
>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]>


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




Re: DAO or ... ?

2002-10-14 Thread Kevin Viet

Le lun 14/10/2002 à 16:55, V. Cekvenich a écrit :
> "Avoid persistence in Action code as much as you can."
> Yes.
> And a way to do that is to say in action something like:
> 
> formBean.save()
> 
> where the formBean has something like this in save() {getDAO().update()}
> 
> and the DAo does the save for the bean.
> 
But I'v read that the domain  objects needn't know that are persitent,
if you implement a save method that means that ur object know it can be
persisted

> .V
> 
> Lacerda, Wellington (AFIS) wrote:
> > Hi Kevin
> > 
> > Avoid persistence in Action code as much as you can.
> > 
> > This is the general recommendation.
> > 
> > Wellington Silva
> > Author of "JSP and Tag Libraries for Web Development"
> > FAO of the UN - Consultant
> > 
> > -Original Message-
> > From: Kevin Viet [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 14, 2002 4:45 PM
> > To: struts-user
> > Subject: DAO or ... ?
> > 
> > 
> > My question is a web app design question. 
> > What pattern you guys follow when you want to save a domain object in
> > the database ?: 
> > 
> > - use the DAO pattern of java blueprint  (persistence layer is called
> > into classes)
> > - call to persistence statements into action code :
> > 
> > // store example
> > try {
> > PeristenceLayer pl = getPerstitenceLayer();
> > pl.save(domainObject);
> > }
> > catch (Exception
> > 
> > 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
-- 
Kevin Viet <[EMAIL PROTECTED]>
ActiVia Networks




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




RE: DAO or ... ?

2002-10-14 Thread Andrew Hill

So where should one invoke the persistance layer?

-Original Message-
From: Lacerda, Wellington (AFIS) [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 22:51
To: 'Struts Users Mailing List'
Subject: RE: DAO or ... ?
Importance: High


Hi Kevin

Avoid persistence in Action code as much as you can.

This is the general recommendation.

Wellington Silva
Author of "JSP and Tag Libraries for Web Development"
FAO of the UN - Consultant

-Original Message-
From: Kevin Viet [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 4:45 PM
To: struts-user
Subject: DAO or ... ?


My question is a web app design question.
What pattern you guys follow when you want to save a domain object in
the database ?:

- use the DAO pattern of java blueprint  (persistence layer is called
into classes)
- call to persistence statements into action code :

// store example
try {
PeristenceLayer pl = getPerstitenceLayer();
pl.save(domainObject);
}
catch (Exception


--
Kevin Viet <[EMAIL PROTECTED]>
ActiVia Networks




--
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]>




Re: DAO or ... ?

2002-10-14 Thread V. Cekvenich

"Avoid persistence in Action code as much as you can."
Yes.
And a way to do that is to say in action something like:

formBean.save()

where the formBean has something like this in save() {getDAO().update()}

and the DAo does the save for the bean.

.V

Lacerda, Wellington (AFIS) wrote:
> Hi Kevin
> 
> Avoid persistence in Action code as much as you can.
> 
> This is the general recommendation.
> 
> Wellington Silva
> Author of "JSP and Tag Libraries for Web Development"
> FAO of the UN - Consultant
> 
> -Original Message-
> From: Kevin Viet [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 4:45 PM
> To: struts-user
> Subject: DAO or ... ?
> 
> 
> My question is a web app design question. 
> What pattern you guys follow when you want to save a domain object in
> the database ?: 
> 
> - use the DAO pattern of java blueprint  (persistence layer is called
> into classes)
> - call to persistence statements into action code :
>   
>   // store example
>   try {
>   PeristenceLayer pl = getPerstitenceLayer();
>   pl.save(domainObject);
>   }
>   catch (Exception
> 
> 




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




RE: DAO or ... ?

2002-10-14 Thread Lacerda, Wellington (AFIS)

Hi Kevin

Avoid persistence in Action code as much as you can.

This is the general recommendation.

Wellington Silva
Author of "JSP and Tag Libraries for Web Development"
FAO of the UN - Consultant

-Original Message-
From: Kevin Viet [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 4:45 PM
To: struts-user
Subject: DAO or ... ?


My question is a web app design question. 
What pattern you guys follow when you want to save a domain object in
the database ?: 

- use the DAO pattern of java blueprint  (persistence layer is called
into classes)
- call to persistence statements into action code :

// store example
try {
PeristenceLayer pl = getPerstitenceLayer();
pl.save(domainObject);
}
catch (Exception


-- 
Kevin Viet <[EMAIL PROTECTED]>
ActiVia Networks




--
To unsubscribe, e-mail:

For additional commands, e-mail:



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