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:50:03.
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
November 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
Oct   Dec



Archives
December 2002
November 2002
October 2002
September 2002
August 2002

Listening To


Valid RSS

Click here to visit the Radio UserLand website.

  04 November 2002

We'll have no casting here...

Spam, Spam, Spam, Spam, Spam, Spam, Spam.. Java's Casts of Thousands More than any other programming language Java forces programmers to embed hard-coded knowledge throughout their code about the types of data items. The numerous explicit cast [Small Values of Cool]

Generally speaking, numerous explicit casts are a sign your design is a bit suspect. Chances are there's some duplication to be removed (so numerous casts become just one), or the design is attempting to be too generic ie. 'built for flexibility', which often (ironically) results in a very brittle and inflexible codebase. I tend to find myself using casts when (a) dealing with the collections framework, and (b) writing framework code. Be suspicious if there are lots in 'normal' code.

Added later: having followed the post to its source, here, it looks like the code is suffering from from the 'too generic' problem. The Additive interface appears to be far too general to be useful. This is just my opinion of course, but I find that very specific and well defined interfaces lend themselves to flexible code far more than vague ones do.


8:55:01 PM      comment []

J2EE Performance

I just got word from one of our developers, who have been testing our portal/CMS product using WebStress. Turns out that with a combo of Apache/Tomcat/JBoss and 50 concurrent users (i.e. no "think time") we consistently get an average page rendering time of about 30-40ms, and this is on quite moderate hardware. Each page has a bunch of portlets on it which displays texts, forums, images, etc. I.e. a normal portal/website.

This is pretty good, but remember this: while the recent benchmarks of PetStore was done with architectures that were optimized for performance, our architecture is created entirely focusing on good design patterns and maintainability. Plus, everything in our system is an AOP object (e.g. Server,Site,Page,Forum,Message,Thread,Link,etc.etc., even a persistence manager is an AOP object), so it's pretty complex (yet simple). No corners have been cut with regard to the design of our product. [Random Thoughts]

There is no substitute for good design (or excuse not to do it). "We must strive to reach that simplicity that lies beyond sophistication." - John Gardner (courtesy of Russ).

Make it run, make it right, make it fast. I find that the third rule is often not an issue if the first two have been followed.

Great stuff Rickard, now when can we get our hands on this monster you've created? :)


10:37:43 AM      comment []

© Copyright 2003 Darren Hobbs