SlideShare a Scribd company logo
1 of 24
Download to read offline
Developing XUL Application
                    - Mozilla For RIA

                             김대웅
Contents


                       Contents
     1.    RIA?
     2.    XULRunner?
     3.    Developing With XULRunner
     4.    Blog Writer
     5.    Q&A




                                       2
RIA?

 RIA
 ?
       Installation & Updates
       Using Anywhere
       Richer Than Web Standard
       Allow offline use of Application
       Client/Server Balance
       Network Efficiency




                                          3
RIA?

RIA Platforms




                4
RIA?

RIA Platforms




                5
XULRunner?


 XULRunner
 ?a Mozilla runtime package (GRE) that can be used to
   bootstrap XUL+XPCOM applications
      XPCOM                        SVG
      Gecko rendering              XSLT
      engine
                                   XMLHttpRequest
      XUL
                                   DOMParser
      XBL
                                   Web Services (SOAP)
      File picker
                                   Embeding APIs
      Helper app dialog/UI
      Extension Manager

                                                         6
XULRunner?


 XPCOM                  Cross Platform Component Object Model

  Reusable cross-platform libraries
  Virtually all of the functionality of Gecko




      XPConnect - quot;Scriptablequot; IDL interfaces
                                                                7
XULRunner?


 XUL         XML User Interface Language

                                           <window>
                                           <menubar id=quot;
                                           menubaridquot;>
                                              <menu id=quot;
                                           menuid“ >
                                                 <menupopup>
                                                  <menuitem >
                                                 </menupopup>
                                              </menu>
                                           </menubar>
                                           <toolbar id=quot;
                                           toolbaridquot;>
                                              <toolbarbutton >
                                           </toolbar>
                                           <!-- your code here
                                                          8
XULRunner?




   Roadmap
         XULRunner 1.8.0.x ~= firefox
         1.5
         XULRunner 1.8.1 ~= firefox
         2.0
         XULRunner 1.9 ~= firefox 3.0
   XULRunner Based
   Application
             SpiceBird
             SongBird
             Google AdWords
             Editor
             Flickr Uploadr 3.0
             Joost
             …
                                        9
XULRunner vs Adobe AIR


 AIR      Adobe Integrated Runtime

  A runtime environment for building RIAs using Flash, Flex, HTML
  and Ajax, that can be deployed as a desktop application.

   Features
        Local file system access
        Native Drag N Drop
        UI Controls
        SQLLite embed
        Webkit
        Ajax framework Support
        Rich Media and Video
    Tools
        Flex Builder
        Aptana
        Dreamweaver extention
                                                                    10
XULRunner vs Adobe AIR




                            XULRunner                     AIR
        Language         Html, xul & javascript   Html,mxml, javascript
                                                     & actionscript
    Rendering Engine            gecko                    Webkit
         RDBMS                   Yes                      Yes
       UI Controls               XUL                   Flex Comp.
           API                 XPCOM                Flash, Flex APIs
           DnD                   Yes                      Yes
   Access FileSystem             Yes                      Yes
     Cross Platform      Window, linux, mac        Window, linux, mac
      Web Launcher                No                      Yes


                                                                          11
XULRunner vs Adobe AIR




           Desktop Based RIA
                         XULRunne
                         r
                         AI
                         R


                         Flex,
                         SilverLight
                         AJA
                         X
            Web Based RIA


                                       12
Developing With XULRunner




           Developing
           With XULRunner




                            13
Developing With XULRunner


  Simple Application Demo




                            14
