Concepts
Preface
LLBLGen Pro is a system that helps you build solid n-tier applications fast and easy. To be able to do that,
you should familiarize yourself with some concepts forming the foundation of the system, and the source code
produced by the system. In the LLBLGen Pro system you first define definitions for Entities, Typed Lists, Typed
Views and, if you want to include existing stored procedures, Stored Procedure calls. When you're done designing,
you will use these definitions to produce code. It is thus fundamental that you understand what these definitions
stand for and how they are used in the process.
This section, the concepts section, guides you through a set of concepts and their meanings.
This way you will understand why certain things in the LLBLGen Pro system are designed the way they are and how you can
utilize the full power of them.
The concepts
- Entities, typed lists and typed views. These elements are the building
blocks of the code you are designing with the LLBLGen Pro system. The designer of the LLBLGen Pro system
lets you design these elements before they are used to generate code.
- O/R Mapping. O/R Mapping is short for Object-Relational Mapping, and is the general term for
the concept of creating mappings between tables or views and their fields and Object Oriented (OO) classes and their fields, to be
able to represent a table row / view row in an OO program via a class. LLBLGen Pro uses the O/R Mapping technique
in the code generated. O/R Mapper frameworks are also called 'Object persistence frameworks'.
- Entity inheritance and relational models. Using supertype/subtype constructions in abstract
relational models offer you the ability to use inheritance in LLBLGen Pro as well. This section describes the relation between inheritance
constructs of entity hierarchies, how they're typically constructed in schemas and how inheritance in entity hierarchies differs from
plain OO code inheritance.
- Stateless persistence. Statefull and stateless are terms which have a lot of different, often
contradicting, definitions. To understand what stateless and stateless persistence mean in the LLBLGen Pro
system, this section describes these terms and why the system utilizes this variant and not another one.
- Task based code generation. LLBLGen Pro uses a template consuming, task based code generator framework.
This system is very powerful and flexible, but because of that it can also lead to confusion and questions about
where to alter what to get the results you want. This document explains the system and its elements
and how you can utilize it in full to extend it to meet your needs.
- Templates and Template Groups. The core code emitter task performer (see Task based code generation)
shipped with LLBLGen Pro uses templates to generate the code for you. These templates are semantically groupd in Template Groups which consist of
a variety of templates for all the classes that will form the framework that will be the result of
a code generation action. This section explains how they work and what their place is in the system.
- Database drivers. LLBLGen Pro uses database drivers to connect to different types of databases
in order to retrieve the schema's which will be the target of the code to generate. This section explains the
role of the database drivers in the LLBLGen Pro system.
- Dynamic SQL. LLBLGen Pro doesn't use stored procedures for data-access.
Instead, it uses a Dynamic Query Engine (DQE) which generates SQL on the fly, parameterized, to anticipate dynamically on the current situation. This document
explains what the advantages are of Dynamic SQL and how it is embedded in the LLBLGen Pro system.
- Type Converters. This section describes in brief the Type Converter technology build into LLBLGen Pro
With this technology you can specify different .NET types for your entity/typed view fields than which are compatible with the table/view field the
entity/typed view field is mapped on. An example of this of to map a System.Boolean entity field onto a numeric database field.
- Dependency Injection and Inversion of Control. This section discusses the Inversion of Control (IoC) design of the LLBLGen Pro framework and briefly introduces the Dependency Injection mechanism build into LLBLGen Pro.