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

Sun Java Studio Creator

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Sun Java Studio Creator

Sun Java Studio Creator

Ken PaulsenStaff EngineerSun Microsystems, Incorporated(Slides by: Craig R. McClanahan)

Page 2: Sun Java Studio Creator

2 | Seattle Java Users Group – Jan 18, 2005

Agenda

● Background– Developer characteristics– Corporate developers– Sun Java Studio Creator

● Application Model– Overview – Basic components– Under the covers – Additional components– Using data in applications– Page navigation

Page 3: Sun Java Studio Creator

3 | Seattle Java Users Group – Jan 18, 2005

Agenda

● Other Features– Component Library Import– Creator Design Time APIs

● Summary

Page 4: Sun Java Studio Creator

4 | Seattle Java Users Group – Jan 18, 2005

Agenda

● Background– Developer characteristics– Corporate developers– Sun Java Studio Creator

● Application Model– Overview – Basic components– Under the covers – Additional components– Using data in applications– Page navigation and value bindings

Page 5: Sun Java Studio Creator

5 | Seattle Java Users Group – Jan 18, 2005

The Appeal of Java

● Java has traditionally appealed to technology-savvy developers– Object orientation– Type safety– Sophisticated, powerful APIs

● But it has often been perceived as “too hard to use” by a significant audience

Page 6: Sun Java Studio Creator

6 | Seattle Java Users Group – Jan 18, 2005

Corporate Developers

● May not be your typical developers– May be domain experts– Might use VB, 4GLs, or scripting languages

● The applications they create:– Are typically consumers of data and services– Provide rich UI to what may be a complex

underlying system

Page 7: Sun Java Studio Creator

7 | Seattle Java Users Group – Jan 18, 2005

Corporate Developers

● The bar with most Java IDEs is just too high– Geared toward techologists / enterprise

developers● Value = flexibility and richness

– Corporate developers have different requirements● Value = simplicity and understandability

● Prefer a complete solution

Page 8: Sun Java Studio Creator

8 | Seattle Java Users Group – Jan 18, 2005

Tools for Corporate Developers

● More “up front” coding– Design UI, modify attributes, plug in data,

services, and logic– Heavy re-use and component drag and drop

● Simplified coding– Does not mean “no code”– Results should be understandable, obvious– “Truth in code”– Cause and effect should be evident

Different development styles

Page 9: Sun Java Studio Creator

9 | Seattle Java Users Group – Jan 18, 2005

Tools for Corporate Developers

● Platform “power”– Must be available, but not required to be

productive– Understanding complexity should not be

required

● Resulting applications– Should be standards based– Minimal or no required runtime

Different requirements

Page 10: Sun Java Studio Creator

10 | Seattle Java Users Group – Jan 18, 2005

Sun Java Studio Creator

● Solid IDE platform – NetBeans– Infrastructure for building a complete

development environment– Powerful “standard IDE fare” features

● Built with and for Java standards– Integrated with SJSAS Platform Edition– Features standard Java APIs– Runtime applications are portable

A Tool For The Corporate Developer

Page 11: Sun Java Studio Creator

11 | Seattle Java Users Group – Jan 18, 2005

DEMO

A Quick Orientation

Page 12: Sun Java Studio Creator

12 | Seattle Java Users Group – Jan 18, 2005

Agenda

● Background– Developer characteristics– Corporate developers– Sun Java Studio Creator

● Application Model– Overview – Basic components– Under the covers – Additional components– Using data in applications– Page navigation and value bindings

Page 13: Sun Java Studio Creator

13 | Seattle Java Users Group – Jan 18, 2005

The Application Model

● Applications consist of the following primary elements:– A set of web pages (and Java source)– Configuration (metadata) information– Additional logic, services, and runtime code– Extra resources as necessary (for example):

● Images● Localizing bundles

High Level View

Page 14: Sun Java Studio Creator

14 | Seattle Java Users Group – Jan 18, 2005

The Application Model

High Level View

Page 15: Sun Java Studio Creator

15 | Seattle Java Users Group – Jan 18, 2005

The Application Model

● Each logical page consists of:– JSP Page

● JSF components● Additional markup

– Corresponding Page Bean● Component instances● Event handlers● Page properties● Methods

Page Level View

Page 16: Sun Java Studio Creator

16 | Seattle Java Users Group – Jan 18, 2005

DEMO

JSP Pages and Page Beans

Page 17: Sun Java Studio Creator

17 | Seattle Java Users Group – Jan 18, 2005

The Application Model

● Prebuilt JavaBeans:– PageBean – Per-request properties,

components, event handlers– SessionBean – Per-user properties required

across requests or pages– ApplicationBean – Application wide properties

(such as cached contents for drop down lists)

Under The Covers – Additional Elements

Page 18: Sun Java Studio Creator

18 | Seattle Java Users Group – Jan 18, 2005

The Application Model

● PageBean Additional Contents:– Event handlers (actions, value changes)– Converters– Validators

● Data Source Components:– JDBC Rowsets– Web Services– Enterprise JavaBeans

Under The Covers – Additional Elements

Page 19: Sun Java Studio Creator

19 | Seattle Java Users Group – Jan 18, 2005

Using Data In Applications

● JDBC Rowsets are components:– Non-visual, so represented in the “tray”– Have properties that can be customized– Properties persisted in constructor of the

containing page bean

● Visual binding of rowsets to UI components

● Visual editing of SELECT queries

JDBC Rowsets

Page 20: Sun Java Studio Creator

20 | Seattle Java Users Group – Jan 18, 2005

DEMO

Binding Rowsets To UI Components #1

Page 21: Sun Java Studio Creator

21 | Seattle Java Users Group – Jan 18, 2005

Rich Design Time Experience