Developing With XULRunner


 Structure
                            application.ini
                                entry point, application information

                            chrome.manifest
                                register resource location by “chrome://” URI

                             EX) content myapps
                             content/myapps/
                            Preference.js
                                setup application preferences

                             EX) pref(quot;toolkit.defaultChromeURIquot;, “chrome:
                             //myapps/content/myapps.xul quot;);




                                                                                15
Developing With XULRunner


 Tools
                            Orangevolt eclipse plugin




                             XUL
                             Explorer




                                                        16
Developing With XULRunner


 Debugging
    Function dump()
                            pref(quot;browser.dom.window.dump.
                            enabledquot;, true);
    Javascript              dump(quot;my text herenquot;);
    Console                 pref(quot;javascript.options.showInCons
                            true);
                            Components.utils.reportError(str);
                            function jsdump(str){
                            Components.classes['@mozilla.
                            org/consoleservice;1']
    Venkman Debugger
                            .getService(Components.interfaces.
                            nsIConsoleService)
                            .logStringMessage(str);
                            }
                                                            17
Developing With XULRunner


Libraries            Mozilla Fuel
  A JavaScript Library to help developers build extensions
  new in Firefox 3


 Objective
 s easy access interfaces, components and
       services.
       threaded wrapper for nsIProcess
       convenience wrapper for file, text or stream



  var cs = Components.classes['@mozilla.org/consoleservice;1']
  .getService(Components.interfaces.nsIConsoleService);

           var cs = MOZILLA.ConsoleService();
                                                             18
Developing With XULRunner


Libraries            Mozdev JSLib
  make life easier for developers by providing a general purpose
  library


  Modules
      Debug
      install       jslib.init(this);         var file = Components.classe
      io            include (jslib_file);     (Components.interfaces.nsILo
      network       var file = new File(quot;c:   file.initWithPath(quot;c:tmpfoo.d
      rdf           tmpfoo.datquot;);         var ioService = Components.
      sound         file.open(quot;wquot;);           getService(Components.inter
      utils         file.write(quot;This is a     var uri = ioService.newFileUR
      xul           testnquot;);                 var channel = ioService.newC
      zip           file.close();             var outputStream = Compone
                                              stream;1quot;].createInstance(Co
                                              outputStream.init(file, 0x20|0x
                                              var buffer = quot;This is a testnquot;;
                                              outputStream.write(buffer, bu
                                                                          19

                                              outputStream.flush();
Developing With XULRunner


Libraries            Extras
   Use your Favorite Javascript Libraries.


            Prototype
            Jquery
            Mootools
            Extjs
            ... Anything You Like




                                             20
Blog Writer



 Blog Writer : Objective
   Try developing the Desktop RIA with Web
   Standard and Open API




                                             22
Blog Writer



 Building
 Blocks       Trimpath Template
              MetaWeblog API
              PowerEditor
              nsDragAndDrop.js
              Components.interfaces.nsIIOService
              Components.interfaces.nsILocalFile
              Components.interfaces.nsIFileInputStream
              Components.interfaces.nsIBinaryInputStream




                                                           24
Reference




 Reference
       http://developer.mozilla.org/en/docs/XULRunner:What_XULRunner_Provides

       http://www.xulplanet.com

       http://books.mozdev.org/html/index.html

       http://www.simonwhatley.co.uk/rich-internet-applications-a-background

       http://www.adobe.com/products/air




                                                                                25
Q&A 감사합니다

More Related Content

What's hot

[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool
javablend
 
Migrating PriceChirp to Rails 3.0: The Pain Points
Migrating PriceChirp to Rails 3.0: The Pain PointsMigrating PriceChirp to Rails 3.0: The Pain Points
Migrating PriceChirp to Rails 3.0: The Pain Points
Steven Evatt
 

What's hot (14)

Titanium - Making the most of your single thread
Titanium - Making the most of your single threadTitanium - Making the most of your single thread
Titanium - Making the most of your single thread
 
Bonnes pratiques des applications java prêtes pour la production
Bonnes pratiques des applications java prêtes pour la productionBonnes pratiques des applications java prêtes pour la production
Bonnes pratiques des applications java prêtes pour la production
 
Highlights from Java 10, 11 and 12 and Future of Java at JUG Koblenz
Highlights from Java 10, 11 and 12 and Future of Java at JUG KoblenzHighlights from Java 10, 11 and 12 and Future of Java at JUG Koblenz
Highlights from Java 10, 11 and 12 and Future of Java at JUG Koblenz
 
Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09
 
Java fx smart code econ
Java fx smart code econJava fx smart code econ
Java fx smart code econ
 
What's New in java 9
What's New in java 9What's New in java 9
What's New in java 9
 
Add new commands in appium 2.0
Add new commands in appium 2.0Add new commands in appium 2.0
Add new commands in appium 2.0
 
Symfony2 and AngularJS
Symfony2 and AngularJSSymfony2 and AngularJS
Symfony2 and AngularJS
 
[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool
 
oVirt UI Plugin Infrastructure and the oVirt-Foreman plugin
oVirt UI Plugin Infrastructure and the oVirt-Foreman pluginoVirt UI Plugin Infrastructure and the oVirt-Foreman plugin
oVirt UI Plugin Infrastructure and the oVirt-Foreman plugin
 
Head toward Java 14 and Java 15
Head toward Java 14 and Java 15Head toward Java 14 and Java 15
Head toward Java 14 and Java 15
 
Manage appium dependencies with -appium-home in appium 2.0
Manage appium dependencies with  -appium-home in appium 2.0Manage appium dependencies with  -appium-home in appium 2.0
Manage appium dependencies with -appium-home in appium 2.0
 
Migrating PriceChirp to Rails 3.0: The Pain Points
Migrating PriceChirp to Rails 3.0: The Pain PointsMigrating PriceChirp to Rails 3.0: The Pain Points
Migrating PriceChirp to Rails 3.0: The Pain Points
 
Hierarchy Viewer Internals
Hierarchy Viewer InternalsHierarchy Viewer Internals
Hierarchy Viewer Internals
 

Viewers also liked (9)

M. Laudisa Executive Profile (www.exec-profiles.com)
M. Laudisa Executive Profile (www.exec-profiles.com)M. Laudisa Executive Profile (www.exec-profiles.com)
M. Laudisa Executive Profile (www.exec-profiles.com)
 
Vacation Spot[1]
Vacation Spot[1]Vacation Spot[1]
Vacation Spot[1]
 
071102 사진함 전략안
071102 사진함 전략안071102 사진함 전략안
071102 사진함 전략안
 
Teen Leadership Institute
Teen Leadership InstituteTeen Leadership Institute
Teen Leadership Institute
 
Youth Use Social Media for Social Good
Youth Use Social Media for Social GoodYouth Use Social Media for Social Good
Youth Use Social Media for Social Good
 
Volunteer Orientation
Volunteer OrientationVolunteer Orientation
Volunteer Orientation
 
20070920 Roll Project
20070920 Roll Project20070920 Roll Project
20070920 Roll Project
 
Tecnicatura En Informatica De Gestion 2003
Tecnicatura En Informatica De Gestion 2003Tecnicatura En Informatica De Gestion 2003
Tecnicatura En Informatica De Gestion 2003
 
Mustawa Ali Lil Mawaris
Mustawa Ali Lil MawarisMustawa Ali Lil Mawaris
Mustawa Ali Lil Mawaris
 

Similar to developing Xul

Sergey Ilinsky Presentation Ample Sdk
Sergey Ilinsky Presentation Ample SdkSergey Ilinsky Presentation Ample Sdk
Sergey Ilinsky Presentation Ample Sdk
Ajax Experience 2009
 
Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator
Alessio Ricco
 
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...
Whymca
 
Ajax with DWR
Ajax with DWRAjax with DWR
Ajax with DWR
gouthamrv
 

Similar to developing Xul (20)

Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
 
Webapps development on ubuntu
Webapps development on ubuntuWebapps development on ubuntu
Webapps development on ubuntu
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Google Back To Front: From Gears to App Engine and Beyond
Google Back To Front: From Gears to App Engine and BeyondGoogle Back To Front: From Gears to App Engine and Beyond
Google Back To Front: From Gears to App Engine and Beyond
 
Sergey Ilinsky Presentation Ample Sdk
Sergey Ilinsky Presentation Ample SdkSergey Ilinsky Presentation Ample Sdk
Sergey Ilinsky Presentation Ample Sdk
 
XPages Blast - ILUG 2010
XPages Blast - ILUG 2010XPages Blast - ILUG 2010
XPages Blast - ILUG 2010
 
Profusion of RIAs
Profusion of RIAsProfusion of RIAs
Profusion of RIAs
 
Progscon 2017: Taming the wild fronteer - Adventures in Clojurescript
Progscon 2017: Taming the wild fronteer - Adventures in ClojurescriptProgscon 2017: Taming the wild fronteer - Adventures in Clojurescript
Progscon 2017: Taming the wild fronteer - Adventures in Clojurescript
 
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFlex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
Titanium appcelerator best practices
Titanium appcelerator best practicesTitanium appcelerator best practices
Titanium appcelerator best practices
 
vodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev toolsvodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev tools
 
Bye flex. Hey js.
Bye flex. Hey js.Bye flex. Hey js.
Bye flex. Hey js.
 
Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator
 
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails Devs
 
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over WebsocketIntroduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
 
Ajax with DWR
Ajax with DWRAjax with DWR
Ajax with DWR
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

developing Xul

  • 1. Developing XUL Application - Mozilla For RIA 김대웅
  • 2. Contents Contents 1. RIA? 2. XULRunner? 3. Developing With XULRunner 4. Blog Writer 5. Q&A 2
  • 3. RIA? RIA ? Installation & Updates Using Anywhere Richer Than Web Standard Allow offline use of Application Client/Server Balance Network Efficiency 3
  • 6. XULRunner? XULRunner ?a Mozilla runtime package (GRE) that can be used to bootstrap XUL+XPCOM applications XPCOM SVG Gecko rendering XSLT engine XMLHttpRequest XUL DOMParser XBL Web Services (SOAP) File picker Embeding APIs Helper app dialog/UI Extension Manager 6
  • 7. XULRunner? XPCOM Cross Platform Component Object Model Reusable cross-platform libraries Virtually all of the functionality of Gecko XPConnect - quot;Scriptablequot; IDL interfaces 7
  • 8. XULRunner? XUL XML User Interface Language <window> <menubar id=quot; menubaridquot;> <menu id=quot; menuid“ > <menupopup> <menuitem > </menupopup> </menu> </menubar> <toolbar id=quot; toolbaridquot;> <toolbarbutton > </toolbar> <!-- your code here 8
  • 9. XULRunner? Roadmap XULRunner 1.8.0.x ~= firefox 1.5 XULRunner 1.8.1 ~= firefox 2.0 XULRunner 1.9 ~= firefox 3.0 XULRunner Based Application SpiceBird SongBird Google AdWords Editor Flickr Uploadr 3.0 Joost … 9
  • 10. XULRunner vs Adobe AIR AIR Adobe Integrated Runtime A runtime environment for building RIAs using Flash, Flex, HTML and Ajax, that can be deployed as a desktop application. Features Local file system access Native Drag N Drop UI Controls SQLLite embed Webkit Ajax framework Support Rich Media and Video Tools Flex Builder Aptana Dreamweaver extention 10
  • 11. XULRunner vs Adobe AIR XULRunner AIR Language Html, xul & javascript Html,mxml, javascript & actionscript Rendering Engine gecko Webkit RDBMS Yes Yes UI Controls XUL Flex Comp. API XPCOM Flash, Flex APIs DnD Yes Yes Access FileSystem Yes Yes Cross Platform Window, linux, mac Window, linux, mac Web Launcher No Yes 11
  • 12. XULRunner vs Adobe AIR Desktop Based RIA XULRunne r AI R Flex, SilverLight AJA X Web Based RIA 12
  • 13. Developing With XULRunner Developing With XULRunner 13
  • 14. Developing With XULRunner Simple Application Demo 14
  • 15. Developing With XULRunner Structure application.ini entry point, application information chrome.manifest register resource location by “chrome://” URI EX) content myapps content/myapps/ Preference.js setup application preferences EX) pref(quot;toolkit.defaultChromeURIquot;, “chrome: //myapps/content/myapps.xul quot;); 15
  • 16. Developing With XULRunner Tools Orangevolt eclipse plugin XUL Explorer 16
  • 17. Developing With XULRunner Debugging Function dump() pref(quot;browser.dom.window.dump. enabledquot;, true); Javascript dump(quot;my text herenquot;); Console pref(quot;javascript.options.showInCons true); Components.utils.reportError(str); function jsdump(str){ Components.classes['@mozilla. org/consoleservice;1'] Venkman Debugger .getService(Components.interfaces. nsIConsoleService) .logStringMessage(str); } 17
  • 18. Developing With XULRunner Libraries Mozilla Fuel A JavaScript Library to help developers build extensions new in Firefox 3 Objective s easy access interfaces, components and services. threaded wrapper for nsIProcess convenience wrapper for file, text or stream var cs = Components.classes['@mozilla.org/consoleservice;1'] .getService(Components.interfaces.nsIConsoleService); var cs = MOZILLA.ConsoleService(); 18
  • 19. Developing With XULRunner Libraries Mozdev JSLib make life easier for developers by providing a general purpose library Modules Debug install jslib.init(this); var file = Components.classe io include (jslib_file); (Components.interfaces.nsILo network var file = new File(quot;c: file.initWithPath(quot;c:tmpfoo.d rdf tmpfoo.datquot;); var ioService = Components. sound file.open(quot;wquot;); getService(Components.inter utils file.write(quot;This is a var uri = ioService.newFileUR xul testnquot;); var channel = ioService.newC zip file.close(); var outputStream = Compone stream;1quot;].createInstance(Co outputStream.init(file, 0x20|0x var buffer = quot;This is a testnquot;; outputStream.write(buffer, bu 19 outputStream.flush();
  • 20. Developing With XULRunner Libraries Extras Use your Favorite Javascript Libraries. Prototype Jquery Mootools Extjs ... Anything You Like 20
  • 21. Blog Writer Blog Writer : Objective Try developing the Desktop RIA with Web Standard and Open API 22
  • 22. Blog Writer Building Blocks Trimpath Template MetaWeblog API PowerEditor nsDragAndDrop.js Components.interfaces.nsIIOService Components.interfaces.nsILocalFile Components.interfaces.nsIFileInputStream Components.interfaces.nsIBinaryInputStream 24
  • 23. Reference Reference http://developer.mozilla.org/en/docs/XULRunner:What_XULRunner_Provides http://www.xulplanet.com http://books.mozdev.org/html/index.html http://www.simonwhatley.co.uk/rich-internet-applications-a-background http://www.adobe.com/products/air 25