December 2008 - Posts

Promesh .net in a glance

First of all I came from a pure aspx developer. Web page is the most easy to develop page with control and event engine , so that every time user postback , you only handle the abstraction level that already provided for you, to maintain it it embeded the information using view state, bind every control, render each control, Page it self contains complex interface and class . all of that cause the aspx to bloat in size and overhead on performance. Sometimes There's nothing more you more than just pure html, javascript,and css with out having to deal with webpage, but you need those to process on serverside. that's why mvc framework comes along. using low level,request,context,session,httphandler,etc) .throw away the unnecessary overhead.

but as i recall , mvc come to .net a little bit late, you might hear java already do this long time i'm not an expert on this matter but just trying to explore and understand the benefit, i suggest reading RichStrahl blog on low level i don't read it till finished it's too long Smile

There are some framework, mvc,,,monorail,puremvc, and also you can make it your self.

let's take a look at promesh

  • easy to install ->yes quite easy.
  • support templating ->masterpage like but pure html. monorail support this too,

    i think most of the framework has similiarty

  • validation can use the Promesh.WebForm class  


Url to type Conversion

by the way since it use the Url routing. for example you are trying to edit a row and you set to navigate to url such as: http://localhost/employee/edit/1, 1 is the employee id

on the Controller path accepting employee object [Url("employee/edit/{employee}")], 

 you might wonder gee, how can he convert those 1 to employee object, there must be something that does the conversion.

yes. you are right, all will go to the class that inherit customobjectcreater

 public class DataObjectCreator : ICustomObjectCreator
        public bool TryConvert(string value, Type objectType, out object obj)
            if (objectType == typeof(Employee))
                int id = TypeHelper.ConvertString<int>(value);

                obj = DataService.LoadEmployee(id);

                return (obj != null);

 you register  the custom object creater on the init:

public class MyApplication
        public static void Init()
            WebAppConfig.RegisterCustomObjectCreator(new EmployeeObjectClassCreator());


Any way i'm stuck on this Promesh.webform, the validation will works correctly when not using ajax, but if using ajax attribute which Trigger the $Promesh.validateform(form,callback,errorcallback) i already pass function to call back but never triggered.Now there must be something about marry. i've already post on his forum.the version is 2.0 rc3 quite new version right? still a baby , i think so does the mvc.... but i think mvc is nice and powerfull

any idea for a better and mature one?



Share this post: | | | |
Posted by cipto with 5 comment(s)
Filed under: