WellFrame (The Wellcode Framework)

WellFrame is a fullstack software developing framework. It produces out of database definitions (tables, columns, references, indexes) a well defined and complete framework based on the MVC architecture.

The code generation is controlled via templates so that the framework can be generated in several target languages ​​(such as C #, Java) – however the main  focus here is C#. The framework components focus are:

– C#, the .Net framework for the data and business layer

– HTML5, CSS3 and Javascript for the presenation layer including windows metro apps.

– Android/iPhone apps, used as phone-gap for the web application.

The framework is based on modern technologies and automatically creates an environment that includes a data and business layer. Based on this layers a Web service (WCF) will be automatically generated, the options of the web service properties can be controlled with the help of meta informations defined by user (see “*-meta.xml” in the downloadable examples here).

For the presentation layer the framework provides basic tools, even thow a complete web development environment in HTML5, CSS3 and Javascript. The web development environment also includes an environment with basic functions to create Android apps and windows metro apps.

The Android app acts as a shell (similar to phone-gaps) to control the Web application and can access features of the Android operating system.

Main Focus in the provided framework is setting up a development environment that provides basic functions for modern software development, without being dependent on additional tools. So own requirements scale better and old projects can be better ported.

The ready-to-use web components and the web environment of the framework make the transition for people without web experience like a self-evident task.


The main function of the Framework is its dynamic and transparent capability, this will only be seen if all the components of the Framwork are used together. For better understanding and illustrating the functionality, the components will be individually presented and illustrated with examples.

Following flow chart illustrates the operation of the Wellcode Framework:


At the end an example including a complete development environment will be posted, which presents all the components togather.


To work with WellFrame, you need the library WellFrame.dll, that includes all the necessary functions enabling working with the framework.

An example can be downloaded here. This example uses the framework WellFrame to reflect/map the person from the Microsoft sample database AdventureWorks and perform some routines on it.

The AdventureWorks database, you can be downloaded from the Microsoft or Codeplex sites here. Otherwise the the person table can be created in any database using the following command:

The following steps should be followed in order to integrate WellFrame in your application:

        1. Download the WellFrame libraries from this link. The DLLs are compiled for AnyCPU.
        2. Add references in your project on WellFrame.dll, Basics.dll and DbmsLibrary.dll.
        3. The abstract class EntityManager needs to be derived in the project, using this class Entities could be grouped instantiated, changed, or deleted.


This presents accordingly an object and its properties. In our example, this would be the class Person . The class Person includes properties such as FirstName, LastName, etc. A possible definition can be as follows:


This presents a list of Entity. The base class for the listing is WebEntityList. In our example, the class would PersonList and is defined as follows:

Factory (Controller)

A factory class must be defined for each entity. The factory class contains the business logic and the manipulation of an entity.
The base class for a factory is WebEntityFactory and takes -the meaning according to- two template classes, theentity and its collection.
In our example, the factory class for the person would be PersonFactory. In the Factory diverse functions can be overwritten or added. The definition of the class PersonFactory can look as follows. The definition leans heavily on the primary key in the table Person :


in an automated environment the EntityManager would be automatically added to several manipulating functions of an entity. In our example, we need to add them now manually:

In summary, two files are created for the classes Entity, EntityList, EntityFactory and EntityManager. The classes themselve must then partially be defined, because the class is defined in two separate files, “*.Designer.cs” and “*.cs“.To see a detailed example using the full framework go to this link.

In our example the following files are created:

  1. The file Person.Designer.cs includes all properties of Person, such as FirstName , LastName, etc.
    In addition, the file contains partial definition for the entity manager EntityManager, such. as creating an instance.
  2. The second file is the so-called custom part and can contain the business logic and some overrides of the basic classes.

Now bringing everything together, so if we want -as example- read all persons, we have to set up a valid connection string to the AdventureWorks database, as follows:

Then all person can be read with the following command:

The complete example can be downloaded here. It is created with Visual Studio 2013 and .Net Framework 4.5.


to be continued …

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.