Click here to Skip to main content
14,604,882 members


Rate this:
4.60 (4 votes)
Please Sign up or sign in to vote.
4.60 (4 votes)
30 Apr 2011CC (ASA 3U)
WebLights Component Library

Note: This framework is a framework that has 100% compatibility with standard MVC FOR SPRING in J2EE and MVC.NET 3.00 and is running on top of them and adds many capabilities which did not exist in this arena before.


I always disliked webforms because of its low quality of code and also the non web nature it had. Moreover, I liked C#, but because of leaking of MVC architecture in this platform, I went to JAVA whose library we are talking about also has a JAVA (MVC FOR SPRING) component Library but I would like to introduce C# and MVC.NET version as my favorite product.

The goals of this design were:

  1. An application like environment in the web
  2. Made a Real DB Centric System and less effort in manual coding for forms
  3. Low weight and high quality pages
  4. NEVER use from IFrame or Popup Windows because of their behavior (which I did it with JavaScript SandBox means: all forms you load will load in the same DOM area and they will show in a DIV not an IFRAME)
  5. And many other goals: the most important was a new and standard way for development specially I like to use META MODELS against Models because Meta Models have a much stronger concept.

This system is:

  • 100% full Ajax
  • No refresh required at all (I repeat again, no refresh but you can redirect but also, no need to refresh the page at all)
  • Upto 5 times faster Page Load
  • And for the first time:
    • JavaScript SandBox support Implemented in component Model (No need for Iframes at all!)
    • 100% DB centric System

Compare after we have done the job.

We wrote the same code for the same reason and we tested them in three different platforms. Here, you can see the results:

Image 1

As you see, MVC PLUS needs one third of MVC.NET and less than half of WebForms to spend it in development which means, less cost, more high quality code and exactly a cheaper and better product in code quality and overall.

Here, we compared these frameworks in line of Rendering size which also means less Render Time in server side which is effective if you use SSL (less cost for application server and much faster data transfer):

Image 2

As you see, Average Forms rendered with MVC Plus have a size between 5 to 10 Kilobytes which is much less than other competitors, even less than half of their size in MVC.NET (Using Telerik Components).

Note: All tests passed in my friends' office, later I will publish the sample codes (these were a real product for business, so my friend might cut some parts of code).

Note that all tests were done for the similar form design in view and reason and scenario.


In standard MVC, you have to write your models as below:

public class Person{
  public string name {get ; set ; }
  public string FamilyName {get ; set ; }
public class ADDRESS{
  public string name {get ; set ; }
  public string FamilyName {get ; set ; }

Each view can support only up to one Model, for example, you can have only Person Model or address Model accessible.


In MVC Plus, you have to declare your Models separated from Meta Models and Meta Models will be used in Controllers and Views:

First, write your Models (which work as repository or DAL):

public class Person:WLBaseModel {
  public int PersonID;
  [stringLength (max:50)]
  public string name {get ; set ; }
  [stringLength (max:50)]
  public string FamilyName {get ; set ; }
public class ADDRESS:WLBaseModel {
  public int addrssID {get ; set ;}
  public int PersonID {get ; set ;}
  [stringLength (max:50)]
  public string City {get ; set ; }
  [stringLength (max:65535)]
  public string Address {get ; set ; }

And then you have to declare your META MODELS as below:

public class MetaModel :WLBaseMetaModel
  [ApplicationServerCache { timeOut:10}]
  public Person Person{get ; set ;}
  [ApplicationServerCache { timeOut:10}]
  public Address Address {get ; set ;}

In Standard MVC 3.00, you cannot have access to both models. In MVC PLUS And Meta Models, you can have many models in one Meta Model.


We only support RAZOR in MVC.NET 3.00, so, other view engines are not supported by now and we don’t think we will support them later.

You can use META MODELS you declared in your View as below:


All Model members will be connected to each other: Grids, Trees, Editors, checkboxes, Combos, etc., I repeat this phrase that you have to separate concept of Models and Meta Models from each other.

Here, you can see what I mean in the upper lines:

Image 3

As you see, Tree and Editors are connected to each other.

But how does it work? In brief, we have an architecture like this. It was a complex architecture but we did it once to have a safe way of development:

Image 4

Later, I will introduce how hard it is to implement such a code in a heavy JavaScript and C# Library (mostly in architecture which was a hard to do).

Note that this is a huge and great architecture for WEB, maybe for the first time??? (I don’t know! Just maybe.) We did several new things to supply these abilities.

Batch Data Transfer

In standard MVC, data transfer can transfer a single record and you need to do much custom code for multiple records.

Hard for development in most cases you want to transfer several records to/from Server.

In MVC, you can send / receive multiple records at once and we can name it Batch Transfer. It is useful for most cases of development.

As an extra advantage in architecture, MVC Plus has a two side (server/client) cache in both client and server which will guarantee:

