XUL, 4th-generation programming language

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

XUL, 4th-generation programming language

#1 Post by Lobster »

XUL comes from the film "Ghosbusters" and is a 4th generation programming language, that will be of most interest to those used to HTML, javascript and XML

I am still getting familiar with this technology. It suits Puppy because it is small and fast and is already available to any Mozilla or Firefox user.

Here is an intro for HTML users:
http://www.informit.com/guides/content. ... m=100&rl=1


Here are ways of creating interfaces - this is just examples:

Ways of creating interfaces
http://www.hevanet.com/acorbin/xul/top.xul

This is a practical on line program used by Amazon:
http://www.faser.net/mab/chrome/content/mab.xul
(view source to see how XUL code looks)

If you find out any interesting links or wish to explore use this thread

8)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

First XUL

#2 Post by Lobster »

My first tentative (pre alpha attempt at XUL can be found incorporated here (click on HELP)
http://www.murga.org/%7Epuppy/viewtopic.php?p=8955#8955

The basic XUL file used contains the following XML code which is not too hard to follow for those used to HTML and XHTML . . .

It is buggy and full of mistakes - but parts of it run and it does look rather good when running . . .

In theory whole on-line programs can be built in XUL . . .

8)

Code: Select all

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>

<window title="PUPPY XUL"
        xmlns:html="http://www.w3.org/1999/xhtml"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<description><html:h1>Woof! Woof! ~ Welcome to Puppy - preview mode - pre Alpha</html:h1></description>

<vbox flex="1" style="overflow: auto">

<groupbox>

  <groupbox>
    <tabbox  flex="1">
      <tabpanels flex="1" style="border-bottom: 0px solid" >
   
    <hbox>
        <vbox align="center">
          <image src="puplogo.jpg" />
            <label value="Ay Chiwawa" />
          <tooltip id="moretip" orient="vertical" style="background-color: #33DD00;">
            <description value="Click here to see more information"/>
            <description value="Really!" style="color: red;"/>
          </tooltip>
        </vbox>
   </hbox>  

   <label value="Tf;jasfjf;k" tooltip="moretip" />

<textbox multiline="true" value="
 

Change icon text: right-click desktop icon, select Rox-Filer, Options. Click Pinboard 

 

Virtual Screen: Right click and drag the screen selector (bottom right) 

 

Puppy IRC anywhere: Go to http://das.funzt.org/cgi-bin/irc.cgi replace nickname, server=irc.ICQ.net, Channel=#puppylinux 

"/> 

  <hbox>
    <vbox align="center">
      <image src="chiwawa.jpg" />
      <label value="Ay Chiwawa" />
    </vbox>
   </hbox>

     <label value="Facilities"  />

<textbox multiline="true" value="
 

   HolyGeeks:  

 

   Puppy Linux:  

 

   Tmxxine:  

"/> 

 <hbox>
    <vbox align="center">
      <image src="killer_108.jpeg"/>
      <label value="Ay Chiwawa"/>
    </vbox>
 </hbox>

       <label value="Tips"/>
       <label value="Facilities"/>
       <label value="Tips"/>
       <label value="credits info here . . .Created In XUL by Lobster"/>

  </tabpanels>
    <tabs flex="1"               class="tabs-bottom">
       <tab label="Welcome"      class="tab-bottom" />
       <tab label="Facilities"   class="tab-bottom" />
       <tab label="Tips"         class="tab-bottom" />
       <tab label="Welcome2"     class="tab-bottom" />
       <tab label="Facilities2"  class="tab-bottom" />
       <tab label="Credits"      class="tab-bottom" />
    </tabs>
  </tabbox>

</groupbox>
</groupbox>

 <groupbox flex="1">
   <caption label="These are menubuttons." />
   <hbox>
     <button flex="1" type="menu" label="Menu">
       <menupopup>
         <menuitem label="Option 1" oncommand="setText('menu-text','Option 1');" />
         <menuitem label="Option 2" oncommand="setText('menu-text','Option 2');" />
         <menuitem label="Option 3" oncommand="setText('menu-text','Option 3');" />
         <menuitem label="Option 4" oncommand="setText('menu-text','Option 4');" />
       </menupopup>
     </button>
    
   </hbox>
   <hbox pack="center">
     <description  id="menu-text" value="(no input yet)" />
   </hbox>
  </groupbox>

   <groupbox>
     <description>
           This site created by Lobster in XUL
    </description>
   </groupbox>
<button oncommand="nsPreferences.setUnicharPref('browser.startup.homepage', 'www.xyz.com');" label="set home page"/>
</vbox>
</window>
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

Mathiasdm-not-logged-in

#3 Post by Mathiasdm-not-logged-in »

I like it! I'm going to check that out :)

Mathiasdm
Posts: 100
Joined: Thu 05 May 2005, 07:52

#4 Post by Mathiasdm »

I like creating web pages using HTML, and XUL looks quite the same.
Would it be possible to create standalone applications using XUL?
If not, is it possible to make XUL inside the browser perform actions outside the browser? (like launch programs and such)

edit: I found something called XULRunner.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#5 Post by GuestToo »

