Some notes and random thoughts how to improve the Lenya architecture. Feel free to add your comments.
– ApacheCocoon:AndreasHartmann
+----------------------+---------------------------+ | Presentation Layer: | Pub.-specific operations | | Cocoon +---------------------------+ | | Publication-specific API | +----------------------+---------------------------+ | Lenya Core API | | - Access Control | | - Workflow Handling | | - Scheduler | | - Business-level Transactions | +--------------------------------------------------+ | Repository Layer | | - System-level Transactions | | - Meta Data | | - Versioning | +--------------------------------------------------+ |
lenya:/
./images/landscape
)..xml
, .png
)./images/landscape.xml/1.2
).lenya://images/landscape.xml
(accessible)<lenya:version resource-id="/images/landscape"> <lenya:meta> <dc:creator>John</dc:creator> </lenya:meta> <lenya:asset mime-type="image/png" src="file:///home/john/lenya/images/landscape.png"/> </lenya:version> |
lenya://images/landscape.xml
(not accessible)<lenya:version resource-id="/images/landscape" accessible="false"/> |
lenya://images/landscape.png
would return the binary image datalenya://news/index.xml?language=de
<lenya:version resource-id="/news/index"> <lenya:meta> <dc:creator>John</dc:creator> <dc:language>de</dc:language> </lenya:meta> <xhtml:html> <xhtml:head> ... <xhtml:body> ... </xhtml:body> </xhtml:html> </lenya:version> |
A collection is a specific kind of resource which contains other resources. The XML source of a version of a collection resource could look like:
<lenya:collection resource-id="/overview"> <lenya:resource resource-id="/sections/news"/> <lenya:resource resource-id="/sections/tv"/> <lenya:resource resource-id="/sections/sports"/> </lenya:collection> |
The XML view of this version could look like:
<lenya:resource resource-id="/overview"> <lenya:meta> <dc:creator>John</dc:creator> <dc:language>de</dc:language> </lenya:meta> <lenya:resource xlink:href="resource://sections/news.xml" xlink:show="embed"/> <lenya:resource xlink:href="resource://sections/tv.xml" xlink:show="embed"/> <lenya:resource xlink:href="resource://sections/sports.xml" xlink:show="embed"/> </lenya:resource> |
ResourceSourceFactory
class.The presentation is handled by Cocoon pipelines. The XML view of a resource is requested using the resource protocol:
<map:match pattern="**.html"> <map:generate src="lenya://{1}.xml"/> <map:transform src="page2xhtml.xsl"/> <map:serialize/> </map:match> |
A staging view of the website could be created as follows:
<map:match pattern="staging/**.html"> <map:generate src="lenya://{1}.xml?workflow-state=staging"/> <map:transform src="page2xhtml.xsl"/> <map:serialize/> </map:match> |
Using a repository, metadata should be stored as properties attached to an asset/document. Different types/classes of metadata can be indentified like for
Those metadata should be queried by the appropriate mechanism which is supported by the underlying repository implementation i.e. via Xpath.
Each type of metada should be stored using its own namespace i.e. wf:state, dc:title etc.