Diff for /books/www/articles/xpfe_dhtml.html between versions 1.18 and 1.22

version 1.18, 2001/08/09 21:27:46 version 1.22, 2001/08/14 18:15:16
Line 17  different supported platform. Line 17  different supported platform.
 time. XPFE, Mozilla's cross-platform front end, was designed to solve this problem by enabling engineers to create one interface that would then work on  time. XPFE, Mozilla's cross-platform front end, was designed to solve this problem by enabling engineers to create one interface that would then work on
 any operating system.    any operating system.  
   
<p>In this context a front end is more than the look and feel of a Mozilla-based application, but can also include the functionality and structure of<p>In this context a front end is more than the look and feel of the application, but can also include the functionality and structure of that
that application.  For example, Netscape 6 does use XPFE to allow for the creation of <a href="http://www.netscape.com/themes/">different themes</a> forapplication.  For example, Netscape 6 does use XPFE to allow for the creation of <a href="http://www.netscape.com/themes/">different themes</a> for
their browser suite, but the browser suite itself is also created using XPFE.their browser suite, but the browser suite itself is created using XPFE as well.
   
 <p>This new technology started out as a time-saving technique and turned into one of Mozilla's most powerful innovations.  Mike Cornall, in <a  <p>This new technology started out as a time-saving technique and turned into one of Mozilla's most powerful innovations.  Mike Cornall, in <a
 href="http://linuxtoday.com/news_story.php3?ltsn=2000-07-25-001-07-OP-SM-0036">an article</a> published on LinuxToday, summarizes the history of XPFE  href="http://linuxtoday.com/news_story.php3?ltsn=2000-07-25-001-07-OP-SM-0036">an article</a> published on LinuxToday, summarizes the history of XPFE
Line 32  useful for developers it is necessary to Line 32  useful for developers it is necessary to
   
 <p><b>Understanding XPFE</b>  <p><b>Understanding XPFE</b>
   
