Blog Home  Home Add to any service  
Beckshome.com: Thomas Beck's Blog - Wednesday, May 23, 2007
Musings about technology and things tangentially related
 
 Wednesday, May 23, 2007

Every IT generation has its seminal tome that transcends time and connects the dots in a way that no book had before it. For the object oriented generation in the 1980s, it was the Gang of Four (GoF) book. For the application architecture generation in the 1990s, it was Fowler’s book on patterns (PoEAA). “RESTful Web Services” will be, in my opinion, that book for the 2000s Web services generation.

There is something absolutely special about this book that readers of GoF or PoEAA will immediately recognize and appreciate. The book covers a breadth of technologies and ideas yet it helps the reader see how they all connect. It uses short code samples (in Ruby, the choice of this generation) to illustrate rather than obfuscate the ideas. Most importantly, it makes the complex comprehensible and delivers epiphany-like experiences throughout the book.

There are too many highlights in this book to enumerate in this review. However, some of the coverage that I appreciated most included:

  • The chapters on resource-oriented design, since there was practically no written information available on this topic prior to this book
  • The chapter on resource-oriented best practices
  • An overview of the service building blocks, including the different representational formats and WADL, which I wasn’t aware of
  • The chapter comparing and contrasting RESTful services with the “Big” (e.g. SOAP) service overhead that is common in most enterprise environments
I would have liked to see this book touch on simple POX versus true REST and handle the resource-oriented security concerns in a bit more detail but you can only ask so much of any one book. I’m fairly confident that “RESTful Web Services”, like the seminal tomes that have gone before it, will become assumed reading 
Wednesday, May 23, 2007 2:07:30 PM (Eastern Standard Time, UTC-05:00)  #    Comments    |  |   |  Trackback
 Tuesday, May 08, 2007

Eliminating or reducing enterprise system batch processing is the bane of many architects looking to convert large-scale legacy systems to current platforms. Some believe, rightly or wrongly so, that mainframe-style batch has no place in modern system architectures and attempt to eradicate its existence entirely. Others are a bit more accepting and attempt to understand the role that batch processing fills in enterprise application architectural space. Even for these people, finding people with the skills to engineer batch processing systems with these newer technologies is not an easy proposition since little or nothing has been written about batch on the Java or .NET platforms.

I’ve seen various attempts at non-mainframe batch processing over the years from the simple CRON / Quartz type attempts to more sophisticated approaches that handled concepts such as scheduling, job control, retry and rollback, and parallel processing. There are commercial applications that purport to take care of much of this for you. Many of these are, for better or worse, nothing more than mainframe tools ported to the Java and .NET platforms with little regard for the differences between mainframe and non-mainframe architectures.

I’ve seen several attempts at batch processing frameworks in .NET. The earlier versions (pre .NET 2.0) of Rocky Lhotka’s Component Scalable Logical Architecture (CSLA) included admittedly simple batch functionality. Avanade’s Avanade Connected Architecture (ACA.NET), which formed the backbone of Microsoft’s Enterprise Library, had a batch element, entitled fittingly ACA Batch. Until recently, the Java open source community had only produced several half-hearted batch processing architectures which, given their lineage as the first “true” legacy replacement technology, is actually more than a bit disappointing.

A couple of month’s back, word got out that Rod Johnson, the brains behind the widely respected Spring framework, was going to be presenting the Spring Batch Framework at this year’s JavaOne conference. Yesterday, the formal announcement was made of the addition of Spring Batch to the Spring portfolio. A combination of Interface21 (the folks behind Spring) and Accenture (the folks behind Avanade) resources have collaborated in the creation of this batch framework.

I haven’t checked out the source code yet but Spring Batch purports to be non-dependant on other Spring facilities. The architectural diagram for Spring, which is shown below, won’t tell you much.


Perhaps more telling are the use cases upon which their framework is based:

  • Simple Batch Repeat
  • Automatic Retry After Failure
  • Commit Batch Process Periodically
  • Asynchronous Chunk Processing
  • Copy File to File in a Batch
  • Massively Parallel Batch Processing
  • Manual Restart After Failure
  • Sequential Processing of Dependant Steps
  • Partial Processing
  • Whole-Batch Transaction
  • Scheduled Processing.

If any or all of these things are present needs of your existing system and will need to be replaced over time, I encourage you to look at Spring Batch. Even if you’re developing in a language other than Java, take a look at Spring Batch. If historic success provides even the slightest indicator of future success, than Spring Batch will be another exciting and innovative addition to the Spring Suite.

Tuesday, May 08, 2007 10:25:41 PM (Eastern Standard Time, UTC-05:00)  #    Comments    |  Trackback
 Wednesday, April 18, 2007

The Microsoft Live Search Maps update to include Firefox support that I blogged about a couple of weeks ago was released sooner than I expected. The updated maps API supporting Firefox has not yet been released but word has it that this is imminent as well. I’ve put together a brief screencast of Live Search Maps running in Firefox. Omitted from the screencast are the features that have been available in Firefox for a while, like bird’s eye view. Focus is given explicitly to navigating with the 3D control.

The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.


When running the 3D control, you can turn detailed building rendering on or off from the options link in the upper right corner of the screen. Detailed rendering chews up more space but looks a whole lot better. It looks like Microsoft is definitely taking the geospatial market seriously and is out-innovating Google in this area. Cross browser 3D support (albeit limited to Windows), bird’s eye views, and other features are real eye catchers. In the 3D realm, I like Microsoft’s approach to creating the 3D space on their own. Google might have overextended the community participation concept with  Google Earth’s philosophy of user-created 3d models. Do we really need 60 different virtual models of the Empire State Building? That seems just a bit too confusing. Still, if you look at the number of mashups built using the respective mapping APIs, Microsoft still has a lot of catching up to do. Either that or folks just aren’t willing to admit that Microsoft might actually have something here.

Wednesday, April 18, 2007 8:56:12 PM (Eastern Standard Time, UTC-05:00)  #    Comments    |   |  Trackback
 Thursday, April 12, 2007

The recent announcement that Google will support GeoRSS in addition to KML as a data format for geographic content in Google Maps is long overdue. This is one of those rare areas where Google trailed both Microsoft and Yahoo and did not seem at all willing to budge. Google's announcement also seals the deal on GeoRSS as the way to syndicate geo-specific data. However, despite the obvious importance of GeoRSS, there is little written material on producing GeoRSS feeds.


I promised a brief tutorial on creating a GeoRSS feed with my post on Yahoo's Tag Maps. More specifically, my post will focus on a boundary update GeoRSS feed. That is, you pass in the maximum and minimum latitudes and longitudes for your map in question and only data about the points that correspond to that particular latitude / longitude box is actually fetched. Obviously, if the user interacts with the map (i.e. panning or zooming), you can use the map's API and some AJAX'y goodness to make calls to the GeoRSS feed to pick up a new set of points that correspond to the updated map's boundaries.

The code below represents the most rudimentary and explicit way to construct a GeoRSS feed using ASP.NET and C#. For the purposes of illustration, no third party GeoRSS libraries are used. It's all basic I/O, streams, and very manual XML construction. Also note a single monolithic call in Page_Load, lack of exception handling and parameterized queries may or may not be the way you want to do things. Try it out though; it does what it's supposed to do really well. If you have any comments or corrections, just drop me a line.

I plan on posting a follow up in a couple of days with a live GeoRSS feed. I just need to find a nice sized set of simple data that I can load into a database and point my code at. Expect to see this soon.

using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Xml;

public partial class BlogGeoRss : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.Response.Clear();
this.Response.ContentType = "text/xml";
this.Response.ContentEncoding = System.Text.Encoding.UTF8;
System.IO.MemoryStream stream = new System.IO.MemoryStream();
XmlTextWriter XMLWrite = new XmlTextWriter(stream, System.Text.Encoding.UTF8);

