MozillaZine

Delivering Rich Web-based Applications with Mozilla

Wednesday December 4th, 2002

Andy Cavatorta writes: "Mozilla can be used to deliver rich stand-alone applications as easily as you can deliver documents. And I brought proof!

"My example is a client program that generates and manages a rich GUI, processes data, and communicates with the server in the background. There's even some server push and snap-in code libraries. And it's all W3C compliant. Proof of the power of the lizard!"

Andy's application is an email client called Nervemail which runs entirely in a browser. It allows you to set up multiple POP3 mail accounts and then access your messages through a Web-based GUI. A demo is available on the site. If you decide to set up an account, remember that the application is still in the alpha stage of development, so don't rely on it for anything important. You'll probably want to check the 'leave mail on server' box for each of your POP3 accounts (in Edit > Options) so that you can still collect your mail with your regular email client.

#1 Very nice

by robdogg

Wednesday December 4th, 2002 10:28 PM

Nice, very nice. Assuming that applications of this type take off, is there a mechanism of associating the mailto: protocol to the particular web apps?

#9 Re: Very nice

by GAThrawn

Thursday December 5th, 2002 5:26 AM

Don't know how up to date it is these days, but in the past I've used Protozilla http://protozilla.mozdev.org/ to associate these protocols (such as mailto:) with various offline and web-based apps.

#2 How about a 101

by sime

Wednesday December 4th, 2002 11:06 PM

Could someone document how to start such a task ? Including programming examples. In a _basic_ sort of way

#3 How about a 101

by sime

Wednesday December 4th, 2002 11:34 PM

Could someone document how to start such a task ? Including programming examples. In a _basic_ sort of way

#4 Nervemail is Ugly

by Lancer

Thursday December 5th, 2002 12:47 AM

I prefer Mozilla Mail & Newsgroups, is less ugly than Nervemail.

#5 Re: Nervemail is Ugly

by bzbarsky

Thursday December 5th, 2002 1:14 AM

Amazing. The page says "it's still in the alpha stages of development". You go and compare it to a product that's been in development for 4 years and has shipped 3 stable releases. Why?

#10 I bet it skins

by bmacfarland

Thursday December 5th, 2002 5:39 AM

I'm just taking a stab looking at the sophistacation of this program that it's probably skinnable.

#25 Re: I bet it skins

by grayrest

Thursday December 5th, 2002 10:30 PM

I'm guessing it's a XUL app whose apperance is entirely driven by CSS (like mozilla), thus skinnability is a given.

#27 Re: Re: I bet it skins

by asa

Thursday December 5th, 2002 11:05 PM

It's written in JS and relies heavily on the W3C DOM so it works well in Mozilla and I'm sure that it could be easily styled but it's not XUL.

--Asa

#6 Howto?

by lstep

Thursday December 5th, 2002 3:58 AM

Tha's right, seeing that it's possible is cool, but having some starting points/howtos would be even better.

#7 Documentation and Libraries

by andyc

Thursday December 5th, 2002 5:06 AM

Hi folks, Thanks for taking the time to look at this. I've gotten a lot of helpful feedback email.

I think the end product for Nervemail will be an open codebase for delivering stand-alone programs that don't just look like desktop apps, but actually *work* like them. By that I mean that all of the program logic is in the client and the server is only used as data storage and a network proxy.

So it will be a bunch of open libraries and the accompanying documentation.

But first I've got to get it out of the Alpha phase :)

thanks again, all

#8 More details needed

by baluba

Thursday December 5th, 2002 5:20 AM

Well very impressing. Though some more technical specs with particular regard to Mozilla tecnologies used would be welcomed. Also it'll be nice to see Mozilla acknowleged as a platform. I do understand that these kind of information has any interest for the average user, but just put them in separate pages for the pleasure of people willing to dig a bit more.

Thanks

#11 Does not work for me ...

by johann_p

Thursday December 5th, 2002 8:06 AM

I am trying to launch nervemail using the demo login under linux, with a recent nightly, but nothing whatsoever happens

#12 server pinned :(

by andyc

Thursday December 5th, 2002 10:07 AM

