Every time we have to develop a n-tiers application, that works on a database, we need to write source code to use these data. In an object oriented environment, the source code has to be modeled in classes and encapsulated in a Data layer and then used in a Business layer.
During the development process of an application we can say that:
– The code for the Business layer always comes from the Customer demand (Business Requirements), and such requirements are different every time.
– The code of the Data layer always comes from the operations made on data, and such functions are always the same (Select, Insert, Update, SPs, ….).The structure of the Database is created properly to support indirectly, the Customer demand, and directly, the requirements of the application that can change. If we get our attention on Data layer, we can see that all the source code, needed to access those data (Data Object), will not be bind directly to the Customer demand, but it will be bind to the Database structure. This means that every time we have to re-write the Data Object for the specifically database.
Solution: Andrea Ferendeles has developed TDO – Typed Data Object is a .NET source code generator (C#/VB) for data layers based on Microsoft SQL Server 2000/MSDE/2005/Express. Which allows .NET Framework 2.0 developers, to have the source code automatically generated for MS SQL Server databases. It is made up of a NET assembly (Tdo.dll) and a source code generator (TdoCodeGenerator.exe). The source code generator produces a collection of derived classes (VB.NET/C#.NET) that extends the base classes within the Tdo.dll assembly, all under the Object Oriented model.
Every generated class has the scope “to represent” an object of your SQL database, where object are Tables, Views, Stored Procedures, Functions. According to this model, every table or view, etc…, is considered as an object itself that shows its attributes and operations (that are properties and methods).
That means that the single cell of a table or the single parameter of a stored procedure will be seen as object itself. All these classes are enclosed in a hierarchically macro-object as a representation of the entire database – the TdoHelper class.
More ahead we’ll see all the possible operations that we can execute on our database (select, insert, update, delete, stored procedure, etc…) that will be called from the present methods within the TdoHelper class objects.
- TDO V 2.0.50727.20 (Installer Or Source Code)
- Article by Andrea Ferendeles
- Home Page
- Screen Shots
To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/tdo-users
or, via email, send a message with subject or body ‘help’ to firstname.lastname@example.orgYou can reach the person managing the list at email@example.com