3246 jsf support in jbuilder 2005 karl ewald r&d engineer borland software corporation

Post on 21-Jan-2016

217 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

3246JSF Support in JBuilder 2005

Karl EwaldR&D Engineer

Borland Software Corporation

Primary Presentation Goals

To introduce you to JBuilder’s JavaServer Faces (JSF) support and

show you how to maximize your productivity while working on JSF

applications in JBuilder.

Speaker’s Qualifications• Karl Ewald is an R&D Engineer at

Borland working on the JBuilder Team• Karl was one of Borland’s

representatives on JSR-127, JavaServer Faces

Presentation Overview• JSF Crash Course• JBuilder’s Design Philosophy• Demo• Summary• Q & A

JSF Crash CourseJavaServer Faces (JSF) is a user interface (UI)

framework for Java web applications. It is designed to significantly ease the burden of

writing and maintaining applications that run on a Java application server and render their UIs back

to a target client.

From: JavaServer Faces specification

JSF Crash Course• Oh, the Complexity!• How to Simplify: Identify Your Role• “Backing” Beans• JSF Expression Language• Programming Models• Controlling Navigation

Identify Your Role• Application Development

– JSPs, “Backing” Beans, Navigation, Converters, Validators…

• Component Development– Components, Render Kits, Renderers...

• Application Configuration– Factories, Handlers, Resolvers, etc...

“Backing” Beans• Referenced Bean: Defines the logical name and

the type of a bean that will be available within one of the scopes at runtime.

• Managed Bean: Defines the logical name, type, and scope of a bean that will be made available via the JSF Framework.– “Concrete” vs. “Dyna”– Managed Properties– List / Map Entries

JSF Expression Language• Searches in scoped storage for an object by

name• Allows access to the object’s methods and

properties• Uses the delimiters “#{“ and “}”

JSF Expression Examples

#{foo}

#{foo.bar}

#{foo.bar.baz}

#{foo[bar]}

#{foo[“bar”]}

#{foo[3]}

#[foo[3].bar}

#{foo.bar[3]}

Programming ModelsValue Bound - The component values are bound

to properties in the “backing” in beans.• Advantages

– Clean separation of view and model– Less casting in business logic– Covered extensively in books

• Disadvantages– More difficult to manipulate components

programmatically

Programming ModelsComponent Bound - The components are bound

to properties in the “backing” in beans.• Advantages

– Easy to manipulate components programmatically

• Disadvantages– Need to cast to get meaningful values – Blurs the line between view and model– “Your results may vary…”

Programming ModelsWhich model should I use?

Have a bias to the Value Bound Model…

…but do what you need to do.

– Simplicity– Minimize view/model blending – If you must, bind components as generically

as possible

Controlling Navigation• The UICommand Components

– Setting the “action attribute• a hard coded outcome• method binding expression

• Default Navigation Handler– The three keys:

• From view ID• From outcome• From action

Controlling Navigation• Navigation Rule

– From view ID• The views for which this rule is active• Can include the wildcard character, “*”

– Collection of Navigation Cases• Navigation Case

– From outcome– From action– To view ID

JBuilder Design Philosophy• Easing development is the goal• Assume developers will touch the code

– No extra artifacts– No unnecessary fluff– Encompass the breadth of the spec

What elephant?

...WYSIWYG

Demo

Things to Remember• Configure JBuilder to your liking• “Sketch” your application’s flow• Exploit the JSF Palette• Exploit code templates• Let ErrorInsight lead the way

Usability Testing

Testing takes place Monday and Tuesday, 1-5pm, in the Computer Lab.

Testing Areas:– Code generation and manipulation– Running, debugging, deploying– Web & JSF features– EJB features

Questions?

Thank You

3246

JSF Support in JBuilder 2005

Please fill out the speaker evaluation

You can contact me further at …kewald@borland.com

http://blogs.borland.com/kewald/

top related