XMLWrite.WriteStartDocument();
XMLWrite.WriteWhitespace(Environment.NewLine);
XMLWrite.WriteStartElement("rss");
XMLWrite.WriteAttributeString("version", "2.0");
XMLWrite.WriteAttributeString("xmlns:georss", "http://www.georss.org/georss");
XMLWrite.WriteAttributeString("xmlns:gml", "http://www.opengis.net/gml");
XMLWrite.WriteWhitespace(Environment.NewLine);

XMLWrite.WriteStartElement("channel");
XMLWrite.WriteWhitespace(Environment.NewLine);
XMLWrite.WriteElementString("generator", "geoglue.com");
XMLWrite.WriteWhitespace(Environment.NewLine);
XMLWrite.WriteElementString("title", "GeoGlue GeoRSS Feed");
XMLWrite.WriteWhitespace(Environment.NewLine);
XMLWrite.WriteElementString("language", "en-us");
XMLWrite.WriteWhitespace(Environment.NewLine);

// Pick up the query strings for the latitude / longitude boundaries
float UpperBound = 0F, LowerBound = 0F, LeftBound = 0F, RightBound = 0F;
try { UpperBound = float.Parse(Request.QueryString["UpperBound"]); }
catch (Exception ex) { };
try { LowerBound = float.Parse(Request.QueryString["LowerBound"]); }
catch (Exception ex) { };
try { LeftBound = float.Parse(Request.QueryString["LeftBound"]); }
catch (Exception ex) { };
try { RightBound = float.Parse(Request.QueryString["RightBound"]); }
catch (Exception ex) { };

// Build the item nodes for each of the specific tours
SqlCommand cmd = new SqlCommand("SELECT Name, Description, Latitude, Longitude " +
     "FROM TOUR WHERE (Latitude < @UpperBound) AND (Latitude > @LowerBound) " +
"AND (Longitude > @LeftBound) AND (Longitude < @RightBound)",
new SqlConnection(ConfigurationManager.ConnectionStrings["GeoGlueDev"].ConnectionString));
cmd.CommandType = CommandType.Text;
cmd.Parameters.Add(new SqlParameter("@UpperBound", SqlDbType.Float)).Value = UpperBound;
cmd.Parameters.Add(new SqlParameter("@LowerBound", SqlDbType.Float)).Value = LowerBound;
cmd.Parameters.Add(new SqlParameter("@LeftBound", SqlDbType.Float)).Value = LeftBound;
cmd.Parameters.Add(new SqlParameter("@RightBound", SqlDbType.Float)).Value = RightBound;
cmd.Connection.Open();
SqlDataReader dr = cmd .ExecuteReader();

while (dr.Read())
{
XMLWrite.WriteStartElement("item");
XMLWrite.WriteWhitespace(Environment.NewLine);
XMLWrite.WriteElementString("title", (string)dr["Name"]);
XMLWrite.WriteWhitespace(Environment.NewLine);
XMLWrite.WriteElementString("description", (string)dr["Description"]);
XMLWrite.WriteWhitespace(Environment.NewLine);
XMLWrite.WriteElementString("georss:point", Convert.ToString(dr["Latitude"]) + " " + Convert.ToString(dr["Longitude"]));
XMLWrite.WriteWhitespace(Environment.NewLine);
XMLWrite.WriteEndElement();
XMLWrite.WriteWhitespace(Environment.NewLine);
}
cmd.Connection.Close();

XMLWrite.WriteEndElement();
XMLWrite.WriteWhitespace(Environment.NewLine);
XMLWrite.WriteEndElement();
XMLWrite.WriteWhitespace(Environment.NewLine);
XMLWrite.WriteEndDocument();
XMLWrite.Flush();

System.IO.StreamReader reader;
stream.Position = 0;
reader = new System.IO.StreamReader(stream);
Byte[] bytes = System.Text.Encoding.UTF8.GetBytes(reader.ReadToEnd());
this.Response.BinaryWrite(bytes);
this.Response.End();
}
}
Thursday, April 12, 2007 12:15:53 AM (Eastern Standard Time, UTC-05:00)  #    Comments    |   |  Trackback
 Thursday, March 29, 2007

