JSFTemplating https://jsftemplating.dev.java.net https://jsftemplating.dev.java.net ● Ken Paulsen – Senior Staff Engineer ● Sun Microsystems, Inc.

Slides:



Advertisements
Similar presentations
LeadManager™- Internet Marketing Lead Management Solution May, 2009.
Advertisements

INTRODUCTION TO ASP.NET MVC AND EXAMPLE WALKTHROUGH RAJAT ARYA EFECS - OIM DAWG – 4/21/2009 ASP.NET MVC.
Introduction to MVC Adding a View Page NTPCUG Tom Perkins, Ph.D.
Web Applications Development Using Coldbox Platform Eddie Johnston.
Internet Technologies 1 Master of Information System Management Java Server Faces Model/View/Controller Design Pattern for Web Development Slides.
Java Server Faces Model/View/Controller Design Pattern for Web Development Slides adapted from “Core JavaServer Faces” by Geary and Horstmann and the J2EE.
Struts 2.0 an Overview ( )
UNIT-V The MVC architecture and Struts Framework.
JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)
Java Server Faces Çağatay Çivici Apache MyFaces Team Member
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
AJAX Chat Analysis and Design Rui Zhao CS SPG UCCS.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Introduction to the Oracle Application Development Framework 11g
JDeveloper 10g and JavaServer Faces: High-Performance UIs on the Web Avrom Roy-Faderman Senior Programmer May, 2006.
JSP Java Server Pages Softsmith Infotech.
Codeigniter is an open source web application. It occupies a very small amount of space in the memory and is most useful for developers who aim to develop.
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
® IBM Software Group © 2006 IBM Corporation Programmatically Rendering and Hiding JSF Controls This section describes how to hide and show JSF controls.
CHEF II / Sakai Architecture. CHEF II Changes uPortal replaces Jetspeed –jsr 168 portlet, servlet compliant Spring replaces Turbine component framework.
Symfony web development framework is used to develop rapid, complex and large scale web applications faster and in an effective way.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Peter Laird. | 1 Building Dynamic Google Gadgets in Java Peter Laird Managing Architect WebLogic Portal BEA Systems.
JAVA SERVER FACES ADITI RAJORIYA UNI – ar2630. POINTS TO BE DISSCUSED WHAT IS JSF? WHY JSF? ARCHITECTURE JSF VERSIONS UI COMPONENTS JSF STRUCTURE AND.
JSF Framework Java Server Faces Presented by Songkran Totiya (6/10/2014)
JavaServer Faces (JSF) and Ajax Integration. Agenda 대강의 ( 정말로..) 개요 예제 아키텍트라면..
Getting Started with ASP.NET MVC BRIJ BHUSHAN MISHRA.
Chính phủ điện tử TS. Phạm Văn Tính Khoa CNTT, ĐH Nông Lâm TP.HCM
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 41 JavaServer Face.
PHOBOS Javascript Engine By Daniel Reeves. What is Phobos? Lightweight application framework for Java Used by NetBeans Supports multiple scripting languages.
Getting started with ASP.NET MVC Dhananjay
Introduction Selenium IDE is a Firefox extension that allows you to record, edit, and debug tests for HTML Easy record and playback Intelligent field selection.
What is a Servlet? Java Program that runs in a Java web server and conforms to the servlet api. A program that uses class library that decodes and encodes.
WebObjects Matt Aguirre Lally Singh. What Is It? A Java based development platform specifically designed for database-backed web applications.
Servers- Apache Tomcat Server Server-side scripts- Java Server Pages.
: Information Retrieval อาจารย์ ธีภากรณ์ นฤมาณนลิณี
SDJ INFOSOFT PVT. LTD. 2 BROWSERBROWSER JSP JavaBean DB Req Res Application Layer Enterprise server/Data Sources.
By Jonathan Smith. Road Map Introduction Company Information Project Overview Java Web Design and Development Summary Relation to IUP Acknowledgments.
Topics to be covered (ni) Client side validation JSF (free tools as well) Webservices Tell Resources e.g. sites Packaging and deploying web applications.
Simple PHP Web Applications Server Environment
Web Services with Netbeans 6.0 Your Name Sun Campus Ambassador Your Address.
Introduction to Java Server Faces (covered topics) ● Reasons to use „Java Server Faces“ ● JSF application structure ● JSF component model ● JSF managed.
Plug Your JavaServer Faces Application into the GlassFish v3 Admin Console Ken Paulsen – Anissa Lam –
1 Facelets Çağatay Çivici Apache MyFaces Team Member Slightly modified by Sang Shin
Intro to JavaServer Faces Mimi Opkins CECS 493 Fall 2016.
JMaki, Phobos Ludovic Champenois Sun Microsystems Tools story February 23, 2007.
Visual Web & AJAX with Netbeans 6.0 Your Name Sun Campus Ambassador Your Address.
Introduction to JavaServer Faces and the Woodstock UI Components Presenter Name
Servlets What is a Servlet?
Admin Console for Glassfish v2
Business Directory REST API
ASP MVP Web applications and Razor
Data Virtualization Tutorial… CORS and CIS
Kanban Task Manager SharePoint Editions ‒ Introduction
Apache Wicket Component Based Web Development Framework.
Admin Console for Glassfish v2
Intro to PHP & Variables
Sakai WebApp Structure
MVC Framework, in general.
Online Testing System Assessment Viewing Application (AVA)
Predefined Dialog Boxes
CSE341: Programming Languages Section 1
Online Testing System Assessment Viewing Application (AVA)
JavaServer Faces: The Fundamentals
The JSF Tools Project – WTP (internal) release review
Introduction to Java Servlets
Client-Server Model: Requesting a Web Page
SharePoint Saturday Kansas City October 19, 2019
Kanban Task Manager SharePoint Editions ‒ Introduction
Presentation transcript:

JSFTemplating ● Ken Paulsen – Senior Staff Engineer ● Sun Microsystems, Inc.

Welcome! What is JSFTemplating? Creating Pages Additional Features Developer Tips Questions? Agenda

Welcome! Now why are you here? I'm interested in JSF JSFTemplating got my attention I want to talk Ajax Pizza! (Thanks Nike!) PJUG Meeting, I come no matter what

What is JSFTemplating? JSF Page Framework? JSF Renderer Framework? Both! Oh... and it's Open Source too.

Quotes “This is going really fast and I may just drop my current JSF/Facelets implementation on the floor for JSFTemplating." "...developed a GUI in a couple hours that would had took a day in JSF... (interesting.)"

Key Features Multiple format support #include pageSession Events / Handlers Factories Inter-operates w/ JSP Better Performance Instant changes AJAX Support

High Level Overview Template-based description of Renderer or UIComponent tree Template becomes "LayoutElement" tree (meta- data) LayoutViewHandler creates UIComponent tree TemplateRenderer walks tree

HTML Page test.jsf Web Browser High Level Overview – Page UIComponen t Tree next.jsf

HTML Produced Renderer component.jsf Output Stream High Level Overview – Renderer LayoutElemen t Tree

How to create JSFTemplating pages 1) Setup standard JSF environment 2) Put jsftemplating.jar in WEB-INF/lib 3) Put.jsf files in docroot (or classpath) 4) Try out your new.jsf pages!

Hello World! “Hello World! ~ “HelloWorld.jsf” 1 line

DEMO Hello World!

Another Example Page " " You typed: #{in}, try typing: abc " Type something and click 'Go!' " Congratulations! You did it! " "

DEMO Example #2

Creating Pages No compile time Instant changes (Debug Mode) No JSP problems Events and handlers are available > (hint: “info.jsf” to see a list) #include files

DEMO #include

Page Session Session pageSession Request

DEMO pageSession

initPage beforeCreate / afterCreate beforeEncode / encode / afterEncode command decode + more Events

Handler example type=String.class)}, type=String.class)}) public static void calculateResponse(HandlerContext context) { // Get the input String in = (String) context.getInputValue("userInput"); // Business logic String resp = "Type something and click 'Go!'"; if (in != null) { if (in.equals("abc")) { resp = "Congratulations, you did it!"; } else { resp = "You typed " + in + ", try typing 'abc'."; } } // Set the response context.setOutputValue("response", resp); }

Handler example (using) <!beforeEncode getUserResponse(usrInput=”#{in}” response=>$pageSession{resp}); println(value=”We responded with: #{resp}”); /> <!command getUserResponse(usrInput=”#{in}” response=>$pageSession{resp}); println(value=”We responded with: #{resp}”); />

DEMO events / handlers

“One thing I absolutely believe is a waste of space is how SJSC2 has create four.java files per page.” Quote

Chainable Reusable Mappable I/O > EL Enabled > Automatic type conversion > Required field checking Handlers Reduces the amount of Code

Q: How can I find out what handlers are available? What Handlers? A: info.jsf

DEMO info.jsf

Alternate approach to “binding” Parameterizable Allows you to “extend” components w/o extending > DropDown > Table > Tree ComponentFactory's

ComponentFactory public class ButtonFactory extends ComponentFactoryBase { public UIComponent create(FacesContext ctx, LayoutComponent descriptor, UIComponent parent) { UIComponent comp = ctx.getApplication(). createComponent(“com.sun.webui.jsf.Button”); if (descriptor.getOption("primary") == null) { comp.setValueBinding("primary", context.getApplication(). createValueBinding("#{true}")); } if (parent != null) { addChild(ctx, descriptor, parent, comp); } setOptions(ctx, descriptor, comp); return comp; }

Yes (but you may not want to) Can I use JSF JSP's with JSFTemplating?

DEMO Speed Test

DEMO Ajax Demos

Set DEBUG to true: com.sun.jsftemplating.DEBUG true Set your Log level: Developer Tips

Pretty URLs Better jMaki support Additional component library support Future Features...

GlassFish: jMaki: Dynamic Faces: JSFTemplating: References / Places to get involved!

GlassFish > GlassFish V2 Beta Available Feb 26 th > Contest for suggestions during 2 Month Beta > Discussions for GlassFish V3 starting now > User Experience Meetings Wed 12:00 -> 1:00 JSF > JSF 2.0 JSR about to be formed JSF Components / Tools > NetBeans Visual Web Pack 5.5 Announcements

jMaki > Ajax Charting > > PHP Support DynamicFaces > Beta build tomorrow Announcements (more)

● Ken Paulsen – JSFTemplating