1 / 11

Intro to J avaserver Faces

Tony Nguyen. Intro to J avaserver Faces. Architecture Advantages Disadvantages Setup JSF Environment JSF & Database Conclusion Demo. Architecture. A standard API for creating Java Web Application GUIs.

tymon
Download Presentation

Intro to J avaserver Faces

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tony Nguyen Intro to Javaserver Faces

  2. Architecture • Advantages • Disadvantages • Setup JSF Environment • JSF & Database • Conclusion • Demo

  3. Architecture • A standard API for creating Java Web Application GUIs. • Allow Java programmers to develop application without HTTP details and integrate it with user interface through event-driven model. • JSF based on Model-View-Controller (MVC) design pattern. • Drag and drop UI components to build web application. (EIS)

  4. Advantages • Less code. • Custom GUI controls. • Form validation. • Event handling. • Managed beans. • Expression Language.

  5. Disadvantages • Less transparent. • Harder to learn. • Not enough documentation. • Rigid approach. • Undeveloped tool support.

  6. JSF & Event Driven • <h:form> • <!-- For non graphical browsers --> • <p>Example of <code>commandLink</code></p> • <h:panelGrid id="links" columns="4" • summary="#{bundle.chooseLocale}" • title="#{bundle.chooseLocale}" > • <h:commandLink id="NAmerica" action="storeFront" • actionListener="#{carstore.chooseLocaleFromLink}"> • <h:outputText value="#{bundle.english}" /> • </h:commandLink> • </h:panelGrid> • </h:form>

  7. Expression Language <c:if test=“${result.rowCount == 0}”> Sorry, no products match your criteria </c:if> <c:if test=“${result.rowCount != 0}”> These products were found <ul> <c:forEach items=“${result.rows}” var=“row”> <li>${row.prodName}</li> </c:forEach> </ul> </c:if>

  8. Setup JSF Environment • Java 2 Software Development Kit. • Enabled web-server Tomcat 5. • JSF 1.0 implementation(Sun’s Reference Implementation).

  9. JSF & Database • Standard JDBC • JSTL • Hibernate

  10. Conclusion • JSF can provide many useful features for developing complex GUIs and handling events. • MVC for web development. • Huge industry and vendor support.

  11. References • http://myfaces.apache.org/download.html • http://www.oracle.com/technology/products/jdev/collateral/4gl/papers/JSF_For_4gl.pdf • http://www.roseindia.net/jsf/whatisjsf.shtml • http://jlbtc.eduunix.cn/index/html/java/OReilly.Java.Enterprise.in.a.Nutshell.3rd.Edition.Nov.2005/0596101422/javaentnut3-CHP-5-SECT-3.html • http://www.codeguru.com/cpp/data/mfc_database/sqlserver/article.php/c10079/#more • http://www.geekinterview.com/question_details/36717

More Related