The more I use Ruby on Rails, the more I become convinced that it is damn near the perfect framework for state government Web-based applications. That said, I don’t know of a single state, local, or municipal government that is experimenting with Rails in any meaningful fashion. I have a bunch of stored Google queries that have yielded woefully little information about the penetration of Rails into state government over the past year or so. I fear that is because there really has been little or no penetration.

When I think through the merits of Ruby on Rails and apply the pragmatic brush of my experience with state governments, I’m torn as to whether I believe Rails will ever gain a foothold in this arena. To articulate my ideas, I’ve enumerated, on one hand, my top three compelling arguments why Rails should be overwhelmingly successful in state government. On the other hand, I’ve listed the top 3 reasons why Rails doesn’t really stand a fighting chance. I’ve omitted what some would consider the “classic” selling points of RoR: ActiveRecord, Scaffolding, etc. By all means, I encourage you to look into these if you’re new to Rails. It’s just that they aren’t particular to adoption in state government. In the spirit of remaining optimistic, I’ll list the top 3 reasons Rails has a chance first.

Top 3 Reasons Rails Could Find a Home in State Government

  1. Convention Over Configuration – With this mantra, the Rails community initiated a full-frontal attack against the J2EE crowd (pre-EJB3, have you), where XML configuration files had become the tail wagging the dog. Ruby on Rails, on the other hand, makes all sorts of assumptions about what how things will work and requires developer intervention as the exception rather than the norm. In an environment where developers really do work an 8 hour day (or less), focus on delivering functionality and not on tweaking and re-tweaking the application architecture means significantly greater productivity.
  2. Painless Objects – For many developers, especially those transferring from procedural languages like COBOL or Visual Basic, objects do not come naturally. I’ve seen many state government developers spend years trying to catch onto the concept and still not get it. In Rails, objects just work out of the box, knowing how to deal with the database, providing easy validation hooks and manageable relationships. As a bonus, Ruby tends to be less intimidating to look at for COBOL or classic VB developers than do the C family of languages (C# and Java, in our case).
  3. Embodiment of Best Practices – From unit tests and separation of concerns to database migrations and standard environment definitions, everything is built into Rails. These things can certainly all be done in the Java and .NET worlds, the practices and tools just seem so much more external to the way of doing things and have not been universally integrated into the standard way of doing things in these languages. As an example, how many C# texts talk about unit testing? How many RoR texts don’t talk about unit testing?

Top 3 Reasons Rails Will Fail To Find a Home in State Government

  1. No Salesforce – Surprised that I didn’t mention cost in the reasons contributing to Ruby on Rails success in state government? That’s because it isn’t. The fact that the entire RoR stack is free means less “conventional” ways to make money on the software side of things. You won’t find IBM, BEA, or Microsoft pitching Ruby on Rails solutions to state governments. Furthermore, the large system integration vendors won’t be pitching it either. Without the software vendors and the SI’s, it’s really hard to get in the door at state governments.
  2. Knocked as Not Enterprise-Worthy- Ruby and Rails have been knocked since their inception as great for hobbyist but not enterprise worthy. This is a knock that open source software gets in general and when it’s a scripting language to boot, you might as well be buying your technology from Toys-R-Us. For the real story on this, I suggest that you take a look at Dare Obasanjo’s classic blog post My Website is Bigger Than Your Enterprise. Dare’s points are very good, and although they’re not 100% accurate, you gotta think, “if this works for Google and Yahoo, why can’t it work for me?”
  3. No Formalized Training Program – This may sound even more ludicrous than my first two points. What’s the right way of saying this… “it’s true.” Believe me, it’s a known fact that until there is formal training available for a technology and the big vendors are pitching it, it’s not enterprise worthy. Right?
Thursday, March 29, 2007 1:17:26 AM (Eastern Standard Time, UTC-05:00)  #    Comments    |  |   |  Trackback
 Friday, March 23, 2007

For those Rails developers using RadRails as your IDE, you might have noticed that, in the last several days, the RadRails site has slipped off of the face of the earth. Due to a very unfortunate run-in with their registrar and DNS provider, the nice folks at RadRails are apparently stuck in DNS purgatory. This little mishap coincided with the announcement of the Aptana IDE / RadRails merger. Due to the site outage, many folks missed out on the announcement all together... so I'll repeat Aptana and RadRails are merging. You can now find the mirrored RadRails site here. The location of the RadRails download on SourceForge has not changed.

Aptana has posted a brief roadmap for the new combined product. This should be exciting new for folks using RadRails. It was apparent that RadRails grew far beyond the initial expectations of its creators and, as Ruby on Rails skyrocketed in popularity, support was going to be an issue. The creators of RadRails did a great job of maintaining and expanding the IDE for a long time. They then made the greatest of sacrifices and, instead of letting their product die on the vine, they merged it with a likeminded product for the greater good of their RadRails users. It would be great if all open source project owners functioned in this fashion. 1 or 2 great products is much better than 9 or 10 mediocre products.

If you haven't tried out Aptana, I encourage you to give it a look. It's a great Eclipse-based JavaScript IDE. With planned support for RHTML integration and hopefully more extensive code assist capabilities to come, there is much promise in this merger. Not that it is required, by any means, but a high quality IDE will only serve to further Ruby on Rails case and attract more and more developers from the Java and .NET camps to at least give RoR a look.

Friday, March 23, 2007 5:29:03 AM (Eastern Standard Time, UTC-05:00)  #    Comments    |   |  Trackback
 Sunday, March 18, 2007

I’ve spent the better part of the last 6 years dealing with state government systems that manage information about citizens receiving government services. As creative as state government can be in some areas, presenting new and interesting visual metaphors for the management of citizen and case (i.e. collections of citizens) information is certainly not a forte. This problem is not solely the fault of state governments. Rather, it’s the product of state government business leaders’ lack of knowledge of the available options, educational obligation complacency on part of government’s IT partners, and the real or perceived difficulty of being visually creative in an environment where accessibility compliance is not an option. 

There are ways around the accessibility compliance constraints; up to and including parallel functionality with both accessibility compliant and non-accessibility compliant versions. Education, however, is not always as easy to come by. With the technology supporting rich Internet applications, we can do so much more than could be done with an old 3270 mainframe terminal. Yet, across a broad swathe of in-house, outsourced, and packaged case management solutions, you’ll rarely find anything beyond some minimalistic styling and obligatory “smiling citizen” pictures that could not have been done 20 years ago. There are many new metaphors that we could use to make the data presented by case management applications more meaningful to workers. I present three of the more radical concepts below:

 

1.      Geospatial - Use a geographic metaphor to allow the discovery of relationships between individuals, cases, caseloads, or entire programs. With the advent of map mashups, this has surely become one of the more popular new visuals for creatively displaying data on the Web. For publicly accessible examples of what is possible, check out Chicago Crime and Citystat. These two examples represent visualizations of publicly available data in Chicago and Wasington D.C. , respectively. Also, these were built on top of relatively garden variety two dimensional maps. More recently, things are moving more in the direction of quasi 3 dimensional (a.k.a. “Bird’s Eye Views”) and fully navigable three dimensional models. If you haven’t seen Microsoft’s maps at all (or as of late), I strongly encourage you to give them a look. Right from your browser you get fully scrollable 2 dimensional maps and bird’s eye views of many major and non-major (check out the Capitol Complex in Harrisburg , as an example) US cities. As a bonus, if you’re using Internet Explorer, you can get fully virtual reality tours of several major cities. Firefox users, don’t despair, support is supposedly being added soon for Firefox too.

 

2.      Temporal – Use a timeline metaphor to show a longitudinal time scale relationship between various events. These events could be various transactions within a case or across multiple cases. Simile Timelines are an exciting new way to model such relationships. Check out the example timeline for the events surrounding the assassination of John F. Kennedy.  Notice especially how the top and bottom timelines interact together as you drag them independently. For bonus credit, check out how the scale of time changes in the most critical moments surrounding Kennedy’s assassination from months to days to hours to 15 minute intervals. Timline, much like the maps that support the geographic metaphor, has a fully API against which one can program. This leaves the possibilities for state government based uses of the timeline metaphor wide open.


3.      Network Graphs – Using the network metaphor enables the discovery of complex relationships between people and other entities. With a deep network of relationships in most case management systems, this is potentially one of the most useful new metaphors. Given the graphic and data intensive nature of displaying these relationships, it’s also one of the most difficult ones to implement technically. There are some great examples of this being done on the open Internet though, most of them using Flash. Check out Tracking the Threat’s terrorist network navigator. Imagine using the same thing to expand the network relationships in a case management system. Moritz Stephaner’s Relation Browser is also a great example of what can be done in this space. Unfortunately, there’s a lack of standard tools to build these types of models. The one tool that I know of (Prefuse) uses Java and Java Applets instead of Flash. Hopefully, we’ll see some key players recognize the opportunity and create standard tools to support this metaphor in the near future.

These really are the more radical of the changes that I can think of. There are, of course, more rudimentary changes that can be made that could have just as profound of an impact. The use of pictures with personal profiles or the ability to perform full text searches on the system’s case notes (the unstructured data lifeblood of many systems) immediately come to mind. As much of a challenge as it seems to implement these suggestions for existing case management systems, the far greater challenge lies in adjusting users’ approach to leveraging these new features. A genuine knowledge worker approach is required to get the most out of these features. This is a proposition bound to be a very exciting opportunity for some and a very scary change for others.

Sunday, March 18, 2007 1:13:45 PM (Eastern Standard Time, UTC-05:00)  #    Comments    |  Trackback
 Friday, March 09, 2007

One of the most common misunderstandings or missteps in following a particular software process is to follow that process in a blind, one-size-fits all fashion. This is especially true if you are mandated organizationally to use a particular software process. Just as the founding fathers could not have foreseen the challenges of the modern world when authoring the Constitution, there is no way that the creators of a generic software process could understand the nuances of every particular project where their process would be used.

 

Processes need to be malleable so that they don’t incite the “baby with the bathwater” response in which the entire process is tossed aside because it proves too inflexible. Good processes can and should be customized. There are several methods that can be used to achieve this end. One of my favorite articles on this topic is an oldie from Per Kroll (“Dr. Process”), entitled How Can We Customize the RUP? In this article, Per lays out 3 basic methods that can be used to customize the RUP:

 

  1. Make comprehensive changes to the RUP with the Process Workbench (Heavy)
  2. Produce a custom RUP configuration using RUP builder (Lighter)
  3. Create your own development case and place it in the project-specific Web site. (BINGO)

First reading this article caused me to re-examine the development case, an often overlooked project artifact. I fell in love with the idea of the development case but the RUP and online examples I could find at the time didn’t live up to my expectations. Between online examples, my ideas, and a great section on the development case in the book Software Development for Small Teams: A RUP-Centric Approach, I pulled together a template that I’ve carried with me, more or less unchanged, until this very day. I’ve included a copy of this template for you to download. The version that is included in Pennsylvania’s BSCoE Software Engineering Process (SEP) is very similar in many ways. You can find that version in the center ring of the online SEP.

 

 

The beauty of the development case is that: (1) it’s very lightweight, just a Word file; (2) it works equally well with a commercial process tool or with no process tool; (3) facilitating a meeting to walk through a development case forces people to communicate about what will and won’t work for them and to make decisions that often have very beneficial impacts for their projects. The best part of the development case is that it works very much like object-oriented inheritance. Customizations from higher levels in an organization can trickle down to lower layers of an organization with customizations and/or additions being provided at every layer where this is required to add value.

Friday, March 09, 2007 12:52:01 AM (Eastern Standard Time, UTC-05:00)  #    Comments    |   |  Trackback
Copyright © 2008 Thomas Beck. Some rights reserved.

Creative Commons License