Home arrow Web Standards arrow Page 2 - Configuring Firefox for Chrome and a Server
WEB STANDARDS

Configuring Firefox for Chrome and a Server


If you have been building Internet applications with XUL, you'll appreciate this four-part article series. It explains how to prepare such an application for a commercial setting. This article is excerpted from chapter four of Programming Firefox, written by Kenneth C. Feldt (O'Reilly, 2007; ISBN: 0596102437). Copyright © 2007 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.

Author Info:
By: O'Reilly Media
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
June 05, 2008
TABLE OF CONTENTS:
  1. · Configuring Firefox for Chrome and a Server
  2. · Running as a Local Installation
  3. · Package Registration
  4. · Configuring the Server

print this article
SEARCH DEVARTICLES

Configuring Firefox for Chrome and a Server - Running as a Local Installation
(Page 2 of 4 )

We will first look at what we need to install the application on the local machine and to communicate with a server through a form of HTTP request. For both versions, we must have an Apache web server running, PHP installed, and an SQL database up and running.

Chrome Directory Structure

An application registered as a chrome package is not required to be located in a specific directory; convention, however, has placed most chrome applications within Firefox’s chrome directory. The chrome directory is located in the same directory as the binary executable for Firefox. Most of the files in the chrome directory are .jar files, or Java archive files.

Although XUL applications use the Java archive as a preferred distribution medium, the source code files are not written in Java. XUL applications are developed as JavaScript and XUL source files.

To see the content of any of the archives, usethe
jar –tf
command. For example, to view the contents of the inspector.jar file, change to the chrome directory and type the following:

  jar –tf inspector.jar

If we were to do the same for all the archive files, we would see that they share a common directory structure:

Content
  
For user interface (XUL) files, stylesheets, and scripts

Skin
  
Stylesheets and images that collectively provide a
   theme to an appearance

Locale
  
To provide multiple-language support for interface
   widgets

For our application, we will work with only thecontent root.

Before we continue installing our application in the Firefox chrome directory, we need to understand that such an application is referred to through a special chrome URL. The form of this URL is:

  chrome://<package>/<part>/<fileName>

Thepackage  andpart  names are consistent with conventions used for .jar files. This URL instructs the Firefox framework to scan its installed packages to access a filename located as part of a specific package. Once our application is registered, we would use a command line with the–chromeoption (to open the file in a chrome window) or specify a chrome URL (to launch the application with chrome privileges):

  firefox –chrome chrome://<package>/<part>/<filename>

Figure 4-3 illustrates an example directory structure.


Figure 4-3.   Chrome directory structure

 
blog comments powered by Disqus
WEB STANDARDS ARTICLES

- Mozilla Popcorn Maker 1.0 Makes Videos More...
- Completing a Configuration for Chrome and a ...
- Getting Connected with Firefox and Chrome
- Configuring Servers and Databases with Chrome
- Configuring Firefox for Chrome and a Server
- Designing the Elements of a Web Page
- Matching div heights with CSS and JavaScript
- Forms
- Get Down With Markup
- If I Said You Had a Beautiful Body...
- Web Standards in Dreamweaver Part 3
- Web Standards in Dreamweaver, Part 2
- Web Forms
- Making Lists Using XHTML
- Web Standards in Dreamweaver, Part 1

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials