If you are implementing the service layer because that is how you
think you need to achieve this functionality I would say that is
somewhat off base.

Patterns have certain "driving forces" that justify their
implementation.  For example, if you wanted to support multiple
database platforms that would "drive" you to implement an Abstract
Factory pattern.  If you want to provide a "API" of your application
such that it can support multiple client types (HTML/Flash/Mobile
phone/...) then you may want to implement the service layer.

You may have other reasons to implement a service layer but doing so
to create multiple object instances and persist them doesn't sound
like a valid one.

As for validation code, you would typically have some validation code
in the BO.  If you're processing multiple BO you may have other
validation code (that catches validation errors from each BO).  The
code that creates the array of objects could be in the Listener.

Does that help?

-Phil


On Tue, 18 Jan 2005 04:03:14 -0400, Sam Clement <[EMAIL PROTECTED]> wrote:
> I'm looking to create a form that allows a user to cut and paste from an
> excel file that will then create multiple instances of an object and then
> add them to the persistence layer.  Am I way off base trying to implement
> this from the service layer?
> 
> Normally I'd use the bean.cfc, validateFormObject.cfc model but by creating
> multiple object instances from a single form I'm having difficulty figuring
> out where I should be putting the validation code and the code that creates
> the array of objects (to be persisted).  I was thinking of rolling the
> creation of the array of objects and validation into one function/method
> within the service layer.  Does that make sense in the context of what I'm
> trying to do?
> 
> Any insight appreciated.
> 
> Cheers,
> 
> Sam
> ________________________________
> 
> Sam Clement
> ABOVE Studios
> Boutique Design Solutions
> 
> <http://www.abovestudios.com/>
> 32 Clifford St - Belmont
> Trinidad + Tobago - West Indies
> T: (868) 621 5159 W: abovestudios.com
> <http://www.abovestudios.com/>
> 
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
> in the message of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
> 
> An archive of the CFCDev list is available at 
> www.mail-archive.com/[email protected]
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Reply via email to