Using Cocoon Page 2 Ovidiu Predescu April 5th, 2001 Using Cocoon to build Web sites for wireless devices Ovidiu Predescu Hewlett Packard ApacheCon 2001.

Slides:



Advertisements
Similar presentations
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Advertisements

1 XSLT – eXtensible Stylesheet Language Transformations Modified Slides from Dr. Sagiv.
Lecture 6/2/12. Forms and PHP The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input When dealing with HTML forms.
1 Dickson K.W. Chiu PhD, SMIEEE Thanks to Prof. S.C. Cheung (HKUST) CSIT600b: XML Programming WML.
Creating Web Page Forms. Objectives Describe how Web forms can interact with a server-based program Insert a form into a Web page Create and format a.
Tutorial 6 Working with Web Forms
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 3-1 of…
V1.00 © 2009 Research In Motion Limited Introduction to Mobile Device Web Development Trainer name Date.
WAP: Wireless Application Protocol Mike Mc Ardle ACSG April, 2005.
Web Portals for Mobile Devices Arcadia’s Experience.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
UNIT-V The MVC architecture and Struts Framework.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
An Introduction to WAP/WML. What is WAP? WAP stands for Wireless Application Protocol. WAP is for handheld devices such as mobile phones. WAP is designed.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
PHP Tutorials 02 Olarik Surinta Management Information System Faculty of Informatics.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
XP Tutorial 6New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Creating Web Page Forms Designing a Product Registration Form Tutorial.
Forms and Form Controls Chapter What is a Form?
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
By Amisha Pardasani. Contents Introduction to Wireless Application Protocol Introduction to Wireless Markup Language WML Formatting Links and Images Input.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Lectured By: Vivek Dimri Assistant Professor, CSE Dept. SET, Sharda University, Gr. Noida.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
WAP and WML The Wireless Application Protocol  WAP architecture  WML document structure  WML syntax Basic document syntax Layout Text formatting Images.
SDPL 2002Notes 7: Apache Cocoon1 7 XML Web Site Architecture Example: Apache Cocoon, a Web publishing architecture based on XML technology
WML Wireless Markup Language Presented by: Richa Saxena Roll no
CIS 375—Web App Dev II WAP. 2 Introduction to WAP WAP ________________________ is an application communication protocol that uses a ______ Browser in.
10 Adding Interactivity to a Web Site Section 10.1 Define scripting Summarize interactivity design guidelines Identify scripting languages Compare common.
WML Programming. What is WML WML Programming Wireless mark up language based on XML. Purpose:  to specify user interface behavior and  display contents.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
ASP.NET.. ASP.NET Environment ASP.NET is Microsoft's programming framework that enables the development of Web applications and services. It is an easy.
CSC 551: Web Programming Fall 2001 emerging & alternate Web technologies  Dynamic HTML  ActiveX  XML course overview  online review sheet  advice.
Using Cocoon Page 2 Ovidiu Predescu April 5th, 2001 Using Cocoon to build Web sites for wireless devices Ovidiu Predescu Hewlett Packard ApacheCon 2001.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
SDPL 2001Notes 7.2: Apache Cocoon1 7.2 Apache Cocoon An example of a Web publishing architecture based on XML technology An.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Wireless Application Protocol. WAP- Wireless Application Protocol Gateway WAP WEB Server Content Browser HTTP IPWAP Deck WML.
Database Handling, Sessions, and AJAX. Post Back ASP.NET Functionality The IsPostBack method in ASP.NET is similar to the BlackBerry.refresh method –IsPostBack.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Creating Web Page Forms. Introducing Web Forms Web forms collect information from users Web forms include different control elements including: –Input.
Chapter 4: Working with ASP.NET Server Controls OUTLINE  What ASP.NET Server Controls are  How the ASP.NET run time processes the server controls on.
Presented By: Dixit Wadhwani B.TECH 3 rd YEAR, CSE 07CS Sir Padampat Singnania University Technical Seminar on Wireless Markup Language Guided By:
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Website Forms / Data Acquisition.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
WML & WML Script Presented by Kelvin Liu 01/06/2000.
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
WWW Programming Model. WWW Model The Internet WWW architecture provides a flexible and powerful programming model. Applications and content are presented.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Introduction to Mobile Applications. Wireless Applications Personal Time and KnowledgeManagemnt Personal Health & Security PersonalNavigation Remote Monitoring.
Presentation Title 1 1/27/2016 Lucent Technologies - Proprietary Voice Interface On Wireless Applications Protocol A PDA Implementation Sherif Abdou Qiru.
Mobile Service with.NET By – Sharad Varshney. Agenda What is it supposed to do? Goals Applications System Design Future Work / Enhancements.
Learning Aim C.  In this section we will look at how text, tables, forms and frames can be used in web pages.
Getting Your Content in the Penn State Student Portal Presented By James Leous, Program Manager James Vuccolo, Lead Research Programmer.
HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
XP Tutorial 6New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Section 10.1 Define scripting
M-Commerce Wireless Markup Language (WML) By Prof T.R. Vaidyanathan.
Web Development Using ASP .NET
Presentation transcript:

