27. JSON Schema based evolutionary schema Start without a schema Add constraints as application evolves
28. JSON Schema driven UI Start with schema http://javascript.neyric.com/inputex/examples/json-schema2.html http://javascript.neyric.com/inputex/examples/base-schema.js
29.
30. Server side JavaScript + web storage http://sitepen.com/labs/persevere.php "schema":{ “ name”:”Friend”, “ properties”:{ “ firstName”:{“type”:”string”}, “age”:{“type”:”integer”}, } "staticCreateMethod":function(arg1){ var friend = new Friend(); friend.age = 0; }, "prototype":{ “ myMethod”:function(){ return this.firstName + ‘ ‘ + this.lastName; } } "extends":{"$ref":"../Person"} }
31.
32.
33.
34.
35. JSONPath http://goessner.net/articles/JsonPath/ XPath like query language for JSON Filters - [?expr] Properties/paths (like JS) - .prop Recursive descent - ..prop Slice operator – [3:10:2] Union operator - [3,4,5]
36. JSONPath querying in requests JSONPath + REST URLs = Web querying /Table/ - All the objects in a table /Table/[?@.price < 10] – all items with a price under $10 /Table/..name – A list of the name property values /Table/.length – A count of the items in the table
53. The Open Web is more than just licensing GPL LGPL BSD
54.
Editor's Notes
SOA on the web, architecture and benefits
Working in the post-ORM realmData could be in native object storageData could in relational, but ORM’ed to objectsData storage technology agnosticNon-relational storage Schemas may or may not be appliedLook at this in Persistent Computing on the web presentationDo DemoInstall PersevereCreate TableCreate an objectModify an objectDo a query
Analogous to gradual typingBegin prototyping with no schemaSchema-free DB is extremely beneficial for prototyping in early stage agile developmentGradually adding constraints as the application evolvesAnalogous to how we do evolve in user requirements with agile devLanguage and storage agnostic data definitionsUIs can use schemas to auto-generate forms and widgetsUI can auto-update based on schema changesAnother form of rapid prototyping (reverse direction, starting with schemas)Flexible prototyping approachAll can be done with Persevere
Persevere includes class definition for each tableTable objects are class instancesPrototype methodsFunction storage capableWorks in conjunction with SchemasJSON-RPC interaction with object methodsAccompanied by DemoSet up PersevereStoreCreate itemModify itemConnect to a widgetShow demo from consoleShow demo from console
Any Bayeux client should be able to connect to any Bayeux server and communicatePubSub protocolService/Transport Advertising and NegotiationDefault format for transportsSemantics include:PublishSubscribeDeliverREST Channels provide data modification notifications using HTTP/REST semanticsMinimal extension of HTTP standardsCompatible upgrade to RESTHTTP/MIME or JSON formatEnables live views of data with virtually no extra codingAccompanied by DemoREST Channels provide data modification notifications using HTTP/REST semanticsMinimal extension of HTTP standardsCompatible upgrade to RESTHTTP/MIME or JSON formatEnables live views of data with virtually no extra coding
Accompanied by DemoService oriented architecture with thin server architecture makes building offline applications much easierdojox.rpc.OfflineRest - Dojo module that can automatically add offline support for apps that do server interaction through JsonRestStoreData changes are stored/cached locally until network connectivity is available.Accompanied by Demo
Easy to use, clearly defined web APIOne could create a new UI for the application without barrierPresentation code is executed on the client, business/application logic occurs on the backendPresentation state on the clientLess load on the server, more scalableREST Channels provide data modification notifications using HTTP/REST semanticsMinimal extension of HTTP standardsCompatible upgrade to RESTHTTP/MIME or JSON formatEnables live views of data with virtually no extra coding