Extending XForms with Server-Side Functionality
-
Upload
markku-laine -
Category
Technology
-
view
1.275 -
download
2
description
Transcript of Extending XForms with Server-Side Functionality
![Page 1: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/1.jpg)
Extending XForms with
Server-Side Functionality
Markku Laine, Denis Shestakov, Petri Vuorimaa
Aalto University
Finland
The 27th ACM Symposium on Applied Computing (SAC'12)
Riva del Garda, Trento, Italy
March 26-30, 2012
![Page 2: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/2.jpg)
Presentation is about...
Web application architectures
XML technologies
End-user programming
2
![Page 3: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/3.jpg)
Presentation Outline
Introduction
Proposed approach
Proposed XForms server-side extensions
The XFormsDB framework
Conclusions
3
![Page 4: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/4.jpg)
Introduction
4
![Page 5: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/5.jpg)
Three-Tier Web Application Architecture
5
Presentation
Logic
Data
![Page 6: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/6.jpg)
Conventional Web Application Architecture
6
Presentation
Logic
Data
Java / Ruby / Python
SQL
(X)HTML
JavaScript
![Page 7: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/7.jpg)
Conventional Web Application Architecture
7
Presentation
Logic
Data
Java / Ruby / Python
SQL
Object
Relational
Object-JSON Mapper
Object-Relational Mapper
(X)HTML
JavaScript
XML
JSON
![Page 8: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/8.jpg)
Problems with the Architecture
Multiple programming languages
Multiple data models
Multi-paradigm approach
Makes the development of entire Web
applications extremely complex
8
![Page 9: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/9.jpg)
How could we simplify the
architecture?
...and as a result...
turn more people into Web
developers.
9
![Page 10: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/10.jpg)
Proposed Approach
10
![Page 11: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/11.jpg)
Proposed Approach
One programming language
One data model
One paradigm approach
Unified Web application architecture
11
![Page 12: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/12.jpg)
Proposed Approach
"Everyone" knows (X)HTML, right?
Let's use it as the base language
12
![Page 13: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/13.jpg)
What about interaction?
13
![Page 14: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/14.jpg)
Proposed Approach
Prefer XForms over JavaScript
XForms is even part of XHTML 2.0!
14
![Page 15: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/15.jpg)
XForms Web Application Architecture
15
Presentation
Logic
Data
XML XHTML
XForms
![Page 16: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/16.jpg)
Proposed Web Application Architecture
16
Presentation
Logic
Data
XHTML
XForms
XForms
(XPath)
XML
XML
XML
XForms
![Page 17: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/17.jpg)
Proposed Web Application Architecture
17
Presentation
Logic
Data
XHTML
XForms
XForms
(XPath)
XML
XML
XML
XForms
![Page 18: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/18.jpg)
Proposed XForms
Server-Side Extensions
18
![Page 19: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/19.jpg)
Proposed XForms Server-Side Extensions
Definition of Server-Side Requests
Submission of Server-Side Requests
Notification about Server-Side Errors
Permission Management
Reuse of Code Fragments
Seamless integration with XForms
19
![Page 20: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/20.jpg)
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" ...>
<head>
<title>Notes</title>
<xformsdb:include resource="xinc/meta.xinc" />
<xforms:model>
<xforms:instance id="notes">
<dummy xmlns="" />
</xforms:instance>
<xformsdb:instance id="select-notes">
<xformsdb:query datasrc="notes">
<xformsdb:expression>/root/notes</xformsdb:expression>
</xformsdb:query>
</xformsdb:instance>
<xformsdb:submission id="sub-select-notes" replace="instance"
instance="notes" requestinstance="select-notes" />
<xforms:send submission="sub-select-notes" ev:event="xforms-ready" />
</xforms:model>
</head>
<body>
...
</body>
</html>
20
![Page 21: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/21.jpg)
The XFormsDB Framework
21
![Page 22: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/22.jpg)
The XFormsDB Framework
Implements the proposed extensions
Supports all major Web browsers
Supports various data sources
Supports extensibility on all three tiers
Open source!
22
![Page 23: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/23.jpg)
Evaluation: Web Applications and Widgets
23
![Page 24: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/24.jpg)
Conclusions
24
![Page 25: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/25.jpg)
Conclusions
• Entire Web applications can be developed using only one programming paradigm, language, and data model – Simplifies the architecture
• Presentation tier technologies provide a good basis for the architecture – Especially markup languages (e.g., (X)HTML) due to their wide
adoption and ease of use
• Our proposed approach is based on XForms – Only a few new elements, good XML knowledge is needed
• The implementing framework, XFormsDB, suits well for developing small- and medium-sized Web applications and widgets
25
![Page 26: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/26.jpg)
Related Work
• Kuuskeri, J. and Mikkonen, T. “REST Inspired Code Partitioning with a JavaScript Middleware”. In Proceedings of ICWE’10, pages 244-255, 2010.
• Fourny, F. et al. “XQuery in the Browser”. In Proceedings of WWW’09, pages 1011-1020, 2009.
• Laine, M. et al. “Toward Unified Web Application Development”. In IT Professional, Vol. 13, No. 5, pages 30-36, 2011.
• Litvinova, E., Laine, M., and Vuorimaa, P. “XIDE: Expanding End-User Web Development”. In Proceedings of WEBIST'12, pages xxx-xxx, 2012.
26
![Page 27: Extending XForms with Server-Side Functionality](https://reader033.fdocuments.net/reader033/viewer/2022051109/54926183ac7959182e8b45e1/html5/thumbnails/27.jpg)
Thank you for your attention!
27
Markku Laine
M.Sc. (Tech.), Ph.D. student
+358 50 565 8179
http://media.tkk.fi/webservices/personnel/markku_laine.html