Tooling for Ajax-Based Development. Craig R. McClanahan Senior Staff Engineer Sun Microsystems, Inc.

Similar documents
Developing Ajax Web Apps with GWT. Session I

jmaki Overview Sang Shin Java Technology Architect Sun Microsystems, Inc.

GWT and jmaki: Expanding the GWT Universe. Carla Mott, Staff Engineer, Sun Microsystems Greg Murray, Ajax Architect, Sun Microsystems

Etanova Enterprise Solutions

An update on the latest strategies for building Ajax applications with JavaServer Faces

Etanova Enterprise Solutions

Services Interoperability With Java Technology and.net: Technologies for Web 2.0

RIA Security - Broken By Design. Joonas Lehtinen IT Mill - CEO

Sun Java Studio Creator. Ken Paulsen Staff Engineer Sun Microsystems, Incorporated (Slides by: Craig R. McClanahan)

Like It Or Not Web Applications and Mashups Will Be Hot

Networking & The Web. HCID 520 User Interface Software & Technology

Web 2.0 Käyttöliittymätekniikat

eclipse rich ajax platform (rap)

IBM JZOS Meets Web 2.0

Java EE 7 is ready What to do next? Peter Doschkinow Senior Java Architect

Using JavaScript on Client and Server with Project Phobos

IBM Rational Developer for System z Version 7.5

Networking & The Web. HCID 520 User Interface Software & Technology

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

Rails powered by GlassFish & jmaki

Backend Web Frameworks

Review of Mobile Web Application Frameworks

JavaServer Faces Technology, AJAX, and Portlets: It s Easy if You Know How!

Introduction to Ajax. Sang Shin Java Technology Architect Sun Microsystems, Inc.

PGT T3CHNOLOGY SCOUTING. Google Webtoolkit. JSF done right?

AJAX: Rich Internet Applications

,

20480C: Programming in HTML5 with JavaScript and CSS3. Course Code: 20480C; Duration: 5 days; Instructor-led. JavaScript code.

Web Frameworks MMIS 2 VU SS Denis Helic. March 10, KMI, TU Graz. Denis Helic (KMI, TU Graz) Web Frameworks March 10, / 18

Web Application Security

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML

Front End Programming

The Next Generation of Eclipse: e4. Mike Milinkovich Executive Director Eclipse Foundation

welcome to BOILERCAMP HOW TO WEB DEV

Using Adobe Flex in JSR-286 Portlets

Building Web Applications With The Struts Framework

Web Standards Mastering HTML5, CSS3, and XML

Mix It Up: Visual Studio 2010 and ASP.NET 4.0. Singapore 25 March 2009

COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

COURSE 20480B: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

AJAX Basics. Welcome to AJAX Basics presentation. My name is Sang Shin. I am Java technology architect and evangelist from Sun Microsystems.

Ajax and JSF: Natural Synergy

Web 2.0, AJAX and RIAs

AJAX Programming Chris Seddon

Programming in HTML5 with JavaScript and CSS3

Web Applications. Software Engineering 2017 Alessio Gambi - Saarland University

Developing ASP.NET MVC 5 Web Applications

Komodo IDE 4. Multi-platform, multi-language IDE for dynamic languages and Ajax technologies.

<Insert Picture Here> JavaFX Overview April 2010

Developing Applications with Java EE 6 on WebLogic Server 12c

Practical AJAX by Erin Mulder

Database Driven Web 2.0 for the Enterprise

Start of the site or web application development

User Interaction: jquery

Contents. Demos folder: Demos\14-Ajax. 1. Overview of Ajax. 2. Using Ajax directly. 3. jquery and Ajax. 4. Consuming RESTful services

JSF 2.0: Insight and Opinion

dotnettips.com 2009 David McCarter 1

Performance evaluation of J2EE

Index. C CakePHP framework, 232 Cascading Style Sheets (CSS)

Petr Suchomel Architect, NetBeans Mobility

Course 20480: Programming in HTML5 with JavaScript and CSS3

20486-Developing ASP.NET MVC 4 Web Applications

XAP: extensible Ajax Platform

Radical GUI Makeover with Ajax Mashup

A Model-Controller Interface for Struts-Based Web Applications

Jquery Ajax Json Php Mysql Data Entry Example

Eclipse 4.0. Jochen Krause EclipseSource

Modern and Responsive Mobile-enabled Web Applications

Web Development for Dinosaurs An Introduction to Modern Web Development

P a g e 1. Danish Technological Institute. Scripting and Web Languages Online Course k Scripting and Web Languages

Architectural patterns

Architectural Styles II

Get in Touch Module 1 - Core PHP XHTML

