You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alberto Zanon <az...@sistemi-servizi.it> on 2003/06/26 09:27:19 UTC
Where I put my business logic ?
Hello,
as I written in a previous message (see below), I have to build an intranet
and I want to use a solid system (= Cocoon) that helps me to separate
presentation, logic and database. At this moment I don't know where to put
the "logic". For example, when a user of my site posts an html-form, I have to
do some sql selects, evaluate the results, do an sql update on table and finally, if all is ok,
insert the user data. Where and how I write it?
If I don't use Cocoon, I will write it in a Java class.
I have two days to decide if I will use Cocoon.
Thanks
----------------------------------
Alberto Zanon
Sistemi & Servizi Informatica Srl
tel +39 0423 722324
fax +39 0423 498302
web http://www.sistemi-servizi.it
Alberto Zanon wrote:
> Hello!
>
> I'm a Java developer and I'm looking for a solid system to construct my
> sites.
> I have already realized an e-commerce site, but without rules.
> My jsp pages contain both logic and presentation layer.
> Only the data layer is encapsulated into java classes called from jsp.
> Now I have to construct an intranet at my company where employees
> will register their activity during the day.
> The site involves form validation, business logic, and the use of a
> database.
> Before becoming aware of Cocoon, I thought I would build the site this way:
> - a layer of java classes that interface with the database;
> - a layer of java classes for business logic;
> - a layer of jsp for presentation;
>
> Now I have downloaded the latest version of Cocoon and read many pages of
> documentation.
> But I'm very confused! I read about XSP but I read also about XMLForm ...
> and where I put
> my business logic? For example, I downloaded a tutorial from IBM about
> Cocoon and databases
> but it shows only the XSP pages to dialog with the database and format the
> data ... no business
> logic in it.
> I'm interested about Cocoon because one goal of it is the "MVC" or "SoC"
> approach
> when a site is developed.
>
> Please, can anyone suggest me the right way to use Cocoon?
Re: Where I put my business logic ?
Posted by Joerg Heinicke <jo...@gmx.de>.
What about
http://wiki.cocoondev.org/Search.jsp?query=database&Search=Find or more
specific http://wiki.cocoondev.org/Wiki.jsp?page=DatabaseActions.
ESQL is another possibility
(http://wiki.cocoondev.org/Wiki.jsp?page=ESQL). It's an XSP logicsheet,
which adds further separation to XSP
(http://cocoon.apache.org/2.0/userdocs/xsp/logicsheet-concepts.html).
Joerg
Alberto Zanon wrote:
> Hello,
>
> as I written in a previous message (see below), I have to build an intranet
> and I want to use a solid system (= Cocoon) that helps me to separate
> presentation, logic and database. At this moment I don't know where to put
> the "logic". For example, when a user of my site posts an html-form, I
> have to
> do some sql selects, evaluate the results, do an sql update on table and
> finally, if all is ok,
> insert the user data. Where and how I write it?
> If I don't use Cocoon, I will write it in a Java class.
>
> I have two days to decide if I will use Cocoon.
>
> Thanks
>
> ----------------------------------
> Alberto Zanon
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org