extending xforms with server-side functionality

27
Extending XForms with Server-Side Functionality Markku Laine, Denis Shestakov, Petri Vuorimaa Aalto University Finland The 27 th ACM Symposium on Applied Computing (SAC'12) Riva del Garda, Trento, Italy March 26-30, 2012

Upload: markku-laine

Post on 18-Dec-2014

1.267 views

Category:

Technology


2 download

DESCRIPTION

My presentation at the 27th ACM Symposium on Applied Computing (SAC'12). by Markku Laine, http://www.tinyurl.com/mplaine

TRANSCRIPT

Page 1: Extending XForms with Server-Side Functionality

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

Presentation is about...

Web application architectures

XML technologies

End-user programming

2

Page 3: Extending XForms with Server-Side Functionality

Presentation Outline

Introduction

Proposed approach

Proposed XForms server-side extensions

The XFormsDB framework

Conclusions

3

Page 4: Extending XForms with Server-Side Functionality

Introduction

4

Page 5: Extending XForms with Server-Side Functionality

Three-Tier Web Application Architecture

5

Presentation

Logic

Data

Page 6: Extending XForms with Server-Side Functionality

Conventional Web Application Architecture

6

Presentation

Logic

Data

Java / Ruby / Python

SQL

(X)HTML

JavaScript

Page 7: Extending XForms with Server-Side Functionality

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

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

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

Proposed Approach

10

Page 11: Extending XForms with Server-Side Functionality

Proposed Approach

One programming language

One data model

One paradigm approach

Unified Web application architecture

11

Page 12: Extending XForms with Server-Side Functionality

Proposed Approach

"Everyone" knows (X)HTML, right?

Let's use it as the base language

12

Page 13: Extending XForms with Server-Side Functionality

What about interaction?

13

Page 14: Extending XForms with Server-Side Functionality

Proposed Approach

Prefer XForms over JavaScript

XForms is even part of XHTML 2.0!

14

Page 15: Extending XForms with Server-Side Functionality

XForms Web Application Architecture

15

Presentation

Logic

Data

XML XHTML

XForms

Page 16: Extending XForms with Server-Side Functionality

Proposed Web Application Architecture

16

Presentation

Logic

Data

XHTML

XForms

XForms

(XPath)

XML

XML

XML

XForms

Page 17: Extending XForms with Server-Side Functionality

Proposed Web Application Architecture

17

Presentation

Logic

Data

XHTML

XForms

XForms

(XPath)

XML

XML

XML

XForms

Page 18: Extending XForms with Server-Side Functionality

Proposed XForms

Server-Side Extensions

18

Page 19: Extending XForms with Server-Side Functionality

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

<?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

The XFormsDB Framework

21

Page 22: Extending XForms with Server-Side Functionality

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

Evaluation: Web Applications and Widgets

23

Page 24: Extending XForms with Server-Side Functionality

Conclusions

24

Page 25: Extending XForms with Server-Side Functionality

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

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

Thank you for your attention!

27

Markku Laine

M.Sc. (Tech.), Ph.D. student

+358 50 565 8179

[email protected]

http://media.tkk.fi/webservices/personnel/markku_laine.html