SlideShare a Scribd company logo
1 of 15
Download to read offline
Webformer:a Rapid Application Development
Toolkit for Writing Ajax Web Form Application

David W.L. Cheung         Thomas Y.T. Lee          Patrick K.C. Yee

Center for E-Commerce Infrastructure Development (CECID), Department of
               Computer Science, University of Hong Kong


                       December 10, 2007
Motivation


      Web forms are commonly used to capture data on the web.
      With Asynchronous Javascript and XML (Ajax) programming,
      interactive web forms can be created.
      However, Ajax programming is complex in a way that the
      model-view-controller (MVC) code is not clearly separated.
      We have developed a rapid application development toolkit
      called Webformer to simplify web form programming with
      Ajax.
      Webformer provides a scripting language called Web Form
      Application Language (WebFAL) for modeling web forms and
      generate Javascript/HTML code.
Webformer Architecture

      We have designed an XML-based scripting language called
      Web Form Application Language (WebFAL) for modeling web
      forms.
      A web form model written in WebFAL is complied by our
      Webformer Complier (wfc) to generate the Javascript/HTML
      source to run on the browser.
      A JavaScript engine called webformer.js is provided as
      provides a Javascript library to handle the MVC interactions
      on the browser, e.g. data validation and autocompletion,
      XML document object model (DOM) management, and Ajax
      messaging.
      A Java library called webformer.jar is provided for parsing
      and composing the messages in these formats to ease the
      programming the Java Servlet handlers on the server-side.
Web Form Application Development Lifecycle

   Two-phase life-cycle facilitates
   segregation of duties between                         Gather application requirements

   software developers and web
   designers:
                                                           Specify web form in WebFAL
        Phase 1. The software
                                                                          WebFAL script
        developer first specifies
                                                             Compile WebFAL script
        the model and controller
        of a web form in                                                         Javascript/
                                               XSD+webformer.jar              HTML+webformer.js
        WebFAL.
                                      Develop server-side handlers             Enhance HTML design
        Phase 2. The model is
        then compiled into an
        HTML template for the
                                                          Deploy servlets and HTML file
        web designer to enhance
        the UI view.
Sample Web Form Application
    1. The user enters his username.
       The entered username is
       validated on-the-fly against
       the server database.
    2. The user enters the album
       name while the server
       suggests the possible names
       that match what the user
       types.
    3. The user can upload multiple photos. He can click on the
       [Add Photo] or the [Delete Photo] link to add or delete a
       upload entry.
    4. In each upload entry, the user specifies the photo file name,
       whether he wants to share the photo, and the number of
       prints of the photo he wants to order.
    5. The user clicks on the Submit button to send the form data
       to the server.
Web Form Application Language (WebFAL)

  A WebFAL document has a root element <WebForm/> and consists
  of five kinds of child elements: <Model/>, <Validation/>,
  <Selection/>, <Event/>, and <SubmitUrl/>.
  <WebForm name="PhotoUpload">
      <Model>...</Model>
      <Validation>...</Validation>
      ...
      <Selection>...</Selection>
      ...
      <Event>...</Event>
      ...
      <SubmitUrl>...</SubmitUrl>
  </WebForm>
<Model/> Element
      Specifies the data model of the web form as a hierarchical
      structure of data groups (<Group/>) and data fields
      (<Field/>).
      Each <Field/> is associated with a name and a data type.
      Possible data types include: String, Number, Date,
      DateTime, Time, File and Boolean.
      A <Group/> contains a list of <Field/>s or other
      <Group/>s. The minimum and maximum occurrence for a
      <Field/> or <Group/> on the web form can be specified.
  <Model>
      <Field name="Username">String</Field>
      <Field name="Album">String</Field>
      <Group name="Photo" minOccurs="1" maxOccurs="unbounded">
          <Field name="File">File</Field>
          <Field name="Share">String</Field>
          <Field name="Prints">Number</Field>
      </Group>
  </Model>
<Validation/> Element
     Specifies a set of validation rules for a <Field/> or a
     <Group/>.
     There are two types of validation rules: browser validation
     rules and server validation rules.
     Browser validation rules are some static constraints for
     <Field/>s that can be checked by the browser without
     contacting the server.
     Browser validation rules are some static constraints for
     <Field/>s that can be checked by the browser without
     contacting the server. Available static validation constraints
     are <RegExp/>, <Length/>, <MinLength/>, <MaxLength/>,
     <TotalDigits/>, <FractionDigits/>, <MinInclusive/>,
     <MaxInclusive/>, <MinExclusive/>, and
     <MaxExclusive/>.
     An error message may be specified so that that message is
     reported on the HTML page when the validation fails.
<Validation/> Element (Continued)
       A server validation is dynamically performed by the server.
       The <HandlerUrl/> specifies the URL of the server handler
       that performs the validation.
       At runtime, when the server validation event is triggered, an
       Ajax request containing the data field content is sent to the
       specified handler.
       The server validates the content dynamically and responses to
       the browser with the validation result.
  <Validation id="ValPrints">
      <FractionDigits errorMsg="must be integer">0</FractionDigits>
      <MinInclusive errorMsg="must be greater than 0">0</MinInclusive>
      <MaxInclusive errorMsg="must be less than 10">10</MaxInclusive>
  </Validation>
  <Validation id="ValUser">
      <MinLength errorMsg="must be longer than 6 characters">6</MinLength>
      <MaxLength errorMsg="must be shorter than 20 characters">20</MaxLength>
      <HandlerUrl>/ajax/userval</HandlerUrl>
  </Validation>
<Selection/> Element

     Provides either a static set of coded values for a <Field/> or
     specifies the URL of a server handler that provides some
     suggested values.
     Coded values are a set of permissible values for a data field.
                                         <Selection id="SelShare">
     A <Code/> can be optionally given     <Code text="Share">public</Code>
     a text attribute, which is a          <Code text="Don’t share">
                                             private
     description for presenting on the     </Code>
     web page.                           </Selection>
                                         <Selection id="SelAlbum">
     Suggested values are dynamically      <HandlerUrl>
     generated by a server handler           /ajax/albumsuggest
                                           </HandlerUrl>
     through an XMLHttpRequest.          </Selection>

     <HandlerUrl/> specifies the URL of the server handler.
<Event/> Element

     Specifies an event that can take place in a <Field/> in order
     to trigger some validation or selection operations.
     Each <Event/> binds a <Field/> to one or more
     <Validation/>s or <Selection/>s.
                                  <Event>
     The reference to a             <FieldRef>Username</FieldRef>
     <Field/> is the path of        <ValidationRef>ValUser</ValidationRef>
                                    <Trigger>FocusOff</Trigger>
     <Group/> and <Field/>        </Event>
     names, delimited by a dot,   <Event>
                                    <FieldRef>Album</FieldRef>
     from the root of the           <ValidationRef>SelAlbum</ValidationRef>
     <Model/> to that               <Trigger>KeyUp</Trigger>
     <Field/>, e.g.               </Event>

     Photo.Description.
     <Trigger/> specifies the event type of the data field that
     triggers the specified validations/selections.
<SubmitUrl/> Element




     Specifies the URL of the server handler that processes the
     data submission.
     When a user clicks on the submit button in the web form, the
     form data will be re-validated, packaged in an XML
     document, and submitted to that URL.

  <SubmitUrl>ajax/photoupload</SubmitUrl>
Compilation of WebFAL Scripts
      wfc compiles the WebFAL script into an JavaScript/HTML
      file and picks the HTML component that best represents a
      <Field/>.
      JavaScript code is embedded to handle the validation and
      selection events for the component.
      The web designer may modify this HTML file to enhance the
      view and content of the web page.
      wfc also generates an XSD file from the WebFAL script that
      specifies the XML format of the web form data for submission
      to the server.
      <Model/> and <Validation/>s are converted into XSD
      types and elements.
      The structure of <Group/>s and <Field/>s in <Model/>
      determines the XML structure while the data type of a
      <Field/> determines its XSD data type.