Mathiasdm wrote:... is it possible to make XUL inside the browser perform actions outside the browser? (like launch programs and such) ...
actually, you can do that with Mozilla/Firefox ... probably Opera

for Firefox:

make an executable script (for Puppy 1.0.4, you should be able to right click a folder in Rox and select New, Script)
call it something like myscript.pupp ... make sure the name has a .pupp extension ... put some shell commands in the file, something like:

Code: Select all

#!/bin/sh
xmessage -center "Hello, World"
if you browse to the location of the file (for example, if you put myscript.pupp in /tmp, you could type /tmp in Firefox's url bar) ... Firefox should display the script as text

add a line something like this to the bottom of /etc/mime.types:

Code: Select all

type=application/x-puppy-exec-file desc="Puppy Executable" exts="pupp"
now if you click myscript.pupp, it should open an Open With/Save As window ... click Open With, tell it to Open With /usr/local/bin/rox, and check the Do This With Files Automatically From Now On box

now if you click myscript.pupp in Firefox, it should automatically run the file as if you clicked it in a rox window

if you link to the file in an html page, using something like href=file:///tmp/myscript.pupp ... it should run the program when you click the link

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#6 Post by Lobster »

Yes it is possible to make standalone programs with XUL runner but most are dependent on running the widgets and programs that are provided with Mozilla.

Thunderbird is an application written in XUL.

Launching and running programs is possible by giving special chrome permissions (javascript and java are restricted from doing things that might invite rogue programming) HTML can include XUL commands and XUL can include HTML and javascript and call other programs and load in and save files etc.

I am still very new to XUL. There are some things to bare in mind. XUL programs will run in FireFox and Mozilla based browsers on WIndows, Mac, Linux. and BSD

XUL does not run on Opera, IE or Dillo
I have not yet found an IDE or WYSIWYG way of putting together buttons and menus etc but it will arrive.

There are other things required to make the most of XUL - for example like other XML it requires a style sheet - not looked at this yet.

Keep us updated with how you get on and any good links or tips

:)

Here is a great link with a guy developing a WP and other apps all using XUL
http://www.georgenava.com/applauncher.php
If for example you click on XUL studio you will see a WYSIWYG designer is in preparation . . . Maybe we should register an interest.

You do not have to be on line to run XUL programs. They also reuse existing components within Mozilla

The browser IS the Internet :)
Last edited by Lobster on Thu 15 Sep 2005, 09:50, edited 2 times in total.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

thoughtjourney
Posts: 61
Joined: Thu 05 May 2005, 01:30
Location: Sutton, NSW

#7 Post by thoughtjourney »

i'm intrigued, Lobster. I'll have to check it out sometime whe i get half a thought to myself. Thanks
in the beginning was the Logos

http://thoughtjourney.aus.cc

Mathiasdm
Posts: 100
Joined: Thu 05 May 2005, 07:52

#8 Post by Mathiasdm »

Okay, I'm back from a 10-day journey. I'll get to work (mostly research ;-) ).
edit: http://books.mozdev.org/
I'll get started right now :-P

delphi
Posts: 19
Joined: Mon 05 Sep 2005, 02:25

Re: XUL, 4th-generation programming language

#9 Post by delphi »

Lobster wrote: XUL comes...
If you find out any interesting links or wish to explore use this thread
8)
Lobster, you might want to check out Byzantine OS ( http://byzgl.sourceforge.net/ ) mini distro which already implemented the ideas you're talking about here using XUL quite a while ago (2 years?).

Byzantine OS is quite unique in that it uses Mozilla as the desktop. Not only it gives you the browser, email and simple word processor (ie.composer) but includes some plug-ins (ie.java) , some additional apps (mplayer, gaim and some simple games) and simple packaging system. I think the UI could have been developed much further but even now it is quite an amazing and unique little distro.

Sadly, the development has stopped over a year ago - unlike with Puppy, there was just one active developer and no forum to speak of either. A valuable lesson for any distro developer, I think... However, I'm sure, sooner or later, someone will pick up the ideas Byzantine OS implemented and take them further.

Here are some screenshots to give you a better idea ( http://byzgl.sourceforge.net/screenshots.html ).

Regards,
delphi

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Re: XUL, 4th-generation programming language

#10 Post by Lobster »

Hi Delphi,

Welcome to the kennels you are our 600th resident which you will see mentioned in the wiki news.
http://www.goosee.com/puppy/wikka/LatestNews

:)

I never downloaded the Byzantine OS, perhaps because the project was abandoned. Now perhaps it would be worth looking at, to see what can be learnedt and salvaged.

There are two main approaches to in-browser programming the other one being the Ajax approach. Ajax is much harder to implement (best really suited to many programmers / commercial undertakings and uses a kludge type mentality). Basically it makes use of javascript and server side programs to deliver services such as the excellent Google map service.
Any company that can make a buck from delivering a unique service will then do very nicely - thank you - MS likes it of course . . . except for one thing - this mapping service (link it to services) will make Google the richest company in the world (in a few years time) Of course the wikimedia project might be working on wikimap (even as we speak) and that might change the situation somewhat . . .

[ahem . . . am I rambling again fellow Puppys?]

The other tool is zool (XUL) which is client centered. Clean and suited to individuals providing extra functionality. Thunderbird and Firefox are written in XUL. A map service written in XUL could access the data from Googlemap, strip the ads, hype (has not arrived yet) and display the information requested and required. People power. Must be a Puppy thing . . .

Go Puppy - Go XUL
Last edited by Lobster on Wed 06 Oct 2010, 03:16, edited 1 time in total.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

delphi
Posts: 19
Joined: Mon 05 Sep 2005, 02:25

Re: XUL, 4th-generation programming language

#11 Post by delphi »

Lobster wrote: Go Puppy - Go XUL
Hmm...

I wonder if anyone tried to create mozilla-only Puppy (Pupzilla http://www.timelord.co.uk/rf/gallery/RF ... 35_d41.jpg anyone :? ) - just like in Byzantine OS, no desktop - just Mozilla. I've had an exchange with someone on another forum who was very keen on a bare-bones browser based distro which could be run on old computers (ie. lean and mean - the existing solutions so far are too much of a bloatware). Of course, it's easy to imagine many other kiosk-type usages: libraries, community centers or just for many people (like my father in-law) who would prefer a simple setup.

The basic functionality would be:

1) Browser (of course),
2) Email,
3) Calendar,
4) Simple word processor (Composer with default format set to rtf plus some more changes),
5) Chat/telephony service,
6) Set of basic plug-ins (choice of flash, pdf reader, mplayer and maybe java),
7) Root-only system settings (that would also include access to terminal),
8 ) Anything else provided by Mozilla extensions.