Using Cocoon Page 2 Ovidiu Predescu April 5th, 2001 Using Cocoon to build Web sites for wireless devices Ovidiu Predescu Hewlett Packard ApacheCon 2001

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 3 Contents Characteristics of wireless devices Random introduction to WML Why use Cocoon? Enhancements to Cocoon XHTML language to describe the presentation

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 4 Characteristics of wireless devices small screens cumbersome data input capabilities limited memory different markup languages: WML, c-HTML, HTML

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 5 User experience challenges information retrieval, not browsing organize data such that it’s easy to access it the application should be optimized for the device, to increase the user experience

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 6 Contents Characteristics of wireless devices Random introduction to WML Why use Cocoon? Enhancements to Cocoon XHTML language

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 7 Random introduction to WML Card and deck Anchors: anchor, a Text elements Emphasis elements ( em, strong, i, b, u, big, small ) br, p, table, tr, td Events and tasks: do, postfield, go, prev Variables: setvar, refresh, onevent User input: input, select, option

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 8 Simple WML example <!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN" " > Choose service: News Weather Stocks

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 9 Simple WML example (continued) <!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN" " > Weather Enter your zip code:

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 10 Simple WML example (continued) <!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN" " > Sunnyvale, clear skies, 70F

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 11 WML: card and deck A WML “page”, or deck, is a collection of cards only one card is visible at a time, but all the cards in a deck are sent to the browser in one message Hello... Hello World!

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 12 WML: emphasis elements Very similar with the HTML elements with the same name: em, strong, i, b, u, br, p, table, tr, td big and small are informative elements to increase or decrease the font size; ignored on most phones

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 13 WML: events and tasks do : mechanism to perform actions on the current card postfield : post the value of a variable in a URL request go, prev : go to a given URL or to the calling one

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 14 WML: variables setvar: sets a variable on the user’s browser refresh : task that indicates an update of the card’s variables onevent: binds a task to the enclosing element...

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 15 WML: user input input : specifies a text entry element SSN: <input type=“text” name=“ssn” format=“NNN-NN-NNNN”/>

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 16 WML: user input (continued) select, option : allow the user to choose from a list of options Please select your menu: Beer Pizza Hot dog

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 17 Contents Characteristics of wireless devices Random introduction to WML Why use Cocoon? Enhancements to Cocoon XHTML language

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 18 Challenges in building wireless applications How to write applications that have to work with both WML and HTML devices? Handling sessions is a tricky task to do it in a portable and transparent way with all phones and WAP gateways Browser implementations vary widely from vendor to vendor, or even from one version to another; supporting them all is a maintenance nightmare How to display dynamic content such that the generated decks are not larger than the size limit?

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 19 Approach to solving the problem Use an XML based language to represent the user interface: an enhanced subset of XHTML to describe the UI Use XSLT for doing the translation from XML to the language supported by the device As long as the navigation between screens is common between WML and HTML, we can use the same source XML pages to describe the user interface Cocoon, an XML publishing engine, looks like the perfect choice for this, so lets use it!

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 20 Cocoon architecture LDAP, SQL information retrieval processors Data source XSLT processor XML Web server Request Response

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 21 Example using Cocoon and XHTML <?xml-stylesheet href=“resource:xhtml.xsl” type=“text/xsl”?> Choose service News Weather Stocks

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 22 Example using Cocoon and XHTML <?xml-stylesheet href=“resource:xhtml.xsl” type=“text/xsl”?> Weather Enter your zip code:

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 23 Example using Cocoon and XHTML <?xml-stylesheet href=“resource:xhtml.xsl” type=“text/xsl”?> Sunnyvale, clear skies, 70F

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 24 Contents Characteristics of wireless devices Random introduction to WML Why use Cocoon? Enhancements to Cocoon XHTML language

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 25 Additional work needed Some adaptation of Cocoon is required though: support for sessions needs to be in the engine browser capabilities database to be able generate the presentation with the best user experience generate the MIME type expected by the browser, even if the browser type is not specified in the capabilities database design the XHTML language and implement the XSLT sheets post-processing of generated pages to split large pages in smaller ones that fit on the device

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 26 Session handling Some WAP gateways support cookies, so we can rely on them to keep the session id on behalf of the phone Some WAP gateways send the subscriber ID as a header with each request; we can make use of this id as the session identifier Many WAP gateways do not support cookies: we can set a variable on the phone that’s presented with each request, it will act as the session id When everything else fails, we can use URL rewriting; this however increases the size of the pages and makes them non- cacheable

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 27 Browser capabilities database We need to have some knowledge on what are the capabilities of the browser to generate: correct pages, with no additional elements or attributes which can cause errors on the device enhance the user experience for that particular device by making use of features available for that particular browser The database should be extensible and allow specifying browser variants, which derive from a given browser type but have certain new or modified attributes Solution: use an XML format to describe the data and pass the capabilities of the current browser in the XSLT stylesheets

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 28 Browser capabilities database example text/vnd.wap.wml text/wml text/wml/phone.com UP.Browser vnd.up.send 1400

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 29 Browser capabilities database (continued) MO01 false 2

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 30 Contents Characteristics of wireless devices Random introduction to WML Why use Cocoon? Enhancements to Cocoon XHTML language

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 31 XHTML language Would like to have developers write using the XHTML familiar language instead of learning WML If the page navigation is the same for the HTML and WML versions, the presentation can be written only once An XSLT set of stylesheets converts from our XML language to WML Another set of XSLT stylesheets deals with the translation from our enhanced subset of XHTML to pure XHTML

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 32 The translation to WML h1 through h6 elements are translated to a b element an a XHTML element is translated to an anchor WML element; if the browser support the accesskey attribute, it will be automatically added to the generated anchor element the select and option XHTML elements are translated to the corresponding WML elements phone, an additional element is used to describe special content to be treated as a phone number. On a cell phone, it automatically creates a “call” button to call that number. If the cell phone has the ability to add the number to its internal phonebook, another button with this functionality is created. is another special element to display an address, which may be integrated with an internal existing application

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 33 The translation to WML (continued) Translate form elements in do elements with the appropriate postfield elements Enter your zip code: Enter your zip code:

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 34 The translation to WML (continued) Table elements are not usually used in WML, but they are handy when displaying HTML. The special attribute keep tells whether the stylesheet has to keep the table in the output page or not Name: Password:

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 35 Page splitting: motivation Dynamic Web applications can generate arbitrary amounts of data Web developers should not be aware of the device requesting the data or about its limitations Complex issue, which requires the framework to understand the logical structure of the page

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 36 Page splitting: possible approach This issue exists not only in WML browsers, but also in iMode devices Split the high level XHTML page not the resulting WML or cHTML page Pages could be transparently split and cached by the framework; when subsequent requests come, the framework can serve them from the cache Splitting long p elements is the simplest example Long table elements can be split relatively easily Large form elements that embed large table s, p and input elements are difficult to split correctly Some human guidance to the splitter could be a reasonable expectation Work in progress...

Using Cocoon April 5th, 2001 Ovidiu Predescu Page 37 Resources Cocoon: Patches: These slides: hecon-2001/