Rich Internet Applications using NetBeans 6

thrillukrainianΛογισμικό & κατασκευή λογ/κού

7 Ιουν 2012 (πριν από 5 χρόνια και 5 μήνες)

588 εμφανίσεις


Rich Internet Applications
using NetBeans 6.0
Simon Cook
UK Software Practice
Sun Microsystems

Agenda

Introduction

RIA Technologies

Using Ajax for RIA

jMaki

Wicket

Google Web Toolkit (GWT)

JavaServer Faces and Dynafaces

Using JavaFX for RIA

Questions and maybe some answers

Me

Lead Software Engineer for Finance

UK Software Practice

11 years at Sun Microsystems

Too many roles to mention!

Java since 1996 (and before)

Java Certified Enterprise Architect

Introduction

Haven't we been here before?

Browser interface is a dumb terminal

RIA is X11

What's new this time?

The browser paradigm – Simplicity

World Wide Web

Pushing the web to the next level

Web 2.0? Read Write Web

Introduction

Some RIA Examples

Google Maps

Google Documents

BBCi Beta (The new site)

Facebook

Youtube

Flickr

Linerider

Introduction

Why Rich Internet Applications

Better user experience

The UI is more responsive

The UI is easier to work with

No round-trip page refresh

Processing off-loaded to the client

Less network load (?)

Read/Write applications

Introduction

The Issues with Rich Internet Applications

The affects on the client system

Security models (sandboxes, permissions)

Search engine optimization (or lack of)

Simplicity made complex

Difficult to develop

How many frameworks do I need?

RIA Technologies

There are currently two main types of RIA:

Browser centric

Browser launched

Browser Centric RIA

Runs within (lives) the browser

Generally standards based

HTML

JavaScript

XML

CSS

Developers use current skill-set

Limited by the browser's capabilities

Browser Launched RIA

Container based

JavaFX

Flash, Flex, etc.

Silverlight

Typically proprietary development

Typically requires a specialised skill-set

Not limited by browser capabilities

Browser Based RIA

ActiveX Controls

Internet Explorer centric

Security Issues

Provides seamless rich applications

Microsoft provide good development tools
(for Microsoft)

Broswer Centric RIA

Asynchronous JavaScript and XML (Ajax)

New use of existing technologies

HTML, CSS, Javascript and XMLRequests

Many client-side frameworks available:

jMaki

Dojo

Prototype

Script.aculo.us

Etc.

Browser Centric RIA

Ajax requires a server-side component

Client communicates via XML

Many server-side frameworks

Direct Web Remoting (DWR)

OpenLaszo

Google Web Toolkit (GWT)

Browser Centric RIA

Ajax supported in many existing
frameworks

Enables developers to use what they know

Extensions to existing frameworks

JavaServer Faces

Wicket

(J)Ruby on Rails

Etc.

Browser Launched RIA

Abode Flash and Flex

Flash Player is the runtime container

Flex is a RIA framework

Proprietary Development

ActionScript and MXML (Magic XML)

Browser Launched RIA

Do you remember Java Applets?

Orginal vision was RIA

Java Programming Language

Delivered via the Java Plugin

Too big for initial download (vs Flash, etc.)

Now superseded by Java Web Start and
JavaFX

Browser Launched SIA

Silverlight from Microsoft

Silverlight browser plug-in run-time

Microsoft Visual Studio

Developed using a compact CLR

Mixture of XAML, JavaScript and VB

Ruby and Python to come

Using jMaki for Ajax RIA

jMaki provides a single framework

Makes use of many other frameworks

Google, Yahoo, Script.aculo.us, etc.


Ajax in a tag” development

Widget Model – leverage existing widgets

Layouts – provides standard layouts

Server model – access to DBs/WSs/etc.

Great support in NetBeans

jMaki Example in NetBeans

Using Wicket for Ajax RIA

Wicket is an Apache project

Makes Ajax easy for Java developers

Automatic server-side state management

Seperations of Concerns

Java and HTML linked by Wicket IDs

Simple Swing type OO model

Back button state management

Wicket Example in NetBeans

Using GWT for Ajax RIA

The Google Web Toolkit (GWT)

Takes the “J” out of Ajax

Manages back button history

Based on a Swing-type programming model

Only supports JDK 1.4.2. currently

Compiles to JavaScript

Support for other APIs (Google Gears)

GWT Example in NetBeans

Using JSF for RIA

JavaServer Faces

Nice MVC model for web development

Woodstock components for RIA

Ajax details completely hidden

Dynamic Faces (Dynafaces)

Part of the Java EE 5 standard

Support in NetBeans 6.0

Including The Visual Editor

Using DynaFaces for RIA

Incremental improvement ot JSF 1.2

Extends the JSF Lifecycle

Uses Shale Remoting

All details hidden, only require entry points

Developer Entry Points

Page – Ajax Components, AjaxZones and
JavaScript libraries.

Components – Ajaxzones and JavaScript

JSF Examples in NetBeans

Using JavaFX for RIA

What is JavaFX?

JavaFX is a programming language

JavaFX has a run-time container (FXPlayer)

JavaFX Mobile for device development

Statically typed

Dynamic and flexibile

Very easy to learn and extended

Can make full use of Java APIs

Using JavaFX for RIA

JavaFX Script

Ideal for creating GUI applications

Java2D, Swing and Java3D

Declarative GUI development

Simple for Animations

Filters, fades, movement and animations.

Support in NetBeans 6.0

Using JavaFX for RIA

The Weather View sample:

Using JavaFX for RIA

Deployment

Java Web Start

Java Applets

Consumer run-time support (JavaSE 6uN)

Deployment Toolkit

Faster startup time

Java Kernel (smaller download)

Graphics Acceleration

More of a 'Flash Like' experience

JavaFX Example in NetBeans

Conclusion

Microsoft – Great Tooling, proprietary & new

Adobe – Good Tooling, proprietary & established

JavaFX – Great Potential (tooling), Java & new

Ajax – Greatest momentum

Utilises existing browser technologies

Good tool support

Many existing frameworks

wiki.netbeans.org/NetBeansWorldTour2008

References

jMaki

https://ajax.dev.java.net/

Dynafaces

https://jsf-extensions.dev.java.net/mvn/tutorial.html

JavaFX Open Source Project

https://openjfx.dev.java.net/

Wicket Home Page

http://wicket.apache.org/

The Google Web Toolkit

http://code.google.com/webtoolkit/

Rich Internet Applications
Simon Cook
simon@sun.com