I do hope SeaMonkey developers will be successful in their effort to keep Mozilla suite alive - in many situations it just makes more sense to have and integrated (but plug-able) environment than separate browser and email (composer/nvu, calendar,...) .

+++

You've mentioned Google and services - clearly that's the way they are heading. In fact, I wouldn't be surprised if they're already working on a 'free' (of course) browser-only 'thin-client' linux distro tied up to their back-end services. 2GB of email storage is a lot. In fact, plenty for other type of data as well: documents, photos...And the 'complete' storage would, of course, be complemented by on-line apps manipulating all that data. On-line Picasa anyone...?

Interesting times ahead...Bill should be worried :wink:

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Re: XUL, 4th-generation programming language

#12 Post by Lobster »

delphi wrote:
I wonder if anyone tried to create mozilla-only Puppy (Pupzilla http://www.timelord.co.uk/rf/gallery/RF ... 35_d41.jpg
The version of Puppy most suitable for Time Lords is here:
http://peace.wikicities.com/wiki/Tmxxine_Linux

In this brane (slice of reality) Puppy and Linux Tmxxine are identical and called "Puppy Linux"

We shall see how things develop . . .
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

delphi
Posts: 19
Joined: Mon 05 Sep 2005, 02:25

Re: XUL, 4th-generation programming language

#13 Post by delphi »

Lobster wrote: The version of Puppy most suitable for Time Lords is here:
http://peace.wikicities.com/wiki/Tmxxine_Linux
I've checked your website - I'm afraid your Tmxxine Linux is far too ambitious for this humble earthling :wink:

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Re: XUL, 4th-generation programming language

#14 Post by Lobster »

delphi wrote:
Lobster, you might want to check out Byzantine OS ( http://byzgl.sourceforge.net/ ) mini distro which already implemented the ideas you're talking about here using XUL quite a while ago (2 years?).
:-)
Yes tried ByzantineOS - in it now in fact, and yes it is very interesting. Shame it was abandoned. If you decide to download (this is one of the things that put me off) - it uses gzip on the ISO - so if you are using burnCDCC on Windows (yes to my shame I still use this reliable method) then download 7zip from priclessware2005.org to ungzip on Windows . . .

Anyways back to playing with ByzantineOS ;)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

delphi
Posts: 19
Joined: Mon 05 Sep 2005, 02:25

Re: XUL, 4th-generation programming language

#15 Post by delphi »

Lobster wrote: Yes tried ByzantineOS - in it now in fact, and yes it is very interesting.
ByzantineOS took the ideas (and some code) from OEone HomeBase - from the guys who developed Penzilla ( http://freshmeat.net/projects/penzilla/ ) and implemented it as a micro (<50mb) distro. I've played with it for a while back a year ago but had problems getting support (eg. no support for winmodems). I really feel there's a room for something like that in the market place and someone will re-start the development with updated apps and more streamlined GUI. Puppy is an amazing little distro (can't help but think of it as a sheep farm working dog - not pretty but working hard and dependable... ;) ) and a joy to use for someone like myself. However, for my wife, kids or my parents, I would prefer something even simpler - hence the ByzantineOS and Pupzilla idea... Come to think of it it, would be a great case for the SeaMonkey guys to show off the integrated apps approach advantages...
Lobster wrote: Anyways back to playing with ByzantineOS ;)
"How to build ByzantineOS from scratch ?"( http://byzgl.sourceforge.net/faq.html ) - have fun :wink:

BTW. On WinXX I use DVD Decrypter to burn ISOs - it works every time!

Post Reply