Sample Generated Code Fragments


  <html>
  <head>
  <title>PhotoUpload</title>
  <script language="JavaScript" src="webformer.js"></script>
  ...
  <input type="Album" id="Album_1.1" onkeyup="selfld(this) "/>
  ...
  <input type="text" id="Photo.Prints_1.1" onblur="valfld(this)"/>
  ...
  <a href="javascript:addgrp(Photo)" id="Photo">[Add Photo]</a>
  ...
  </body>
  </html>
Conclusion

   Contributions:
       Rapid application development framework for web client and
       server programming: WebFAL web form modeling language
       and wfc compiler.
       Facilitation of two-phase web development life-cycle.
   Future work:
       Choice of HTML controls for data fields.
             The current version of webformer does not allow the user to
             choose an HTML control (e.g. radio button or drop-down list)
             for a data field (e.g. coded value field).
       Inter-field data validation.
       GUI environment for specifying WebFAL.

More Related Content

What's hot

Create an application with ember
Create an application with ember Create an application with ember
Create an application with ember Chandra Sekar
 
Parallelminds.web partdemo1
Parallelminds.web partdemo1Parallelminds.web partdemo1
Parallelminds.web partdemo1parallelminder
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSFSoftServe
 
Oa Framework Tutorial
Oa Framework TutorialOa Framework Tutorial
Oa Framework Tutorialnolimit797
 
Lab 5a) create a struts application
Lab 5a) create a struts applicationLab 5a) create a struts application
Lab 5a) create a struts applicationtechbed
 
Ch 04 asp.net application
Ch 04 asp.net application Ch 04 asp.net application
Ch 04 asp.net application Madhuri Kavade
 
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book Feras Ahmad
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.NetHitesh Santani
 
New Features of ASP.NET 4.0
New Features of ASP.NET 4.0New Features of ASP.NET 4.0
New Features of ASP.NET 4.0Buu Nguyen
 
Selectionwidgetwhitepaper 140907120000-phpapp02
Selectionwidgetwhitepaper 140907120000-phpapp02Selectionwidgetwhitepaper 140907120000-phpapp02
Selectionwidgetwhitepaper 140907120000-phpapp02Nigel Abbott
 
Building a custom Oracle ADF Component
Building a custom Oracle ADF ComponentBuilding a custom Oracle ADF Component
Building a custom Oracle ADF ComponentWilfred van der Deijl
 
11 asp.net session16
11 asp.net session1611 asp.net session16
11 asp.net session16Vivek chan
 
15 asp.net session22
15 asp.net session2215 asp.net session22
15 asp.net session22Vivek chan
 

What's hot (20)

Create an application with ember
Create an application with ember Create an application with ember
Create an application with ember
 
MVC Training Part 1
MVC Training Part 1MVC Training Part 1
MVC Training Part 1
 
Parallelminds.web partdemo1
Parallelminds.web partdemo1Parallelminds.web partdemo1
Parallelminds.web partdemo1
 
Jquery
JqueryJquery
Jquery
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
 
Req pro tips
Req pro tipsReq pro tips
Req pro tips
 
Oracle EMC 12C Grand Tour
Oracle EMC 12C Grand TourOracle EMC 12C Grand Tour
Oracle EMC 12C Grand Tour
 
Oa Framework Tutorial
Oa Framework TutorialOa Framework Tutorial
Oa Framework Tutorial
 
Lab 5a) create a struts application
Lab 5a) create a struts applicationLab 5a) create a struts application
Lab 5a) create a struts application
 
Ch 04 asp.net application
Ch 04 asp.net application Ch 04 asp.net application
Ch 04 asp.net application
 
Oracle ADF Case Study
Oracle ADF Case StudyOracle ADF Case Study
Oracle ADF Case Study
 
Jsf
JsfJsf
Jsf
 
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
 
New Features of ASP.NET 4.0
New Features of ASP.NET 4.0New Features of ASP.NET 4.0
New Features of ASP.NET 4.0
 
Mvc by asp.net development company in india - part 2
Mvc by asp.net development company in india  - part 2Mvc by asp.net development company in india  - part 2
Mvc by asp.net development company in india - part 2
 
Selectionwidgetwhitepaper 140907120000-phpapp02
Selectionwidgetwhitepaper 140907120000-phpapp02Selectionwidgetwhitepaper 140907120000-phpapp02
Selectionwidgetwhitepaper 140907120000-phpapp02
 
Building a custom Oracle ADF Component
Building a custom Oracle ADF ComponentBuilding a custom Oracle ADF Component
Building a custom Oracle ADF Component
 
11 asp.net session16
11 asp.net session1611 asp.net session16
11 asp.net session16
 
15 asp.net session22
15 asp.net session2215 asp.net session22
15 asp.net session22
 

Similar to Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form Application

Component Based UI Architecture - Alex Moldovan
Component Based UI Architecture - Alex MoldovanComponent Based UI Architecture - Alex Moldovan
Component Based UI Architecture - Alex MoldovanITCamp
 
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.pptGAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.pptCUO VEERANAN VEERANAN
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCSunpawet Somsin
 
Spring MVC
Spring MVCSpring MVC
Spring MVCyuvalb
 
Ajax toolkit framework
Ajax toolkit frameworkAjax toolkit framework
Ajax toolkit frameworkSunil Kumar
 
331592291-HTML-and-Cascading style sheet
331592291-HTML-and-Cascading style sheet331592291-HTML-and-Cascading style sheet
331592291-HTML-and-Cascading style sheetstephen972973
 
Ajax toolkit-framework
Ajax toolkit-frameworkAjax toolkit-framework
Ajax toolkit-frameworkWBUTTUTORIALS
 
58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-serviceshomeworkping3
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVCJohn Lewis
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083Divyam Pateriya
 
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio AnguloLuis Du Solier
 
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe
 

Similar to Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form Application (20)

Component Based UI Architecture - Alex Moldovan
Component Based UI Architecture - Alex MoldovanComponent Based UI Architecture - Alex Moldovan
Component Based UI Architecture - Alex Moldovan
 
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.pptGAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Asp.NET MVC
Asp.NET MVCAsp.NET MVC
Asp.NET MVC
 
Ajax toolkit framework
Ajax toolkit frameworkAjax toolkit framework
Ajax toolkit framework
 
331592291-HTML-and-Cascading style sheet
331592291-HTML-and-Cascading style sheet331592291-HTML-and-Cascading style sheet
331592291-HTML-and-Cascading style sheet
 
Mvc3 crash
Mvc3 crashMvc3 crash
Mvc3 crash
 
JavaScript
JavaScriptJavaScript
JavaScript
 
MVC
MVCMVC
MVC
 
Day7
Day7Day7
Day7
 
Web Service Basics and NWS Setup
Web Service  Basics and NWS SetupWeb Service  Basics and NWS Setup
Web Service Basics and NWS Setup
 
Ajax toolkit-framework
Ajax toolkit-frameworkAjax toolkit-framework
Ajax toolkit-framework
 
58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC
 
C# Unit5 Notes
C# Unit5 NotesC# Unit5 Notes
C# Unit5 Notes
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
 
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
 
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
 

More from Thomas Lee

What AI can do for your business
What AI can do for your businessWhat AI can do for your business
What AI can do for your businessThomas Lee
 
多雲策略:別把所有系統跑在同一雲平台上
多雲策略:別把所有系統跑在同一雲平台上多雲策略:別把所有系統跑在同一雲平台上
多雲策略:別把所有系統跑在同一雲平台上Thomas Lee
 
XML Schema Design and Management for e-Government Data Interoperability
XML Schema Design and Management for e-Government Data Interoperability XML Schema Design and Management for e-Government Data Interoperability
XML Schema Design and Management for e-Government Data Interoperability Thomas Lee
 
Automating Relational Database Schema Design for Very Large Semantic Datasets
Automating Relational Database Schema Design for Very Large Semantic DatasetsAutomating Relational Database Schema Design for Very Large Semantic Datasets
Automating Relational Database Schema Design for Very Large Semantic DatasetsThomas Lee
 
Formal Models and Algorithms for XML Data Interoperability
Formal Models and Algorithms for XML Data InteroperabilityFormal Models and Algorithms for XML Data Interoperability
Formal Models and Algorithms for XML Data InteroperabilityThomas Lee
 
XML Schema Computations: Schema Compatibility Testing and Subschema Extraction
XML Schema Computations: Schema Compatibility Testing and Subschema ExtractionXML Schema Computations: Schema Compatibility Testing and Subschema Extraction
XML Schema Computations: Schema Compatibility Testing and Subschema ExtractionThomas Lee
 
Cloud Portability and Interoperability Architecture Model and Best Practices ...
Cloud Portability and Interoperability Architecture Model and Best Practices ...Cloud Portability and Interoperability Architecture Model and Best Practices ...
Cloud Portability and Interoperability Architecture Model and Best Practices ...Thomas Lee
 
Architecture and Practices on Cloud Interoperability and Portability
Architecture and Practices on Cloud Interoperability and PortabilityArchitecture and Practices on Cloud Interoperability and Portability
Architecture and Practices on Cloud Interoperability and PortabilityThomas Lee
 
ebXML Technology Development in Hong Kong
ebXML Technology Development in Hong KongebXML Technology Development in Hong Kong
ebXML Technology Development in Hong KongThomas Lee
 
ebXML and Open Source Software for E-Commerce
ebXML and Open Source Software for E-CommerceebXML and Open Source Software for E-Commerce
ebXML and Open Source Software for E-CommerceThomas Lee
 
The Mythical XML
The Mythical XMLThe Mythical XML
The Mythical XMLThomas Lee
 
Development of Open Source and Standards Technology in Hong Kong
Development of Open Source and Standards Technology in Hong KongDevelopment of Open Source and Standards Technology in Hong Kong
Development of Open Source and Standards Technology in Hong KongThomas Lee
 
Paperless Trading Infrastructure Technology Development in Hong Kong
Paperless Trading Infrastructure Technology Development in Hong KongPaperless Trading Infrastructure Technology Development in Hong Kong
Paperless Trading Infrastructure Technology Development in Hong KongThomas Lee
 
E government Interoperability Infrastructure Development
E government Interoperability Infrastructure DevelopmentE government Interoperability Infrastructure Development
E government Interoperability Infrastructure DevelopmentThomas Lee
 
Adopting Web 2.0 in Business World
Adopting Web 2.0 in Business WorldAdopting Web 2.0 in Business World
Adopting Web 2.0 in Business WorldThomas Lee
 
E-Government Interoperability Infrastructure in Hong Kong
E-Government Interoperability Infrastructure in Hong KongE-Government Interoperability Infrastructure in Hong Kong
E-Government Interoperability Infrastructure in Hong KongThomas Lee
 
XML Schema Computations: Schema Compatibility Testing and Subschema Extraction
XML Schema Computations: Schema Compatibility Testing and Subschema ExtractionXML Schema Computations: Schema Compatibility Testing and Subschema Extraction
XML Schema Computations: Schema Compatibility Testing and Subschema ExtractionThomas Lee
 

More from Thomas Lee (17)

What AI can do for your business
What AI can do for your businessWhat AI can do for your business
What AI can do for your business
 
