Introduction to XUL Thuha Nguyen. Overview What is XUL? Benefits of using XUL XUL syntax XUL package XUL elements XUL examples –Menu, menubar –Button.

Slides:



Advertisements
Similar presentations
Chapter 3 – Web Design Tables & Page Layout
Advertisements

1 Web Site Design Overview of the Internet Cookie Setton.
Introduction to HTML & CSS
Sue Wills July Objects The JavaScript language is completely centered around objects, and because of this, it is known as an Object Oriented Programming.
Computer and Communication Fundamental Basic web programming Lecture 8 Rina Zviel-Girshin.
Ch. 5 Web Page Design – Templates and Style Sheets Mr. Ursone.
The Web Warrior Guide to Web Design Technologies
SE-2840 Dr. Mark L. Hornick 1 HTML input elements and forms.
Firefox Addon development tutorial 谢烜
COMPSCI 345 / SOFTENG 350 TUTORIAL WEEK 8 | SAM KAVANAGH.
HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure.
Markup Languages Controlling the Display Of Web Content.
Introduction To Form Builder
Tutorial 13 Working with Objects and Styles. XP Objectives Learn about objects and the document object model Reference documents objects by ID, name,
4.01B Authoring Languages and Web Authoring Software 4.01 Examine webpage development and design.
 jQuery Mobile An Introduction. What is jQuery Mobile  A framework built on top of jQuery, used for creating mobile web applications  Designed to make.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
CST JavaScript Validating Form Data with JavaScript.
XML User Interface Language (XUL) Karl Strength April 16, 2006.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
 Using Microsoft Expression Web you can: › Create Web pages and Web sites › Set what you site will look like as you design it › Add text, images, multimedia.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
