Shiju Varghese's Blog

Cloud First and Mobile First

  • ASP.NET MVC Grid View using MVCContrib

    In this post, I demonstrate how you can use the  Grid UI helper of the MVCContrib project in your ASP.NET MVC  application. MVCContrib is a community project that adds the functionalities to Microsoft’s ASP.NET MVC Framework and makes the framework easier to use. MVCContrib provides several UI helpers and Grid UI helper is one of them. The Grid helper provides the functionalities of GridView control of ASP.NET GridView. The Grid component generates HTML tables for displaying data from a collection of Model objects and it support paging. The MVCContrib project can download from http://www.CodePlex.com/MvcContrib.

    The following are the steps to get Grid to work:

    Step1

    Add a reference to the MvcContrib assembly (download available from http://www.CodePlex.com/MvcContrib )

    Step 2

    Add a namespace import for MvcContrib.UI.Html to your web.config file:
    <pages>
        <namespaces>
            <add namespace="MvcContrib.UI"/>
            <add namespace="MvcContrib.UI.Html"/>
            <add namespace="MvcContrib.UI.Html.Grid"/>
           <add namespace="MvcContrib"/>
        </namespaces>
    </pages>

    Using the Grid

  • ASP.NET MVC Preview 4 Released

     ASP.NET MVC Preview 4  has been released on the CodePlex. You can download it from here.The Preview 4 release provides the new features such as OutputCache Action Filter, Authorize Action Filter, AccountController, Ajax Helpers and Namespaces in Routes.Visit Guru Gu's (Scott Guthrie) blog entry for more detailed informations. Now the ASP.NET MVC is getting the maturity for live production and the product is going close to the official beta, after that RTM version will be available. I hope the community can expect V 1.0 release on this year itself and new enhanced features will be included in a future full release.

  • ASP.net MVC Vs ASP.net Web Form

     
    Software Architects have been involving lot of debates about different approaches and architectures. Some of the examples are ORM Vs Store Procedures, REST Vs SOAP, etc. There is a debate happening inside the Microsoft community about ASP.net web form Vs ASP.net MVC. Many people thinking that ASP.net MVC will be replace webforms at least eventually and others are thinking that ASP.net MVC will not be replace webforms. Will ASP.net MVC replace webforms?. ASP.net MVC is an alternative approach to webforms rather than a replacement. It will not replace webforms and webforms will not replace ASP.NET MVC. The fact is that ASP.NET MVC and webforms will co-exist and that ASP.NET MVC is not a replacement for webforms. If you prefer ASP.net MVC use it and you feel webform is more comfortable, you can use it. . Both approaches are just choices and different approaches and choices are good things. Different choices are available for other platforms especially in the Java platform.

  • REST and WCF 3.5

    The first version of WCF was focused on SOAP. But another approach known as REST is becoming a popular approach for building web services. The latest version of WCF in the .NET Framework 3.5 supports both SOAP and REST.

    What is REST?

    REST is an acronym standing for Representational State Transfer and it is an architecture style of networked systems. According to Roy Fielding (one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification) , the explanation of Representational State Transfer is :
    "Representational State Transfer is intended to evoke an image of how a well-designed Web application behaves: a network of web pages (a virtual state-machine), where the user progresses through an application by selecting links (state transitions), resulting in the next page (representing the next state of the application) being transferred to the user and rendered for their use." Systems that follow Fielding’s REST principles are commonly known as “RESTful”;

    REST means that each unique URL is a representation of some object. You can get the contents of that object using an HTTP GET, to delete it, you then might use a POST, PUT, or DELETE to modify the object.

    Unlike SOAP, REST is not a standard or specification. It is just an architectural style. You can design your web services using this architectural style.

    REST is using the built-in operations in HTTP: GET, POST, and others. And rather than identify the information to be accessed with parameters defined in XML, as SOAP typically does, REST assumes that everything is identified with a URL. However REST is not a standard, it does use the following standards