Creating Applications with Mozilla
On the first and most obvious level, the book is just the typical, thorough treatment of the important APIs that we've come to expect from O'Reilly. There are chapters addressing all of the important layers of the Mozilla platform and plenty of examples that show you how to customize the platform. Some may want to change the icons and others may want to add more robust features. The range of possibilities is surprising and coders are creating one-to-one communications enhancements, add-on widgets, and even games. There are certainly some things missing, and some areas that could use more detail or more complicated examples, but the book is already 454 pages long.
On another level, this book is also one of the first finished documents that explains what the Mozilla group has really been up to for the past five years. Some have abandoned the project, and others have attacked it as fundamentally misguided. This book shows why it took so long by demonstrating all of the cool features added during the long march to a new, thoroughly extensible architecture.
Are the results enough to justify the time and the effort? Some note that the features may be a bit overhyped, because building your own browser with the Mozilla API is like making a pizza with $15 and a telephone. While there's a large part of the book devoted to the work you can do to change the look and feel of the buttons on your browser, the book and the project offer much more. The Mozilla project is one of the biggest threats to simple tools like Visual Basic to come down the pike in some time. The various layers offer many ways to provide good, customizable interfaces to databases, the web, and much more. I can see how many corporate development shops may want to start making Mozilla the platform for a license-free front-end, simply because it's a straightforward tool without extra costs or restrictions.
At the most abstract level, the book is a great way to get a taste of modern software development. Computer scientists sometimes fix problems by adding more and more layers of indirection. This may not solve anything, but at least there are hooks for a real solution to use some time in the future if some one ever does figure out how to make the box do it. The Mozilla browser is one of the most extreme examples of this philosophy to ever emerge. Emacs was something special, but this is even more insane. Everything can be changed around by rewriting some XML and Javascript and most people don't need to juggle the pointers in grubby C to do amazing things. I realize it's not as beautiful as Lisp to some, but it's got a clarity and level of abstraction that's stunning to behold. Lisp was just procedural, while XML is more like logic programming.
This relentless customizability embodies one of the deepest reasons for the success of open source. Technology is inherently complicated and the only way we can use it is if we can look under the hood. You can say all you want about CVS trees and bazaars filled with competing code, but opening up the interface is one of the most powerful themes of open source. It's not about teaching people to build their own VCR or PVR from scratch, getting the VCRs for free or even debugging the VCR's source code -- it's just about making them easy enough to program.
The book illustrates how Mozilla opens up the API to create a relatively easy language for people to use. The real open source is not the C in the tar ball, but the XML interface spelled out in the book. Many people feel that the most important thing that the first browser designers did was make it easy for people to see the HTML tags marking up the document in front of them. The new Mozilla takes this transparency to a new high.
If you look at the book at all of these levels, you can see that this is one of the most important documents to emerge from the open source community in some time. At first glance, it's just another set of APIs for us to wiggle. I realize it's not fair to credit the Mozilla team or the book authors with creating the browser or XML ex nihilio -- they just jumped on some of the most popular bitwagons propagating across the Net. But the result is a stunning completion of a very important and cohesive vision. The book doesn't crackle with bleeding-edge novelty, but shines with the certainty of a job well-done.
Peter Wayner is the author of Translucent Databases , Disappearing Cryptography , and a number of other books. You can purchase Creating Applications with Mozilla from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
from what i've read in the past it sounds like mozilla can be used to develop just about anything. is this true? who has done it? what about applications? it's odd to think of a browser as a platform for application development. i'd really like to get my hands on a good explanation. perhaps this book.
Mozilla just becomes a toolkit and VM to run applications. Think of it like Java. Can you run a java app w/o the JVM? No. It's not executable without it.
It seems Mozilla is working closer and closer to being an OS than just a browser. Kinda funny if you think about it, where MS has windows which was supposed to be an OS and is now including a browser.
-
ping -f 255.255.255.255 # if only
Ugg you got modded insightful. I better clarify before I get modded down:
This article is about the mozilla application framework. The application can be a stand alone application! This is not some kind of "mozilla only webpage."! This is just a method for creating an application that uses parts of the mozilla codebase, or more appropriately (though you and the mdos don't seem to understand the meaning of this) the mozilla application framework.
--
WHO ATE MY BREAKFAST PANTS?
What embedding Mozilla promises to me is the ability display and interact with appropriately transformed HTML and XML documents in any kind of application without having to reinvent all the complex machinery to do that. XML apps like MathML and SVG are particularly important to me, but who wants to write the code to display them? Now lots of things are possible that have little to do with browsers. I like it.
Helium balloons want to be free.
Good troll attempt! I'll give you an A for effort!
Let's see... can I embed IE into my web app?
Nope.
Yes you can. I've done it before, and I currently use three different programs with IE integrated.
Can my IE web app run on almost every platform out there?
Nope.
You're right about this one, but for most commercial apps, hitting 99% of the users is pretty damn good. You can't please all the people all the time.
Can I modify IE in case I need additional functionality?
Nope.
Yup, you sure can. I run a customized version of IE for a few special projects.
Oh yeah, and this has all been true for several years now.
So, 2/3 were flat wrong, and the third one was pretty irrelevant. All in all, I gotta say this was a *very* professional troll. Blatantly wrong, and intentionally inflammatory.
You fail to consider that by investing a large amount of time in developing and refining XUL, the Mozilla developers greatly delayed the release of a stable product. During the resulting period of delay, hordes of Netscape Navigator users finally gave up and switched to IE. Now, very few are switching back.
What you praise as visionary, I regard as self-defeating folly. Undeniably, Mozilla is vastly more flexible because of its XML foundation. It's also largely irrelevant.
I know this is short notice, but I'm going for dinner with one of the the authors tonight in two hours time, and then going to his talk with the Internet Society in Trinity College Dublin (Ireland). The details of the talk are here.
The TCP/IP effort was very focused on standards and interoperability. That's what the U.S. Department of Defense, which funded the effort, wanted, because they wanted all their computers to be able to talk to each other. (Back then, IBM, DEC, Xerox, etc. each had their own network protocols, all incompatible.) The DoD project management people were very insistent on this; a formal DoD TCP/IP standard was pushed through. The individual implementations were forced to comply. (The Berkeley BSD crowd had to be hammered on a bit; they'd gone off on a LAN-only tangent for a while, neglecting long-haul issues.) And it worked.
C was the creation of two people. K&R C was rather PDP-11 oriented and lacked a real type system, but UNIX took off within the academic community before C was standardized. ANSI C came years later, so the UNIX world was still on K&R C years after the DOS world used ANSI C. Eventually, everybody settled down on ANSI C, but it took a while.
In addition to all of the fine examples above, it'd be great for a company Intranet. It's a case where you can standardize all the computers that will have access to the app to have Mozilla.
"Giving money and power to government is like giving whiskey and car keys to teenage boys" P. J. O'Rourke
For a group of people which rely on so many open standards (and indeed, complain when companies don't use them!) I've yet to see little progress here on ensuring XUL remains an open standard. Which is a pity, because otherwise it has little to recommend it, no matter how extensible it is.
Also, does anyone here know anything about performance issues? Visual Basic nowadays is fairly reasonable for certain aspects of enterprise solutions, but if this is anything like Mozilla I'm not sure I could recommend it as being a good platform for applications.
Jon Erikson, IT guru
Good examples would be Oddpost, an email app that launches from the web, and RhymBox, a Jabber client.
Note that I've spoken to the froods who did both of these projects, and they've been constantly hitting the wall in terms of what IE can do. RhymBox now uses quite a lot of ActiveX code in order to work around the general lameness of using DHTML .hta files for the ui.
Point two is not only correct, as you yourself admit, but is most certainly not irrelevant as you claim. Between desktop boxes, PDAs, embedded systems and non-Windows PCs, IE does not have a 99% market share. I think that perhaps you are confusing a particular segment (commercial retail) of commercial software with the universe of commercial software.
Point three is probably correct despite your denial. I'm fairly certain that the previous poster was referring to mshtml.dll and not IE itself. While IE provides a powerful and flexible toolkit, the fact remains that if there is a need to alter the core behavior of the toolkit there is no method for the developer to do so aside from petitioning Microsoft to change the behavior. This is not the case with Mozilla.
One of the big updates being done for embedding purposes in the big 1.2 push is to get a basic installation prepared which can be used for all sorts of Gecko/Mozilla-based applications. See it coming to an application near you soon!
This is a very important development as it means that the full Mozilla suite will no longer need to be packaged with your custom application. The basic installation may even be installed on the system already - and can then be discovered and used by your system without installing a second copy!
This miraculous beast is the GRE, and its webpage is here.
Crap! No better yet, DOUBLE CRAP! Has the entire concept of higher level programming languages been lost?! WTF people we have to stop the mad-people (madman is not PC apprently) from screwing up the whole concept of high level language.
High Level Language is to make it easier and quicker to code. Remember doing "Hello World" in ASM? Then compared to when you wrote it in C? Where did that innovation go? I remember having to code 300 to a 1000 lines to accomplish what I was able to do in 10 lines in C. Also complexity was reduced in high level languages. Where did that mindset vanish.
Now I have some yahoo trying to tell me to use Mozilla as a front end to programs? Does using Mozilla some how make life easier for me? Quicker development times? Less errors? Let me think
NN NN OOOOOOOO !!
NNNN NN OO OO !!
NN NN NN OO OO !!
NN NNNN OO OO
NN NNN OOOOOOOO !!
So once again we have another programming FAD! Aww crap can I just get a good programming language...
-=[ Who Is John Galt? ]=-
Do you do any database access with it? Are there Native 'Mozilla' database modules, or do you use ODBC?
"I can't give you a brain, so I'll give you a diploma" - The Great Oz (blatently stolen sig)
The book is good and interesting, but it reminds me another book, Programming Jabber: a lot of examples in the book, and no available examples in real life (besides Jabberd itself).
Less is more !
Dude-- read the review. Here are a few sentences from the top: On the first and most obvious level, the book is just the typical, thorough treatment of the important APIs that we've come to expect from O'Reilly. There are chapters addressing all of the important layers of the Mozilla platform and plenty of examples that show you how to customize the platform. Some may want to change the icons and others may want to add more robust features. The range of possibilities is surprising and coders are creating one-to-one communications enhancements, add-on widgets, and even games. There are certainly some things missing, and some areas that could use more detail or more complicated examples, but the book is already 454 pages long.
Sounds like he talks about what can and can't be done with the code samples and even a bit about a few of the individual chapters. He just didn't do one of those boring Slashdot reviews that goes through each chapter one by one. I can get the chapter breakdown from the book's website.
And if you ask me, knowing what to do with the XML is pretty important. If the Mozillians are smart, then that means there's something of value int he book. I really don't want a well-written, witty book about how to write assembler code. Dis
Yeah. You call the dll's directly. You can use any of all of the functionality in IE, and yes, it is distributable. I don't remember the names of 'em now, but there are several to use. And yes, you can customize it however you'd like. You can do a web browser window, do whatever buttons you'd like, however you'd like. I have one tool which is does something automatic, and doesn't even have a GUI. You can absolutely embed and customize it. Check out the details at MSDN. Hell, I'm looking at Quickbooks 2002 which is built around IE. They just use it for the rendering... no actual browsing per se.
I use a customn app that I wrote that is completel automated using the XML object that comes with IE. You don't need the source since you have access to every possible property/method in every DLL, and they're all documented. If you have to muck with the source, that's because the program itself doesn't work, or has a shitty API. IE works and has a very extensive API. Has for years.
And no, of course you can't use it on Solaris. But, I'm not aware of a whole heck of a lot of products that would need to be ported to Solaris (Quickbooks for Solaris? I don't think so.).
So yes, you are completely wrong.
I laud Mozilla for going down this road and it is clear to me that the core developers for Mozilla are a step above your standard programmer. Some accuse Mozilla for not following a method that would create "standards" for their XML GUI description language, but I have found that the successful "standards" usually follow already adopted and reasonably mature technologies. You do not know how you want to design something until you have done it, used it, and given it to other people to play with. Only after an application has grown sufficiently to include all the thousands of unexpected details is it sufficiently mature for people to talk about standards. For example, I consider the EJB specification's largest failing is that they tried to standardize it before it was actively used for a couple of years. Only now that we have some mature app servers do we really have an idea what needs to be in the core EJB specification. If EJB had followed this road, maybe application developers would not need to use vendor specific code for the critical parts of the functionality. Like OO, the mantra of "standards" seems to be more of a marketing tool to get Fortune 500 companies to cough up millions of dollars than something that really influences how sophisticated and successful applications get developed.
I have my own questions for the Mozilla team. How do you deploy "overrides" of existing configurations. Suppose I want to deploy a "batch" of changes that I want to turn on or off. Is there a way to create configuration "layerings" in XML files so a group of data specifications can be conditionally included from a set of external files? How much scripting is allowed in these files? If I want to write conditional code for specifying a color (such as a color choice per day of the week), is there a way to write scripting solutions for that need? Of course, I could read the book but I am lazy and I suspect that it would not give a full answer.
How close is this Mozilla thing to supporting that?
I picked Solaris as being a platform on which MS once supported IE [1]. I believe that MS no longer does that. There are a LOT of non-windows platforms out there. Solaris is one, AIX is another, IRIX and Linux and the BSDs are others, then there are the Macs, then there are the palm-tops and embedded devices (some of which are candidates for Mozilla, or Gecko). If you can't run your app on any of these, you're limiting your user pool. If you can use this on Mac today, will MS make it available there tomorrow? Remember, they once had IE on Solaris.
Somehow I suspect that we are using freely distributable in very different ways.
Having the source code is a big deal for ``distributable'', since it means that someone can make it run on his platform, I could make it run on my platform, and so on. No source code means that it only runs where MS allows it to this week.
So, you have in IE a library which you can call to render things onto the screen, IF you are developing for Windows only. I'm glad you are so easily pleased.
[1] Never saw it myself, but was told by a usually reliable source that MSIE 4.x was available for Solaris. If it still is, it isn't current enough to be relevant to the topic at hand.
See what I've been reading.
I would like to relate a recent experience with NETSCAPE 7.0. Please excuse two paragraphs or so of background information...
But I digress... So back to *N*E*T*S*C*A*P*E* I installed Netscape for my mom, because Internet Explorer is trash. Netscape, in my opinion, is lacking in many areas (such as usability), but I'll classify it as software, rather than trash. So I installed it. The install went along pretty smoothly and before I knew it, I had Netscape launched. The new graphics are MUCH nicer than the extremely crappy ones in Communicator 4.x. But the initial screen was SOOOOOO cluttered!!! Buttons and tabs and side bars EVERYWHERE! As an experienced user of computers and web browsers, I couldn't hear myself think, so to speak, in all this optical noise. I immediately turned all that crap off and modified all the settings to my liking, so that my mother, who has much less experience than myself, would actually be able to use the damn thing. And then it happened. The next time I launched Netscape, everything locked up and the disk started crunching and grinding away like there was no tomorrow. Even the ctrl-alt-delete window took forever to show up. I ended up forcefully shutting off the power, because I couldn't even log out. (Yeah yeah... File a bug report--but do you HONESTLY think that my mother knows what a bug report IS, let alone knows how to file one?!!) And this is where the background information on XP comes in... I guess it REMEMBERS what made it crash and when you reboot it (or log out and log back in) it does it over again, consequently putting itself in the same situation and locking up again. That's what happened. Whenever I logged into my mother's account, the whole computer became so unresponsive (from the grinding and whatnot) that I couldn't even open up the huge, cumbersome Start menu. (Mafiasoft. Where do you want to pay today?)
I noticed that the other account, that I had originally set up for her out of the mere habit of always giving myself three or four accounts on my BSD boxen, still worked fine, so I logged into it, created yet another new account, moved all her files over, and deleted her original account. Oh yeah, and I removed Netscape and purchased a copy of the newest Opera 6.x for her. Sure, its initial screen is a bit cluttered and I have a few complaints about the increasing complexity and proliferation of seemingly unnecessary features (that other people probably want, just not me), but it's small, fast, and it WORKS. Extremely well, I might add. (It's what I am using right now under FreeBSD with Linux compatibility turned on.) Now she's happy as can be... And I know for a FACT that I will not buy a computer with Windows XP. And I am pretty disappointed with Netscape once again (not so much for the crash, but very much so because of the clutter), as I have been for several years. (Yes, I will continue trying it from time to time, because somewhere deep inside, I believe that it will BECOME a very good, reliable web browser. I just wish it'd become as SMALL as Opera (3 megs or so) and as fast. Netscape is very, very slow.)
I hope if any Netscape developers are reading this, that they'll take this as constructive criticism rather than as flamebait. Oh yeah. And YES, I know the Gecko engine is found in Galeon and several other browsers.