Recent Posts

RSS Feeds

Cactus In Roller


Well I finally managed to get Cactus tests working in roller. It has been since Cactus 1.3 that I had to set up a new project and man is it a lot easier now! The team has done a great job of getting 90% of the configuration issues worked out with the new ant integration.

A couple of things I'd like to see added:

  • Support for web directories in addition to war files.
  • Performance improvements in the cactify task

If you are doing J2EE development you owe it to yourself to checkout cactus.

Permalink     1 Comment

Motorcycles In The Mountains - Almost Heaven


Like I always say, this place is about as close to heaven as you can get without being dead...
We rode our motorcycles up this road to an old abandonded mine at the top of the hill, where we rode and jumped and played etc.
Here is Andrew climbing one of the hills

And here is Isaac doing a differnt hill.

We had a great afternoon!

Permalink     No Comments

The Duh! Department: Deploying Webapps on Tomcat From Build Directory


I just learned last night that you can deploy your webapp from anywhere on your hardisk with Tomcat. All you have to do is put a 'Foo.xml' file into the webapp directory of tomcat. The XML file needs to have the config for your app like this...

<Context path="/roller" docBase=".../roller/build/roller" debug="0">
other config info
</Context>


I'm doing some playing around (adding Cactus to the build) with the roller source (which is lot of fun BTW) and was trying to get the target that copies the webapp over to tomcat working, I thought to myself 'self there must be another way'. After looking around for 15 minutes I found the roller.xml file and ta-da an epiphany. Now all I have to do is build and invoke the catalina reload target in my ant file and roller is redeployed. Cool!

I posted a snipit of the build.xml file if your interested.

Anyway I hope this helps some other person that is new to Tomcat...

Permalink     1 Comment

Java an SUV, I love my SUV



Well I generally try to stay away from most of the flame wars but this little bit made me want to respond.

With Web applications, nearly all of the engineering happens in the SQL database and the interaction design, which is embedded in the page flow links.  None of the extra power of Java is useful when the source of persistence is a relational database management system such as Oracle or SQL Server.  Mostly what you get with Java are reams of repetitive declarations at the top of every script so that the relevant code for serving a page is buried several screens down.  With a dynamic language such as Lisp, PHP, Perl, Python, Tcl, you could do bind variables by having the database interface look at local variables in the caller's environment.  With Java the programmer is counting question marks in the SQL query and saying "Associate the 7th question mark with the number 4247", an action that will introduce a bug into the program as soon as the SQL query is modified (since now the 7th question mark has been moved to become the 8th question mark in the query).

Perhaps most of the 'engineering' that Greenspun and his students do happens in the DB but in most every enterprise level application that I've been involved in the DB is only a small fraction of the actual design work.
Java, perl, python, ruby, Obj-C, C++, VB, etc. all have their strengths and weaknesses. VB is probably much better for building 6 week long school projects cause you never have to maintain it, you never have to even run it after you pass the class, so who really cares what the arch is, how easy it is to maintain, how well it scales etc. If your doing most of the engr in the db why not just serve up your db into vb forms...

Now on to some specifics.

  • embeded in the page flow links
  • This practice is documented in my J2EE AntiPatterns book as an antipattern that inexpierenced people get stuck in. Perhaps the point of all this is to teach the students how not to do it?
  • matching the 7th ? to 4247
  • Who uses plain ol JDBC anymore? Your are more or less wasting your time if your not using CMP on an EJB project or a relational object bridge such as Hibernate on your pojos.
  • None of the extra power of Java is useful when...
  • Hows that? Clearly little or no understanding of J2EE, what is for, how to use it. Again if you are building a quick hack in a single semester college class, J2EE is probably not what you need. Heck, if you are building a 6 week long project that will only be run once, the J2EE is probably not what you need. But if you are trying to build a large scale application that performs complex business logic you certianly dont want to be using VB. Do you really want to put all your logic into the db? That is way back in the 70's.