  • You will receive a record or data only once.
  • You will receive only required records which are needed to show them in the client.
Image 5

You can set Model Behavior as Live.

Since data is changed in client and you change cursor position in client or modify client data, Client will send Update or Inserted or Deleted item to Server.

Address.LiveData = true;

You can set Model Behavior as Offline.

You can send batch records, for example 10 modified records to server at once.

Person.LiveData = false;

To handle batch or single records, you have triggers such as:

  • Beforeinsert
  • BeforeUpdate
  • BeforeSelect
  • BeforeDelete
  • BeforeChange
  • BeforeOtherCommands

And also you have:

  • Afterinsert
  • AfterUpdate
  • AfterSelect
  • AfterDelete
  • AfterChange
  • AfterOtherCommands


In MVC Plus, you can make Models available in Meta Models as Master detail, but don’t worry, no need to do much code - you just have to do it with few lines of code. You can connect two models as Master details as below:

Address.Master = Person;


public class MetaModel {
             … {Models …

No need for extra code.

Required data for automatic actions will be provided through attributes over model properties:

public int addrssID {get ; set ;}
public int PersonID {get ; set ;}


Validations will show beside controls and client will show a message before sending them to the Application Server.

Validation is very similar to standard MVC, but you can have:

  1. RowValidation
  2. FieldValidation

This is not required to do RowValidation most of the time, but you can also add it to client and server.

By default, most of the validations will be done automatically.

A sample code would be:

public string  Name {get ; set ;}

Or even:

Public string Password {get ; set ; }

Also, the system will automatically validate type of model members in both client and server.

Validations will show beside controls and client will show a message before sending them to the Application Server. You can set a special shape for them easily but by default, we have four different ways of showing them:

  1. Before Post as Modal (DIV Modal not POPUP!)
  2. In left top corner as tooltip when you are typing them
  3. Custom Way
  4. In Left or Right space of Edit Control


Each single control should have a FieldName, which is similar to Model’s Property name in application server, these will be generated automatically by C# or J2EE components.

Just leave your control simply in view:


We have many components ready for this Framework:

  • Html.WLTextEditFor
  • Html.WLWebEditorFor
  • Html.WLDivEditFor
  • Html.WLDisplayfor
  • Html.WLTreefor
  • Html.WLCheckBoxFor
  • Html.WLComboBoxFor
  • Html.WLSpinEditFor
  • Html.WLAutoCompleteFor
  • Html.WLLookUpFor
  • Html.WLGridFor

And more than 109 other READY TO USE components.

In the pictures, you can see some pages are designed with this system. Note that these tabs are not IFRAMES but they come from different sources and they are used from JAVASCRIPT SandBox Model, always you can run any JS Command from server side without refresh.

MVC PLUS 2.00 now support TREE MODELS which did not exist before:

  • Tree Models are two way, manual or Automatic which use Recursive Model. No need for any special code
  • Just made Tree Property in Model Enabled
  • And then in view:


Ryan Samiee

BCs and 16 years Professional Experience (since I had 14 years old I started working with companies as a professional developer) and 14 years experience in Component Development in Delphi and then WEB Components.


This article, along with any associated source code and files, is licensed under The Creative Commons Attribution-Share Alike 3.0 Unported License


About the Author

Ryan Samiee
Belgium Belgium
No Biography provided

Comments and Discussions

QuestionAbout your development time chart Pin
Hardy Wang30-May-11 2:14
MemberHardy Wang30-May-11 2:14 
GeneralI am sorry for the death of your father Pin
georani1-May-11 4:56
Membergeorani1-May-11 4:56 
GeneralWhere's the download or link to framework Pin
DaveAuld30-Apr-11 19:21
professionalDaveAuld30-Apr-11 19:21 
GeneralRe: Where's the download or link to framework Pin
Ryan Samiee30-Apr-11 20:26
MemberRyan Samiee30-Apr-11 20:26 
GeneralTonight , My father left me alone, he is dead.... Pin
Ryan Samiee30-Apr-11 15:52
MemberRyan Samiee30-Apr-11 15:52 
GeneralRe: Tonight , My father left me alone, he is dead.... Pin
deBaires1-May-11 6:04
MemberdeBaires1-May-11 6:04 
GeneralRe: Tonight , My father left me alone, he is dead.... Pin
Ryan Samiee1-May-11 6:55
MemberRyan Samiee1-May-11 6:55 
GeneralRe: Tonight , My father left me alone, he is dead.... Pin
shahin.kiassat15-May-11 8:39
Membershahin.kiassat15-May-11 8:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Posted 30 Apr 2011

Tagged as


20 bookmarked