Difference between revisions of "Cocoon And Manakin"

From Dryad wiki
Jump to: navigation, search
(Flow of control)
Line 18: Line 18:
 
== Flow of control ==
 
== Flow of control ==
  
* the theme directs a call to sitemap.xmap for each abstract
+
* the theme directs a call to the sitemap.xmap for each abstract that is active
* sitemap.xmap determines what classes to call
+
* sitemap.xmap determines what Java classes to call
* pipeline may include a selector (decides which section of a pipeline to follow)
+
* A pipeline in the sitemap
* pipeline must have a generator and serializer.  
+
** may include a selector (decides which section of a pipeline to follow)
* pipeline may have an optional number of transformers in between
+
** must have a generator and serializer.  
* all steps in a pipeline may be subject to matchers that turn pieces on and off for certain URLs.
+
*** there are generators (see xmlui sitemap) for ORE, directory listing, reading a file, etc. -- e.g., org.dspace.app.xmlui.cocoon.?????OREGenerator
 +
** may have an optional number of transformers in between
 +
** may have "actions" -- like transformers, but don't output xml (they are intended to produce a side effect)
 +
** may have matchers that turn pieces of the sitemap on and off for certain URLs.
 
* pipeline transformer classes modify the DRI  
 
* pipeline transformer classes modify the DRI  
 
* the serializer runs the DRI through XSL in i18n
 
* the serializer runs the DRI through XSL in i18n
 
* the resultant page is sent to the browser, which may apply a CSS
 
* the resultant page is sent to the browser, which may apply a CSS
 +
 +
== Random notes ==
 +
 +
* adding ?XSL to the URL is similar to adding /DRI, but it doesn't do the internationalization step -- so strings aren't replaced....
 +
* sitemaps (or just one?) define the ordering of the compile-time overlays -- right now, the items in the "current directory" for the sitemap have precedence, then items explicitly defined in the sitemap, and finally other things from the mvn dependency analysis
 +
* when you get an exception, you see all of the cocoon pieces that have run (not quite the same as a regular stack trace)
 +
 +
  
 
[[Category:Technical Documentation]]
 
[[Category:Technical Documentation]]

Revision as of 11:18, 23 March 2018

The DSpace user interface layer is called Manakin. It is based on Apache Cocoon. Here are some helpful notes.

Philosophy

  • An "aspect" is a bit of java code that creates XML to be inserted into a page. Aspects usually represent things that are repeated on multiple pages (e.g., the user's login status and associated menu items)
  • A "theme" applies XSL to create HTML, which dictates the content's basic layout. We use separate themes for the Dryad look-and-feel, and the DryadLab look-and-feel.
  • CSS dictates how the layout is rendered.
  • JavaScript dictates how the rendering behaves.

Samples

  • (repo)/xmltest/form/basic
  • (repo)/xmltest/form/inline
  • (repo)/xmltest/form/advanced
  • (repo)/xmltest/form/structural
  • (repo)/xmltest/form/HTML

Flow of control

  • the theme directs a call to the sitemap.xmap for each abstract that is active
  • sitemap.xmap determines what Java classes to call
  • A pipeline in the sitemap
    • may include a selector (decides which section of a pipeline to follow)
    • must have a generator and serializer.
      • there are generators (see xmlui sitemap) for ORE, directory listing, reading a file, etc. -- e.g., org.dspace.app.xmlui.cocoon.?????OREGenerator
    • may have an optional number of transformers in between
    • may have "actions" -- like transformers, but don't output xml (they are intended to produce a side effect)
    • may have matchers that turn pieces of the sitemap on and off for certain URLs.
  • pipeline transformer classes modify the DRI
  • the serializer runs the DRI through XSL in i18n
  • the resultant page is sent to the browser, which may apply a CSS

Random notes

  • adding ?XSL to the URL is similar to adding /DRI, but it doesn't do the internationalization step -- so strings aren't replaced....
  • sitemaps (or just one?) define the ordering of the compile-time overlays -- right now, the items in the "current directory" for the sitemap have precedence, then items explicitly defined in the sitemap, and finally other things from the mvn dependency analysis
  • when you get an exception, you see all of the cocoon pieces that have run (not quite the same as a regular stack trace)