This whole thing is just another reason why I think college computer degress are not what they should be. Not trying to say that all CS grads are poor developer/arch or anthing like that, its just that college should be teaching people how to think, not how to poorly build applications in a single type of technology. Why not have a 4 year degree where you have to build two big enterprise type applications (maybe the HR system for the school, and the class booking system). Build it in VB/.NET, Perl/Python/C/C++ and J2EE. The the final two years the same people that built it would have to maintain it. Anyway, this is digressing into another post where I rant about college degrees, I'll leave that for another time...

And oh yeah, my Expedition is a great off roader, we have been all over the mountains around Breck and not been stuck once. (we probably will this week end cause I posted this :-)

Permalink     No Comments

Legacy Code & Abbot


I am currently trying to write tests for a huge 'legacy' application written in Swing on JDK 1.2.
Many (if not most) of the components are not named. Which makes them hard to find via Abbot's component finder mechanism.
The components of interest are dynamically generated. Which is why the are not named.
Abbot has many different means to find the components but I have tried them all and still end up unable to narrow the search to one component. I don't want to hard code 'the third one should have this value' kind of tests because they become way too brittle and would require too much maintenance. I have used the Abbot script runner to identify the component but since it is not uniquely identifiable when the test is rerun I get 'mulitple component found' exceptions.
So my quest is to figure out a low impact way to get these tests done. I am currently thinking of modifying the code to get it to assign names to all the components. Which I had to do without a good regression test in place (you never know who depends on 'null' being the name of a component in some logic somewhere) but I think it is likely a low impact addition that I can try out to see if it makes my tesing easier without breaking a ton of stuff.
I also started rereading Working Effectively With Legacy Code. Its a great read but does not have enough specifics for GUI code. If you are involved in maintenance though it is worth downloading and reading this paper. I think you have to be a member of the yahoo group to get at it. If the above link does not work try out Refactoring Group join and select 'files' which should get you to the pdf.

So I'm left with this question for you reader, what suggestions and tricks etc have worked for you?

Permalink     No Comments

Built the NavRobot


Andrew (my oldest) and I built the NavBot this weekend. It basically is the RoverBot from the 2.0 directions with the tread instead of wheels. Its able to turn on its center so we should be able to play with the nav java programs from the Core Lego Mindstorms book.
I'm not sure yet if we will build the electronic compas. Anyone else built it? If so please post a comment and let me know how it went.

Permalink     No Comments

EMF rocks!


Finally had some time to play with EMF over the weekend (the topic of one of the books I'm currently reading).
It was very cool. I had a whole set of model objects persisting in XML in a snap. It was not the cheezy model that is shown on the eclipse site either. I actually had multiple relationships between many of my classes as well as some of the so called 'volitile' relationships. It was really cool that it just worked.
I did have a few probles with the Omondo UML/EMF tool. I found that deletion of model elements can sometimes corrupt your model. I ended up hand tweaking the model the first time that I got bitten, after than I was very careful to check everything after every delete and make sure that it was not hosed.
All in all a very grooy time geeking out with the framework. I'm hoping to try out building a custom persistence plugin for the framework. From reading the book and looking at the API it should be possible to put the model objects into a relational db.

Permalink     No Comments

Upgrade to Roller 0.9.8 & Comments Fix


Well I upgraded to the latest version of roller, and things went smoth as butter.
In addition to having to run the db update script I had to update my roller context in the server.xml file to point to the new columns and new tables introduced to workaround key words in db's other than mysql. (I'm assuming that was the reason for the change). The changes are highlighted in the roller dev Wiki
Very cool how easy the upgrade was, kudos to the team!
I also took the time to figure out what the comments problem was. The logs were showing it the whole time. I did not have the java mail jar's in the classpath ($tomcat/common/lib is an easy place to put them). Dooh. So I finally have comments enabled and they work!

Permalink     No Comments

See You At the Pole...


Went to See You At The Pole yesterday with the teens of

It was fantastic!

Permalink     No Comments

Jakarta Pitfalls & Real World JSF Presentations Posted


Finally got my presentations posted from the Chicago show. You can find them on line here;

I will be making some changes over the next few weeks due to the great feedback i got from the folks in Chicago, Thanks Again!
After I get them updated I'll repost here.
I would love your feed back as well, however I have some how managed to hose the comments creation ability in roller. I am going to try to update/fix that over the weekend, in the mean time feel free to email me @ Bill's Email.

