Why Mapping Code Generation?
- High performance, open ADO.Net code - in minutes?
- What is the cost of writing efficient, clean and robust ADO.Net code?
- A .Net developer's life made easier
- Unit Test Workbench: Tuning the database tier
- Data tier breakdown and analysis
- Benefits of mapping code generation
- Mapping issues analysis and Orasis approach
Who can you hire to write thousands of lines of pure, high performance ADO.Net code for only what you need in minutes?
This is virtually impossible for any human to do. In addition to that, it is such a tedious job that humans tend to copy and paste, apply non-standard patterns, and add more code than is needed - let alone considering the use of database column metadata for optimum code with less CPU execution cycles.
Perhaps you can shift to an ORM solution that will shield you from ADO.Net and even SQL?
We thought so too; and we did it. We found it more costly, under performing, had to learn some complex Query language constructs that resemble some reverse SQL syntax. And when it came down to tuning, there was not so much we could do rather experiment with the object query language and the entities. In addition to that, it was impossible to utilize our existing domain classes and map at any depth in their object graphs.
Orasis Mapping Studio 2009 attacks such problems in a comprehensive IDE that is simple to use, allows you to target your business requirements directly, and generates all of the tedious code that you hate to write. Some tasks are better left to code generation engines to do so that developers can concentrate on business logic and grow the value of their applications.
How much money do you need to pay for such an amazing engineer?
Well, this engineer would have cost you thousands of dollars and still would not be able to perform as his fellow engineer utilizing Orasis Mapping Studio. As a new product, Orasis Mapping Studio is reasonably priced and will change the way engineers build data access layers. You could try it out and see for yourself how easy it is to auto-generate thousands of lines of pure and efficient ADO.Net code in minutes. We do not mean code for every table either. We mean straight database projections for each business requirement that you may have.
I am not a DBA; actually I am not very good with databases at all. I am a software engineer, but I have to write database code all the time. Developer managers tend to blur the skill sets of DBAs and developers and often think that I can act as one. I often found myself asking "Is there a tool that can help me write database code and even allow DBAs or other developers to come in and easily tune it?"
As a matter of fact, I am one of the core engineers of this system and this is exactly the reason why I am working in this company. I always wanted such a tool to assist me with both SQL and ADO.Net. I always wanted to be able to manage the code that relates to my database tier in one solution.
I used to hate searching through multiple files trying to find out where the database access code that relates to a problem is so I can look at it and fix it. The worst part is that most of the time the “discovered” database access code requires other libraries to compile (nobody forces isolation of the database tier); I'd have to find all of the missing libraries and setup configurations to test the database transaction. The truth of the matter is that I came across the same issues in all of the projects with which I have participated. Between all of the searching, configuration and setup, and the lack of unit tests (of which most tended to be outdated), an exorbitant amount of time and money would be wasted.
With Orasis Mapping Studio, I do not have to write unit tests and they are up to date at all times without writing any test code. My database tier is in one place and I do not have to deal with any configuration files at all. If I need to point to a different database I simply edit my connection and I am ready to go. Another big relief is that I can see the actual data and verify the validity of my results in the same IDE. I do not need to get to another application to do that. When my data access performance is not adequate, I can always ask the DBA to come, put him in the query designer and look at my queries.
I believe that the best development tools for engineers are created by engineers based on their experiences. I hope my two year effort in this product will make other engineers' lives easier and more productive.
With Orasis Mapping Studio, tuning your database tier has never been easier. It allows you to execute all queries and data access code with built-in Unit Test Workbench - no need to write unit tests at all!
- Quickly validate all data access code directly in the IDE.
- Analyze performance and test the raw database server response as well as the actual code that executes the SQL.
- Unlike other data tier solutions (i.e. ORMs, LINQ, EF), no need to worry how the unknown dynamic SQL will perform or scale.
- Test with different middleware provides without writing a line of code.
How is the Data tier is conceptually represented and analyzed by the Visual Mapping Studio?
The power of Visual Mapping Studio is ease of generation, maintainability and tuning of data services. An architect, a developer and a DBA can use this tool to satisfy architectural, coding and database requirements in one place. Each mapping (database access projection) is made up of SQL, an Object graph and the ADO.Net code (database access code) that brings them all together.
To look into this in detail:
A system, in this case a data tier [DT] is made up of multiple data services [Data Service]. Orasis Software strictly enforces [DT] to be isolated as an independent tier and thus enforcing separation between data access and business logic. Operations on data can be performed at the SQL level through the powerful SQL functions provided by the database vendors or they can be performed in code. This is a choice of the architect and most of the time is controversial and open. Orasis Software focuses on performance and we do not enforce any architectural decision on operations of data.
A [Data Service] is made up with multiple data projections to the database that target a business requirement [RDBMS Data Interaction] or a group of related business requirements. An open XML format Visual Mapping Studio project [XMP] is the collection of all of these Data Services and each project can conceptualize different aspects of the [Data Tier]. For each [XMP], the studio allows the creation of a database connection with the selection of a middleware provider from available providers and is stored in the project and can be edited and changed at all times.
An [RDBMS Data Interaction] is a mapping and a mapping is made up of an SQL statement [SQL], an object graph [Object Graph] and the code [Code] which is consisted of database access code [Data Access Code] and an object Graph [Object Graph]. An [Object Graph] is the data contract that is known across different application services. The [Mapping] comes in three flavors:
A [SQL] is parsed into data columns [SQL Data Column] and parameters [SQL Parameter].
The SQL can be of different types.
The SQL parser determines the SQL type and assigns the data columns and parameters.
The data contract [Object Graph] maybe a production of the Visual Studio Code generation engine itself where it semantically mirrors the SQL parameters and data column types [Managed Object Graph] or an object graph that the engineer has constructed in some library [Imported Object Graph]. The mapping control allows true ‘n level’ nested mappings into the [Imported Object Graph] at any child level as long as the child has a default constructor so it can be instantiated. Visual Mapping Studio maintains a library for the auto generated object graphs and its runtime credentials are maintained in the settings for Object library settings. [Managed Object Graph](s) are auto mapped in the mapping control. When the [Object Graph] is mapped the engineer has the liberty to remove any field mappings at any time and rebuild the code.
Visual Mapping Studio Type Selector and Managed Type creator expose all of the public properties of the [Object Graph]. These are the fields that can be mapped [Object Mappable Field].
Essentially,
.
Mappings are defined in the following flavors:
Since an [RDBMS Data Interaction] is a [Mapping], a data service can also be defined to be:
The construction of the [Data Access Code] is the output of the code generation engine and the [Data Access Code] is the outcome of the field mapping definitions. A field mapping [Field Mapping] is a one to one mapping assignment relationship of [Data Column] or [Parameter] to an [Object Graph Mappable Field] as well as in the opposite direction in a persist mapping.
Or
The data access generation engine has the knowledge to apply automatic conversions [Conversion] on a [Field Mapping] that is semantically allowed by the .Net runtime. If such a conversion is required it will be applied.
The Visual Mapping Studio treats the [Mapping] as an individual compilation unit. There are two parts that need grammar verification here which is the [SQL] and the [Code]. The Visual Mapping Studio SQL parser verifies the [SQL] grammar and the .Net compiler verifies and compiles the [Code] grammar.
The [Data Access Code] is contained in a .Net Class as a Class method. So essentially
.
A [Data Service] is translated as a .Net class with the methods [.Net Class Method] being the database access methods to be invoked by the other tiers.
A [.Net Class Method] based on the type of Mapping can take the following formats:
In a [Select Mapping] the [SQL Parameters] are mapped to method parameters and the class type of the [Object Graph] is always the return type as a generic argument in an IList collection.
In a [Delete Mapping], [Update Mapping], [Insert Mapping] and [Stored Proc Mapping ] the return parameter is an int that defines the number of affected rows and the method parameter is a generic list of [Object Graph] whose [Object Graph Mappable Field](s) are mapped to the [SQL Parameter](s).
All [Mapping] constructs translate to .Net code inside .Net Classes that can be exported as Microsoft Visual Studio projects and be used in the business projects in the enterprise.
Code is build to target business requirements directly:
A simple definition of a use case is to describe how to achieve a goal or task. Use cases are often associated with data requirements that reside in some database schema. A data architect (DBA) is primarily responsible for data storage and a business analyst knows the business rules that generate/operate on the data. A [Mapping] or a group of Mappings can target a business use case and through the [Mapping] Orasis Mapping Studio builds optimal and maintainable data access code that achieves the use case’s goal. Data architects and developers can target business use cases through a tool that allows both of them to optimize data access performance as well as isolation of database tier code.
Efficient, manageable, non-propriety code is generated:
The Code Mapping generation engine, advices the field mappings that the IDE generates in open XML format based on RDBMS and .Net object graphs metadata. These mappings allow for extremely efficient ADO.Net code generation that targets .Net runtime conversions, Nullable fields and optimal data access design patterns. It focuses strictly on data access and does not allow introduction of business layer code. The generated code has no framework dependencies with no “using statements” from ant 3rd party vendor libraries. Open source and open project format was the main goal and promise of Orasis Software , as other companies bind data access code with their own framework libraries. By simply editing any aspect of a [Mapping] through the powerful Visual Mapping Studio editors, changes can be regenerated and recompiled with a click of a button.
Code is open and can be called and extended as necessary:
The generated code can be adapted in any Visual Studio 2005 and 2008 project. Visual Mapping Studio auto generates the solution files. The generated code files can be extended and the virtual methods can be overridden as necessary. The classes are created partial as well, to make addition of any extra methods a breeze.
Get only the data you need and where you need it.
Orasis focuses on executing data business requirements that target data use cases. Orasis Software does not generate all sorts of classes with attributes and properties and bind your data model classes to a framework either. The data tier data models ( data contracts) are 100% free of any framework or restrictions and can be either auto generated in a different library or simply imported and mapped to any nested class level graphically ( True N level Mapping of Object Graphs ). No need to attach attributes or write XML mapping code, simply drag and drop and expand nested object graphs as necessary.
Code is free from configuration attributes, reflection, introspection, and third party dependencies:
Simply, operate a configuration free code generation engine, with an IDE that targets straight clean .Net code generation free of reflection and introspection in your data models (Data contracts) for population and retrieval of data. Execute raw, fast SQL without writing it and maintaining it. No need to code in some object query language that creates SQL that in many cases is not optimized at all. Be able to simply optimize performance by allowing data architects to intervene and optimize SQL without breaking your code.
Leverages the most efficient pattern for performing data access:
[Mapping] Code is created in data access methods that belong to data service classes. The interface of the data tier becomes the Data access service classes that utilize database connection pooling, efficient object oriented data access patterns and pure ADO.Net code.
Whatever programming paradigm for data processing we choose; data has the tendency to live on the other side or to eventually end up there. The major paradigms for data processing are object, relational and XML; each paradigm offers many facets and many versions; each paradigm provides specific forms of data models (object models, relational schemas, XML schemas, etc.).
Each data-processing application depends on interrelated data models and artifacts that are derived from data models (such as data-access layers). Such conglomerations of data models are challenging due to paradigmatic impedance mismatches, performance requirements, loose-coupling requirements, and others.
This ubiquitous problem calls for a good understanding of techniques for mappings between data models, actual data, and operations on data. There are a lot of research challenges regarding mappings today. Orasis Software has contacted its own research and developed a system that allows manageability of the mapping concept that involves both the source and the destination of a mapping as well as the “mapping association code” that maps the entities. Our first release concentrates on two “Mapping Entities” that both act as sources and/or destinations:

(Dave Thomas: “The Impedance Imperative Tuples + Objects + Info sets = Too Much Stuff!”)
“Once upon a time it was possible for every new programmer to quickly learn how to write readable programs to Create, Read, Update and Delete business information. These so-called CRUD applications, along with reporting, were pervasive throughout business and essentially defined IT or MIS as it was called in those days.”
But in today’s times it seems that there is a great bit of diversity and multiple different approaches:
– The XML hype is over. XML types and XML documents are everywhere now.
– All these paradigms have triggered a myriad of query languages and 4GL tools.
– Much current CRUD development is done with OO languages with various APIs.
– Various ORM (Object relational mapping) technologies have been introduced.
Either there are respectable, perhaps fundamental reasons for all this diversity or it is just plain IT reality. Orasis Software is introducing an integrated development environment that uses dynamic code generation and makes the concept of a Mapping tangible, maintainable, reusable and optimizable for performance and accuracy.