Pushing the envelope

Darren's take on Java, agile methods, cool open source stuff, interesting technologies and other random wanderings through the land of blog.
Updated: 26/01/2003; 11:49:32.
Places to go
Apache Jakarta Project
c2.com
ExtremeProgramming.org
OpenSymphony
XProgramming.com
XP Developer

People to see
Russell Beattie
Eugene Belyaev
Tony Bowden
Mike Cannon-Brookes
Jeff Duska
Paul Hammant
Scott Johnson
Brett Morgan
Rickard Öberg
James Strachan
Joe Walnes

Things to do

Subscribe to "Pushing the envelope" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.


That was the day
August 2002
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Jul   Sep



Archives
December 2002
November 2002
October 2002
September 2002
August 2002

Listening To


Valid RSS

Click here to visit the Radio UserLand website.

  31 August 2002

When asked about JBoss (Open Source J2EE-based application server) in his August interview with Linux Magazine, Sun Microsystems' CEO, Scott McNealy claimed in so many words that Open Source is hampering Sun's ability to effectively market J2EE against Microsoft's competing .NET standard. [jboss.org]

This strikes me as wrong. In my more cynical moments it reads more like 'Open Source is hampering Sun's ability to effectively market their own J2EE server product'. Microsoft are closer to the mark with their 'software as services' angle. Although thats still not quite right. Open source software usually has no pricetag - for the software itself. But that's only a tiny part of the story. As all the software giants are so keen to tell us, TCO is the key. The upfront purchase price of almost any enterprise system is a very small part of the whole cost.

Where its really at is 'services supporting software'. This is what customers are really after. They want to know that if they have a problem, someone will be on the case to fix it. If your enterprise software is processing a million bucks worth of transactions an hour and it goes down, who cares if it cost 100,000 pounds or 10 pounds? It seems to me that software as a 'product' will be increasingly sublimated into software as a service. Support and technical expertise of those offering it will be the differentiators when it comes to choosing one over the other. Lets face it, your CEO probably couldn't tell you whether your enterprise was running Solaris, Linux or NT, .NET, J2EE or mod_perl. And probably doesn't care. He has more important things on his mind. And that's how it should be.

Of course, the technical merit of a product is important, but as software (purchase) prices tend towards zero and interoperability becomes more transparent, choosing a supplier becomes less 'who's got the best product on a features/price basis', but 'who offers the best service on a quality/cost basis'. If the software is free, try it all. Choose your shortlist, then find out what the service offerings are. Chances are, if its 'none' or 'the dev mailing list', however comfortable your developers are with this, your Ops, Support and QA teams probably won't be. The people who are carrying the can, those whose continued employment depends on uptime, they will want guaranteed, knowledgable and rapid support on the end of the phone. The legal team will just want someone to blame. But that's another story.


2:11:31 PM      comment []

  28 August 2002

2 open source projects that could be worth looking at...

beanutils from Jakarta contains heaps of useful utility methods for working with beans, introspection etc. There's also something support for DynaBean objects, which are like dynamic beans that can be defined at runtime. They make a neat wrapper around regular java beans too so you can access them in a Map-like manner.

Jexl is cool, its a simple expression language for evaluating expressions on beans. Jexl is a little like the Velocity expression language and is a super set of the JSP Expression Language. So you can use it to navigate bean property trees, accessing maps, arrays, collections, indexed properties and 'map properties' (a term coined by the beanutils project for getter methods that take a String argument) as well as methods. So the following are valid Jexl expressions...
[James Strachan's Radio Weblog]


I looked at the beanutils stuff. I'm actually working from the other direction, grabbing all the properties from a bean and iterating through them looking for placeholders in the HTML that match each property name. That seemed easier than parsing the HTML and looking up properties on the bean. It should also make it easier to add user-defined markup - the code just does indexOf(openingMarkup + propertyName + closingMarkup) and replaces it with the property value. I wanted something that was 'developer-driven' - so the natural direction to go in seemed to be to emphasise the model acting on the view, rather than the other way around. Performance may be an issue, I have no feel at all for the performance of introspection and repeated calls to indexOf. I'm deferring worrying about that!

6:17:38 PM      comment []

  27 August 2002

Didn't get as much accomplished over the long weekend as I'd hoped, what with having to do a from-scratch reinstall of the OS on my new machine. WinXP Professional. Hmm. Reinstalling everything seems to have sorted out the random twice-hourly spontaneous reboot problem though.

What I did get done:

Tried out Maven. Looks very good, if somewhat complex to get going initially. I like the idea that you can specify all your dependencies in one project file. What would be really good is if you could bootstrap an entire build process starting with just the project.xml file. Maybe it can, I haven't looked into it in sufficient depth yet.

Started using TortoiseCVS (yet another fine recommendation from JoeW). Works very well, but for some reason I have to type my password in every time I want to do anything - it would be nice to have it cache it.

Mucked about with my toy project, ViewBeans a bit more. Knocked up a quick-n-dirty site using Maven, and got the code doing string replacements based on bean introspection (including nested beans), which is quite cool. Need to learn more about taglibs, and how it might be accessed from within a JSP, and possibly consider how to deal with subclasses.


12:06:06 AM      comment []

  25 August 2002

Happy birthday to me. [Joe's Jelly]

Happy birthday Joe!


5:22:43 PM      comment []

  21 August 2002

Russell has been having issues with custom tags and logic in pages. Interestingly, he remarks that it will never be possible to fully remove logic from pages. Its interesting because that was exactly what I had in mind for ViewBeans. Its still just an idea buried in my head, and some snippets of very dodgy experimental code, but it just might work...

8:44:35 PM      comment []

There was some discussion last night regarding the use of JMS behind altRMI to make asynchronous calls. Taking the idea further, I wondered if it might be possible to implement asynchronous callbacks using temporary queues. So requests that take a long time, but need to return a response to the user could present a 'please wait...' message, or pop up an alert when the response has arrived, without the client having to poll the server.

Some sample code I found here looked a bit like this:

Queue tempQueue = qSession.createTemporaryQueue();
TextMessage request = qSession.createTextMessage();
request.setJMSReplyTo(tempQueue);
QueueReceiver qReceiver = qSession.createReceiver(tmpQueue);
qReceiver.setMessageListener(new MyMessageListener(. . .)); 

Could be interesting, perhaps.


1:32:28 PM      comment []

Post XtC thoughts:

Frameworks / Infrastructure code / Plumbing, call it what you will. It should be easy, really easy to use. If the framework coders have to perform unnatural acts to ensure that the users of the framework don't have to, so be it. That's part of the appeal anyway (or is that just me?). Writing frameworks is something of a masochistic activity in that sense. Producing something that is so easy to use its almost a no-brainer. Hard to use frameworks won't get used. Or if they do, they'll probably be misused. Its a tough balance. You want to make the lives of developers using your framework easier, without making their decisions for them, or taking away control.

AltRMI is a good example of a framework done well - its what RMI should have been. Simple exterior, clever interior.

Paul Hammant had some wise words to say on interface / implementation separation. So important for reuse, testability, just about everything thats worth having. The collections stuff from Java 1.2 being a good example:

 Map myMap = new HashMap(); 

What if I want a map that survives restarts?

 Map myMap = new PersistentMap();

Done and dusted. No client code ever needs to know. The counter example being java.io.File. What if I want to slot in a caching file layer? or some other data source that pretends to be a file? Out of luck...

Want reusable code? Interface - implementation separation.


12:33:44 AM      comment []

BTW did you know that in JSP 2.0 you can create blocks of JSP code as ciustom tags or as variables and pass them into other JSP blocks. So you could pass the header & footer blocks into a JSP page or custom tag. This might be worth bearing in mind in your 'composite view framework' from a previous post. Is that what the ViewBeans project is gonna be? [James Strachan's Radio Weblog]

Something along those lines. The general idea being that a web designer designs components, 'pagelets', small chunks of HTML, whatever, with placeholders for the data. Each ViewBean class is mapped to a different HTML component. The page is constructed by pulling the fields out of each bean in a list and merging them with the components. The completed HTML is then appended to the output stream. The therory being that the object graph in memory determines how the page is built. No logic on the page at all. Not quite sure how (or even if) it will work yet, but that's half the fun...


12:07:15 AM      comment []

  20 August 2002

Thank goodness for Radio's blog by mail functionality. Otherwise I'd be risking serious withdrawal. I'm also going to look incredibly prolific when all the posts arrive at once!

James Strachan has put up a link to me, cool! Returning the favour, you can find his current blog here, and his new one here. I'll add a link to my luminary list once my technical tribulations have been resolved.


5:22:44 PM      comment []

By bizarre coincidence, as I was writing my last post, my Visual Studio .NET trial DVD arrived. Must resist...

On a more Java note, Sourceforge have approved my ViewBeans project. Expect plenty of inaction on that one imminently. Really, really need to sort out my new machine. The commitments are just piling up.


5:22:43 PM      comment []

First off, this is being written on tuesday morning - there may be a delay before it appears on the site due to an unfortunate confluence involving a new pc, a missing keyboard and a broken network card. Sigh.

Upon skimming my last few posts, there does seem to be a preponderance of .NET related stuff. Russell Beattie made the point best. Very funny!

It appears I may be suffering from shiny new toy syndrome. Always a danger when there are so many toys to choose from. I plan to put together a more detailed piece on .NET / C# vs. Java in the near future, and I promise I'll say bad things about it! C#'s inheritance mechanism for example. Its just wierd.


5:22:41 PM      comment []

  19 August 2002

If I hadn't seen it I wouldn't believe it: COBOL for .NET. Astonishing...

12:12:20 PM      comment []

Microsoft are offering a 60 day trial of Visual Studio.NET. Mine should be arriving early next week.

What I'm most interested in trying is the java language conversion assistant plugin. Although why they felt the need to make it require VS .NET is beyond me. A stand-alone conversion tool makes far more sense from the perspective of persuading java developers to at least evaluate .NET.

Note that I'm not trying to evangelise either platform here. Language is a tool. Java is top of the heap today. It won't always be so. I don't know if .NET is the thing that will topple java, I also don't know whether it isn't. Time will tell.


11:23:42 AM      comment []

I've been looking for a while for a decent composite view framework for java web apps. Most of the ones I've seen so far tend to focus on the view as being a single JSP / Velocity page etc, with dynamic bits inside the page doing conditionals etc. Using taglibs can push some of the logic out of the page itself, but the focus is still on simple pages where the iteration is limited to repeating rows in a table. What if I want the 'list' part of my page to contain an arbitrary number of heterogenous components, that have different data fields and need to be displayed differently?

Forgetting trivial things like 'can it be done', what I'm considering is to build up a simple composite object model, essentially a collection of beans, whose fields are either strings or other simple beans. What I'd like to do then is go through the collection, select a template for each bean, and insert the bean's field values into the template. When one of the fields is another bean, lookup the view for that bean, and recurse as necessary. When you get to the end of a bean's fields, append each populated template to the output stream.

In theory this should allow the designers to design each visual element independently (as a JSP for example), and the overall view would effectively assemble itself based on an object model in memory. No need for conditionals, iteration, or any of that other stuff on the page. Do all the logic in the code, assemble your beans, and splat them onto the page.

Its all a bit speculative at the moment, but I'll mull it for a while until I realise that it can't work or (even better) find one that someone prepared earlier.


12:35:31 AM      comment []

  17 August 2002

Unveiling the new style! I'm a keen advocate of 'less is more' when it comes to web page design. Understated and simple. A bit like me.

Thanks are owed to Open Source Web Design for the original template.


3:01:11 PM      comment []

  16 August 2002

Grid computing. Supposed to be the next big thing. I'm sure it will, although possibly not in the same explosive fashion that the internet was. The internet was a brand new thing - a whole new paradigm in communication and connectivity. Grid computing is essentially a new means of using the existing 'net infrastructure. An evolution rather than a revolution.

The forerunners of the grid are already starting to appear. The SETI-at-home project, P2P file-sharing etc. Its not too great a leap from sharing MP3s and parcelling out pieces of the sky for signal analysis to active collaboration of distributed nodes to solve complex problems or provide services.

There are a few projects working in this area, the ones I can remember off the top of my head being:

The JTrix project.

Gaia from The Mind Electric.

[Insert obligatory cyberspace/the matrix homily here].


10:31:23 AM      comment []

  15 August 2002

Holy automated code generation Batman...

.NET has a superb mechanism for building class models in memory and outputting them to source code. Check out this page for some idea what I'm talking about.

There are plenty more goodies on the gotdotnet site to play with as well.

Never thought I'd say it, but MS have done well, from what I've seen so far. Now if only their IDE was cheaper than a small car...


11:50:11 PM      comment []

Anyone who (like me) has issues spending vast sums of cash on Visual Studio .NET might want to check out SharpDevelop, an open source editor for .NET. Its still in beta, but beats using Notepad.

11:50:09 PM      comment []

  14 August 2002

Gone to the dark side: wrote my first C# program today. Okay, so all I really did was replace 'import' with 'using' and give 'main' a capital 'M', but small acorns and all that...

This remarkable feat was accomplished using the C# plugin for eclipse. Its basic at present, but functional. Keep it up guys.


8:19:19 PM      comment []

  13 August 2002

Maven. Maven 1.0 beta 5 has been released. Maven is a funky tool that simplifies the life of Java developers. [james strachan's musings]

Aye, he be speaking the truth.

I used Maven on a little projectlet I'm playing with and it did all the boring work for me. All I did was create two source directories (one for production code - other for unit tests), a single index.xml documentation page and a project descriptor - and it magically produced this.

Given how much time I typically spend playing with build files, documentation, test/code reportings, etc, this was a major timesaver.

[Joe's Jelly]

Two useful tools in one post! I'll be following QDox - I was looking for a simple parser when I got bored of keeping test suite classes updated by hand and wrote a simple suite generation tool. Ended up doing it with string matching, not ideal, but it does the job. This looks like it might be just what I need.


7:59:23 PM      comment []

Found Rikard Öberg's blog today. Definitely worth a look.

Also worth further study:

Coherence, a distributed cache for J2EE applications.


4:09:01 PM      comment []

A C# plugin for Eclipse has been released. Microsoft must be in two minds about this. On one hand they absolutely need to nurture the development community if .NET and C# are to take off, on the other, they want to sell as many copies of Visual Studio .NET as possible.

This can only be a good thing for the platform - an alternative (and free) IDE will be an effective way to attract those who are on the fence to at least evaluate .NET. I'll be posting my own thoughts on it in the near future...


10:25:55 AM      comment []

  12 August 2002

Worthy of further study:

Webwork is an MVC framework along the lines of struts, but smaller and cleaner, with less servlet-specificness.

Xindice is a native XML database that allows the use of XPath for queries.

Kodo is a JDO implementation that makes persistence look really easy.

Sitemesh is a dynamic decoration framework for HTML pages.

Lucene is a java based document indexing system and full text search engine.


10:24:33 PM      comment []

While trawling through some legacy web application code today, a paraphase of Greenspun's tenth rule of programming occurred: "Any sufficiently complex 3-tier application will start to resemble an ad-hoc, buggy, poorly implemented version of an existing open source framework."

Original quote: "Any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp."


8:57:56 PM      comment []

Been tussling with classloaders and SAX parsers this morning. Class.forName is essentially broken when using modern app. servers with multiple classloaders. Fixed that by using Thread.getCurrentThread().getContextClassloader(). Unfortunately this then broke JUnit with a ClassCastException when using the reloading classloader. Had to add a fallback to the bootstrap classloader to cover both bases.

The implementation of SAX shipped with Java 1.4.0_01 no longer uses class.forName(), which should make life easier.


8:57:19 PM      comment []

OK. Got bored with trying to make MovableType work on my hosting provider's system. Shame, as its otherwise a nice tool. Time to let the blogging commence...

8:56:43 PM      comment []

© Copyright 2003 Darren Hobbs