beholding the giant pyramid of application development; why ajax applications are its natural top...

39
The pyramid of application development Rik Arends @rikarends @ajax_org

Upload: javeline-bv

Post on 12-May-2015

3.612 views

Category:

Technology


2 download

DESCRIPTION

Building large and complex web applications using the open browser stack without any plugins is taking off (google wave), and with the support of rapidly innovating browsers like Firefox and Chrome it looks like it is bypassing proprietary platforms. This talk illustrates why the web browser and HTML5 are positioned to become the global platform for applications and how Ajax technologies like our ajax.org are optimizing application development.

TRANSCRIPT

Page 1: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

The pyramid of application development

Rik Arends @rikarends @ajax_org

Page 2: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer
Page 3: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer
Page 4: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Then• 1983 Commodore 64– 65536 bytes of ram– 1 mhz

• Focus: applications

Page 5: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Now• Current PC– 2.000.000.000 + bytes of ram– 4x3000 mhz +

• Focus: applications

Page 6: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

How do layers emerge• Competition creates layer complexity• A new layer in between the app and the

hardware is needed to optimize reach– Ms / IBM PC, OS / runtimes

Page 7: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Why layer independence is important

• Monopoly emerges through multi-layer controlled competition destruction

• Diversity is healthy– Never stops optimizing areas– Natural selection works by selection from the

diversity, not by directed adaptation

Page 8: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

When do you need standardization• Up: abstraction, Down: standardization• Progress halted because of not abstractable

scalability differences• Competition incredibly technical• Lower level innovation useless because of too

many verticals• Group competition with larger entities

Page 9: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Where are we now• Standardization in the browser made it

scalable to abstract on base level• Browser competition now focused on

performance and strict compliance

Page 10: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

What do JS libraries do• Abstract browser differences• Optimize effort vs result• Modularize and reuse

Page 11: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

JS Library differentiation• DOM operation automation:– jQuery, Prototype, Mootools

• Widget libraries:– Dojo, Qooxdoo, Ext

• Domain specific methodologies– Ample, Ajax.org Platform

Page 12: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Domain specific methodologies• Compression through projection• Language optimized for understanding• Cross-over at optimal points

Page 13: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Browser domain specific• HTML– Document and spatial structure

• CSS– Styling

Page 14: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

HTML 5 • Started as the DSL for web applications• Moved towards adding features • HTML is the assembly language of the web• Does not solve the application-level

integration

Page 15: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Domains in an application• Layout• State• Style• Templating• Data bindings• Communication

Page 16: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

DSL approaches• Tree hierarchy (markup, json)• Functional Reactive (signal-slot)• Query selectors (css-selectors, xpath, json-

path)• Expressions• Code flow syntax (e4x, live markup)

Page 17: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Why are we doing this?• Our time is expensive• We want to build cool stuff• It should be fun to make – and maintain

Page 18: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Ajax.org DSLs • Ajax.org Markup Language– Static application declaration

• Live Markup– Dynamic application declaration

• Layouting• Skinning• Expression CSS

Page 19: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Ajax.org Markup Language• Application is represented in a DOM tree– XML (AML) definable– JSON definable– JS DOM-api controllable

Page 20: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

The XML way<div> <a:chart> <a:axis mode="2D"> <a:graph mode="line" formula="sin(x)" /> </a:axis> </a:chart>

<a:button>Test</a:button>

</div>

Page 21: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

The JSON wayvar chart = new apf.chart({ htmlNode : document.body.firstChild, childNodes : [ new apf.axis({ mode : "2D", childNodes : [ new apf.graph({ mode : "line", formula : "sin(x)" }) ] }),

new apf.button({caption : "2D”}) ]});

Page 22: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

JS and W3C DOM APIvar chart = new apf.chart();apf.document.body.appendChild(chart);

var axis = chart.appendChild(new apf.axis());axis.setAttribute("mode", "2D");

var graph = axis.appendChild(new apf.graph());graph.setAttribute("mode", "line");graph.setAttribute("formula", "sin(x)");

var graph = axis.appendChild(new apf.button());graph.setAttribute("mode", "line");graph.setAttribute("formula", "sin(x)”);…

Page 23: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Dynamic UI - Live Markup<?lm var x = 10; <ul>{ each([mdlExample::foo/bar]) { <li>{

[@name].toUpperCase() + x }</li>

} }</ul>?>

Page 24: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Dynamic UI - Live Markup<?lm var x = 10; <ul>{ each([mdlExample::foo/bar]) { <li>{

[@name].toUpperCase() + x }</li>

} }</ul>?>

Page 25: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Live markup syntax• Extended JavaScript

– [] for query selectors– {} for code mode– In string parsing

• E4X style xml literals (literal is a string, not an object)• Overloaded operators• Async calling abstracted (use sparsely)• Fast execution and compilation• Auto concat and auto output

Page 26: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

A lot of work in HTML:• Synchronizing data with the UI• Dealing with the server• Maintaining state• Undo / Redo / Offline• Templating from data• Dynamic vector graphics

Page 27: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Loading data

<a:model id = "mdlUsers" src = "http://example.com/users.php" />

Page 28: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Displaying data - databinding<a:tree model = "mdlUsers" each = "[user]" caption = "[@name]" icon = "icoUser.png" />

Page 29: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Displaying data – a bit more complex<a:tree each = "[mdlUsers::user]" caption = "{[@fname].uCaseFirst()} [@lname]" icon = "{[@icon] or 'icoUser.png'}" />

Page 30: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Managing state and simple logic<a:thumbnails each="[mdlThumbs::thumbs]" image="[@url]" thumbsize="{sld1.value}"/>

<a:slider id="sld1" value="90" min="10" max="150" />

Page 31: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Managing state – a bit more complex<a:tree id="tree" actiontracker="atTree" ... />

<a:label value="[{tree.selected}::@name]" />

<a:button disabled="{!atTree.undolength}" onclick="..."> Undo</a:button>

Page 32: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Undo and Redo<a:tree actiontracker="atTree" ... />

<a:button onclick="atTree.undo()">Undo</a:button><a:button onclick="atTree.redo()">Redo</a:button>

Page 33: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Vector graphics<div> <a:chart> <a:axis mode="2D"> <a:graph mode="line" formula="sin(x)" /> </a:axis> </a:chart>

</div>

Page 34: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Putting it together• Collaborative applications– Databinding (remote)– Complete widgets– Server communication

Page 35: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Collaborative Demo

Page 36: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Vision• The browser is the application platform of the

future

Page 37: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

What we need• Full feature UI platform• IDE• Desktop integration• Serverside integration• Make the browser compete with

Flash and Silverlight

Page 38: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

APF Roadmap• Apf 3.0 stable early Q1 2010• Apf 3.1

• contentEditable• WAI-ARIA support• Virtual viewport for all widgets• Offline applications• Multiple query languages in

Live Markup (JSON-Path, CSS3)

Page 39: Beholding the giant pyramid of application development; why Ajax applications are its natural top layer

Thank you• Rik Arends @rikarends [email protected]• www.ajax.org @ajax_org