Jsp tag libraries based framework for wireless application development
Download
1 / 57

JSP Tag Libraries based Framework for Wireless Application Development - PowerPoint PPT Presentation


  • 104 Views
  • Uploaded on

JSP Tag Libraries based Framework for Wireless Application Development. Hitesh Kr. Seth Chief Technology Evangelist SeraNova, Inc [email protected] O’Reilly Conference on Enterprise Java, 2001. Agenda. Overview Servlets Java Server Pages JSP Tag Libraries

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' JSP Tag Libraries based Framework for Wireless Application Development' - cyrah


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Jsp tag libraries based framework for wireless application development

JSP Tag Libraries based Framework for Wireless Application Development

Hitesh Kr. Seth

Chief Technology Evangelist

SeraNova, Inc

[email protected]

O’Reilly Conference on Enterprise Java, 2001


Agenda
Agenda Development

  • Overview

    • Servlets

    • Java Server Pages

  • JSP Tag Libraries

  • Tag Libraries for Wireless Application Development

    • Design Requirements

    • Tags

  • Enhancements

  • Conclusion

  • References


Servlets

Servlets Development


Servlets1
Servlets Development

  • Java based web server extension mechanism

  • Based on HTTP request-response Paradigm

  • Multi threaded, Session Management

  • Versions

    • J2EE v1.2 – Servlets 2.2

    • J2EE v1.3 - 2.3 (Draft)

  • Usage Scenarios

    • Creating dynamic web applications

    • Finer control than JSP


Features
Features Development

  • Extend Web Server Functionality

    • Similar to CGI-BIN, NSAPI/ISAPI extensions, apache Modules

  • Portable

    • Multiple Servlet implementations on various platforms

  • Rich

    • Can call any Java API, such as JDBC, EJB, JNDI etc.

  • High Performance

    • Loaded into memory once and called

    • Uses threads for concurrency

    • Can maintain connection pools


Features1
Features Development

  • Converts HTTP Form parameters into a Hashtable

  • Customizable Session Management capabilities

    • Using cookies and URL rewriting

    • Application Servers implement session management Mechanisms

      • Memory, File System, Relational Database; Web farm compatible

  • Leverage other java capabilities such as localization


Servlet by example
Servlet by Example Development


Java server pages

Java Server Pages Development


JSP Development

  • Embedded dynamic Java scriptlets

  • Similar to ASP and Server Side JavaScript

  • Implemented as a “Self-Managed” Servlet

    • “Compiled” into Servlets and kept in Memory

  • Separates presentation from business logic

  • Tag Extension mechanism

  • Versions

    • J2EE v1.2 – JSP 1.1

    • J2EE v1.3 – JSP 1.2 (Draft)

  • Usage Scenarios

    • Dynamic/flexible presentation layer


Jsp elements
JSP Elements Development

  • Static Templates

    • HTML/XML/WML/...

  • Standard Directives

    • Include Directive

    • Page Directive

    • Taglib Directive

  • Scripting Elements

    • Declaration

    • Expression

    • Comments

  • Standard Actions

    • forward, get/set Property, include, plugin, useBean, param

  • Custom Tags

    • Tag Libraries


Jsp implicit objects
JSP Implicit Objects Development

  • request

  • response

  • pageContext

  • session

  • application

  • out

  • config

  • page

  • exception

    • Error Pages Only


Jsp by example
JSP by Example Development


Jsp by example interactions

HTML Form Development

(SubmitForm.jsp)

JSP by Example - Interactions


Jsp by example beans

Using Beans Development

Without Beans

JSP by Example - Beans


Using third party beans

Upload HTML Development

<form method="post" action="Upload.jsp" enctype="multipart/form-data">

<input type="file" name="FILE1" SIZE="50"><br/>

<input type="submit" value="Upload">

</form>

JSP

Using Third Party Beans


Jsp servlet implementations
JSP/Servlet Implementations Development

  • Reference Implementation

    • Apache [email protected]

  • Third Party Implementations

    • Allaire JRun Application Server

    • ATG Dynamo Application Server

    • BEA Weblogic Application Server

    • Gemstone/J Application Server

    • IBM WebSphere Application Server

    • iPlanet Application Server

    • Orion Application Server

    • SilverStream Application Server

    • etc.


Jsp tag libraries

JSP Tag Libraries Development


Jsp tag libraries1
JSP Tag Libraries Development

  • Create application/vertical specific tags

  • Rich

    • Encapsulation of functionality

    • Simplified Code

    • Less presentation code to manage

  • Easier to author

    • Ease of Use

  • Ease of Use within WYSIWYG authoring tools

    • Portability

    • Reusability

  • Less Java “Scriptlets”

    • Cleaner separation of presentation format & presentation logic


Jsp taglib examples
JSP Taglib Examples Development

  • Examples

    • Logging

      <x:log message=“database #13 connection opened”/>

    • XSLT Transformation

      <xslt:transform stylesheet=“Product.xsl”>xml content

      </xslt:transform>

    • Iteration

      <x:Iterate …/>…</x:Iterate>

    • Send an Email

      <x:email from="[email protected]" [email protected]">Message...

      </x:email>

    • JSR #000052

      • A Standard Tag Library for Java Server Pages