多雲策略:別把所有系統跑在同一雲平台上
多雲策略:別把所有系統跑在同一雲平台上多雲策略:別把所有系統跑在同一雲平台上
多雲策略:別把所有系統跑在同一雲平台上
 
XML Schema Design and Management for e-Government Data Interoperability
XML Schema Design and Management for e-Government Data Interoperability XML Schema Design and Management for e-Government Data Interoperability
XML Schema Design and Management for e-Government Data Interoperability
 
Automating Relational Database Schema Design for Very Large Semantic Datasets
Automating Relational Database Schema Design for Very Large Semantic DatasetsAutomating Relational Database Schema Design for Very Large Semantic Datasets
Automating Relational Database Schema Design for Very Large Semantic Datasets
 
Formal Models and Algorithms for XML Data Interoperability
Formal Models and Algorithms for XML Data InteroperabilityFormal Models and Algorithms for XML Data Interoperability
Formal Models and Algorithms for XML Data Interoperability
 
XML Schema Computations: Schema Compatibility Testing and Subschema Extraction
XML Schema Computations: Schema Compatibility Testing and Subschema ExtractionXML Schema Computations: Schema Compatibility Testing and Subschema Extraction
XML Schema Computations: Schema Compatibility Testing and Subschema Extraction
 
Cloud Portability and Interoperability Architecture Model and Best Practices ...
Cloud Portability and Interoperability Architecture Model and Best Practices ...Cloud Portability and Interoperability Architecture Model and Best Practices ...
Cloud Portability and Interoperability Architecture Model and Best Practices ...
 
Architecture and Practices on Cloud Interoperability and Portability
Architecture and Practices on Cloud Interoperability and PortabilityArchitecture and Practices on Cloud Interoperability and Portability
Architecture and Practices on Cloud Interoperability and Portability
 
ebXML Technology Development in Hong Kong
ebXML Technology Development in Hong KongebXML Technology Development in Hong Kong
ebXML Technology Development in Hong Kong
 
ebXML and Open Source Software for E-Commerce
ebXML and Open Source Software for E-CommerceebXML and Open Source Software for E-Commerce
ebXML and Open Source Software for E-Commerce
 
The Mythical XML
The Mythical XMLThe Mythical XML
The Mythical XML
 
Development of Open Source and Standards Technology in Hong Kong
Development of Open Source and Standards Technology in Hong KongDevelopment of Open Source and Standards Technology in Hong Kong
Development of Open Source and Standards Technology in Hong Kong
 
Paperless Trading Infrastructure Technology Development in Hong Kong
Paperless Trading Infrastructure Technology Development in Hong KongPaperless Trading Infrastructure Technology Development in Hong Kong
Paperless Trading Infrastructure Technology Development in Hong Kong
 
E government Interoperability Infrastructure Development
E government Interoperability Infrastructure DevelopmentE government Interoperability Infrastructure Development
E government Interoperability Infrastructure Development
 
Adopting Web 2.0 in Business World
Adopting Web 2.0 in Business WorldAdopting Web 2.0 in Business World
Adopting Web 2.0 in Business World
 
E-Government Interoperability Infrastructure in Hong Kong
E-Government Interoperability Infrastructure in Hong KongE-Government Interoperability Infrastructure in Hong Kong
E-Government Interoperability Infrastructure in Hong Kong
 
XML Schema Computations: Schema Compatibility Testing and Subschema Extraction
XML Schema Computations: Schema Compatibility Testing and Subschema ExtractionXML Schema Computations: Schema Compatibility Testing and Subschema Extraction
XML Schema Computations: Schema Compatibility Testing and Subschema Extraction
 