<p>The technologies that XPFE uses are all existing Web standards, such as <a href="http://www.w3.org/Style/CSS/">Cascading Style Sheets</a>, <p>XPFE uses a number of existing Web standards, such as <a href="http://www.w3.org/Style/CSS/">Cascading Style Sheets</a>, <a
<a href="http://www.ecma.ch/ecma1/STAND/ECMA-262.HTM">JavaScript</a> and <a href="http://www.w3.org/XML/">XML</a> (the XML component is a newhref="http://www.ecma.ch/ecma1/STAND/ECMA-262.HTM">JavaScript</a> and <a href="http://www.w3.org/XML/">XML</a> (the XML component is a new language
language called XUL, the XML-based User Interface Language).  In it's most simple form, XPFE can be thought of as simply the union of each of these called XUL, the XML-based User Interface Language).  In it's most simple form, XPFE can be thought of as simply the union of each of these standards.
standards.Viewed together these three standards can be seen forming XPFE in Figure 1 below.
   
 <center>  <center>
 <p><img src="http://books.mozdev.org/screenshots/moz_0101.gif"><br>  <p><img src="http://books.mozdev.org/screenshots/moz_0101.gif"><br>
 <font size="-1"><i>Figure 1: XPFE Framework</i></font>  <font size="-1"><i>Figure 1: XPFE Framework</i></font>
 </center>  </center>
   
<p>To understand how XPFE works, we can look at how the different components of it fit together.  JavaScript is used to create the functionality for a<p>To understand how XPFE works, we can look at how these different components fit together.  JavaScript is used to create the functionality for a
Mozilla-based application, Cascading Style Sheets are used for formatting the look and feel, and XUL is used for creating the application's structure.  Mozilla-based application, Cascading Style Sheets are used for formatting the look and feel, and XUL is used for creating the application's
Viewed together these three standards can be seen forming XPFE in Figure 1 above.structure.
   
 <p>Instead of using platform-specific C code to create an application, XPFE uses these well understood Web standards that are by design inherently  <p>Instead of using platform-specific C code to create an application, XPFE uses these well understood Web standards that are by design inherently
 platform independent.  Since the framework of XPFE is inherently platform independent, so are the applications that are created with it.  Since the  platform independent.  Since the framework of XPFE is inherently platform independent, so are the applications that are created with it.  Since the
framework is also made up of tools that are used to create Web pages, anyone familiar with creating a Web page can use XPFE to create a cross-platformframework is also made up of tools that are used to create Web pages, people familiar with creating a Web page can quickly learn how to use XPFE to
application.create a cross-platform application.
   
 <p>Although the actual creation of Mozilla-based applications can be much more complicated than building a Web page, XPFE allows developers to create  <p>Although the actual creation of Mozilla-based applications can be much more complicated than building a Web page, XPFE allows developers to create
applications in the same way they would create a Web page.  Or to put it another way, the application is now a Web page.  Gecko, the rendering engineapplications in the same way they would create a Web page.  Or to put it another way, the application is now a Web page.  
that Mozilla uses to draw a Web page in the browser, even draws the Mozilla application on the desktop.
 <p>In some ways Mozilla doesn't even make a distinction between Web pages and XPFE applications.  For instance, Gecko, the layout engine that Mozilla
 uses to render Web pages in the browser, also renders Mozilla-based applications on the desktop.
   
 <p><b>Comparing XPFE and DHTML</b>  <p><b>Comparing XPFE and DHTML</b>
   
Line 87  accustomed to using XUL you will be read Line 89  accustomed to using XUL you will be read
 details were ignored in the comparison to give a better understanding of the basic framework of XPFE.  Now that we've gotten past the basics, we can go  details were ignored in the comparison to give a better understanding of the basic framework of XPFE.  Now that we've gotten past the basics, we can go
 back and talk about the rest of the functionality available with Mozilla that makes it such a powerful framework for creating applications.  back and talk about the rest of the functionality available with Mozilla that makes it such a powerful framework for creating applications.
   
<p>At the <a href="http://meetzilla.mozdev.org/second_meeting.html">Second Mozilla Developer Meeting</a>, Rob Ginda, the creator of ChatZilla, lead a<p>At the <a href="http://meetzilla.mozdev.org/second_meeting.html">Second Mozilla Developer Meeting</a>, Rob Ginda, the creator of ChatZilla, led a
 discussion group about Mozilla as Platform.  In this session he listed all of the following as components of a Mozilla-based application:  discussion group about Mozilla as Platform.  In this session he listed all of the following as components of a Mozilla-based application:
   
 <UL>  <UL>
 <LI>XUL (XML-based User Interface Language) - Used to create the structure and content of an application.<br><br>  <LI>XUL (XML-based User Interface Language) - Used to create the structure and content of an application.<br><br>
 <LI>CSS (Cascading Style Sheets) - Used to create the look and feel of an application.<br><br>  <LI>CSS (Cascading Style Sheets) - Used to create the look and feel of an application.<br><br>
<LI>JavaScript - Used to create the functionality of an application. (Other scripting languages, such as Python, Perl or Ruby, can be used in <LI>JavaScript - Used to create the functionality of an application, although other scripting languages, such as Python, Perl or Ruby, can be used in 
place of Javascript to create functionality for an application.)<br><br>place of Javascript.<br><br>
 <LI>XPInstall (Cross-Platform Install) - Used to package applications so that they can be installed on any platform.<br><br>  <LI>XPInstall (Cross-Platform Install) - Used to package applications so that they can be installed on any platform.<br><br>
 <LI>RDF (Resource Description Framework) - Used to store data and transmit information.  Generally regarded to be one of the most complicated   <LI>RDF (Resource Description Framework) - Used to store data and transmit information.  Generally regarded to be one of the most complicated 
 aspects of XPFE.<br><br>  aspects of XPFE.<br><br>
 <LI>DTD (Document Type Definition) - Used for localization and internationalization, more commonly referred to in short-hand as L12N and I18N   <LI>DTD (Document Type Definition) - Used for localization and internationalization, more commonly referred to in short-hand as L12N and I18N 
 respectively.<br><br>  respectively.<br><br>
<LI>XBL (eXtensible Binding Language) - Used to create reusable widgets using a combination of XUL and JavaScript.<br><br><LI>XBL (eXtensible Binding Language) - Used to create reusable widgets with a combination of XUL and JavaScript.<br><br>
 <LI>XUL templates - Used to create a framework for importing data into an application with a combination of RDF and XUL.<br><br>  <LI>XUL templates - Used to create a framework for importing data into an application with a combination of RDF and XUL.<br><br>
 <LI>XPCOM/XPConnect - Used to allow JavaScript, or potentially any other scripting language, to access and utilize C and C++ libraries.  <LI>XPCOM/XPConnect - Used to allow JavaScript, or potentially any other scripting language, to access and utilize C and C++ libraries.
 </UL>  </UL>
   
 <p>Each of these technologies is important and several of these deserve to have whole books devoted to them.  Although each of these technologies is  <p>Each of these technologies is important and several of these deserve to have whole books devoted to them.  Although each of these technologies is
important there is a distinction to be made among them.  Some of these are essential to the creation of a Mozilla application and some of them provideimportant there is a distinction to be made among them.  Some of these are essential to the creation of a Mozilla application and some provide
powerful extra features that can be used in addition to the basic functionality.powerful extra features.
   
 <p>For example, <a href="http://www.mozilla.org/rdf/doc/">RDF</a> is an extremely powerful technology for using data in Mozilla but it is possible to  <p>For example, <a href="http://www.mozilla.org/rdf/doc/">RDF</a> is an extremely powerful technology for using data in Mozilla but it is possible to
 create an application without it.  <a href="http://www.mozilla.org/projects/l10n/mlp.html">Localization</a> also provides Mozilla with a great amount of  create an application without it.  <a href="http://www.mozilla.org/projects/l10n/mlp.html">Localization</a> also provides Mozilla with a great amount of
 flexibility but there are many existing applications that don't take advantage of this feature.  It wouldn't be possible to create an application without  flexibility but there are many existing applications that don't take advantage of this feature.  It wouldn't be possible to create an application without
 XUL though.  XUL though.
   
 <hr>  
   
 <p><b>Judge For Yourself</b>  <p><b>Judge For Yourself</b>
   
<p>XPFE is a new technology that has yet to prove itself to the Web community and many people are skeptical about the need for an application framework<p>XPFE is a new technology and has yet to prove itself to the Web community.  Many people are also skeptical about the need for an application
such as this.  Before you make up your mind about XPFE, you should take a look at the many different applications that have already been created usingdevelopment framework such as this.  Before you make up your mind about XPFE though, you should take a look at the many different applications that
Mozilla so you can judge for yourself.have already been created using Mozilla so you can judge for yourself.
<p>If you are interested in trying out some of these, there are currently over 40 different Mozilla-based applications being hosted on <a<p>The first place to start would be to try using the latest version of <a href="http://mozilla.org/releases/">Mozilla</a> or <a
href="http://www.mozdev.org/projects.html">mozdev.org</a> that have been created using XPFE.  Other applications using the same technology includehref="http://www.netscape.com/browsers/6/index.html">Netscape 6.1</a> if you haven't already, since these are the most well known applications that
ActiveState's <a href="http://www.activestate.com/ASPN/Downloads/Komodo/More">Komodo</a> IDE, Rob Ginda's <ause XPFE.  If you want to try out other projects using XPFE, there are currently over 40 different Mozilla-based applications being hosted on <a
 href="http://www.mozdev.org/projects.html">mozdev.org</a>.  Other applications using the same technology include ActiveState's <a
 href="http://www.activestate.com/ASPN/Downloads/Komodo/More">Komodo</a> IDE, Rob Ginda's <a
 href="http://www.hacksrus.com/~ginda/chatzilla/">ChatZilla</a> IRC client, and Zope's <a href="http://www.zope.org/Resources/Mozilla/">Mozilla  href="http://www.hacksrus.com/~ginda/chatzilla/">ChatZilla</a> IRC client, and Zope's <a href="http://www.zope.org/Resources/Mozilla/">Mozilla
 Initiative</a>.  Initiative</a>.
   

Removed from v.1.18  
changed lines
  Added in v.1.22


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>