Product Reviews

TierDeveloper

Upper-crust code generator.

This is the high-end .NET flavor of a code-generation tool that's also available for VB6, C++, and a variety of Java flavors. It's designed to start with a database and generate a bunch of the routine code you need to create .NET applications that use true middle-tier serviced components (ie, that use COM+ services to handle things like transactions). On the backend, TierDeveloper supports SQL Server, Oracle, and DB2.

With the Enterprise Edition, you can choose whether to generate VB .NET or C# code (less-expensive Professional Edition packages limit you to one of the two languages, and only support SQL Server databases). The first step in using TierDeveloper is to connect to a database. From there, you select the tables you're interested in and generate business objects. If you'd like, you can also generate a Web application that uses these objects, and HTML design documentation. The objects themselves provide a layer on top of the database with methods such as "Insert" available. Here's a tiny snippet from some of the generated Web code:

Int32 result = 0;
NWTest.Orders ObjOrders = new NWTest.Orders();
NWTest.OrdersInfo ObjOrdersInfo = new NWTest.OrdersInfo();

ObjOrdersInfo.OrderID = vOrderID;
result = ObjOrders.Load(ObjOrdersInfo);

ObjOrdersInfo.CustomerID = vCustomerID ;
ObjOrdersInfo.EmployeeID = vEmployeeID ;
ObjOrdersInfo.OrderDate = vOrderDate ;
ObjOrdersInfo.RequiredDate = vRequiredDate ;
ObjOrdersInfo.ShippedDate = vShippedDate ;
ObjOrdersInfo.ShipVia = vShipVia ;
ObjOrdersInfo.Freight = vFreight ;
ObjOrdersInfo.ShipName = vShipName ;
ObjOrdersInfo.ShipAddress = vShipAddress ;
ObjOrdersInfo.ShipCity = vShipCity ;
ObjOrdersInfo.ShipRegion = vShipRegion ;
ObjOrdersInfo.ShipPostalCode = vShipPostalCode ;
ObjOrdersInfo.ShipCountry = vShipCountry ;
if (result == 0 )
{
   result = ObjOrders.Insert(ObjOrdersInfo);
   vMessage = "Record added successfully.";

}
else
{
   result = ObjOrders.Update(ObjOrdersInfo);
   vMessage = "Record updated successfully.";
}

Of course, in real life you'd layer your own application on top of these objectrs, but as you can see, the entire database layer is abstracted away to somewhere that it won't bother you. The TierDeveloper design environment also lets you do fancier things than just map columns to properties. For example, you can add a stored procedure as a method of an object, or create custom methods that take only some of the fields in the object. You can also generate some ancillary objects such as a "hooks" class that gives you some additional events for your data objects, or Web Services interfaces to particular classes.

The generated code seems solid, and the samples I played around with turned out fine. You can download a 30-day testdrive from the company's Web site; the only limitation is that it can only generate code from some specific sample databases (like SQL Server's Northwind sample). That's plenty to give you a good idea of the potential that the product might hold for your business.

About the Author

Mike Gunderloy, MCSE, MCSD, MCDBA, is a former MCP columnist and the author of numerous development books.

comments powered by Disqus
Most   Popular