Developing Great Software

Saturday, March 7, 2009


Welcome! My name is Jeff Schwartz and this is my blog where I will be posting about software development. I'll assume that if you are following the articles that you too are either a software developer or that you are interested in software development. Occasionally, I may "speak my mind" on other issues, but this will be a place where I mostly discuss software development. So you wont get a large window into my personal life here other than what I feel comfortable divulging (see bottom of article for that little window). What's wrong with Web application frameworks Developing Web sites over the years has afforded me the opportunity to experience the good, the bad and the ugly of the development process. Part of that process has been having to deal with numerous Web frameworks with promising potential but that ultimately fail to live up to what can only be described as hype. For the most part every framework that I have been exposed to have fallen far short of expectations for requiring far too much configuration and for failing to take into account established and best practices such as failing to implement the MVC (Model View Controller) pattern and failing to provide a component based architecture. In addition to these, the most egregious of their failings in my opinion is that they do not hide the fact that the Web is a stateless protocol. This is most easily recognizable when studying how most Web frameworks deal or do not deal with session state. Those that do not deal with session state offload the responsibility to the developer by providing a hash (a mechanism to save a value and associate it with a name as well as to retrieve a value by its name) to save and retrieve string values and which is stored on the server and persisted over the life of a user's session while browsing a web site. This mechanism is perhaps the greatest single source of complexity, frustration and errors that a developer will experience over the course of an application's lifetime. All this lead me on the search for the Holly Grail, a Web application frameworks that didn't succumb to the same shortcomings as I perceived them. So I began looking for alternatives. I looked at Ruby On Rails but I hated the mixed markup/code pages. I wanted a framework that promoted a separation of concerns. I looked at PHP but like ROR it also has mixed markup/code pages. I looked at Java EE but I wasn't thrilled about the popular Java Web frameworks that seemed to be discussed the most; way too much XML configuration required to get even the simplest of web applications up and running in my opinion. Then I heard of an open source, statefull, MVC, component based framework written in Java called Apache Wicket and it was like love at first sight. I read everything I could get my hands on about it and almost everything about it just seemed right to me. Most compelling is its non intrusive Ajax support. Wicket, it seemed to me, had to be written by people who actually have experience writing real world web applications, especially large applications. Below I list the strengths of the Wicket Web framework:
  1. It is a true MVC component based framework that allows me to do everything using just Java and HTML.
  2. It is statefull. It hides the stateless nature of the HTTP protocol from the developer.
  3. Its Ajax support is excellent and unobtrusive.
  4. It requires almost no XML configuration other than the typical Java application server and application descriptors which are minimal.
To be fair, Wicket isn't perfect. Its shortcomings, as I see them, are the following:
  1. Wicket can sometimes require more coding than some frameworks ( and JSF, for example) because there are no widget libraries that allow a developer to drag and drop controls off of a palette and onto an HTML page and gaining the benefit of the generated code behind the widgets.
  2. A developer can easily abuse the statefull nature of the Wicket framework and overtax the server. Developers must learn to employ loadable and detachable data models to reduce the likelihood of this. Thankfully, Wicket provides its own LoadableDetachable abstract implementation. Developers just need to remember to use it as Wicket itself does not enforce its use.
  3. Like many open source projects, Wicket sometimes suffers from poor or inadequate documentation.
  4. Wicket doesn't seem to get the tech press coverage that other Web frameworks seem to get so sometimes you as a developer may get that black sheep of the family feeling.
Warts and all, it should come as no surprise that Wicket has become my Web application framework of choice. It is my belief that most Web frameworks will follow the lead taken by Wicket and offer similar benefits to the developer. Benefits of Java and open source I have become a huge proponent of Java and open source. Of the many benefits they provide, here are a few I think are the most important :
  • Java is open source and hence comes under the scrutiny of a large group of stake holders. These stake holders have a great deal of influence in ensuring that Java remains relevant and competitive with all the other options available such as DotNet, C/C++, PHP, Python, Ruby, etc.
  • Java is continuously evolving. Java EE, JavaFX, etc.
  • Java supports both the client (Java SE) and the enterprise (Java EE).
  • There are numerous open source libraries available that provide pre-built solutions to common requirements so that as a developer I don't have to reinvent the wheel each time a new project is begun. I am a firm believer in the DRY principal.
  • Java supports write once, run almost everywhere via the Java run time.
  • There are excellent open source development tools available, IDEs such as Eclipse and Netbeans for example, that provide tooling that minimizes the implementation effort.
  • Java and open source minimize the upfront costs to the developer as many of the tools and libraries are free.
  • Java plays well with other technologies such as numerous back-end databases.
  • Java is a a true object oriented language. I cannot over emphasize how important OO is to me. I think it just relates to how my mind works :).
My primary Java web development environment for the most part consists of the following:
  • Windows running either XP or Vista though I have Ubuntu as well and I have access to Mac OSX.
  • The open source Netbeans IDE.
  • MYSQL.
  • GlassFish Server.
  • FireFox with Firebug and JavaScript Debugger.
  • Apache Wicket Web application framework
When developing Web applications I prefer to work with native XHTML and shy away from the WYSIWYG editors. I really like the HTML editor in Netbeans. My javascript library of choice is JQuery. It is another one of those frameworks that just seems and feels right to me. I believe it, too, was written by people who have written a lot of code. For entity persistence and database query services I use both JPA/EclipseLink and Hibernate . To tie the 3 tiers together in my enterprise applications I will use the Spring framework. Spring brings a lot of features to the table but I find it most useful for its IOC (Inversion Of Control) container. Here are some links to some of the open source items that I mentioned were mentionedOh, and here is a little window into my personal life. I have 5 cats and play the guitar. I am a slave to my cats and the guitar is my only passion other than developing great software. Well, that's about it for now. In the future I will post articles that I hope you find interesting and possibly even educational. Since Wicket and Netbeans are 2 of my favorite technical subjects, I'll be writing a lot about them here. So please come back often to see what is new and feel free to comment on anything that you may read about here.

About Me

My photo
New York, NY, United States
Software Developer