cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SÚrgio Carvalho <scarva...@criticalsoftware.com>
Subject Re: advices on XML architecture
Date Thu, 03 May 2001 10:12:15 GMT
Hi,

I currently use Cocoon much in the same way, except I use EJBs for the business layer. The
pic is something like (I blatantly copied your ASCII art:-) :

         http                CORBA  
 +-----+ get/post  +-----+  method call+-----+
 |user | --------> |     | ----------> |     |
 |agent|           |Pres.|             | BL  |
 |     | <-------  |layer| <---------- |layer|
 +-----+  html     +-----+     XML     +-----+
          pdf      Cocoon   (generated  EJB(jBoss)
          wml                by Castor)

The CORBA EJB method call is defined on a EJB map file (XML), which maps EJB/methods+parameter
to 'URI+HTTP parameters'. Castor allows me to map Java classes to specific DTDs (or XML Schemas),
so the result is serialized onto an XML Schema defined by me. This frees BL developers from
having to think about formatted output. BL methods just return classes, as defined in the
BL API spec.

I can post the C2 generator that does the EJB method mapping. It is just a proof of concept
though. It lacks docs and is awfully slow, because I instantiate a session bean for each call,
which adds too much overhead. This is easily correctable, though.

Using EJBs, I automagically use Corba, thus creating a usefull remote call layer. I can use
this for fault tolerance or load balancing or whatever. I'm pretty satisfied with the solution.


Sergio

On Thu, 03 May 2001 09:29:53 +0200
Xavier MACHENAUD <xavier.machenaud@st.com> wrote:

> Hi,
> 
> I'm in the process of designing an XML based application and I'm running
> into the following problem.
> 
> I want to separate the Presentation layer (XML server) and the Business
> Logic layer (servlet/cgi/...) by using XML : the presentation layer is
> querying the business logic (BL) layer which is returning XML data.
> Of course, I don't want my BL layer to do any output formatting.
> 
> 
>         http
> +-----+ get/post  +-----+    query    +-----+
> |user | --------> |     | ----------> |     |
> |agent|           |Pres.|             | BL  |
> |     | <-------  |layer| <---------- |layer|
> +-----+  html     +-----+     XML     +-----+
>          pdf      Xml Server         Servlet/cgi/...
>          wml
> 
> I also like to be able to pass on the authentication information and to
> add a load-balancing mechanism later on in front of the BL.
> 
> That's why I was thinking of a way to do an HTTP request from the XML
> server, do get to a sort of servlet chaining.
> Am I going to a wrong way thinking that?
> 
> If not, how can I do servlet chaining from the XML server?
> Should I implement a tag library that will allow me to do servlet
> chaining? (or to make and XML-RPC/SOAP call if my BL server is an
> XML-RPC/SOAP service).
> 
> If I'm completely wrong, what should I do?
> 
> Cheers,
> Xavier
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message