17
XQuery in the Cloud Cutting Edge Web Applications with XQuery and Sausalito William Candillon {[email protected] }

XQuery in the Cloud

Embed Size (px)

DESCRIPTION

Cutting Edge Web Applications with
XQuery and Sausalito

Citation preview

Page 1: XQuery in the Cloud

XQuery in the CloudCutting Edge Web Applications withXQuery and SausalitoWilliam Candillon {[email protected]}

Page 2: XQuery in the Cloud

PHP & XQuery

Page 3: XQuery in the Cloud

A Complementary Couple?

Page 4: XQuery in the Cloud

Some Misconceptions

• XQuery:

- is not a scripting language

- has no application serveur

- has no open source development tools

- has no utility functions for the Web

Page 5: XQuery in the Cloud

Some Misconceptions

• XQuery:

- is not a scripting language

- has no application serveur

- has no open source development tools

- has no utility functions for the Web

Page 6: XQuery in the Cloud

Some Misconceptions

XQuery is not a scripting language!

Page 7: XQuery in the Cloud

XQuery Scripting (WC3)

• XQuery Scripting Extension 1.0 and XQuery Update Facility 1.0

• Imperative programmingdeclare function sequential local:hello-world() { declare $hello := "Hello"; declare $world := "World"; exit with concat($hello, " ", $world);}

• Side-effectsreplace value of $client/@id with "foo";

• Loopswhile(true()) { server:handle() }

Page 8: XQuery in the Cloud

XQuery Scripting (Zorba)

• Try/Catchtry { 3 + "2" } catch * { "Caught an error" }

• Evallet $x := "21" return using $xeval { concat($x, "+ xs:double ($x)") }

• Command-line Input/Outputlet $name := util:read-line()return util:print("Hello", $name)

Page 9: XQuery in the Cloud

Some Misconceptions

XQuery has no Application Server

Page 10: XQuery in the Cloud

Sausalito

• XQuery Application Server based on Zorba XQuery Processor and Amazom Cloud Computing Stack

• Success Story: http://doodlendar.my28msec.com

Page 11: XQuery in the Cloud

Some Misconceptions

XQuery has no Open Source Tools

Page 12: XQuery in the Cloud

XQuery Development Tools

http://www.eclipse.org/webtools/incubator/

Page 13: XQuery in the Cloud

Some Misconceptions

XQuery has no utility functions for the Web

Page 14: XQuery in the Cloud

Utility Functions

More than 28 modules in Sausalito library

- HTTP

- REST

- Security

- Sessions

- OAuth

- AtomPub

- Captchas

- AtomPub

- Emails

- Serializer

- Collections

- Strings

- Maths

- Media

- Etc...

Page 15: XQuery in the Cloud

AtomPub Module

• Compliant with RFC 5023

• AtomPub Server for the Clouddeclare function atom:entries(){ atompub:handle($serviceDocument)};

• Atom Storeatomstore:new-feed("/atom/entries", <a:feed><a:title>Demo Blog</a:title></a:feed>);

• Model helpersdeclare $e := f:new-entry(util:uuid(), "XQuery Meetup");f:set-content($e, f:new-content("Go for a drink with XML/XQuery lovers!"))

Page 16: XQuery in the Cloud

Thank You!

Questions [email protected]

More infohttp://sausalito.28msec.com

Because green is the new blue...

Page 17: XQuery in the Cloud

Take it for a ride

http://try.zorba-xquery.com