Recently uploaded

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form Application

  • 1. Webformer:a Rapid Application Development Toolkit for Writing Ajax Web Form Application David W.L. Cheung Thomas Y.T. Lee Patrick K.C. Yee Center for E-Commerce Infrastructure Development (CECID), Department of Computer Science, University of Hong Kong December 10, 2007
  • 2. Motivation Web forms are commonly used to capture data on the web. With Asynchronous Javascript and XML (Ajax) programming, interactive web forms can be created. However, Ajax programming is complex in a way that the model-view-controller (MVC) code is not clearly separated. We have developed a rapid application development toolkit called Webformer to simplify web form programming with Ajax. Webformer provides a scripting language called Web Form Application Language (WebFAL) for modeling web forms and generate Javascript/HTML code.
  • 3. Webformer Architecture We have designed an XML-based scripting language called Web Form Application Language (WebFAL) for modeling web forms. A web form model written in WebFAL is complied by our Webformer Complier (wfc) to generate the Javascript/HTML source to run on the browser. A JavaScript engine called webformer.js is provided as provides a Javascript library to handle the MVC interactions on the browser, e.g. data validation and autocompletion, XML document object model (DOM) management, and Ajax messaging. A Java library called webformer.jar is provided for parsing and composing the messages in these formats to ease the programming the Java Servlet handlers on the server-side.
  • 4. Web Form Application Development Lifecycle Two-phase life-cycle facilitates segregation of duties between Gather application requirements software developers and web designers: Specify web form in WebFAL Phase 1. The software WebFAL script developer first specifies Compile WebFAL script the model and controller of a web form in Javascript/ XSD+webformer.jar HTML+webformer.js WebFAL. Develop server-side handlers Enhance HTML design Phase 2. The model is then compiled into an HTML template for the Deploy servlets and HTML file web designer to enhance the UI view.
  • 5. Sample Web Form Application 1. The user enters his username. The entered username is validated on-the-fly against the server database. 2. The user enters the album name while the server suggests the possible names that match what the user types. 3. The user can upload multiple photos. He can click on the [Add Photo] or the [Delete Photo] link to add or delete a upload entry. 4. In each upload entry, the user specifies the photo file name, whether he wants to share the photo, and the number of prints of the photo he wants to order. 5. The user clicks on the Submit button to send the form data to the server.
  • 6. Web Form Application Language (WebFAL) A WebFAL document has a root element <WebForm/> and consists of five kinds of child elements: <Model/>, <Validation/>, <Selection/>, <Event/>, and <SubmitUrl/>. <WebForm name="PhotoUpload"> <Model>...</Model> <Validation>...</Validation> ... <Selection>...</Selection> ... <Event>...</Event> ... <SubmitUrl>...</SubmitUrl> </WebForm>
  • 7. <Model/> Element Specifies the data model of the web form as a hierarchical structure of data groups (<Group/>) and data fields (<Field/>). Each <Field/> is associated with a name and a data type. Possible data types include: String, Number, Date, DateTime, Time, File and Boolean. A <Group/> contains a list of <Field/>s or other <Group/>s. The minimum and maximum occurrence for a <Field/> or <Group/> on the web form can be specified. <Model> <Field name="Username">String</Field> <Field name="Album">String</Field> <Group name="Photo" minOccurs="1" maxOccurs="unbounded"> <Field name="File">File</Field> <Field name="Share">String</Field> <Field name="Prints">Number</Field> </Group> </Model>
  • 8. <Validation/> Element Specifies a set of validation rules for a <Field/> or a <Group/>. There are two types of validation rules: browser validation rules and server validation rules. Browser validation rules are some static constraints for <Field/>s that can be checked by the browser without contacting the server. Browser validation rules are some static constraints for <Field/>s that can be checked by the browser without contacting the server. Available static validation constraints are <RegExp/>, <Length/>, <MinLength/>, <MaxLength/>, <TotalDigits/>, <FractionDigits/>, <MinInclusive/>, <MaxInclusive/>, <MinExclusive/>, and <MaxExclusive/>. An error message may be specified so that that message is reported on the HTML page when the validation fails.
  • 9. <Validation/> Element (Continued) A server validation is dynamically performed by the server. The <HandlerUrl/> specifies the URL of the server handler that performs the validation. At runtime, when the server validation event is triggered, an Ajax request containing the data field content is sent to the specified handler. The server validates the content dynamically and responses to the browser with the validation result. <Validation id="ValPrints"> <FractionDigits errorMsg="must be integer">0</FractionDigits> <MinInclusive errorMsg="must be greater than 0">0</MinInclusive> <MaxInclusive errorMsg="must be less than 10">10</MaxInclusive> </Validation> <Validation id="ValUser"> <MinLength errorMsg="must be longer than 6 characters">6</MinLength> <MaxLength errorMsg="must be shorter than 20 characters">20</MaxLength> <HandlerUrl>/ajax/userval</HandlerUrl> </Validation>
  • 10. <Selection/> Element Provides either a static set of coded values for a <Field/> or specifies the URL of a server handler that provides some suggested values. Coded values are a set of permissible values for a data field. <Selection id="SelShare"> A <Code/> can be optionally given <Code text="Share">public</Code> a text attribute, which is a <Code text="Don’t share"> private description for presenting on the </Code> web page. </Selection> <Selection id="SelAlbum"> Suggested values are dynamically <HandlerUrl> generated by a server handler /ajax/albumsuggest </HandlerUrl> through an XMLHttpRequest. </Selection> <HandlerUrl/> specifies the URL of the server handler.
  • 11. <Event/> Element Specifies an event that can take place in a <Field/> in order to trigger some validation or selection operations. Each <Event/> binds a <Field/> to one or more <Validation/>s or <Selection/>s. <Event> The reference to a <FieldRef>Username</FieldRef> <Field/> is the path of <ValidationRef>ValUser</ValidationRef> <Trigger>FocusOff</Trigger> <Group/> and <Field/> </Event> names, delimited by a dot, <Event> <FieldRef>Album</FieldRef> from the root of the <ValidationRef>SelAlbum</ValidationRef> <Model/> to that <Trigger>KeyUp</Trigger> <Field/>, e.g. </Event> Photo.Description. <Trigger/> specifies the event type of the data field that triggers the specified validations/selections.
  • 12. <SubmitUrl/> Element Specifies the URL of the server handler that processes the data submission. When a user clicks on the submit button in the web form, the form data will be re-validated, packaged in an XML document, and submitted to that URL. <SubmitUrl>ajax/photoupload</SubmitUrl>
  • 13. Compilation of WebFAL Scripts wfc compiles the WebFAL script into an JavaScript/HTML file and picks the HTML component that best represents a <Field/>. JavaScript code is embedded to handle the validation and selection events for the component. The web designer may modify this HTML file to enhance the view and content of the web page. wfc also generates an XSD file from the WebFAL script that specifies the XML format of the web form data for submission to the server. <Model/> and <Validation/>s are converted into XSD types and elements. The structure of <Group/>s and <Field/>s in <Model/> determines the XML structure while the data type of a <Field/> determines its XSD data type.
  • 14. Sample Generated Code Fragments <html> <head> <title>PhotoUpload</title> <script language="JavaScript" src="webformer.js"></script> ... <input type="Album" id="Album_1.1" onkeyup="selfld(this) "/> ... <input type="text" id="Photo.Prints_1.1" onblur="valfld(this)"/> ... <a href="javascript:addgrp(Photo)" id="Photo">[Add Photo]</a> ... </body> </html>
  • 15. Conclusion Contributions: Rapid application development framework for web client and server programming: WebFAL web form modeling language and wfc compiler. Facilitation of two-phase web development life-cycle. Future work: Choice of HTML controls for data fields. The current version of webformer does not allow the user to choose an HTML control (e.g. radio button or drop-down list) for a data field (e.g. coded value field). Inter-field data validation. GUI environment for specifying WebFAL.