Doing More with Less - 30 Oct 2009

Most software projects don’t come with a time budget that is bigenough. Jonathan Goodyear discusses several ways you can get more things donein less time.

Jonathan Goodyear

October 30, 2009

5 Min Read
ITPro Today logo in a gray background | ITPro Today

Back Draft

 

Doing More with Less

 

By Jonathan Goodyear

 

Most software projects don t come with a time budget thatis big enough. Therefore, we ve all got to find ways to get more things done inless time. An obvious place to start on that endeavor is to purchasethird-party components and tools. After all, it is rarely more cost effectiveto build vs. buy. The not invented here syndrome can cause a project do die aslow, horrible death. A little math and economics can go a long way towardconvincing the powers that be in your organization whomay not see the value in purchasing third-party components.

 

There are plenty of component vendors to choose from, andmost do a pretty good job. To give a couple of examples, my consulting companyhas had very good luck with ComponentArt (http://www.componentart.com)for Web controls and Infragistics (http://www.infragistics.com)for WPF controls. For hard-core grid requirements, we usually go with FarPointSpread (http://www.fpoint.com). I hearthat ComponentOne (http://www.componentone.com)will be releasing a set of Silverlight controls soon, so I will certainly bekeeping my eye on that. I ve been waiting for a mainstream component vendor tojump into that fray.

 

Another way to cut down on the amount of time that ittakes to complete a software project is code generation. Admittedly, I havebeen pretty slow to jump on the code-generation bandwagon. Part of the reasonfor this is because, until the last couple of years, I was not very happy aboutthe code-generation tools that were available. If you really wanted to do codegeneration, you were stuck rolling your own (which is much more difficult to doproperly than you might imagine). These days, there are two sure-fire tools toget an effective code-generation experience.

 

The first is SubSonic (http://www.subsonicproject.com), anobject relational modeler (ORM) tool on steroids. Just point it at yourdatabase and it will create a complete set of objects to interact with yourtables. It can do this dynamically through some configuration files, but I highlysuggest pre-compiling your objects for production scenarios. SubSonic takesinto consideration relationships between tables, and the objects can be boundto the controls in your applications. Although it can be used for Windowsapplications, it is really meant to be used for Web applications.

 

The only significant caveat that I ve found with SubSonicis that it currently doesn t handle aggregates with GROUP BY functionality.That makes it difficult to obtain report-like data. For those situations, youwould have to resort to rolling your own queries. An oddity with SubSonic isthat it uses all dynamic SQL. The SQL is parameterized and checked for thingslike SQL injection attacks, but that might strike a negative chord for those ofyou who like to use stored procedures as a security layer in your applications.SQL Server 2005 does such a great job of optimizing and caching execution plansthat there is no longer a huge performance difference between stored proceduresand dynamic SQL. The best part about SubSonic is probably the price tag: It sfree! If you re in a time crunch, it s a great way to get a head start.

 

If you desire much more power in a code generator, let meintroduce you to CodeSmith (http://www.codesmithtools.com).CodeSmith employs the concept of templates that you create using a scriptinglanguage that looks very much like ASP.NET (so you should all feel right athome using it). The templates can be nested for code re-use and can also easilyaccess SQL Server as a source for template data.

 

The professional edition of CodeSmith includes theCodeSmith Studio IDE, which is an all-purpose code-generation environment thatincludes IntelliSense. Ironically, CodeSmith can be used for the production ofjust about anything via templates. For instance, you could use it to createadvanced mail merges (something completely outside the concept of codecreation). While CodeSmith comes with a large library of code templates, one ofits greatest assets is that there is a vibrant community of developers creatingand sharing templates for it. The best example is .netTiers (http://nettiers.com). The .netTiers templatedoes a lot of what SubSonic does, except that it takes the approach of usingstored procedures instead of dynamic SQL. Once again, you re a few minutes awayfrom a fully functioning ORM layer for your application. The bad part aboutCodeSmith is that it is not free. It currently costs between US$99 and US$399,depending on whether you purchase the Standard Edition or Professional Edition.When you consider how much time you re going to save, though, the price doesn tsting quite so much.

 

A third way that developers canaccomplish more with less time is magic. By magic, I mean leveragingfunctionality that the platform or your development environment does for youbehind the scenes. In the days of Visual Basic 6 and prior, developers reliedheavily on magic (which became painfully apparent as Visual Basic 6 developersattempted to adopt the .NET lifestyle). For instance, how many developersreally knew (or cared) how VB6 enabled collection classes?

 

While some would say that the magic has gone away with.NET, it really hasn t. In fact, it s making a comeback. For instance, have youcoded against an XML Schema Document as if it s a real class? How aboutprogramming against the ASP.NET Profile Provider based on settings in yourweb.config file? When is the last time you had to actually analyze the WSDLwhen consuming a Web service? Probably never (and that s a good thing). Thereare dozens of similar examples. It s true that magic can be detrimental attimes (like when you re trying to debug a problem and you don t quiteunderstand the underpinnings of what you re dealing with), but for the mostpart, it can be a real time saver.

 

So, there you have it. Three good waysto get your project done in less time. I m sure there are other ways,and each time I discover a new one, it makes my day. Spend some time researchingtime-saving tools and techniques before you head into your next big project. It llsave you a lot more time down the road.

 

Jonathan Goodyearis president of ASPSOFT (http://www.aspsoft.com), an Internet consulting firm based in Orlando, FL. Jonathanis Microsoft Regional Director for Florida,an ASP.NET MVP, a Microsoft Certified Solution Developer (MCSD), and co-authorof ASP.NET 2.0 MVP Hacks (Wrox).Jonathan also is a contributing editor for asp.netPRO.E-mail him at mailto:[email protected] orthrough his angryCoder eZine at http://www.angryCoder.com.

 

 

 

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like