Permalink     No Comments

MDA Here To Stay?


Surrived Chicago. It was fun, except for the drunks that set off the fire alarm at 3:45 am. I am very glad to be back in the mountains though, something about them makes me feel at peace, despite all I have to get done today...

Anyway back to the subject of this post. One of the best questions I heard all weekend was during the open speakers panel. Some one asked what the future of MDA was. One of the other speakers, Ted Neward, said that MDA was dead and then made the point that the two religous zealot positions are 'model is king' and 'code is king'. I agree about the zealots and I don't think we can make it very far with the two ends of the spectrum calling each other names. But I totally dissagree that MDA (or at least the concept) is dead. So here I will layout some of my thoughts on where MDA is headed without any hype.
A couple of problems in the software industry.

  1. Software is expensive to build
  2. Software is often over budget and behind schedule
  3. Most technology is to complex for the average IT developer to grok - not saying that the average IT developer is dumb, the average IT developer is smarter than I am, they want to have a real life, spend time with their spouse and kids. They don't want to spend thier day off reading the portlet spec. :-)

All this being said MDA provides a way to raise the level of abstraction so that you don't have to understand the underlying nitty gritty to see an application make it into production. Almost no one writes assembly language anymore, only a few gear heads. While its great to have a gear head around it is very hard to build a production system with assembly language. Also its very rare to find a gear head working in an IT shop, they get bored and besides their talents are be better used in a product company, building tools for the IT developers to use.
Another point that Ted made that I agree with is that we can think of MDA as a sort of 'higher level language'. In the same way that we stoped programming in assembly and started using C (and others) and started relying on compilers to generate all the assembly language for us. We can look at MDA as a 'higher level' language that we can program in and expect the 'compiler' (the PIM to PST conversion) to generate all the nitty gritty 'assembly' language. I think this is a decent analogy but there are obviously break downs so we can't take it to far (for example MDA does not address how to code business logic).
So where does this leave us? My take is that MDA is another step away from programming at the nuts and bolts. To see what I'm talking about take a look at the tutorial from Metanology. Download their eclipse plugin (if you are already using Eclipse) and the tutorial and go through it. I think you will be pleasntly supprised. You gain a lot from MDA, most explicitly though is not having to worry about the neuances of building the Session Facade, or how to manage a deep object graph of EJB entities. All that is taken care of by the MDA generator.
What you loose is control. You have to buy into the paradigm of the MDA tool. For many (if not most) IT developers that will be just fine, more time with the family and less controll over the EJB entity. Easy trade off. People who sit in the 'code is king' camp will not be willing to make this trade off. But I think over time the code is king camp will go away (at least to a large degree) in the same way that people who prefered assembly to C. Even though you might be able to increase performance of the app by 5% with assembly, it just is not worth it because of the amazing amount of time that it takes to build the app. It's just not worth it.

This is by no means a definative writing on what MDA is and where its going etc. but it is a quick mind dump of what was triggered in my head as a result of the question this weekend. I'll try to get my slides on line RSN...

Update - 8:00 am
Just noticed this thread started by Dion who as also on the pannel @ TSS. MDA Thread

Permalink     No Comments

Off To Chicago

Leaving tomorrow morning for Chicago to do my very first No Fluff Just Stuff event. I'm very much looking forward to it and will post my slides here on Monday or Tuesday after I'm decompressed.

Permalink     No Comments

Who Cares About Offshore...

I think we have more to worry about from this than we do from offshore developers. :-)

Permalink     No Comments

J2EE AntiPatterns Presentation OnLine

I've posted a copy of the J2EE AntiPatterns presentation that I presented last night @ the Boulder JUG to my .mac account.

J2EE AntiPatterns

There are two chapters of the book avalible from Patterns Central.

Chapter 2

Chapter 5

Permalink     No Comments

Boulder JUG

I'll be speaking tonight at the Boulder JUG about J2EE AntiPatterns. Hope to see anyone in the area there!

Permalink     No Comments