A guide for UICET for using Wikispaces.  A wiki is a web page or collection of web pages that can be linked together as a website.  Wikis are often.
4.1 JavaScript Introduction
Lesson 13: Building Web Forms Introduction to Adobe Dreamweaver CS6 Adobe Certified Associate: Web Communication using Adobe Dreamweaver CS6.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Yahoo! User Interface (YUI) Library Natly Mekdara.
HTML DOM.  The HTML DOM defines a standard way for accessing and manipulating HTML documents.  The DOM presents an HTML document as a tree- structure.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
© Ms. Masihi.  The Dreamweaver Welcome Screen first opens when you start Dreamweaver.  This screen gives you quick access to previously opened files,
HTML, XHTML, and CSS Chapter 12 Creating and Using XML Documents.
10 Adding Interactivity to a Web Site Section 10.1 Define scripting Summarize interactivity design guidelines Identify scripting languages Compare common.
Website Development with Dreamweaver
What is Java Script? An extension to HTML. An extension to HTML. Allows authors to incorporate some functionality in their web pages. (without using CGI.
Lesson 12: Working with Code-editing Features Introduction to Adobe Dreamweaver CS6 Adobe Certified Associate: Web Communication using Adobe Dreamweaver.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
HTML Concepts and Techniques Fourth Edition Project 12 Creating and Using XML Documents.
An Introduction to JavaScript Summarized from Chapter 6 of “Web Programming: Building Internet Applications”, 3 rd Edition.
Copyright 2007, Information Builders. Slide 1 Understanding Basic HTML Amanda Regan Technical Director June, 2008.
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.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
XHTML 1.1  Derived from Standard Generalized Markup Language (SGML) of ISO  XHTML concerned primary with content rather than presentation and style 
JavaScript - A Web Script Language Fred Durao
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
Overview of Form and Javascript fundamentals. Brief matching exercise 1. This is the software that allows a user to access and view HTML documents 2.
HTML FORMS The TEXT Object Presented By: Ankit Gupta.
INTRODUCTION TO HTML5 New HTML5 User Interface and Attributes.
Unit 3 — Advanced Internet Technologies Lesson 10 — Introduction to XHTML.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
XML DOM Week 11 Web site:
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Microsoft Expression Web - Illustrated Unit A: Getting Started With Microsoft Expression Web.
HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.
Interstage BPM v11.2 1Copyright © 2010 FUJITSU LIMITED FORMS.
THE DOM.
Section 10.1 Define scripting
Introduction to.
DHTML.
Unit 4 Representing Web Data: XML
Using DHTML to Enhance Web Pages
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Section 10.1 YOU WILL LEARN TO… Define scripting
DHTML Javascript Internet Technology.
Web Programming A different world! Three main languages/tools No Java
Chapter 2 – Introduction to the Visual Studio .NET IDE
DHTML Javascript Internet Technology.
Forms, cont’d.
Tutorial 6 Creating Dynamic Pages
Presentation transcript:

Introduction to XUL Thuha Nguyen

Overview What is XUL? Benefits of using XUL XUL syntax XUL package XUL elements XUL examples –Menu, menubar –Button –Text field –HTML elements More information

What is XUL ? XML-based User interface Language (“zool”) Makes UI building easier and faster Cross-platform support Entire Mozilla/Nav5 UI built in XUL Uses W3C standards: HTML 4.0, XML, XML Namespaces, CSS1/2, DOM1/2

Why XUL? Provides flexibility and ease of use –Ready-made widgets –Incorporation of W3E standards Offers enough power to build application UI Less expensive than building separate front ends using Windows GUI and Mac GUI. Benefits both developers and consumers

XUL Benefits Web/client application developers –Cross-platform UI easily –Cross-device UI quickly –Common UI metaphors (boxes, springs) that web standards lack –Can build small, powerful, quickly-downloadable application by leveraging power of browser instead of duplicating it –Conclusion: throw away your books on Windows, Mac, and Motif or GTK UI development and use lightweight web standards and markup languages instead

XUL Benefits (cont.) Consumers: –XUL applications are small, downloaded quickly and therefore save user time –Increase freedom of choice of platform and device –Increase ability to tailor application appearance to own preferences

XUL, XPToolkit, XPFE XUL is used to create interface. It is a universe of elements, attributes, syntax, rules and relationships XPToolkit is the finite set of interface-specific elements created in XUL XPFE (cross platform front end) is the front end created from XPToolkit

XUL User Interface Elements can be created using XUL: –Input controls (text fields) –Toolbars with buttons or any content –Menus on a menu bar or pop up menus –Tabbed dialogs –Trees for hierarchical or tabular information –Keyboard shortcuts –Progress meter, scrollbar, etc.

XUL File Writing a XUL window description is basically the same as writing an HTML content description, except: –Syntax is XML –Unique elements: Widgets Infrastructure

XUL Syntax and Rules XUL is case sensitive: all events and attributes must be written in lower case All strings must be double quoted Every XUL widget must use close tags to be well- formed All attributes must have a value XUL file extension:.xul

XUL Package A chunk of UI machinery used to create a single window Has five parts: –content: XML description of UI –appearance: look customized with CSS –behavior: defined with JavaScript or C++ –locale: all localizable strings in external DTD –platform: platform specific info

XUL Elements Widgets –Small components used to make an interface –Largely self-contained –Window, box, menu, menubars, toolboxes, toolbars, checkbox, scrollbar, titled buttons … Infrastructure –JavaScript event handlers within a widget –Tie widgets together using JavaScript and broadcaster nodes (communicate the changes of state between widgets)

XUL and JavaScript XUL interface is a collection of disconnected widgets until programmed JavaScript and/or C++ JavaScript included in XUL or a separate file function InitWindow() { var checkbox = document.getElementByID(“remember”); if (checkbox) checkbox.checked = true; }

Building an XUL file XUL file preamble <window id=“simple_window” title=“A Simple Window” xmlns:html= xmlns=" ………..

Element Root element in a XUL file and top level of the interface, similar to the tag in HTML Each window is described in a separate file Attributes: –title: name appears in the title bar of window –id: used as identifier so that window can be refered to by scripts –xmlns: xml namespace declaration

Element onclick – JavaScript event handler within a widget

Element <button id="find-button" class="dialog" value="Find" default="true“ style="list-style-image: url('find.png')"/>

Attributes id: unique identifier a button is identified with class: the style class of the button src: URL of the image to appear on the button orient: determines whether the image appears to the left of the text or above disabled: disable the button if true; switch state using JavaScript

Text Entry Fields <button id="find-button" class="dialog" value="Find" default="true“ style="list-style-image: url('find.png')"/>

Adding HTML Elements Examples: Java applets and table Declaration: Remember: –Add a html: prefix to the beginning of each tag –Tags must be entered in lowercase. –Quotes must be placed around all attribute values. – XML requires a trailing slash at the end of tags that have no content

HTML Elements (cont) Example: Click the box below to remember this decision. Remember This Decision

Other Widget Components Dialog, overlay, box, radio menu Toolbox, toolbar, image element, grid Content widget, spring, broadcaster and observer Tab, popup, tree, deck and stack Keyset and key, color picker Progress meter, scrollbar More examples at

Future Development Easy customization of UI XUL Fragments to add components to UI Server-cached XUL to dynamically update an application’s UI at startup

More Information XUL tutorial XUL Programmer’s Reference Manual XUL Developer Central Mozilla XUL