Building JavaServer Faces Applications

2y ago
36 Views
3 Downloads
2.84 MB
30 Pages
Last View : 13d ago
Last Download : 3m ago
Upload by : Averie Goad
Transcription

IBM Software GroupBuilding JavaServer Faces ApplicationsSt. Louis Java User GroupTim SaundersITSRational Softwaretim.saunders@us.ibm.com 2005 IBM Corporation

IBM Software GroupBuilding JavaServer Faces ApplicationsAgendaJSF VisionJSF OverviewIBM Rational Application Developer v6.0Build a JSF application2 2

IBM Software GroupBuilding JavaServer Faces ApplicationsJSF Vision – Bring RAD to J2EE. ease the burden of writing (UI) applications. accessible to a wide variety of developer typesMission:Deliver an easier, visual way to build, test anddeploy rich Web applications that leverage theJ2EE runtime environment with minimal coding. JSF is designed to be tooled .Eclipse Plugins for JSFIBM Rational Web Developer v6.0IBM Rational Application Developer v6.0IBM WebSphere Studio Application Developer v5.1.23 3

IBM Software GroupBuilding JavaServer Faces ApplicationsJ2EE Technology before JSFServlet JSP using MVC patternJSP 0.92 spec patterns: “Model 2”Good:Separation of concernsServlet is ControllerJSP is ViewPotential for reuseComparative ease of maintenanceBad:Repetitive coding – especially in controller4 4

IBM Software GroupBuilding JavaServer Faces ApplicationsJ2EE Technology before JSFStrutsFramework for controller and viewGood:Repetitive work in config and frameworkWidely used (e.g. WAS 5.x console)Studio ToolingBad:Still complexLow productivity compared to RAD toolsLack of flexibility in View5 5

IBM Software GroupBuilding JavaServer Faces ApplicationsJavaServer Faces (JSF)Standards-based Web Application framework (JSR 127)Plug-and-play other JSF components easilyLibrary of User Interface componentsExtensibleIDEs which support JSF will greatly simplify Web Application developmentTargeted for Web Application developers with little Java backgroundReduces the skill level required to develop rich Web applicationsEvent driven architectureServer-Side Rich UI components respond to client eventsUI components are decoupled from its renderingAllows for other technology (e.g. WML, etc) to be usedDesigned for use with tools to increase productivityReduces the skill level required to develop complex Web ApplicationEliminates much of the hand-coding involved with integrating webapplications into back-end systems6 6

IBM Software GroupBuilding JavaServer Faces ApplicationsJSF – A Web FrameworkJavaServer Faces technology simplifies building userinterfaces for JavaServer applications developers of varying skill levels can quickly andeasily build web applications assembling reusable UI components in a pageJSR 127 – JSF specification v1.1JSF 1.2 in progress (JSR 252)JSP 2.1 (JSR 245) will align with JSFJSF spec lead was the Struts architect7 7

IBM Software GroupBuilding JavaServer Faces ApplicationsFramework for Developing AppsUser Interface DevelopmentDirect binding of UI components to model dataExtensive libraries of prebuilt UI componentsNavigationLayer of separation between business logic and the UIFlexible rules control page flowSession and object managementManages model data throughout lifecycleValidation and error feedbackDirect binding of reusable validators to UI componentsSimplified error messaging and feedback to the userInternationalizationNumber, currency, time and data formatting8 8

IBM Software GroupBuilding JavaServer Faces ApplicationsUses MVC architectureModel – Managed beans interface with reusable business logiccomponents or external systemsView – JSPs created by combining model data with predefined andcustom-made UI componentsController – FacesServlet drives navigation and object management9 9

IBM Software GroupBuilding JavaServer Faces ApplicationsApplication Structure10 10

IBM Software GroupBuilding JavaServer Faces ApplicationsApplication StructureJSF Pages – JSPs built from JSF components; each component has aserver-side classFaces Servlet – One servlet controls execution flowConfiguration file – XML file (faces-config.xml) that contains navigationrules, validators and managed beansTag librariesValidators – Java classes to validate content of JSF componentsManaged beans – Hold data from JSF components; passed betweenbusiness logic and UI; JSF moves data between managed beans andUI componentsEvents – Java code executed in the server for events; event handlingpasses managed beans to business logic11 11

IBM Software GroupBuilding JavaServer Faces ApplicationsFacesServlet Request Life enderResponseProcessEventsResponse12 12

IBM Software GroupBuilding JavaServer Faces ApplicationsJSF and StrutsSome similaritiesBuilt on JavaServer Page and Servlet technologyAdd custom tag librariesSupport page navigationUse Model View Controller architectureSupport internationalizationSome differencesStruts focuses on the Controller dispatching business logicJSF focuses on the View (User Interface)JSF offers more user interface features since UI components are separatefrom their rendering (Struts is HTML centric)JSF will not replace Struts immediatelyLead author of Struts is one of the specification leaders for JSFLead author has written a library to use Struts and JSF together13 13

IBM Software GroupBuilding JavaServer Faces ApplicationsStruts vs Faces ComparisonStrutsFacesPage NavigationStruts-config.xmlFaces-config.xmlForm & GUIProcessingActionForms,ActionsSession & object lifecycle,listener scriptsVisual ControlsExtended JSP TagLibrariesStandard or custom UIcomponents with eventsValidatorsFramework andActionFormsFramework and predefinedvalidatorsData ModelActionsService Data Objects, DataAccess Beans14 14

IBM Software GroupBuilding JavaServer Faces ApplicationsFaces HTML UI Component TagsCheck BoxGrid PanelMedia PlayerCheck Box GroupGroup Box PanelMessage ListCombo BoxHidden FieldList BoxCommand ButtonImageOutputCommand HyperlinkInline MessageOutput Formatted TextComponent LabelInputPanel Menu BarData TableInput Text AreaPage Fragment BoxDisplay ErrorsInput PasswordRadio Button GroupFile UploadLabelRich Text AreaFormLink ActionTabbed Panel15 15

IBM Software GroupBuilding JavaServer Faces ApplicationsJSF Extensibility - componentCreate new UI componentsSee JSF Redbook for Traffic Light example16 16

IBM Software GroupBuilding JavaServer Faces ApplicationsService Data Objects (SDO)Query data sources, create data graphs containingdata objects, apply changes back to the data sourceUnified Access to HeterogeneousData SourcesRDBMS DataMediatorServiceProvides a common programminginterface to access data frommultiple heterogeneous sourcesEJBMediatorServiceSupports both static and dynamicdata APIsSupports disconnected operationDecouples application code fromdata access codeDesigned for use with tools toincrease programmer productivityClientSDODataGraphEJBXML DataMediatorServiceWeb ServicesData MediatorServiceJCA DataMediatorServiceService Data Objects (SDO) is a specification created by IBM & BEA,submitted to JCP as JSR 235 in December 2003. Expert Group Formation Stage, not part of J2EE yetRead/Update17 17

IBM Software GroupBuilding JavaServer Faces ApplicationsFaces Client ComponentsLibrary of rich user interface controls for the Web DeveloperEasily develop rich interactive User Interfaces in Web Applications(without using plug-ins)Extends JavaServer Faces, allowing a developer to quickly createhighly interactive Web pages that run client-sideThin client: low maintenance (no installed client code to upgrade)More responsive web applicationsReduced bandwidth (fewer round trips to the server)Components:Data grid, tabbed panel, rich text editor, input formatters, tree control, chart(bar/line/pie), client-side model object18 18

IBM Software GroupBuilding JavaServer Faces ApplicationsFaces Client ComponentsTabbedTabbed PanelPanelTreeControlChartChart19 19

IBM Software GroupBuilding JavaServer Faces ApplicationsRational Dev Tool Family UML 2.0 Pattern/Transform Authoring Reusable Asset Browser UML Language Transforms Structural Review & Control C/C Development ToolsRational SoftwareArchitectRational ApplicationDeveloperRational SoftwareModelerRational WebDeveloper Web DevelopmentWeb Services DevelopmentRich Client DevelopmentXML & Database Tools4GL DevelopmentEclipse J2EE/EJB & PortalDevelopment Component Testing Code Review & RuntimeAnalysis UML Visual Editors ConfigurationManagement20 20

IBM Software GroupBuilding JavaServer Faces ApplicationsJSF support in Rational Developer ProductsVisual development of JSF-based pagesusing Page DesignerBuilt-in Component Property EditorBuilt-in tools simplify/automate event handlingBuilt-in tools simplify page navigationWeb Diagram Tool to visually layout the flowof a JSF-based Web ApplicationAutomatic code generation for data validation,formatting and CRUD functions for dataaccessData abstraction objects for easy dataconnectivity (Service Data Objects)Relational databases, EJBs, Web ServicesData objects can be bound easily to userinterface components21 21

IBM Software GroupBuilding JavaServer Faces ApplicationsVisual Portlet DevelopmentThe Data View letsyou configure anddrag and drop data toautomatically create adata bound UISDO accesses andupdates data withoutwriting any code!The Quick EditView allowsscripting of clientor server sideevents in Java orJava Script.Code assist writesthe code for you!Design, Deploy, Debug, Test and Preview PortletsPortlet project wizard to create basic portlets, JSFportlets, and Struts portletsConstruct pages bydragging anddropping rich webcomponents from acustomizablePaletteAdd Click-2-Actionand PeopleAwarenesscapability bydragging anddropping thesecomponentsBusiness Portlet Development with WPAI (5.1)–SAP, Seibel portletsWeb services client PortletTesting and debugging of portlets within the workbench using theWebSphere Portal Test Environment or a remote serverPortlet project support for the IBM portlet API andthe JSR 168 portlet APIClick-to-Action22 22

IBM Software GroupBuilding JavaServer Faces ApplicationsAdditional ResourcesJavaServer Faces j2ee/javaserverfaces/index.jspService Data s/library/j-sdo/Articles on IBM Rational Software veloperworks/websphere/techjournal/0401 barcia/barcia.htmlIBM Redbooks - WebSphere Studio 5.1.2 JavaServer Faces and Service bstracts/sg246449.htmlCraig McLanahan’s web log and /CraigMcClanahan2/interview.tss?bandwidth dsl23 23

IBM Software GroupBuilding JavaServer Faces Applications24 24

IBM Software GroupBuilding JavaServer Faces Applications25 25

IBM Software GroupBuilding JavaServer Faces ApplicationsThe IBM Rational Software Development Modeler& terRationalApplicationDeveloperRationalFunctional& g3rd PartyISV eRational Team Unifying PlatformRational Portfolio Manager26 26

IBM Software GroupBuilding JavaServer Faces ApplicationsIBM Rational Web Developer for WebSphere SoftwareFollow on to WebSphere Studio Site DeveloperNew Rapid Application Development capabilities focused on ease of useWeb UI construction Visual site layout tools Drag-and-drop webclient constructionsupporting range of webclient technologies: HTML, JSP, Servlet Struts, JSF and SDODatabase tools Explore and designdatabase schema SQL Query Builder Stored procedure builder EGLSimplified 4GL for WebApplication DevelopmentText User InterfacePrograms Support(3270, Curses)VisualAge Generator - EGL Migration ToolJava Runtime TargetsIBM Rational Web DeveloperWeb UI constructionData toolsRich Client UI constructionEnterprise Generation LanguageRich Client UI construction Visual Editor for Java for richclient composition Supports Swing, AWT, SWTwidgetsWeb Services Tools Create/manipulate services WSDL visual editor UDDI Registry browserXML Tools XML and XSD tooling supportWeb Services ToolsXML Tools Eclipse Java Development Tools Eclipse Java DevelopmentToolsJ2SE development toolsCode completion, search,refactoringExtensible Team APIs tosupport CM integration (CVS,ClearCase, and many others)Plug-in DevelopmentEnvironment for extensibility27 27

IBM Software GroupBuilding JavaServer Faces ApplicationsIBM Rational Application Developer for WebSphere SoftwareFollow on to WebSphere Studio Application Developer J2EE/EJB ToolingJ2EE construction toolsSupports WebSphere andWebLogicSupports J2EE 1.2, 1.3, 1.4Rapid Deployment for WAS v6Integrated WAS test environmentsO/R mappingCode Analysis Tools Both static source code analysisand dynamic runtime analysis Source code analysis for ruleviolation detection: Globalization,J2EE/J2SE Best Practices,Private API Usage, Performance Sequence diagram runtime tracewith performance, thread andcode coverage annotation Advanced memory leakdetection Remote data collection acrossmultiple servers User-defined run-time probes Interactive reports and metricsIBM Rational ApplicationDeveloperComponent/Unit TestJ2EE/EJB ToolingPortal/Portlet Design ToolsCode Analysis ToolsUML Visual EditorsIBM Rational Web Developerfor WebSphere SoftwareRUP Configuration for J2EEComponent/Unit Test JUnit-based testing of Java components,EJBs and Web Services Test prioritization recommendation basedon code analysis Automated test case generation throughusage of test patterns Datapool editor for data-driven testing Optimized unit testing through a set ofmetrics in the test creation wizard Test creation wizard offers a set of testpatterns to automatically generate testPortal/Portlet Design Tools Visual Portal site and page layout tools Visual Portlet layout and preview Integrated Portal test environmentUML Visual Editors Class diagrams for Java/EJB structure Sequence diagrams for method bodyvisualization IDEF1X/IE diagrams for Database andXML schema Dynamic topic diagrams Javadoc integration Visual refactoringClearCase LT28 28

IBM Software GroupBuilding JavaServer Faces ApplicationsIBM Rational Software Modeler Product OverviewIBM Rational Software Modeler“Reusable Asset Browser” Browse and import assetsfrom a repository Package model anddevelopment artifacts into aRAS bundleLifecycle IntegrationsReusable Asset BrowserPattern/Transformation Authoring“Report Generation” HTML and XML based dataextraction and reporting Extensive printing Model traceability reportingand custom queriesReport GenerationUML 2.0 ModelingClearCase LT“Lifecycle Integrations” Drag-and-drop association ofRequisitePro requirements withmodels Interface to CM tools Visual compare/merge Document generation with SoDA“Pattern/Transform Authoring” Sample UML-to-code transforms forEJB, Java, and C Selective language to UML harvesting Pattern content Pattern/Transform authoringframework and services“UML 2.0 Modeling” UML 2.0 Diagrams for Class,Communication, Component,Composite Structure,Deployment, Activity, Sequence,State, and Use Case UML Profile Editor OCL Support Automatic diagram generation Extensive open API Java-based “scripting” forextensibility leveraging theEclipse JDT29 29