Yikes. I expected traffic but not this much. My new server should be arrriving today; but apparently that's a day late. The current Nervemail server is pinned at 100% CPU useage and has been for several hours. That's probably why some of you can't get in. I can't even get in right now. You can try back later when the feeding frenzy is over, though. Sorry for the inconvenience.

#23 Don't let Slashdot know

by Kommet

Thursday December 5th, 2002 7:17 PM

Just think of what would have happened if people posted this on Slashdot!

/me quietly runs of to post on Slashdot and laughs evil laugh...

(Kidding)

#13 A couple of questions

by bmacfarland

Thursday December 5th, 2002 11:32 AM

"And it's all W3C compliant." -- did I detect a "moz-radius" on those TDs ;-) ?

Aside from that, this seems like tremendous software. And it could be one of the first uses of Mozilla as an application platform outside of Mozilla and Mozdev that I've used. I don't feel like I'm using a browser for the first time in forever.

Question #1, if this is based on Mozilla as a platform, how does it easily translate to run on IE (for instance)? Question #2, if it's Mozilla as a platform will it run with the project that is like a stub of Mozilla designed to run things as Mozilla without requiring you install the browers (I forget the name of the project)?

I think that's about all I have for now.

#17 Re: A couple of questions

by asa

Thursday December 5th, 2002 3:06 PM

As I understand it, this is a JavaScript application that runs inside Mozilla. It could probably be made to run inside any browser with a sufficiently sophisticated JavaScript engine. The Mozilla platform here is really Mozilla as powerful layout and JS engines. I could be totally wrong but that's how I see it. The thing that makes this so special, as I see it, is that it does so much of the work on the client (Mozilla + the nervemail JS code) rather than on the server like most current web apps.

--Asa

#18 Asa's right. About everything, actually :)

by andyc

Thursday December 5th, 2002 3:51 PM

This doesn't use any of the fancy Mozilla-as-a-platform tools. I actually didn't know about them when I started this project way back when with Moz 0.9. This uses Gecko and JS.

I chose Mozilla over IE because it broadly supports the juicy parts of the W3C DOM that make this kind of thing possible. And being able to work with the W3C specs as my main documentation was a nice feeling.

I wanted to build a client that could be moved easily from server to server.

#19 Re: A couple of questions

by andyc

Thursday December 5th, 2002 3:54 PM

Okay, you caught me. I did use -moz-radius and -moz-opacity too. But that's in no way part of what makes this work. It's just a nice decoration. If those styles were ignored, the whole app would still work the same way. It would just look pointier. :)

#24 I was just joking...

by bmacfarland

Thursday December 5th, 2002 9:09 PM

I was kidding about the Moz-radius. In fact I was just jealous of the rounded edges and wanted to see how to do that. Can we urge the W3C to consider some kind of radius here? :-)

#26 Re: I was just joking...

by grayrest

Thursday December 5th, 2002 10:39 PM

radius is actually in the working draft for CSS3. I'd prefer to push for the ability to write text vertically (take it and rotate it 90degs clockwise/counter clockwise) as it would allow the ability to put tabs on the side of something rather than just the top and bottom and still have it look good.

#28 Re: A couple of questions

by AlexBishop

Friday December 6th, 2002 12:53 AM

"did I detect a "moz-radius" on those TDs ;-) ?"

IIRC, vendor-specific CSS is allowed by the standards, as long as the properties are prefixed by the correct vendor token (so "-moz-" in this case).

Alex

#14 How is this new?

by erik

Thursday December 5th, 2002 12:43 PM

First of all I'd like to say that Nervemail is pretty nice...

But things like these have been available for IE since 98. It is not until lately that Mozilla has become good enough for things like these to become a reality.

Similar applications:

Muse.net (MP3 media manager with clients for Moz and IE) HalfBrain (IE4+, bought by Blox.com, Spread sheet application, discontinued) OddPost.com (IE5+) WebOS.com (IE5+, discontinued) Outlook look alike proof of concept by Ed Bolzer (IE5+, http://www.stedy.com/ieWidgets/webOutlook/webOutlook.htm) probably tons more but you get the point

erik

#15 Re: How is this new?

by erik

Thursday December 5th, 2002 12:45 PM

Wow, this forum totally screws up formatting...

Link to Ed Boltzer's site http : // www . stedy . com, http://www.stedy.com

erik

#16 Re: How is this new?

by Beafsteak

Thursday December 5th, 2002 2:41 PM

Well, as far as I can tell all these pages just use normal HTML with CSS stylings and have all the real work done on the server, i.e. sending completely new pages for every datasource access. This is nothing new really, I bet with a little bit work even NS 4.x could have done this. Nervemail on the other hand just sends the data itself to the client, which then dynamically constructs a HTML (or in this case XUL I think) page on it's own.

#20 Re: Re: How is this new?

by erik

Thursday December 5th, 2002 5:43 PM

Just like all those apps/environments I previously mentiopned did.

The only difference is that previously a lot of IE specific technology was needed. Now a lot of Mozilla specific technologies are.

I still long for the day when things like these can be done without any browser dependencies. But I guess that is never going to happen because the W3C does not target this when designing the standards.

#21 Re: Re: Re: How is this new?

by asa

Thursday December 5th, 2002 5:54 PM

" I still long for the day when things like these can be done without any browser dependencies. But I guess that is never going to happen because the W3C does not target this when designing the standards."

Eric, you obviously haven't looked closely at this technology. The reason the author chose Mozilla was because of Mozilla's world-beating support for Web standards like the W3C DOM and ECMAScript (JavaScript). This client sounds far closer to your ideal than any of the apps you mentioned. When the other browsers support the standards as well as Mozilla then maybe your dream will be realized.

--Asa

#36 Re: Re: Re: Re: How is this new?

by erik

Friday December 6th, 2002 12:04 PM

I do have looked closely at this. If you were into this scene you would know that :-) I love Mozilla and I love the W3C DOM but like previously stated the standards are not targeted at web applications. They are targeted at generic XML documents (maybe rightly so). A simple case is that there is no way to replace offset* with W3C DOM methods. (Another case is the scroll model.) There are tons of cases where features of modern web browser cannot be achieved using standards only. erik

#37 Re: Re: Re: Re: How is this new?

by erik

Friday December 6th, 2002 12:05 PM

This is getting anoying. How do I get a paragraph in this message board? Somehow it insists on removing all new line characters.

#40 Re: How is this new?

by WillyWonka

Saturday December 7th, 2002 2:07 PM

To get a new paragraph, press

enter twice.

As far as I know, there is no way to get just a new line.

#41 New paragraphs

by AlexBishop

Saturday December 7th, 2002 3:46 PM

"To get a new paragraph, press enter twice."

That used to work but it's busted right now. It just gives a new line.

"As far as I know, there is no way to get just a new line."

Correct.

Alex

#30 Re: Re: How is this new?

by Gerv

Friday December 6th, 2002 2:27 AM

The UI isn't XUL; it's standards-compliant XHTML. It will therefore work in any browser which has Mozilla's level of standards support.

Gerv

#22 unclear on the concept

by andyc

Thursday December 5th, 2002 6:43 PM

Erik. You have to like it or anything. But you're obviously missing the point about how this works.

It's not a DHTML page like you seem to think. It's a stand-alone application that's built upon Moz's ass-kicking support of standards. Look at the "features" page on the site and you will see what it is.

And I chose Mozilla *because* of its standards support - after tossing out IE for it's lack of same. I used the W3C specs as my reference while building this - and the match was perfect. How much closer to standards can you get?

The only Moz-specific stuff I used was for decoration: curved edges and transparency in the menus.

#29 Re: unclear on the concept

by eiseli

Friday December 6th, 2002 2:24 AM

> The only Moz-specific stuff I used was for decoration: curved edges and transparency in the menus.

Which anyways will be there with CSS3.

#31 Code question

by pepejeria

Friday December 6th, 2002 3:37 AM

Nice, though it would be interesting exactly why this does not work in IE at the moment, what in the Mozillas DOM support and Javascript support have you used that is not available in IE 6?

#39 Re: Code question

by andyc

Friday December 6th, 2002 4:07 PM

That would ba a long list. But the first two things that come to mind are:

1. An event model that really works. The W3C's event model (used in Moz) is nimble, powerful, accessable, and actually straightforward and usable. And in the few spots where there is ambiguity in the W3C spec, Moz implementations fill in the gaps with with practical and consistent solutions. And addEventListener() is just *so* much more nimble than onmouseover etc..