When learning coding, be brave

Create-A-Page Design Documentation

CS637 Midterm Review

JAVASCRIPT JQUERY AJAX FILE UPLOAD STACK OVERFLOW

JavaScript Doesn't Have to Hurt: Techniques, Tools and Frameworks to Ease JavaScript Development

THE NEW ERA OF WEB DEVELOPMENT. qooxdoo. Andreas Ecker, Derrell Lipman

Full Stack Web Developer

UX400. OpenUI5 Development Foundations COURSE OUTLINE. Course Version: 02 Course Duration: 5 Day(s)

RAP (The Rich Ajax Platform)

DESIGN AND IMPLEMENTATION OF SAGE DISPLAY CONTROLLER PROJECT

Credits: Some of the slides are based on material adapted from

Tools to Develop New Linux Applications

Improve and Expand JavaServer Faces Technology with JBoss Seam

Migrating traditional Java EE applications to mobile

Application Integration with WebSphere Portal V7

Developing ASP.NET MVC 5 Web Applications. Course Outline

Course 20486B: Developing ASP.NET MVC 4 Web Applications

Developing ASP.NET MVC 4 Web Applications

Advanced Topics in WebSphere Portal Development Graham Harper Application Architect IBM Software Services for Collaboration

GRITS AJAX & GWT. Trey Roby. GRITS 5/14/09 Roby - 1

Ajax and Web 2.0 Related Frameworks and Toolkits. Dennis Chen Director of Product Engineering / Potix Corporation

Upload to your web space (e.g., UCSC) Due this Thursday 4/8 in class Deliverable: Send me an with the URL Grading:

Oracle Fusion Middleware 11g: Build Applications with ADF Accel

Financial. AngularJS. AngularJS.

ASP.NET MVC Training

P a g e 1. Danish Tecnological Institute. Developer Collection Online Course k Developer Collection

Module7: AJAX. Click, wait, and refresh user interaction. Synchronous request/response communication model. Page-driven: Workflow is based on pages

Transcription:

Tooling for Ajax-Based Development Craig R. McClanahan Senior Staff Engineer Sun Microsystems, Inc. 1

Agenda In The Beginning Frameworks Tooling Architectural Approaches Resources 2

In The Beginning 3

In The Beginning How Did We Start Writing Ajax Applications? Hand-coded XMLHttpRequest (XHR) calls > Tedious code > Browser-specific quirks > Limited reusability 4

In The Beginning How Did We Start Writing Ajax Applications? function ajax($url, $vars, $object){ if (window.xmlhttprequest){ var $class = new XMLHttpRequest(); } else { var $class = new ActiveXObject("MSXML2.XMLHTTP.3.0"); } $class.open("post", $url, true); $class.setrequestheader("content-type", "application/x-www-form-urlencoded"); $class.onreadystatechange = function() { if ($class.readystate==4 && $class.status==200) { if ($class.responsetext) { $obj = $class.responsetext; $object($obj); } } } $class.send($vars); } 5

In The Beginning How Did We Start Writing Ajax Applications? Hand-coded Dynamic HTML (DHTML) manipulation > Tedious code > Browser-specific quirks > Limited reusability 6

In The Beginning How Did We Start Writing Ajax Applications? component = Document.getElementById( options ); component._clear(); component.menu.style.visibility = "visible"; var children = null; var items = data.getelementsbytagname("item"); if ((items!= null) && (items.length > 0)) { for (loop = 0; loop < items.length; loop++) { children = items[loop].childnodes; if ((children!= null) && (children.length > 0)) { component._append(children[0].nodevalue); } } } 7

In The Beginning How Could We Do A Better Job? Frameworks... lots of frameworks! 8

Frameworks 9

Frameworks Client Side Frameworks Encapsulate common behaviors: > Asynchronous communication to server > Dynamic HTML widgets > Client side events > Dynamic visual effects Examples: > Dojo, Prototype, Scriptaculous, Jquery, Yahoo! UI... 10

Frameworks Client Side Frameworks But can I use them together? Open Ajax Alliance > http://www.openajax.org/ > Goal Accelerate success with Ajax by promoting mix and match solutions based on interoperable technologies > Many of the organizations presenting here are members 11

Frameworks Client Side Frameworks But can I use them together? The jmaki Framework > https://ajax.dev.java.net/ > Lightweight framework for constructing JavaScript centric Web 2.0 applications using CSS layouts, a widget model, cross library data models, and cross library eventing > Choice of server side runtimes: Java/JSP, Java/JSF, PHP, Server Side JavaScript (Phobos), and Ruby on Rails > Plugins for NetBeans and Eclipse 12

