SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
Acknowledgements MEDIA research Group
Small Data in the large with Oppidum
XML web development with Oppidum and eXist-DB
Presented at XML London 2013 (read the full article)
Stéphane Sire
Contact: s.sire@oppidoc.fr - Oppidoc
Christine Vanoirbeek
Contact: christine.varnoirbeek@epfl.ch
Introduction
Presentation vs. semantic
“ On the left, what browsers see. On the right, what humans see. Can we
bridge the gap so browsers see more of what we see? ”
Source W3C
RDFa 1.1 Primer Rich Structured Data Markup for Web Documents
Small data applications
document structure (sections, paragraphs, lists, etc.)
truffled with structured data inside
edit | xml | hide | previewXML Prague 2010
Introduction of the AXEL Javascript library for XML authoring in the
browser
S. Sire, C. Vanoirbeek, V. Quint, C. Roisin,
Authoring XML all the Time, Everywhere and by Everyone. In
Proceedings of XML Prague 2010, pages 125 - 149 , Institute for
Theoretical Computer Science, 14/03/2010
Self-service demo:
click a first time on “edit” to transform the bibliographic reference into an editor
click on “xml” (resp. “hide”) to show (resp. hide) its current XML content
click on “preview” to hide / show editor structure editing controls
<References>
<Publication Date="2010-03-14">
<Authors>
<Author>
<Name>S. Sire</Name>
</Author>
<Author>
<Name>C. Vanoirbeek</Name>
</Author>
<Author>
<Name>V. Quint</Name>
</Author>
<Author>
<Name>C. Roisin</Name>
</Author>
</Authors>
<Title>Authoring XML all the Time, Everywhere and by Everyone</Title>
<Conference>Proceedings of XML Prague 2010</Conference>
<Pages>
<Start>125</Start>
<End>149</End>
</Pages>
<Location>Institute for Theoretical Computer Science</Location>
</Publication>
</References>
Motivation: full XML stack
XML web development
Languages (W3C)
XPath => XQuery, XSLT
XForms XTiger XML (Adaptable XML Editing Library)
Native XML databases
eXist-DB, Sausalito, baseX, Marklogic
XRX programming style and 2/3 architectures
But still very few application frameworks !
RESTXQ, EXPath
Orbeon Forms, Oppidum
Oppidum Principles
A unique XML file to represent the application architecture
the mapping associates each REST resource from the application with a
rendering pipeline
Oppidum Pipeline
Limited to 3 steps (KISS-principle)
a model implemented as an XQuery script
a (optional) view implemented as an XSLT transformation
an (optional) epilogue implemented as a unique XQuery script called epilogue.xql
sample :
Article Editing Application
Fully specificed by 6 pipelines
Mapping file example
<collection name="articles">
<item> => articles/xml-london[.xml]
<access>
<rule action="edit POST" role="g:authors" message="author"/>
</access>
<model src="oppidum:actions/read.xql"/>
<view src="article/article2html.xsl"/>
<action name="edit"> => articles/xml-london/edit
<model src="actions/edit.xql"/>
<view src="views/edit.xsl"/>
</action>
<action name="POST"> => POST articles/xml-london
<model src="actions/write.xql"/>
</action>
<collection name="images"> => articles/xml-london/images/
<model src="models/forbidden.xql"/>
<action name="POST"> => POST articles/xml-london/images/
<model src="images/upload.xql"/>
</action>
<item> => articles/xml-london/images/1.png
<model src="images/image.xql"/>
</item>
</collection>
</item>
</collection>
Oppidum Execution Model
a two time engine
eXist-DB implementation
1st step : controller.xql calls gen:process( HTTP Request )
2nd step: URLRewriteFilter executes pipeline
Oppidum Design Patterns
Templating system
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:site="http://oppidoc.com/oppidum/site">
<body>
<div id="article">
<site:content/>
</div>
</body>
</html>
Sample flow
Model output
<Document>
<Parag>Hello World</Parag>
</Document>
View output
<site:view>
<site:content>
<p>Hello World</p>
</site:content>
</site:view>
Epilogue output
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<div id="article">
<p>Hello World</p>
</div>
</body>
</html>
Epilogue templating function
universal typeswitch function (cut-and-paste between projects) to include
in the epilogue
declare function local:render( $cmd as element(), $source as element(),
$view as element()* ) as element()
{
element { node-name($source) }
{
...typeswitch function calling site:branch function
for every site:* extension point...
}
};
application-dependent function defining the extension points
declare function site:branch( $cmd as element(), $source as element(),
$view as element()* ) as node()*
{
typeswitch($source)
case element(site:skin) return site:skin($cmd, $view)
case element(site:lang) return site:lang($cmd, $view)
case element(site:navigation) return site:navigation($cmd, $view)
case element(site:error) return site:error($cmd, $view)
case element(site:login) return site:login($cmd)
... (: default implicitly manages other modules :)
default return $view/*[local-name(.) = local-name($source)]/(*|text())
};
More design patterns
Skinning applications
declarative way to keep the association between CSS and JS files and application
pages into a skin.xml resource inside the database
Error and message management (Flash a-la Ruby on Rails)
Data mapping
maintaining a relation between URL input space hierarchy and database collections
hierarchy
Form-based access control
Development life cycle (mode="dev|test|prdo" attribute)
Application : Focus
Newsletter editor
editorial tool chain for publishing a 4 pages newsletter (3000 printed copies)
Application : Alliance
Web site of the Association Alliance
form editor for participant registration with tool chain to publish badges and list of
participants
Application : UAP
Web site of the Union des Artisans du Patrimoine de Belgique
moderated classified ads service for the craftmen member of the association
Application : PSE
database of startup companies member of the Science Park at EPFL
multilingual content and search engine (Apache Lucene)
generation of personalized recommendations to improve company pages
JSON export towards an internal advertising TV screen network
Conclusion
Effective and efficient XML full stack
implicit “model driven” approach with clear division of work for developers
user generated content with AXEL and AXEL-FORMS (article XML Prague)
backend development with eXist-DB and Oppidum (article XML London)
Open source (available on Github)
Opened issues to go beyond "Small Data"
code portability
abstraction layer for cross-database execution environments ?
see EXPath Webapp framework ? XProc ? RESTXQ ?
failover and load balancing

Contenu connexe

Similaire à Small Data in the large with Oppidum

Adcom2006 Full 6
Adcom2006 Full 6Adcom2006 Full 6
Adcom2006 Full 6umavanth
 
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...Lucas Jellema
 
From Provider to Portal - a chain of interoperability
From Provider to Portal - a chain of interoperabilityFrom Provider to Portal - a chain of interoperability
From Provider to Portal - a chain of interoperabilityAndy Powell
 
How to Find a Needle in the Haystack
How to Find a Needle in the HaystackHow to Find a Needle in the Haystack
How to Find a Needle in the HaystackAdrian Stevenson
 
A Semantic Wiki Based Light-Weight Web Application Model
A Semantic Wiki Based Light-Weight Web Application ModelA Semantic Wiki Based Light-Weight Web Application Model
A Semantic Wiki Based Light-Weight Web Application ModelJie Bao
 
Corrib.org - OpenSource and Research
Corrib.org - OpenSource and ResearchCorrib.org - OpenSource and Research
Corrib.org - OpenSource and Researchadameq
 
Deep dive into the native multi model database ArangoDB
Deep dive into the native multi model database ArangoDBDeep dive into the native multi model database ArangoDB
Deep dive into the native multi model database ArangoDBArangoDB Database
 
2005-01-04 Web Services Survey an Inventory Background, Goals and Status
2005-01-04 Web Services Survey an Inventory Background, Goals and Status2005-01-04 Web Services Survey an Inventory Background, Goals and Status
2005-01-04 Web Services Survey an Inventory Background, Goals and StatusRudolf Husar
 
Web Services Inventory
Web Services InventoryWeb Services Inventory
Web Services InventoryRudolf Husar
 
ELK-Stack-Grid-KA-School.pptx
ELK-Stack-Grid-KA-School.pptxELK-Stack-Grid-KA-School.pptx
ELK-Stack-Grid-KA-School.pptxabenyeung1
 
Presentation
PresentationPresentation
PresentationVideoguy
 
Knowledge Discovery in an Agents Environment
Knowledge Discovery in an Agents EnvironmentKnowledge Discovery in an Agents Environment
Knowledge Discovery in an Agents EnvironmentManjulaPatel
 
Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...
Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...
Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...Vlad Savitsky
 
Technical overview of the JISC Information Environment
Technical overview of the JISC Information EnvironmentTechnical overview of the JISC Information Environment
Technical overview of the JISC Information EnvironmentAndy Powell
 
Creating hypermedia APIs in a few minutes using the API Platform framework
Creating hypermedia APIs in a few minutes using the API Platform frameworkCreating hypermedia APIs in a few minutes using the API Platform framework
Creating hypermedia APIs in a few minutes using the API Platform frameworkLes-Tilleuls.coop
 
Extending XForms with Server-Side Functionality
Extending XForms with Server-Side FunctionalityExtending XForms with Server-Side Functionality
Extending XForms with Server-Side FunctionalityMarkku Laine
 

Similaire à Small Data in the large with Oppidum (20)

Adcom2006 Full 6
Adcom2006 Full 6Adcom2006 Full 6
Adcom2006 Full 6
 
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
 
Web Topics
Web TopicsWeb Topics
Web Topics
 
From Provider to Portal - a chain of interoperability
From Provider to Portal - a chain of interoperabilityFrom Provider to Portal - a chain of interoperability
From Provider to Portal - a chain of interoperability
 
How to Find a Needle in the Haystack
How to Find a Needle in the HaystackHow to Find a Needle in the Haystack
How to Find a Needle in the Haystack
 
A Semantic Wiki Based Light-Weight Web Application Model
A Semantic Wiki Based Light-Weight Web Application ModelA Semantic Wiki Based Light-Weight Web Application Model
A Semantic Wiki Based Light-Weight Web Application Model
 
Corrib.org - OpenSource and Research
Corrib.org - OpenSource and ResearchCorrib.org - OpenSource and Research
Corrib.org - OpenSource and Research
 
Deep dive into the native multi model database ArangoDB
Deep dive into the native multi model database ArangoDBDeep dive into the native multi model database ArangoDB
Deep dive into the native multi model database ArangoDB
 
2005-01-04 Web Services Survey an Inventory Background, Goals and Status
2005-01-04 Web Services Survey an Inventory Background, Goals and Status2005-01-04 Web Services Survey an Inventory Background, Goals and Status
2005-01-04 Web Services Survey an Inventory Background, Goals and Status
 
Web Services Inventory
Web Services InventoryWeb Services Inventory
Web Services Inventory
 
ELK-Stack-Grid-KA-School.pptx
ELK-Stack-Grid-KA-School.pptxELK-Stack-Grid-KA-School.pptx
ELK-Stack-Grid-KA-School.pptx
 
Presentation
PresentationPresentation
Presentation
 
Knowledge Discovery in an Agents Environment
Knowledge Discovery in an Agents EnvironmentKnowledge Discovery in an Agents Environment
Knowledge Discovery in an Agents Environment
 
Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...
Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...
Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...
 
Technical overview of the JISC Information Environment
Technical overview of the JISC Information EnvironmentTechnical overview of the JISC Information Environment
Technical overview of the JISC Information Environment
 
Creating hypermedia APIs in a few minutes using the API Platform framework
Creating hypermedia APIs in a few minutes using the API Platform frameworkCreating hypermedia APIs in a few minutes using the API Platform framework
Creating hypermedia APIs in a few minutes using the API Platform framework
 
On a web of data streams
On a web of data streamsOn a web of data streams
On a web of data streams
 
Extending XForms with Server-Side Functionality
Extending XForms with Server-Side FunctionalityExtending XForms with Server-Side Functionality
Extending XForms with Server-Side Functionality
 
Introducing Oslo
Introducing OsloIntroducing Oslo
Introducing Oslo
 
Silicon Valley Semantic Web Meet Up
Silicon Valley Semantic Web Meet UpSilicon Valley Semantic Web Meet Up
Silicon Valley Semantic Web Meet Up
 

Dernier

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Dernier (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Small Data in the large with Oppidum

  • 1. Acknowledgements MEDIA research Group Small Data in the large with Oppidum XML web development with Oppidum and eXist-DB Presented at XML London 2013 (read the full article) Stéphane Sire Contact: s.sire@oppidoc.fr - Oppidoc Christine Vanoirbeek Contact: christine.varnoirbeek@epfl.ch
  • 2. Introduction Presentation vs. semantic “ On the left, what browsers see. On the right, what humans see. Can we bridge the gap so browsers see more of what we see? ” Source W3C RDFa 1.1 Primer Rich Structured Data Markup for Web Documents
  • 3. Small data applications document structure (sections, paragraphs, lists, etc.) truffled with structured data inside
  • 4. edit | xml | hide | previewXML Prague 2010 Introduction of the AXEL Javascript library for XML authoring in the browser S. Sire, C. Vanoirbeek, V. Quint, C. Roisin, Authoring XML all the Time, Everywhere and by Everyone. In Proceedings of XML Prague 2010, pages 125 - 149 , Institute for Theoretical Computer Science, 14/03/2010 Self-service demo: click a first time on “edit” to transform the bibliographic reference into an editor click on “xml” (resp. “hide”) to show (resp. hide) its current XML content click on “preview” to hide / show editor structure editing controls <References> <Publication Date="2010-03-14"> <Authors> <Author> <Name>S. Sire</Name>
  • 5. </Author> <Author> <Name>C. Vanoirbeek</Name> </Author> <Author> <Name>V. Quint</Name> </Author> <Author> <Name>C. Roisin</Name> </Author> </Authors> <Title>Authoring XML all the Time, Everywhere and by Everyone</Title> <Conference>Proceedings of XML Prague 2010</Conference> <Pages> <Start>125</Start> <End>149</End> </Pages> <Location>Institute for Theoretical Computer Science</Location> </Publication> </References>
  • 7. XML web development Languages (W3C) XPath => XQuery, XSLT XForms XTiger XML (Adaptable XML Editing Library) Native XML databases eXist-DB, Sausalito, baseX, Marklogic XRX programming style and 2/3 architectures But still very few application frameworks ! RESTXQ, EXPath Orbeon Forms, Oppidum
  • 8. Oppidum Principles A unique XML file to represent the application architecture the mapping associates each REST resource from the application with a rendering pipeline
  • 9. Oppidum Pipeline Limited to 3 steps (KISS-principle) a model implemented as an XQuery script a (optional) view implemented as an XSLT transformation an (optional) epilogue implemented as a unique XQuery script called epilogue.xql sample :
  • 10. Article Editing Application Fully specificed by 6 pipelines
  • 11.
  • 12. Mapping file example <collection name="articles"> <item> => articles/xml-london[.xml] <access> <rule action="edit POST" role="g:authors" message="author"/> </access> <model src="oppidum:actions/read.xql"/> <view src="article/article2html.xsl"/> <action name="edit"> => articles/xml-london/edit <model src="actions/edit.xql"/> <view src="views/edit.xsl"/> </action> <action name="POST"> => POST articles/xml-london <model src="actions/write.xql"/> </action> <collection name="images"> => articles/xml-london/images/ <model src="models/forbidden.xql"/> <action name="POST"> => POST articles/xml-london/images/ <model src="images/upload.xql"/> </action> <item> => articles/xml-london/images/1.png <model src="images/image.xql"/> </item> </collection> </item> </collection>
  • 13. Oppidum Execution Model a two time engine eXist-DB implementation 1st step : controller.xql calls gen:process( HTTP Request ) 2nd step: URLRewriteFilter executes pipeline
  • 14. Oppidum Design Patterns Templating system <html xmlns="http://www.w3.org/1999/xhtml" xmlns:site="http://oppidoc.com/oppidum/site"> <body> <div id="article"> <site:content/> </div> </body> </html>
  • 15. Sample flow Model output <Document> <Parag>Hello World</Parag> </Document> View output <site:view> <site:content> <p>Hello World</p> </site:content> </site:view> Epilogue output <html xmlns="http://www.w3.org/1999/xhtml"> <body> <div id="article"> <p>Hello World</p> </div> </body> </html>
  • 16. Epilogue templating function universal typeswitch function (cut-and-paste between projects) to include in the epilogue declare function local:render( $cmd as element(), $source as element(), $view as element()* ) as element() { element { node-name($source) } { ...typeswitch function calling site:branch function for every site:* extension point... } }; application-dependent function defining the extension points declare function site:branch( $cmd as element(), $source as element(), $view as element()* ) as node()* { typeswitch($source) case element(site:skin) return site:skin($cmd, $view) case element(site:lang) return site:lang($cmd, $view) case element(site:navigation) return site:navigation($cmd, $view) case element(site:error) return site:error($cmd, $view) case element(site:login) return site:login($cmd) ... (: default implicitly manages other modules :) default return $view/*[local-name(.) = local-name($source)]/(*|text()) };
  • 17. More design patterns Skinning applications declarative way to keep the association between CSS and JS files and application pages into a skin.xml resource inside the database Error and message management (Flash a-la Ruby on Rails) Data mapping maintaining a relation between URL input space hierarchy and database collections hierarchy Form-based access control Development life cycle (mode="dev|test|prdo" attribute)
  • 18. Application : Focus Newsletter editor editorial tool chain for publishing a 4 pages newsletter (3000 printed copies)
  • 19.
  • 20. Application : Alliance Web site of the Association Alliance form editor for participant registration with tool chain to publish badges and list of participants
  • 21.
  • 22. Application : UAP Web site of the Union des Artisans du Patrimoine de Belgique moderated classified ads service for the craftmen member of the association
  • 23.
  • 24. Application : PSE database of startup companies member of the Science Park at EPFL multilingual content and search engine (Apache Lucene) generation of personalized recommendations to improve company pages JSON export towards an internal advertising TV screen network
  • 25.
  • 26. Conclusion Effective and efficient XML full stack implicit “model driven” approach with clear division of work for developers user generated content with AXEL and AXEL-FORMS (article XML Prague) backend development with eXist-DB and Oppidum (article XML London) Open source (available on Github) Opened issues to go beyond "Small Data" code portability abstraction layer for cross-database execution environments ? see EXPath Webapp framework ? XProc ? RESTXQ ? failover and load balancing