Skip to content

Interesting posts about web application performance

The good folks over at the YUI blog posted this: What the 80/20 Rule Tells Us about Reducing HTTP Requests a while ago. I bookmarked it, but wanted to point it out to other folks–it’s a nice bit of research, with numbers and graphs and all that good stuff. It opened my eyes to various non intuitive aspects of web application performance. The whole series is a nice read; part 1 is linked above and here’s part 2, part 3 and part 4.

GWT impressions

After about a year of working with GWT, it seems to me like there are two places where it is really useful as a technology:

  1. Quickly building relatively sophisticated user interfaces for entire web based applications. An intranet ‘client-server’ type application, like a timesheet, would be a perfect fit. If you use Java on the server side, domain objects can even be shared.
  2. Building small widgets that have anything beyond the simplest logic. This is the best way to integrate GWT into an existing application–add small bits of functionality that improve the user experience. You can use GWT to manage, reuse and package this logic.

However, what GWT is best for is not the limiting factor for GWT; rather, if you aren’t a Java developer, GWT just doesn’t make sense. (I’m ignoring the fact that if a user doesn’t have JavaScript enabled, GWT doesn’t make sense, since this is a failing of almost all the Web 2.0 rich user interface toolkits).

For me, being a Java developer and a fan of Eclipse, GWT is a natural fit for a number of reasons. The Java object serialization support, the use of an IDE to code Javascript, the JRE emulation, and the event driven user interface model all make it extremely comfortable to develop in the language. If you’re already coding the server side in Java, GWT is one less language to learn (until you need to do something that isn’t provided for in the emulation libraries, or you need to use a Java 1.5 feature, or a bug leaks up through the abstraction; of course, these problems will never happen).

While I don’t have deep knowledge with other toolkits (I’ve worked slightly with the Yahoo! User Inteface Library and have toyed with Dojo), it seems to me that many many folks can get by using them; there’s no tie to Java.

If someone was going to ask me whether or not they should use GWT, I’d boil it down to the following questions:

  1. Are your developers familiar with Java? (If ‘no’, don’t use GWT.)
  2. Are your developers familiar with JavaScript? (If ‘yes’, consider not using GWT.)
  3. Are you integrating with an existing app? (If ‘yes’, GWT might be a good fit.)
  4. If so, are you planning to ‘web 2.0’-ify the existing application, or add widgets to enhance existing functionality? (If planning to ‘web 2.0’-ify existing functionality, don’t use GWT.)

On a final note, I don’t want to bag on GWT too much. GWT has improved tremendously over the past year or so, and I’m very glad to have used it. I think it’s quite cool tech, and I think it has really improved the user experience on my client’s site.

Thank you, Google, for releasing GWT and making it available for me to use.

Four year blogaversary

It’s been four years and a few days since I started writing this blog. It’s been a great experience. I’ve had good months (15 posts) and bad months (1 post), but I’ve written 352 posts over the last four years. I’ve learned a lot from this blog–how to shoot my mouth off, how to acknowledge mistakes in public, and how to write a post that gets hijacked by others for their own purposes. I thought I’d take the opportunity to highlight four of my favorite posts.

  • Business Process Crystallization: This is a nice little post about how software is both shaped by the business process it will assist and shapes that same process. It’s one of my original thoughts–at least I haven’t seen too much literature taking this view of software.
  • Installing the median user defined function on MySQL: I always enjoy step by step tutorials, and this is one of the better ones I have written. I also enjoyed the challenge of making a mysql user defined function work when I’d never done any significant C development.
  • The Social Life of Information: This book was a slow read, but explains a fascinating concept–that much of the information we receive is contextual and connotative. This was a revelation to me, since I’m more comfortable with denotative, explicit information.
  • Step By Step: A Mortgage Calculator using GWT: I enjoyed this blogging experience, the entire series. My client and I worked together to release a site repeatedly over a week, as well as releasing the source code and documenting the entire experience of learning, developing and deploying a new technology.

Choosing new technology, or tail chasing

Robert Hanson, who built the very useful GWT Widget Library, has an interesting post where he asks:

Let’s say that you are a developer, and you have been spending the past year or so really getting to know a given technology. Now you are being told that the technology you are using is inferior to this “other” technology. You take a look and realize that it might be best to switch. A year later you finally have a good understanding of the tool, and use it with great skill. Then someone tells you about this “other” technology.

How many of us built our own MVC frameworks only to move to Struts, then maybe on to Spring MVC. Sure, there are some improvements made in each technological step, but since you are spending most of your time really getting to know a product you often spend little time getting the most out of it. This is compounded by the fact that you often use several of these products at the same time, adding to what you need to learn.

So what is a dog to do? Although you are moving forward, you never quite catch the tail. Should you just stop moving forward, or run faster or slower?

Personally, I think that there is a middle ground. As a developer, you need to keep up on broad trends and tools, because they can make you so much more productive. The problem arises when you don’t know how much more productive you will be, until you use the technology or tool for a while….

However, just because there is a new tool around, that doesn’t mean you have to use it. In fact, if you have an existing technology that does the job, you should not abandon it just to move to the new technology. There’s always a cost analysis, because learning a new technology is not free. Your time is worth something.

This cost analysis is something that developers should learn to do and appreciate because that process is exactly what most companies need to do before they decide to implement or build new software. Just like a developer, most companies think that a new technology, or system, will help them, but are unsure how much it will help them, and how much it will cost them. Just as for a company, a developer deciding to learn and use a new technology is not solely a technology decision.

