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

21
3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

Upload: pierce-pitts

Post on 21-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

3246JSF Support in JBuilder 2005

Karl EwaldR&D Engineer

Borland Software Corporation

Page 2: 3246 JSF Support in JBuilder 2005 Karl Ewald R&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.

Page 3: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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

Page 4: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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

Page 5: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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

Page 6: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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

Page 7: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

Identify Your Role• Application Development

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

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

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

Page 8: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

“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

Page 9: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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 “}”

Page 10: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

JSF Expression Examples

#{foo}

#{foo.bar}

#{foo.bar.baz}

#{foo[bar]}

#{foo[“bar”]}

#{foo[3]}

#[foo[3].bar}

#{foo.bar[3]}

Page 11: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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

Page 12: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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…”

Page 13: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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

Page 14: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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

Page 15: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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

Page 16: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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

Page 17: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

Demo

Page 18: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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

Page 19: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

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

Page 20: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

Questions?

Page 21: 3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation

Thank You

3246

JSF Support in JBuilder 2005

Please fill out the speaker evaluation

You can contact me further at …[email protected]

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