cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Martin" <raymar...@aci-hq.com>
Subject RE: xsp !!!
Date Wed, 27 Nov 2002 12:15:56 GMT
Sirs,

For a place to put 'common things', I suggest a descriptor file - XML not
XSP.  The tutorial that comes with Cocoon shows (slightly) how to use the
descriptor file.

The descriptor file is the place to put parameters that you want to share
between the web page designers on one side and the code developers and
database folks on the other side.  In the tutorial, they also used the
descriptor file to set constraints to do form validation, but if you do not
require this feature just skip that part.

The descriptor file can be the "contract" between the different types of
folks working on a project.  If you happen to be the only developer/designer
on a small project, the descriptor file is still a very useful contract
between components - one can always go to the descriptor file to get a quick
glance at the parameters required for various modules either under
development or as a history of what was developed.

Currently, I have only used the descriptor file to record and describe
parameters of type string.  But, as I get better at Cocoon, I am reasonably
certain that the descriptor file will become my "common" storage for
everything - file pointers, parameters of any type, etc.

In fact, I believe that the descriptor file is so useful that it will become
the "hub" of all my design and development work.  For example, we use Torque
(an Apache Software Foundation project) to produce the database tables and
accessor classes.  To do this, the developer creates a schema in XML using
the descriptor file as a basis.  The middle tier developer uses the
descriptor file to base his/her efforts.  And the page designer, uses the
descriptor file to do their work.  The goal is to automate all of this
work - take the human out of most of the effort.  (ps we hope to contribute
this to the ASF, unless someone gets there before us and that is okay, too.)

With the descriptor file as the "hub", we would press the button and (using
Ant and Maven and ...) the schema file is created, Torque is run, the middle
tier code is "pre-generated" (all the sets and gets are in place - ready for
the human to add the detailed methods), and the GUI for browsers and text
for WAP devices is created in XML ready for Cocoon consumption.

So, anyway, the descriptor file is your "common" store area.
  -----Original Message-----
  From: Derek Hohls [mailto:DHohls@csir.co.za]
  Sent: Wednesday, November 27, 2002 5:00 AM
  To: cocoon-users@xml.apache.org
  Subject: RE: xsp !!!


  I'm not sure about this - but if you were to include these
  in a logic sheet (as I suggested in another reply),
  then Cocoon would take care it of for you.

  >>> hgdinh@sdcgrp.com 27/11/2002 12:01:17 >>>

  as far as i understand, the cocoon mechanism does it for us but the java
file i must precompile it. is it correct?



  -----Original Message-----
  From: Derek Hohls [mailto:DHohls@csir.co.za]
  Sent: 27 November 2002 16:49
  To: cocoon-users@xml.apache.org
  Subject: RE: xsp !!!



  well - are you aware that xsp is *also* recompiled
  every time you change the file!  (because that's
  what it is converted into... a Java file, that must
  be regenerated and recompiled before it can be
  used.)

  >>> hgdinh@sdcgrp.com 27/11/2002 11:49:56 >>>

  thnks
  but i dont want to use java file coz it made me recompile everytime i
  update the file.
  so, cant i use with xsp?
  cheers

  -----Original Message-----
  From: Ivan Luzyanin [mailto:ivan@ProZa.Lviv.UA]
  Sent: 27 November 2002 16:24
  To: cocoon-users@xml.apache.org
  Cc: Hong Gia Dinh
  Subject: Re: xsp !!!

  > Hi all
  > I got a problem and tried to solve it!
  > i want to have a common 'common.xsp' file containing all the common
  values
  > and i have other personal files that uses all the common values!
  > so how can i use it ?? can i include/import a xsp file in oter xsp
  file?
  > i tried to use aggregate but it doesn't work!
  >
  > can u all show me?
  > Cheers
  Place your common values into simple JavaClass file
  "CommonConstants.java" and
  then import one in any XSP:
  <xsp:page>
  <xsp:structure>
  <xsp:import>&pkg;.CommonConstants</xsp:import>
  </xsp:structure>
  <xsp:logic>
          int foo = CommonConstants.BAR;
  </xsp:logic>
  </xsp:page>
  Ivan.

  ---------------------------------------------------------------------
  Please check that your question  has not already been answered in the
  FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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