There are many ways to minimize the risk of learning a new technology–prototype, read documentation, be conservative and consult someone who’s an expert in the new technology (which means they’ve already made some of the mistakes). Each of these have benefits and detriments. Prototyping takes more time than the others. Reading documentation is great if there is documentation, and if the documentation is accurate, but might teach one as many lessons as using the technology. Being conservative means that you’ll probably miss out on some productivity improvements, just as you’ll miss out on some time sinks. Consulting an expert is great, if you have access and know what questions to ask.

I think the answer to Robert’s final question is intensely context sensitive. It depends on the following five considerations, among others:

  • how crucial a new technology is to your productivity (ie, if you are a java business developer, learning GWT might be lower on the list than learning Spring)
  • how easy you think it will be to learn
  • whether you can be paid to learn it
  • how much spare time you have
  • whether you have a project to use the new technology on

[tags]tail chasing,technology[/tags]

IE 7 does not have a built in javascript debugger (update)

I recently was debugging the dreated “Operation Aborted” error, which was appearing in both IE6 and IE7. (Incidentally, Joel has written a great delineation of the three parts of software: design, development and debugging.) I usually do development in FF and then test in IE. But this bug is specific to IE, which made debugging harder. I was using IE6, looking at the error message and trying to find the line numbers it referenced. Pretty miserable. The fact that I was dealing with external code (Google Analytics, Google Website Optimizer) made it all the more fun!

I was testing at work, and feeling a bit frustrated. I found a reference to the Microsoft Script Debugger, but wasn’t able to find it separate from Microsoft Office.

I went home and tested on IE7, and saw the same error. I thought I’d try to find the debugger for IE7. It was easier than I thought–all you have to do is go to ‘Tools’, then ‘Internet Options…’, click the Advanced tab and uncheck ‘Disable Script Debugging (Internet Explorer)’. Then, when you visit a page with a javascript error, it asks you if you want to debug it. Fantastic!

As far as I know, that was a vanilla install of IE7. I’m thrilled they’re shipping a debugger, as it will make developing for them just a little bit easier.

Update: I was incorrect, I think that you need to install the script debugger separately.  Link below.

[tags]ie7,javascript debugger[/tags]

Beware collections with GWT 1.4 Final

I just upgraded our application to GWT 1.4.60, aka 1.4 Final. The upgrade was for the most part, pretty smooth. Only one issue reared its head. I have a number of objects that are Serializable that contain other Serializable objects. I had not marked them with the @gwt.typeArgs javadoc metadata, and things had worked just fine in GWT 1.4.10 (RC1). However, with 1.4 Final, I kept getting an InvocationException.

These tend to be real pains, because I’ve never seen them raised in code I write. Instead, they seem to arise from misconfiguration. Last time I saw one, I was compiling against the wrong version of gwt-servlet.jar.

This time, I hadn’t marked the contents of various Sets and Maps with the contents (using the aforementioned @gwt.typeArgs markup). I received warnings at compile time about that, but had received warnings with RC1 as well. I had, in typical developer fashion, noticed that the code still worked and thus ignored the warnings.Putting that markup in my code seemed to solve the problem.

There’s one thread on the groups about something similar to this. Here’s the tracking issue.

GWT 1.4 thoughts

I’ve been working with GWT 1.4 RC1 for the past few months. I’ve really enjoyed a number of things about this release, including some of the new widgets (the auto suggest box is pretty cool), and the size decrease (we saw size decreases of 20% without changing a bit of code). More on the release in the release announcement.

However, the number one reason you should upgrade to 1.4 is that it allows you to share value objects between the GWT view throughout the entire Java stack, all the way down to Hibernate (or whatever other data access layer you use). The reason is that java.io.Serializable is now a synonym for IsSerializable, the marker interface for Java objects that can be sent to the client. Obviously, if you are not using the RPC mechanism, this is much less important.

There is still some doubt about the GWT 1.4 release date, but you can check out the auto suggest box in action at Colorado HomeFinder (the browse homes link in the nav bar). I think this will be a killer release when it finally happens.

July Boulder Denver New Tech Meetup Notes

I went to the Boulder Denver New Tech Meetup last night, and it was a blast, as always. Due to the format, 5 minutes of demo, 5 minutes of questions, it’s hard to get much technical depth in any one presentation, but it is always interesting to see the wealth of different businesses that are utilizing the Web. The New Tech Meetups are now being videotaped, but I’m not sure where the video is being posted. Additionally, the CU Entrepreneurial Law Clinic is looking for 6-12 clients–they provide free legal advice to startups.

I’m going to do a separate post about each speaker, and link to them here.

At the end of the night, several folks announced they were looking for people to fill positions: 1 flash, 1 java, 1 flex, 1 ruby on rails. I thought that breakdown was interesting. In addition, someone from the Altera group stood up and announced they were looking to do deals of $3-5M, investing in energy sector startups (and no, just using electricity doesn’t make you an energy sector startup–someone asked).

July New Tech Meetup Notes: Printfection

Printfection was the last company to present–they do on demand printing of t shirts, etc. They started up in a DU dorm room. They are essentially a cafepress clone that focuses on inkjet printing to cloth, rather than screen printing. They compete on quality and automation. Printfection is also are more of a white label printer, where you can set up a very customizable storefront. Eventually, they’re going to have an API (after the Christmas rush) that other sites will be able to use. Their average order size is 1.8 shirts, which I thought was quite interesting–most of their business is micro orders. Just another example of how the internet is shaking up typical business models by making mass customization cheap.

I like to support local companies, so I’ll give them a try next time when I do a custom shirt. I have a couple of cafepress shirts, so I’ll be interested top see how they compare.

[tags]cafepress, micro orders[/tags]