IBM Software GroupBuilding JavaServer Faces ApplicationsIBM Rational Software Architect Product Overview“Application Analyzer” Automatic anti-pattern andpattern detection Architectural discovery,analysis, metrics, andstability reporting Implementation levelarchitectural rules“Modeler” UML 2.0 Diagrams forClass, Communication,Component, CompositeStructure, Deployment,Activity, Sequence, State,and Use Case OCL Support Automatic diagramgeneration Pattern content Pattern/Transformauthoring framework andservices Extensive open API Java-based “scripting” forextensibility HTML and XML baseddata extraction andreporting Extensive printing RAS toolsIBM Rational SoftwareArchitectJava Structural Analysis Sample UML-to-code transforms forEJB, Java, and C Selective language to UML harvestingUML Language TransformsSoftware Modeler C/C editors and build management Compiler and debugger integration UML code editors“WSAD v6”C/C Development ToolsApplication DeveloperRUP Configuration for SW ArchitectsClearCase LT JSF, SDO, StrutsJava GUI editorWeb diagram editorSite designerWeb Services development toolsDatabase editing toolsEGLEJB development toolsUML code editors for EJB, Java, andDataStatic AnalysisRuntime AnalysisComponent test automationPortal/Portlet development tools30 30

Building JavaServer Faces Applications 7 JSF – A Web Framework JSR 127 – JSF specification v1.1 JSF 1.2 in progress (JSR 252) JSP 2.1 (JSR 245) will align with JSF JSF spec lead was the Struts architect JavaServer Faces technology simplifies building user interfaces for JavaServer

Related Documents:

JavaServer Faces (JSF) is a relatively new user interface technology, having been added to the Java standard with Java EE 5. It is supported in the AS Java 7.1 since it supports Java EE 5. In addition the SAP NetWeaver Developer Studio (NWDS) is based on Eclipse 3.3 which in turn comes w

Faces: j 5. Faces: 8 6. Faces: 20 Edges: 15 Edges: j Edges: 30 Vertices: 9 Vertices: 6 Vertices: j Use Euler’s Formula to find the number of vertices in each polyhedron described below. 7. 6 square faces 8. 5 faces: 1 rectangle 9. 9 faces: 1 octagon and 4 triangles and 8 triangles Verify Euler’s Formula for each polyhedron.Then draw a net .

IMS IBM Information Management System (mainframe hierarchical database) IMS Information Management System IP Internet Protocol IVR Interactive Voice Response J2EE Java 2 Platform, Enterprise Edition JAM Java Adapter for Mainframe JCL Job Control Language JDBC Java Database Connectivity JSF JavaServer Faces JSP JavaServer Pages Mass

Title: WA1618 Introduction to JavaServer Faces (JSF) 1.2 Using

6 faces 5 faces 12 edges 9 edges 8 corners 6 corners c prism d pyramid 6 faces 5 faces 12 edges 8 edges 8 corners 5 corners 2 Draw two 3D objects that have no corners. faces sphere cylinder. 92 Shape ISBN: 978-0-521-74532-1 Photocopying is restricted under law and this material must not be transferred to another party.

Faces, Edges, and Vertices Practice Circle the shapes or objects that matches the description. 1. 6 faces, 12 edges, 8 vertices 2. 0 faces, 0 edges, 0 vertices 3. 5 fac es, 8 edges, 5 vertices 4. 6 faces, 12 edges, 8 vertices Three-dimensional shapes are described by the number of faces, edges, and vertices. A face is a flat surface.

JavaServer Pages J avaServer Pages (JSP) and Servlets are complementary technologies for pro-ducing dynamic Web pages via Java.While Servlets are the foundation for server-side Java, they are not always the most efficient solution with respect to development time. Coding, deploying, and debugging a Servlet can be a tedious task.

Software Development Using Agile and Scrum in Distributed Teams Youry Khmelevsky Computer Science, Okanagan College Kelowna, BC Canada Email: ykhmelevsky@okanagan.bc.ca Also Affiliated with UBC Okanagan, Canada Xitong Li Ecole des Hautes Etudes Commerciales de Paris, France Email: lix@hec.fr Stuart Madnick Sloan School of Management Massachusetts Institute of Technology Cambridge, MA USA .