Posted by Shane O'Sullivan on February 9, 2007
Ajaxian has posted an article about the Plain Old Webserver (POW), a web server that runs from inside Firefox. This is a strange idea at first look, but after trying it out it seems to work quite well.
The most applicable use that jumps out at me is for prototyping Ajax applications from your local file system without having to install Apache (or another web server). So, just click on a single link, restart Firefox, and you have a web server running on your system. You then drop files into it’s folder inside your user ( or ~ ) home folder, and they’re available for browsing in any web browser on your system, not just Firefox. You can also make the files available to other machines.
From an Ajax developers perspective, the main advantage to this over working directly from the file system is that you are testing in a more realistic envrionment, with the same security measures being applied as will be used when your application goes live. For example, IE7 will not let you do XHR requests if you are running from the local file system. Also, you don’t have to go to the trouble (ok so it’s not THAT much trouble) of installing Apache.
One issue I found with the server was when attempting to enable debugging on Dojo using the Firebug console, using the dojo.require(“dojo.debug.console”) command. It froze the browser, and I had to kill it. However, all other remote XHR requests worked just perfectly.
All in all, this is a very cool concept, and I can definitely see myself using for quick prototyping of Ajax applications. Well done David Kellog!
Posted by Shane O'Sullivan on January 3, 2007
Just a tiny Ant tip – I’ve been fooling around with Apache Ant for the first time, and needed to change the working directory so that, rather than it being the folder in which the build.xml file is located, it be somewhere else. This enables files in other directories (which I don’t control) to use relative paths to other files. I tried setting the System’s “user.dir” and “basedir” properties, but these didn’t work.
So, the solution is very simple, in your <java> task, set “fork” to true, and then set the “dir” property to the folder you want to use as a working directory.
<java fork=”true” dir=”c:\work\lib”>
No doubt this has been documented somewhere else, but a quick search on Google didn’t readily find it for me, so here you go. Enjoy!
Posted in Ant, Apache, open source | 10 Comments »
Posted by Shane O'Sullivan on December 19, 2006
There has been a lot of talk currently about making the build system for Dojo simpler. The web based method (customise a build on the Dojo website and download it from there) definitely shows promise, and will be attractive to many users. However, I think that many developers would like to have more control over the build process, while still having the possibility of all of it being automated for them. For this reason I’ve decided to look in to the possibility of using an Eclipse based build system that can operate as a standalone Rich Client application or be a new perspective in Eclipse.
My current thinking is that it will be a generic Ant-based build system that can be customised for multiple “categories”, of which Dojo will be one. The use case is:
1. User chooses an Ant build file to import (either from an existing Subversion checkout or from a copy of Dojo downloaded by this application via Subversion)
2. View pane 1 lists all the available Ant build targets as a list of checkboxes that the user can select
3. View pane 2 lists all the properties that can be set on the Ant build. This pulls the original values for these properties from the build.xml file, but these can be overridden by setting some defaults in the application.
4. View pane 3 provides customised Dojo controls, and this is where the meat of the application will lie. These controls will be able to do a number of things:
- Select combinations of build targets based on predefined settings. E.g . “release” and “intern-strings”
- Set various properties on the build
- Check out various builds of Dojo from SVN trunk and give the user the option to use the build files and/or source files from that release, or from the nightly builds.
- Provide a list of build profiles that the user can choose from, with the possibility of also having a profile-builder that will automatically import a list of all the files that a user can choose and writes the profile for them
The advantages of this approach:
Easy to use
- Works both online and offline (online for checking out builds, offline for building)
- Integrates with Eclipse, so can be a standalone application or part of an existing development environment
- Gives you complete control over the build process, while also simply letting you choose a profile and click “Build”
- Users don’t have to install Ant, Subversion etc. All these utilities will be included in this application
- Can leverage the Eclipse update mechanisms so that users can update their application from an Eclipse update site hosted at dojotoolkit.org
- Fun to write
- Large initial download – probably ~15megs for the standalone app, much smaller for just the Eclipse plugin set
- A lot of work for me 🙂
I’ve started work on this, and it’s showing promise. So, all comments and suggestions are welcome.
Update Jan 8th 2006: First beta of this program released. See here for details.
Update Jan 29th 2006: Second beta of this program released. See here for details.
Posted by Shane O'Sullivan on July 1, 2006
ApacheCon Europe 2006 is over, and I had a blast.
Mark Shuttleworth Keynote
It started off with Mark Shuttleworth, the Ubuntu founder, giving a very well delivered speech about where he sees the world of free software heading in the next five years. Some of his better points include “Pretty is a feature“, and the massive opportunity for Linux and other free software on consumer gadgets.
Microsoft Atlas Keynote – Rob Burke
One thing that was missing was a quick comparision between other open source Ajax toolkits, and “why” people should use Atlas instead of Dojo or Scriptaculous/Prototype etc, which are firmly estabished in the open source and commercial worlds. To play devils advocate for a minute, in defence of the other toolkits:
- Tooling around open source ajax frameworks took a large leap forward with the initiation of the Ajax Toolkit Framework in Eclipse, and should soon be quite comparable to the MS IDE. Also, it doesn’t lock you in to a particular framework, as it supports multiple existing ajax toolkits (currently Dojo, Zimbra/Kabuki and Open Rico)
- The announcement that MyFaces, the Apache implementation of the Java Server Faces specification, is migrating its client side widgets to Dojo means that Dojo will now have a server-side binding, for Java developers at least. This should be more or less equvalent to the .NET combination of Atlas + VB/C#
- The recent announcements by IBM and Sun regarding their support of Dojo, with both code and documentation, along with the Oracle connection through MyFaces, and you’ve pretty much got three of the four main IT companies jumping on the Dojo bandwagon.
- The latest code drop for Dojo will surely lead to it’s dominance over mankind as we know it…. cue self patting on back 🙂
My extra-happy birthday
On a more personal note, the second last day of the conference just so happened to be my birthday, and since it was also the birthday of one of the organisers of the conference, we got Happy Birthday sung to us by hundreds of inebriated hackers. Now THAT I can get used to.
Finally, thanks/hi/bye to all the cool people I crossed paths with over the week. I had a fantastic time bouncing ideas & beer bottle tops off you all, and hope to see you all again in a years time!
P.S. For a listing of a whole host of pictures of the event, go here and here.
Posted by Shane O'Sullivan on June 27, 2006
(a sponge absorbing knowledge, not IBM’s conference fees… honestly)
The first two days of ApacheCon Europe are now over and done with – and what have we learned children? I chose to attend two of the full day tutorials,
- Practical Hands-on Tutorial on JavaServer Faces Using Apache MyFaces, and
- An XSLT Tutorial, Including XSLT 2.0 and Publishing with Cocoon
The first was relatively interesting, and since I was (am, I suppose) a relative newcomer to the JSF world, a lot of it was new to me – though of course the main idea of this being essentially “another” MVC architecture meant that much was familiar from Struts. The bar was kept pretty low for the day however, mostly due to the fact that it was a very hands-on tutorial, with each of us expected to implement relatively simple JSF applications. Differences in each person’s laptop setup (JRE version etc) meant that various errors occurred, rarely the same, which slowed the whole thing down. As the organisers themselves said, they could easily have filled three days with this stuff, and it’s just a pity that time was so short. It should also be noted that the tutorial was marked as “Novice”, and it’s really my own fault for not reading the small print. The one small highlight of the day was where the Oracle-based speakers repeatedly apologised each time they *forgot* to mention IBM in each vendor listing. Funny stuff, or else I’m easily amused.
The second days tutorial, focused on XSLT, was considerably more interesting, at least to me as much of my recent work has been based around it. The speaker, Doug Tidwell from IBM, is the author of the O’Reilly XSLT book, and is therefore extremely knowledgeable on the subject. Much of the basic XSLT 1.0 stuff I was already pretty familiar with, but I was very happy to find out that XSLT 2.0 has drastically simplified much of the overly-verbose structures of version 1.0. However, raining on my parade was the fact that there will probably be no browser support for XSLT/XPath 2.0 in the near to medium term – if anyone knows of any support for this coming to either Firefox or, very importantly, Internet Explorer 7, please let me know. Without this support, XSLT 2.0 will remain very much a server side phenomenon, which would be a real shame, since it is a vast improvement over version 1.0, and many cool/nifty things can be done with XSLT browser-side, especially when combined with things like Atom feeds.
On a side note, I’ve recently discovered that JackRabbit, the Apache based Java Content Repository implementation, only supports a subset of XPath 1.0 – for example, you cannot do a query like:
which would be very useful for paging. There are a number of other limitations to the implementation. If anyone is in a programmy kind of mood, and feels like diving the depths of JackRabbit, Lucene and Derby, adding full XPath 1.0 support would be cool little (read huge) and very worthwhile project.
Posted in Apache, ApacheCon, Atom, Technical, xslt xpath jackrabbit jsf | Leave a Comment »
Posted by Shane O'Sullivan on June 23, 2006
James Snell's bid to conquer the webiverse through the power of the Atom continues apace. His threading extension for Atom has been approved as a proposed standard for linking multiple entries/feeds in a threaded manner. See this post for his announcement, and, more interesting, his post on how to use the threading with Abdera, the Apache Atom parser.
Posted in Abdera, Apache, Atom, Feeds, Technical, Threading | Leave a Comment »
Posted by Shane O'Sullivan on June 13, 2006
James Snell's Abdera project has been accepted as an Incubator project by Apache. Abdera is a dedicated Java-based Atom parser. Unlike ROME, a similar project whose aim is to parse all sydication formats, including all versions of RSS and Atom, Abdera instead focuses on just on Atom, which seems to one major advantage – performance.
I've played around a bit with both ROME and Abdera, and they're both quite easy to use, with quite similar structures, obviously enough designed around the Atom sydication format. However, as Rob mentions, in some initial performance comparisons, you can see a reduction of from 10 to 40 times in memory consumption, and up to 8 or 9 times in CPU cycles, which is just massive.
Abdera is still very early on in development, but it's already gotten good documentation and examples, so I'm very impressed. Handy ice breaker for ApacheCon in a couple of weeks!
Posted in Abdera, Apache, Atom, Technical | Leave a Comment »