Page: http://wiki.cocoondev.org/Wiki.jsp?page=BeginnerSimpleWebappOrganisation, version: 5 on Wed Feb 5 09:04:33 2003 by DerekH
- I will show you , how you can setup a cleanly separated development ? -- + I will show you how you can setup a cleanly separated development - *You know how to move within a command line shell to your OS ? ^^^ ^^^^^^^ + *You know how to access a command line shell to your OS ? ^^^ ^^ - for further infos. ? ^ + for further information. ? ^^^^^^^ - !The organisational problem + !The problem: Organisational complexity - You are told, sitemap.xmap is the heart of Cocoon and in order to get ? ^ ^ ^^^^ + As you will read elsewhere, the sitemap.xmap is the heart of Cocoon and, in order to get ? ^^^^ ^^^^^ +++++++++++++ ^^ + - Cocoon doing something for you, you shall modify this file in first place. ? ^^ --------------- + Cocoon doing something for you, you will first have to modify this file. ? ++++++++ ++ ^^^^^ - XML-structure. There is a clear need to keep this as untouched as possible. ? ^ + XML-structure! There is a clear need to keep this as untouched as possible. ? ^ - Not only you want to keep the Cocoon infrastructure intact and + Not only do you want to keep the Cocoon infrastructure intact and ? +++ - operating, you also have the feeling, you want to keep your work ? ^ + operating, but you also have the feeling that you want to keep your work ? ++++ ^^^^^ - !Separating your work by use of subsitemaps + !The solution: Separating your work by use of subsitemaps ? ++++++++++++++ - !Part I: setting up a generic mountpoint ? ^ + !Part I: Setting up a generic mountpoint ? ^ - * Move to the main folder of the Cocoon webapplication. I will name this folder ''$cocoon_root''. + * Move to the main folder of the Cocoon web application. I will name this folder ''$cocoon_root''. ? + - * edit the original sitemap.xmap in $cocoon_root: ? ^ + * Edit the original sitemap.xmap in $cocoon_root: ? ^ - * create a new folder for your own work. The folder name is arbitrary. I will use the name "work" as a placeholder. ? ^ + * Create a new folder for your own work. The folder name is arbitrary. I will use the name "work" as a placeholder. ? ^ - SO what effect has this slight modification of sitemap.xmap on the system ? ? ^ - + So what effect has this slight modification of sitemap.xmap on the system? ? ^ - 1 - an URL, that points to the Cocoon webapp\\ ? - + 1 - a URL, that points to the Cocoon webapp\\ - !Part II connecting your work folder with Cocoon ? ^ -- ^ + !Part II: Connecting your work folder to Cocoon ? + ^ ^ - location specified by the src attribute of the <map:mount> tag. This means, we need to ? - + location specified by the src attribute of the <map:mount> tag. This means we need to - only the bare necessities for your work. At the beginning this file may be very short. ? ----- ^^^^ + only the bare minimum for your work. At the beginning of your development, this file may be very short. ? ++ ^^^ +++++++++++++++++++++ - Assume, you want to serve an XML-content that is serialized into an HTML-output by ? - + Assume you want to serve an XML-content that is serialized into an HTML-output by - use of an XSL-transformation. I think, this is the "simplest use case" for Cocoon. ? ----- - + use of an XSL-transformation. This, I think, is the simplest "use case" for Cocoon. ? ++++++ + - files, you want to serve have the ending ".xml" . The ongoing setup is straight ? - - -------- + files you want to serve have the ending ".xml". The setup is then straightforward: ? +++++ ++++++++ - forward: - What did we achieve by now? ? ------- + !What did we achieve? ? + - First we told cocoon to start a xslt transformation whenever we try to retrieve ? ^ + First we told Cocoon to start a xslt transformation whenever we try to retrieve ? ^ - an html file from the work folder. I.e. the follwing URL ? - ^ + an html file from the work folde. i.e. the following URL ? ^ + - file "index.xml" is transformed by use of the xslt transformation stored in ? ^^^^ + file "index.xml" is transformed by use of the XSLT transformation stored in ? ^^^^ - "mytransform.xsl".Finally the result is serialised by use of the html-serialiser. ? ^^^^ + "mytransform.xsl". Finally the result is serialised by use of the HTML-serialiser. ? + ^^^^ - The final result is snt to the browser as standard html-file. ? ^ + The final result is snt to the browser as standard html file. ? ^ - !a slightly more advanced issue + !Advanced issues - By following this approach you will loss the generic mount feature as ? ^ + By following this approach you will lose the generic mount feature as ? ^ - described above, but it may be worthwhyle, because you may only need ? ^ + described above, but it may be worthwhile, because you may only need ? ^ - - REVIEWED-BY:\\ + - REVIEWED-BY: [DerekH] (minor editing) Page: http://wiki.cocoondev.org/Wiki.jsp?page=SurvivalTips, version: 12 on Wed Feb 5 09:08:21 2003 by DerekH - Separate your app into subsitemaps and subdirs with related issues. + Separate your app into [subsitemaps|BeginnerSimpleWebappOrganisation] and subdirs with related issues. ? + ++++++++++++++++++++++++++++++++++
