Quick Objects Documentation Akal Tech Logo
Quick Objects Business Logic Framework

Glossary Item Box

Quick Objects Business Logic Framework provides a robust, easy to use and scalable mechanism for you to develop database driven applications. Business Logic Framework is built with power, speed, agility and ease of use in mind.  Our target is to make it easy to get data from the database or save changes back to the database.  This article will describe some of the features and concepts, and how you can use them from a high level view. After the brief introduction you should familiarize yourself with the API by going through the samples.

Object Relational Mapping:

What is object relational mapping and why should you use it?  Relational Databases are probably one of they inventions in the IT industry that have revolutionized how we think, store and retreive data. The relational databases are extremely popular along with SQL (Structured Query Language). Various database vendors have their own implementation/flavor of SQL that they support. Just like relational database and SQL, Object Oriented Programming has revolutionized the way we think about creating software/applications. Instead of writing thousands of lines of code, we still write thousands of lines of code today but the code can do a whole lot more, and is much easier to maintain. Everyone who has experience with Object Oriented Programming knows that it is fundamental way of thinking when you are programming.  Both models are extremely popular and provide a solid and functional way to get things done in its domain.  However, in today's world almost no database is useful without n user interface, and no application/user interface is useful without some sort of a data store/data base.  In .NET Framework the data can be retrieved and updated to and from database by using certain classes in your application.

Although, the data access is possible but it requires application developers to write thousands of lines of code and spend close to half of their time writing data access code. The developer in addition have to deal with the problem of NULL values in the database, and database types are not the same as the types in the .NET Framework. In addition, making changes in the database structure often cause broken applications, and make it tough for application developers to pin point the cause of failure.

Quick Objects Business Logic Framework has a completely unique approach to solving this problem.  Our purpose is to make it simple for you, the database application developer to read and write data to database.  Business Logic Framework along with its companion application Quick Objects Designer can automatically generate your business entity classes based on your database model.  These business entity classes extend the power of the business logic framework.  Since we  have built major part of the functionality for reuse, the generated code is small.  Each of these classes map directly to each one of your tables, and each column is represented by a property in the generated class.  Since each database entity is represented as a class in the language of your choice, any database changes can easily be reflected in your code by regenerating the class files from the new schema.  After regeneration, a re-build of the entire solution will easily pin point every location where the changes were made in the database.

( Tutorial 1, Tutorial 2, Tutorial 3, Tutorial 4 and Tutorial 5 )

Centralized Business Logic:

The best way to organize logic is centralizing your logic. You can start with a class library, that contains all your business entities and the logic. Although there are many ways to achieve this, the most common practice is to extend the business entities with the functionality that is related to them. Other popular design patterns these days are MVC and MVP. You can use the Business Logic Framework and easily build MVC or MVP based applications with ease.  As an alternative or addition to a single class library that houses your logic, you can use a web service that exposes only the functionality you want other applications to utilize.  These steps can be very useful in de-coupling your logic from your user interface. ( Tutorial )

 

Validation:

The most common task of any application is to validate the data being supplied by the user or received from external resources. The common practice is to embed the validation logic into the application user interface. This often requires that the validation logic needs to be duplicated or when the interfaces are not compatible, the validation logic has to be coded again. Business Logic Framework provides the best solution for this problem as it enables you to centralize all your validation logic as well.

Included Validators

  • BaseFieldValidator - Provides basic validation such as ensuring that fields that do not allow nulls are not null.
  • RequiredFieldValidator - Ensures that field value is specified (irrespective of the AllowNulls property value).
  • RangeFieldValidator - Ensures that the field value is within the specified range. The range values can also be retrieved from other field objects of the same business object or a different business object. 
  • CompareFieldValidator - Ensures that the field value matches with another field's value.
  • RegularExpressionFieldValidation - Ensures that the field value matches the specified regular expression.

( Tutorial )

Powerful Search Capability:

Business Logic Framework offers a simple to use yet very powerful capability for you to specify the search criteria for any of the fields, and also utmost control over how that search criteria is executed. In addition you have full control of what fields are included in Search.  You can control each field, or the fields can be automatically included in Search when you assign values to them.

( Tutorial , Tutorial With Search Groups)

Events:

Events offer a simplified and easy to use approach that allows you to control the lifecycle of the business object. In addition events can be used to perform checks or selectively cancel the commands.

Following Events have been added:

( Tutorial )

Disconnected Mode:

Disconnected mode is a very easy to use mechanism of keeping data and its modifications on the client end and can be easily synchronized when needed. The disconnected mode feature is very flexible and allows you to connect directly, or ship the data to a web service or by remoting and then synchronize the changes. In most cases changes can by synchronized in one or two lines of code, and for advanced complex scenarios it usually can be achieved with 5-10 lines of code. The synchronization also supports transactions so the synchronization can be done in its entirety as well.

( Tutorial )