2. Support for extention of pretty much any DOM element as a programming object by adding custom methods and properties. IE does that a wee bit. Moz does it very thoroughly. And you can just imagine what THAT opens up!

3. While both browsers have their crash bugs, Moz is the one that holds up under serious scripting and memory loads.

I've occasionally plucked widgets out of this codebase to use in apps I make for clients. To make things work in IE takes a lot more code and time. And the code gets filled up with weird hacks to get around IE's limitations. And it's a sad thing to have to fill clean code with hacks.

I'd like to port Nervemail to IE someday. But I never would have had the fortitude to build the prototype in IE with just JS and XHTML. The hacks and cruft would totally obscure the architecture, and a clean structure would not have emerged. It's like, you could probably write a Java implementation made out of DOS batch files. And you could probably build the Eiffel Tower with bars of wet soap if worked reeeeaally hard. But you wouldn't do it.

Remember that MS invested so much in taking over the browser market to *prevent* the Web from replacing the OS.

Like many other people, the application-in-a-browser idea grabbed me back in '96 when javascript shipped with Navigator 2.0. After all these years, Moz makes it possible. And it's even standard!

#32 security concerns

by thbecker

Friday December 6th, 2002 5:37 AM

To be honest I'm shocked. Is it possible to load "DOM code" with a single click into Mozilla and this code could then read my files, send them to the network, and do other unwanted things?

I trust Mozilla to a certain degree because I somewhat know -- at least I hope -- what local information is accessed and what is sent to the network. But if it's so simple to extend the browser to an arbitrary application, maybe even without a notice to the user, I'm really concerned. Is there a "sandbox" for Mozilla like e.g. for JAVA?

The "proof of the power of the lizard" is really impressive, though.

Thomas

#34 Re: security concerns

by andyc

Friday December 6th, 2002 6:24 AM

Nervemail can't see your local filesystem. So there's no security concern. The most it does is some fancy stuff with sticking little XML docs into cookies to report client errors back to the server.

I've planned for Nervemail to have filesystem access someday - so it can run offline and store mail data and libraries on the client. But the user would have to grant permission to a signed script. There isn't any sneaky way to do it.

So you're safe.

#33 security concerns

by thbecker

Friday December 6th, 2002 5:40 AM

To be honest I'm shocked. Is it possible to load "DOM code" with a single click into Mozilla and this code could then read my files, send them to the network, and do other unwanted things?

I trust Mozilla to a certain degree because I somewhat know -- at least I hope -- what local information is accessed and what is sent to the network. But if it's so simple to extend the browser to an arbitrary application, maybe even without a notice to the user, I'm really concerned. Is there a "sandbox" for Mozilla like e.g. for JAVA?

The "proof of the power of the lizard" is really impressive, though.

Thomas

#35 Re: security concerns

by bzbarsky

Friday December 6th, 2002 10:59 AM

> Is it possible to load "DOM code" with a single click into Mozilla

Yes. Most web pages out there do it. It's called a <script> tag. ;)

> this code could then read my files,

It has to ask for your permission to do that

> send them to the network

If you gave it permission, yes.

#38 Re: UNFOUNDED security concerns

by SomeSmartAss

Friday December 6th, 2002 2:13 PM

"But if it's so simple to extend the browser to an arbitrary application, maybe even without a notice to the user, I'm really concerned."

Kind of like an active X? or Bonzie Buddy? While It is possible to do this with XUL, but you still have to agree to download and install the app. Last time I checked, there wasn't a "Accept all XUL app installs" security preference.

While these extensions *may* cause security issues for idiots whjo install anything/everything. The implications of splitting an app, soi that half sits as a shell on your machine, and the othe lives on a server somewhere are mind-boggling.

#42 mime type?

by Akai

Monday December 9th, 2002 4:12 PM

I wanted to check this out, but it loads up as text/plain and is not interp't, so I just get the source.

Might be server problem? or client?

#43 test

by i5mast

Tuesday December 10th, 2002 3:05 PM

<www.yahoo.com>

#44 test

by i5mast

Tuesday December 10th, 2002 3:06 PM

<http://www.yahoo.com>