Archive for April, 2009

Java and Struts Can Support Friendly URLs

Monday, April 20th, 2009

If you are a Java developer (especially if you use the Struts framework), odds are that you don’t care about friendly URLs.  You probably don’t see anything wrong with URLs that look like /getUserInfo.do or /listUsers.do.  The URLs make perfect sense in a programming scenario as they explain exactly what operation needs to be performed…to a computer program. It goes without saying that humans don’t always think like a computer, hence the clean URL design pattern.

There are tons of articles describing the benefits of search engine friendly URLs, they mainly deal in the realm of optimizing for search engines, improving page rankings and making a nicer impression on the user.

As the core Struts framework was developed and implemented before clean URLs became en vogue, there wasn’t much thought put towards them.  At Gavant Software, we typically will use a web server like Apache in front of our Java applications.  I know we can use mod_rewrite in Apache, but that solution is not optimal.  First off, our developer environments don’t use Apache, so that presents a problem right away.  Second, you are tying business logic to a specific environment.  Maintaining several .htaccess files for multiple environments and keeping them all in sync will surely prove to become a disaster over time.

I finally came across a package that makes use of Struts’ filters.  The package is appropriately named URL Rewrite Filter.  We are exploring the 3.2 version, even though it says its still in beta.  You can check out the site to read up on it, but at first glance this seems to do everything we are looking for.  It keeps the URL logic in the application, it works in all environments and it is easy to maintain.

It is really easy to get started with this, I was up and running creating rules in about 10 minutes.  All it takes is loading a simple jar and an XML configuration file (just like everything else is Struts).  We are still exploring this package in our dev environments, we have yet to perform any serious testing.  I’ll report back after we run some before and after tests to see if application performance is affected in any way.

China’s Green City Plans Put on Hold

Monday, April 13th, 2009

I just saw this article (off Digg) about China’s plans for their new green cities.  It sounds like the ideas of the Chinese Government got ahead of themselves a little in their planning. The article also makes mention of the fact that the plans are put in place without the input of the people who ultimately would be affected.

After just getting back from my trip to China I can saw that though these plans may have been scrapped, or are least put on hold there is still a tremendous amount of development occurring right now all over China.  China’s building spree for the 2008 Beijing Olympics commissioned several well-known international architectural firms to design new buildings.

china-vacation-2009-hangzhou-6164.jpg

(more…)

China Vacation Pictures Posted

Thursday, April 9th, 2009

Finally, after almost a week of collecting, sorting, pruning and editing I have finally posted our main photo gallery for the vacation.  china-vacation-2009-suzhou-5997.jpg

I tried to pick out images that captured the country we were visiting, from the tourist destinations to people in their everyday lives.  For most of these images I did very basic edits:  crops, straighten, adjust levels.  I also made use of the Lightroom presets in the Develop module along with some presets I downloaded from Camera Dojo.  I used the free Lightroom Essentials, though they also have additional presets you can purchase.

Now that I have these up, I flagged a bunch of images that I want to revisist and spend some more time with processing them.  I will post some of these to my flickr stream.

Without further ado, please head over to the gallery and check out the pictures.  Please post your comments about the pictures or the trip.

Post Vacation Week Notes

Sunday, April 5th, 2009

It has been almost a week since we arrived back from China.  In short, I had an awesome time.  I learned so much on the trip, I enjoyed seeing all the sites and people.  It was great. When I get some time in the coming days I will write a two part series about the trip.  Part 1 will consist of the travel to China and our stay in Beijing.  Part 2 will consist of our tours in Suzhou, Hangzhou, Shanghai and our travel back to the states.

Tiananmen Gate

I think I am now just getting back to my normal routine.  Wednesday, Thursday and Friday were crazy at work with trying to catch up for a missed week and a half.  I was able to go through most of my emails on my blackberry on the busride back from JFK to Albany so that helped a little.

This past week I was suffering from sleep bulimia.  I don’t know if that is a real term or not, but that’s how I am describing it.  My sleep schedule from the jet lag is all messed up.  The first night back I stayed up until 1:00am.  I woke up at 5:00am ready to go.  The following night I went to bed around normal time, but I slept until 10:00am.  On Friday night I was exhausted from work and working out at the gym.  I was falling asleep on the couch around 10:30.  I slept until 11:15am Saturday morning.  Finally on Saturday night I went to bed at a normal time, and woke up Sunday morning ready to roll at 5:00am.  I will say that was one of my most productive Sunday mornings in a long time.  I had accomplished a lot of stuff before 11:00.  (more…)