You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by HuiSion Teh <hu...@magix.com.sg> on 2000/09/13 15:28:00 UTC
Design Question
hi
In a very simple e-Commerce site, using EJB is probably overkill. Let say
the site contains a ShoppingCart module and the cart info is stored in a
database.
I guess I have the options
(a)XSP->ESQL->Database (directly manipulate cart info from XSP codes) or
(b)XSP->My Java Class->Database
where in option (a) I develop a Java Class ShoppingCart that interface
between XSP code and database.
1. Does Option (b) makes sense?
2. What is the difference if I implement the Java Class ShoppingCart as
plain Java Class vs "implements JavaBeans" interface?
3. If I implement the ShoppingCart as JavaBean now, does it make it easier
to migrate to EJB in the future?
Regards
Re: Design Question
Posted by Michael Bierenfeld <mi...@atmiralis.de>.
Hello,
HuiSion Teh wrote:
>
> hi
> In a very simple e-Commerce site, using EJB is probably overkill. Let say
> the site contains a ShoppingCart module and the cart info is stored in a
> database.
>
> I guess I have the options
> (a)XSP->ESQL->Database (directly manipulate cart info from XSP codes) or
> (b)XSP->My Java Class->Database
> where in option (a) I develop a Java Class ShoppingCart that interface
> between XSP code and database.
>
> 1. Does Option (b) makes sense?
YES :-)
> 2. What is the difference if I implement the Java Class ShoppingCart as
> plain Java Class vs "implements JavaBeans" interface?
Whith JavaBeans you dont have to hack in the
SQL-Codes by yourself.
> 3. If I implement the ShoppingCart as JavaBean now, does it make it easier
> to migrate to EJB in the future?
Definitly yes. You can collect the experiences in
your fairly simple environment to be used
in more complex projects.
>
> Regards
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
We started with the same approach (1). After a
while it turned out. That if we dont use Beans for
DatabaseAcces and processing of this Data the
application will not be maintainable.
Regards
Michael