Frameworks Server Side Frameworks Often supported by updated versions of traditional web application frameworks: > Java Struts, JSF, Tapestry, Wicket, Stripes,... > PHP Zend, CakePHP, Symfony, Seagull,... > Python Zope, Django, Webware, SkunkWeb,... > Ruby Rails, Nitro, Iowa,... Two general approaches: > Markup generated server side (including Ajax callbacks) > Widget calls generated server side, markup generated client side (data exchanged via Ajax callbacks) 13

Frameworks End To End Frameworks Google Web Toolkit: > http://code.google.com/webtoolkit/ > Write and debug client side code in Java > Translated into JavaScript for download to browser > RPC mechanism for remote data transfer ICEFaces: > http://www.icefaces.org/ > JavaServer Faces component library, so applications developed in Java > Incremental DOM updates delivered dynamically via Ajax > Ajax Push Server initiated content rendering 14

Frameworks End To End Frameworks Google Web Toolkit: > http://code.google.com/webtoolkit/ > Write and debug client side code in Java > Translated into JavaScript for download to browser > RPC mechanism for remote data transfer ICEFaces: > http://www.icefaces.org/ > Based on a JavaServer Faces component library, so applications developed in Java > Incremental DOM updates delivered dynamically via Ajax > Ajax Push Server initiated content rendering 15

Tooling 16

Tooling Why Do Tools Matter? Traditionalists like emacs and vi for development > Why? Because they are productive with these tools > Personal history long time emacs user mouse hater :-) Can a GUI or IDE environment improve productivity? > If it cannot, stay away from them > If it can, pay attention to them 17

Tooling I'm a Power Developer... How Can IDEs Help Me? Color coded editing nice but already available Code completion Documentation lookup Find usages Refactoring GUI editors for configuration files Debugging Code generation wizards 18

Tooling Tooling Demos Based on NetBeans 6.0 Milestone 10: > Similar capabilities available in Eclipse, IntelliJ,... Client side use cases: > Google Web Toolkit > jmaki with JavaServer Pages > jmaki with JavaServer Faces > jmaki with Ruby on Rails Server side use cases: > Java Persistence API entity class generation > RESTful web service from entity classes 19

Architecture Approaches 20

Architecture Approaches Different Architectural Styles Most Ajax-oriented presentations concentrate on: > Client side libraries > End-to-end solutions How do we deal with adding Ajax to existing apps? How do we architect for next generation web scale? Consider the following styles: > Traditional server side web application with eye candy > Traditional webapp with partial page submit/refresh > All In One Page (AIOP) > Non JS+DHTML Solutions 21

Architecture Approaches Traditional Server Side With Eye Candy Millions of currently deployed applications that are: > Based on traditional web application frameworks > Based on traditional HTTP page semantics > Could offer usability improvements from simple Ajax interactions Look for opportunities to leverage: > Client side widget libraries directly > Low hanging fruit animations that would be unfeasible with full page refreshes: Progress bars, animated voting tools, autocomplete text fields,... > Background Ajax to newly created URI endpoints 22

Architecture Approaches Partial Page Submit / Partial Page Refresh Start with a traditional web application Divide page content into separate areas that can (logically) be submitted and/or refreshed separately Continue to leverage server side markup creation Example implementation technologies: > Ruby on Rails Partials > JSF Project Dynamic Faces 23

Architecture Approaches All In One Page (AIOP) Best suited to green field development Move view and controller to client side Use Ajax requests to exchange data not markup > Reuse simple web services exposing your content and functionality for: Internal HTML based UI Internal AIOP based clients External mashups Need some sort of MVC framework on client side Side note give up on traditional web analytics :-) 24

Architecture Approaches Non JS+DHTML Solutions Ajax (implemented with JS+DHTML) is not the only possible solution for rich client UIs Browser plugins offer competing solutions: > Flash, Flex, Silverlight, Java FX So do traditionally installed client applications: > Nowdays, better known as Rich Internet Applications If we want Ajax to succeed, we need: > Higher quality JS+DHTML implementations in browsers > Better interoperability between implementations > Comprehensive solution to code injections with eval() 25

Resources 26

Resources Additional Resource Pointers NetBeans 6.0 Milestone 10: > http://www.netbeans.org/community/releases/60/index.html Sun Web Developer Pack: > http://developers.sun.com/web/swdp/ jmaki On Rails Plugins Repository (alpha quality): > http://jmaki-goodies.googlecode.com/svn/trunk/rails_plugins/ Project Dynamic Faces: > https://jsf-extensions.dev.java.net/ 27

Q & A 28

Tooling for Ajax-Based Development Craig R. McClanahan Craig.McClanahan@sun.com 29