When Seattle-based Avanade Inc. and Microsoft Corp. recently released Enterprise Library, an architecture framework of reusable software components for Microsoft’s .NET framework, they fired another salvo in the ongoing battle to speed up application development by making it easier to reuse

chunks of program code.

Jeff Kempiners, .Net solutions practice director at Avanade Canada in Toronto, says Enterprise Library unifies a number of building blocks created by Microsoft’s patterns and practices group. Early in 2005 Avanade plans to release Avanade Connected Architecture for .NET (ACA.NET) Release 4.0, which Kempiners described as a service-oriented and aspect-oriented architecture built on Enterprise Library. Both are designed to help developers use pre-written code blocks for common functions such as security, logging and exception handling and spend less time writing “plumbing” code, he said.

Microsoft will also address reuse with Visual Studio 2005, a new release of its development environment due in the coming year. Lenny Louis, .Net developer tools product manager at Microsoft Canada Co. in Mississauga, Ont., says the new release will provide more facilities for modeling, testing and documenting reusable code components and applications built with them.

Indigo Books & Music Inc. is using Enterprise Library to rebuild its Web site. Doug Caldwell, Indigo’s chief technology officer, describes the library as “a set of Lego building blocks that I can use to build my Web site.” Working with the prefabricated components is speeding up initial development, he says, but it will continue paying off in the future as Indigo regularly modifies the site. If the retail chain wants to make a change in credit-card processing, for instance, “I can unplug that, enhance it and plug it back in without having to redesign my whole Web site.”

Code reuse has been an enduring dream for at least two decades. Developers have tried to create reusable code components and to facilitate reuse through concepts such as object-oriented programming. The latest development is Web services, which would allow processes to call each other over a network rather than duplicating each other’s functions.

Web services provide an architecturally neutral way of integrating systems, says Arthur Ryman, a software development manager at IBM Canada Ltd.’s Toronto labs. By providing standards, Web services allow components written using different development tools and located in different places to call each other.

Reusable code plays a significant role in software development today, says Greg DeMichillie, senior analyst at Directions on Microsoft, a research firm in Redmond, Wash., but it relies primarily on libraries of pre-written code modules, such as Microsoft’s .NET framework and others. In fact, DiMichillie points out, systems such as SAP AG’s software are really just libraries of modules that can be customized to a particular user’s needs. Independent developers and in-house IT departments are still not writing a lot of reusable code, says DeMichillie — largely because it simply takes more work.

“It’s easier to build my personalized inventory tracking component than it is to build generic inventory tracking code,” DeMichillie says. The design of a reusable component must consider all the ways in which it will be used in the future, and the code then must be written to work in all those situations without unduly compromising on what is needed in any of them.

The quality of the code becomes even more important when it will be used again and again, adds Louis at Microsoft. “If this code is going to be reusable, I need to make sure it’s the best code possible.”

If it isn’t done right, says DeMichillie, “the end result can be something that doesn’t meet the performance goals you had in mind, or is so complicated that another developer can’t understand it.” And doing it right can take considerably more time up front than just writing code for one-time use.

But while the idea of reusable code raises the spectre for some of lowest-common-denominator components designed to do everything that consequently do nothing well, it doesn’t have to be that way, Louis says. Code components can be made configurable to suit different situations. “You can give it as much functionality as you want and expose only what people need,” Louis says.

“We make it as configurable as possible … without going to the point where we might inhibit performance,” says Avanade’s Kempiners. If source code is available to developers, he adds, they can further extend code components when necessary.

“You don’t really have to compromise if you’re prepared to do the work,” Ryman agrees.

Ryman adds that the open source movement offers new opportunities for code reuse, because of its emphasis on sharing code and making source code available.

That also addresses the intellectual property questions that can obstruct some attempts at code reuse. Developers can reuse their own code or those of others within their own groups, or use commercial libraries of components under license, but reusing the work of others is a problem. Ryman says IBM is promoting the idea of “community source,” in which developers within a larger organization share code.

Finding the code you need when you need it is another issue. Standards like Extensible Markup Language (XML), Simple Object Access Protocol (SOAP) and Universal Description, Discovery and Integration (UDDI) help by providing standard ways for components to identify themselves to each other.

Louis describes Microsoft’s long-term vision of software factories as “essentially software-generating software.” Developers will build applications for specific vertical markets by specifying the broad parameters of the application, which will then be put together from components.