Quantcast
Viewing all articles
Browse latest Browse all 17

Introduction to LLBLGenPro – All you need to know to get started with LLBLGen Pro – Hello World! LLBLGen Pro

In one of my latest projects, I found the client extensively using LLBL Gen Pro which I have never used before. After few hours of playing around with it, I managed to find my way round it just enough to the level that I need to get the basic functionality working.

Hence, for this reason, I thought I will write a post to show the basic and first steps for using LLBL Gen Pro to be used as an introduction by anyone who is, like me few weeks ago, was completely new to LLBLGen Pro.

As it is always the case in most of my posts, I focus on the basic start up functionality straight to the point but if you need further detailed instructions and guides on LLBL Gen Pro then I definitely suggest you start with the online documentation and especially the concepts article. http://www.llblgen.com/documentation/2.6/Concepts/concepts_entitylistview.htm

For the full LLBL Gen Pro 2.6 Documentation, go to their online user documentation at: http://www.llblgen.com/documentation/2.6/hh_start.htm

The main feature of LLBLGen Pro is that it automatically creates a data layer for any application to use. The data layer provides full access and complete data management DML And DDL features for you allowing complete control of the specified Database.

LLBLGen Pro generates this Data layer for a variety of database types including full support for the following data bases: Firebird, IBM DB2, MS Access, My SQL, Oracle 8,9,10 and 11, Sybase, PostgreSQL and of course almost all Microsoft SQL Server version such as SQL Server 7, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server Express and MSDE drive. wow! You literally don’t need to write any code, it’s a full data layer created for you to access any database from any of the above types.

LLBLGen Pro generates the code as a .NET project built in your chosen development language (C# or VB.NET). LLBLGen Pro accesses your database using servername and login id and password in case of DB specific Authentication or just windows authentication if your database allows that. It will then generate the code along with the web.config that already has the connection string to your Database.

Now to use LLBLGen Pro you need to do the following:

First thing to do is obviously to install LLBLGen Pro and add the license file to its installation folder. Next is to run the application from the start menu.

Once LLBLGen is loaded, you need to create a new project. Go to File –> New project. Fill in the details as follows:

Name: Project name, Create: User, Location: Location where to create the LLBLGen project file.

Select the database driver (database type), database server name and  Authentication type, then hit Connect.

Once connected to the server, you will get the list of available catalogs (DataBases) within this database server.

Select your chosen Database(s) (you can select more than one) and then click Create.

Once you have done that, the project is now created and saved at the selected location.

Next step is to go and add the tables, views and stored procedures. To do this, right click on Entities and click on add new entities mapped on tables. To add views, right click on Entities and add entities mapped on views, and so on.

Once you have added all your tables and views, they will be all created as Entities. i.e. converted to classes in LLBLGen Pro generated code.

Now you got the project ready for generating the code, there are much more detailed configuration that you can do if you want to create complex code, but for most straight forward data layers, this project configuration is enough.

Now go to Project –> Generate, and you will get the code generation screen. This is where you need to specify the details about the generated code and the project holding it.

The Generate Project Window has 3 tabs. For simplicity and straight forward, not complicated, first project, you only need to fill in the General Settings details. They are the main and most used settings. You can use more complex ones later if you want to.

Target Language: Language to generate the LLBLGen Pro code in (I only tried C#).

Target Platform: Which .NET framework (.NET 3.5 for latest)

Root namespace: Namespace for the generated project

Template Group: Choose self servicing. This is the default and straight forward option in my view.

Destination Root folder: Folder where all generated code files will be created.

Everything is ready now, Click Generate!

Done.

The generated code can be found at the destination root folder specified in the previous step. You will see that the generated code is of type class library. Now go to your solution and add the generated project (Right click on solution –> add existing Project –> new LLBL generated project).

Next and final step in this LONG post is to just add another project that you want to use to work with the data layer that LLBLGen Pro has just created for you as a new project.

Using LLBLGen Pro classes is easy and straight forward but this is the subject of another post, if anyone is interested?!

Please comment if you want me to blog on using LLBLGen Pro generated code basics and introduction.


Viewing all articles
Browse latest Browse all 17

Trending Articles