Taglib descriptor
Taglib Descriptor Development


Reusable tag libraries
Reusable Tag Libraries Development

  • Allaire JRun Tag Library

    • Sql, Email, JMS, JNDI, XML Query, XSLT Transformation, Field Validation, Logic - For Each, If, Switch, Case

  • Apache Jakarta Taglibs

    • Application, BSF, DateTime, Input, JNDI, JSP Spec, Page , Regexp, Request, Response, Session, SQL, Utility, XSL

  • BEA Weblogic Portal Tag Library

    • Portal Framework

  • Orion Taglibs

    • EJB/Utility


Tag libraries for wireless application development

Tag Libraries for DevelopmentWireless Application Development


Design requirements

Design Requirements Development


Requirements summary
Requirements Summary Development

  • Leverage existing HTTP/HTTPS based application delivery frameworks

  • Support multiple display formats

    • HTML, WML, HDML, i-mode (Compact HTML), XHTML-Basic

  • Simple

    • Similar to existing known HTML tags

    • Simple tags and attributes

    • Compliant with Authoring Tools


Multi modal page

Multi-modal Page Development

<page> Tag


Hello world
Hello World Development

Tag Library

Multi-modal Page


Rendering

Web Browser Development

Wireless Microbrowser

Rendering


Taglib descriptor1
Taglib Descriptor Development


Page tag impl
Page Tag Impl. Development

Browser Detection


Page tag impl contd
Page Tag Impl.(contd.) Development

WAP/WML Delivery




Hyperlinks

Hyperlinks Development

<link> Tag


The link tag
The Link Tag Development


Rendering1

HTML Browser Development

WML Microbrowser

Rendering


Tag descriptor
Tag Descriptor Development


Link tag impl
Link Tag Impl. Development


Interactions

Interactions Development

<form> and <field> Tags


Form fields
Form & Fields Development


Rendering2

HTML Browser Development

Rendering


Rendering3

WML Microbrowser Development

Rendering




Field tag impl
Field Tag Impl. Development

Call Parent Tag Methods


Form tag impl
Form Tag Impl. Development


Form tag impl1
Form Tag Impl. Development

Enumerate all fields


Taglib so far
Taglib So far Development

  • Implemented

    • <page> Tag

    • <link> Tag

    • <form> Tag

    • <field> Tag

  • Common Elements

    • <p>, <br/>, <b>, simplified <table>

  • Basic Simple Constructs for creating an complete multi-modal application


Benefits
Benefits Development

  • Similar to HTML tags

    • Ease of authoring/learning

    • Use existing XML Compliant HTML tags

      • <p>, <br/> etc.

  • Simplicity

    • Just <page>, <link>, <form>, <field> tags can be used to create full featured applications

  • Use all JSP features with the application

    • Session Management

    • Request/Response handling

  • Call any Java API


Enhancements
Enhancements Development

  • Implement other delivery formats

    • HDML, i-Mode, etc.

  • More functionality (more tags/attributes)

  • Use “body” tags

  • Code optimization

  • Use XSLT for “templated” delivery

  • Provide capability to implement device/network specific functionality


Conclusion
Conclusion Development

  • JSP Tag Libraries

    • Powerful mechanism to implement rich functionality

    • Promotes usability and maintainability

  • Application for a multi-modal Wireless Framework


References

References Development


References1
References Development

  • Servlets

    • Servlets Homepagehttp://www.javasoft.com/products/servlet

    • Java Tutorial (JavaSoft)http://www.javasoft.com/tutorial

    • Servlet Centralhttp://www.servletcentral.com

    • Servlets.comhttp://www.servlets.com

    • Java Servlet Programming (O’Reilly)

    • Java Enterprise in a Nutshell

  • JSP

    • JSP Homepagehttp://www.javasoft.com/products/jsp

    • Professional JSP (Wrox)

    • JSP Resource Indexhttp://www.jspin.com


References2
References Development

  • Tag Libraries

    • Tag Libraries in JavaServer Pageshttp://java.sun.com/products/jsp/pdf/talks/TagLibs.pdf

    • Jakarta-Taglibs Tutorialhttp://jakarta.apache.org/taglibs/tutorial.html

    • JSR #000052http://java.sun.com/aboutJava/communityprocess/jsr/jsr_052_jsptaglib.html

    • Allaire JRun Tag Libraryhttp://www.allaire.com/handlers/index.cfm?ID=15990&Method=Full

    • Apache Jakarta Taglibshttp://jakarta.apache.org/taglibs

    • BEA Weblogic Portal Tag Libraryhttp://edocs.beasys.com/wlac/portals/docs/tagscontents.html

    • Orion Taglibs (EJB/Utility)http://www.orionserver.com/tags/

    • JSP Tag Libraries at Jspin.comhttp://www.jspin.com/home/tags


References3
References Development

  • Wireless

    • WAP Forumhttp://www.wapforum.org

    • HDML 3.0 Referencehttp://developer.phone.com/dev/ts/htmldoc/31h/hdmlref/output/


Questions suggestions
Questions/Suggestions? Development

?



ad