● As we have seen in the demos so far, Creator provides rich design time facilities– WSYWIG rendering of components– Configuration of components on drop– Visual binding to properties or services– Context sensitive operations

● Let's see more of this in action

Page 22: Sun Java Studio Creator

22 | Seattle Java Users Group – Jan 18, 2005

DEMO

Binding Rowsets To UI Components #2

Page 23: Sun Java Studio Creator

23 | Seattle Java Users Group – Jan 18, 2005

Using Data In Applications

● SOAP-Based Web Services are:– Defined by WSDL resource, which is ...– Located via a URL or a local file

● When you drop a web service onto a page in your application:– Creator generates client stubs– Adds appropriate libraries to your application– Provides Java API to access web service from

event handlers

Web Services

Page 24: Sun Java Studio Creator

24 | Seattle Java Users Group – Jan 18, 2005

DEMO

Accessing Web Services (requires net access to deploy)

Page 25: Sun Java Studio Creator

25 | Seattle Java Users Group – Jan 18, 2005

Using Data In Applications

● You may access stateless session beans that are available on your application server

● When you drop an EJB onto your page– Creator builds a client that encapsulates the

EJB lookup and call– Adds appropriate libraries to your application– Provides Java API to access EJBs from event

handlers

Enterprise JavaBeans (Preview Feature)

Page 26: Sun Java Studio Creator

26 | Seattle Java Users Group – Jan 18, 2005

DEMO

Accessing Enterprise JavaBeans (Preview Feature)

Page 27: Sun Java Studio Creator

27 | Seattle Java Users Group – Jan 18, 2005

Page Navigation

● JavaServer Faces supports two approaches to navigation:– Static – Predetermined path to second page– Dynamic – Calculate where to go next

● Navigation is based on:– Current page being submitted– Which submit button was pressed– Logical “outcome” (or static value) returned

Easy Configuration for Multiple Page Applications

Page 28: Sun Java Studio Creator

28 | Seattle Java Users Group – Jan 18, 2005

Value Binding Expressions

● JavaServer Faces uses value binding expressions to connect components to underlying model data– #{customer.address.city}

● Based on expression language from JSTL 1.0 and JSP 2.0

● Extended to support dynamic bean creation via managed beans facility

Connecting components to data

Page 29: Sun Java Studio Creator

29 | Seattle Java Users Group – Jan 18, 2005

Method Binding Expressions

● Specialized expressions bind components to event handlers– #{Page1.submit_action}– public void submit_action() { ... }

● Allows all the event handlers for a page to be combined in one class

● Can be used for actions, validators, and value change listeners

Connecting components to event handlers

Page 30: Sun Java Studio Creator

30 | Seattle Java Users Group – Jan 18, 2005

DEMO

Using Page Navigation, Value Bindings, and Method Bindings

Page 31: Sun Java Studio Creator

31 | Seattle Java Users Group – Jan 18, 2005

Agenda

● Other Features– Component Library Import– Creator Design Time APIs

● Summary

Page 32: Sun Java Studio Creator

32 | Seattle Java Users Group – Jan 18, 2005

Component Library Import

● Creator supports a mechanism to import third party libraries of JavaServer Faces components

● “Component Import” archive contains:– Runtime classes (to include in a webapp)– Design time classes (to be used by Creator)– Metadata (to register components with JSF)

Going Beyond The Standard Components

Page 33: Sun Java Studio Creator

33 | Seattle Java Users Group – Jan 18, 2005

Component Library Import

● At import time,– Each library gets its own palette section– BeanInfo classes generated (if necessary)

● At design time,– Using third party components is the same drag-

and-drop process as for standard components– Required runtime libraries added to webapp

● At run time,– JSF seamlessly manages all of the components

Going Beyond The Standard Components

Page 34: Sun Java Studio Creator

34 | Seattle Java Users Group – Jan 18, 2005

Creator Design Time APIs

● Creator supports a rich design time experience for standard components:– Event handlers for drop and link actions– Persists configuration in JSP and/or Java code– Custom property editors and customizers– Custom context menu items

● Internally, provided via “Creator Design Time APIs

Support for Third Party Components (Preview Feature)

Page 35: Sun Java Studio Creator

35 | Seattle Java Users Group – Jan 18, 2005

Creator Design Time APIs

● We are publishing these APIs (as a Preview Feature) for use by third party component developers

● User's Guide for these APIs available on the Creator web site

Support for Third Party Components (Preview Feature)

Page 36: Sun Java Studio Creator

36 | Seattle Java Users Group – Jan 18, 2005

DEMO

Component Import and Design Time APIs (Preview Feature)

Page 37: Sun Java Studio Creator

37 | Seattle Java Users Group – Jan 18, 2005

Agenda

● Other Features– Component Library Import– Creator Design Time APIs

● Summary

Page 38: Sun Java Studio Creator

38 | Seattle Java Users Group – Jan 18, 2005

Sun Java Studio Creator

● Rich design time user experience● Drag-and-drop visual programming● Persists all decisions in code:– JSP pages– Java sources– Configuration files

● Simple, intuitive application model

A Tool For The Corporate Developer

Page 39: Sun Java Studio Creator

39 | Seattle Java Users Group – Jan 18, 2005

Sun Java Studio Creator

● Available as part of the first year of a Sun Developer Network subscription– Rich supporting web site content– Active user forum and support channels– Attractive price ($99/year list)– http://developer.sun.com/jscreator/

● Also available at Amazon with “Java Studio Creator Field Guide”

A Tool For The Corporate Developer

Page 40: Sun Java Studio Creator

Sun Java Studio Creator

Ken Paulsen ([email protected])Staff EngineerSun Microsystems, Incorporated(Slides by: Craig R. McClanahan)