What is Model?

image

A model can be considered as a container  that facilitates presentation view, behavior and/or persisting data to/from data source (i.e. database etc). Besides the data container elements, a model may or may not contain behavior (i.e. logic), depending on design context of corresponding architecture.
While the term “Model” is frequently discussed and used in Model-View-Controller pattern context, it is one of most important consideration in current world of software architecture.

Download the EISK 6.0 MVC Edition release to see few of the patterns mentioned in this post – in action!

Common Container Models

Entity

Entities can be considered as the “heart” of a data driven application and plays a primary role on all Model related patterns. By definition, each data container that is designed as an Entity - contains identity (i.e. primary key) and typically utilized to store data in structured storage system.

Value Object Pattern

Value Objects are simple data containers which don’t have any identity. A value object may participate in an entity object as member to provide an object oriented style design or may itself be used as Data Transfer Object (discussed later) to transfer data.

image

Figure: the Person class represents an Entity, where as the Address class represents a Value Object

Model Set Pattern

As the name applies - a Model Set encapsulates a set of model objects in a single class.
While containing objects of different type in a single class is very common in software architecture and implementation world, defining the term “Model Set” in model related architecture context will enable understanding different boundaries in different scenarios.

image

Data Transfer Object Pattern

As the name applies, Data Transfer Object (DTO) is used to transfer data from one boundary to another. According to Fowler - an object that carries data between processes in order to reduce the number of method.

Data Transfer Objects can be considered a form of Model Set pattern, in addition with a mandatory responsibility of participation in transferring data.

Relevant patterns:

  • Model Set Pattern

Business Models

Domain Model Pattern

By definition, Domain Model is - an object model of the domain that incorporates both behavior and data.

Models in a domain model object graph, contains core business logic. Domain object typically contains identity.

image

Trigger Model Pattern

Each model is responsible to execute relevant business rules, each of which is encapsulated in a separate class, containing utility methods to facilitate unit testing.

image

Figure: A sequence diagram demonstrating a portion of Trigger Model work flow. Click the image for larger view.

Relevant patterns:

  • Single Responsibility Principle
  • Transaction Script Design Pattern
  • Domain Model Design Pattern

User Interface Models

Presentation Model Pattern

Presentation Model (also known as Application Model) represents the state and behavior of the presentation independently of the GUI controls used in the interface.

Apart from handling user interaction related behaviors, Presentation Model may utilize Presentation Data Models (discussed later) effectively to minimize user interface rendering logic in view.

image

Figure (courtesy: Martin Fowler): How objects react to clicking the classical check box.

Presentation Data Model

It is often beneficial to create a presentation data model that contains decorated version of domain data models, which are completely presentation friendly.

For instance, if we have a property “Notes”, for a given employee in a domain object, we can create our view friendly model that will encapsulate necessary display logic in a property of presentation data model. In that way we can reduce untestable and unmaintainable code from view. Such an example is shown as below:

image

Based on characteristics, Presentation Data Models can be categorized on 2 primary ways:

View Model Pattern

As mentioned earlier, instead embedding display rendering logic to view, it is often beneficial for testing and maintainability to construct the view rendering logic in to a separate class before sending the model to view. View models are not typically designed to be persisted to database.

Some people consider “View Model” to have Editor related data as well, which I think is very confusing, as the term “View” provides a “read-only” impression. Patterns specific to editor related data are discussed later.

image

Relevant patterns:

  • Façade Pattern
  • Data Transfer Object
  • Presentation Model

Editor Model Pattern

Editor model is a special model to facilitate rendering appropriate data in editor user interface, where the entity and other editor related objects are encapsulated in a single view friendly class and enables the entity to be persisted to database upon submission of data to service.

Relevant patterns:

  • Façade Pattern
  • Data Transfer Object
  • Presentation Model

Editor Model Pattern can be categorized in 2 following ways:

Member Editor Model Pattern

Member Editor Model is a simple form of Editor Model pattern, where the persistence entity object is placed in a Model Set as a class member. Other class members of the Model Set include related presentation friendly objects.
Since the Model Set contains the database persistence entity, it requires very less coding effort to perform crud operation.

image

Relevant patterns:

  • Model Set Pattern
  • Façade Pattern

Adapter Editor Model Pattern

Adapter Editor Model Pattern combines the benefit of View Model and Editor Model pattern, with an additional overhead of adapter component that converts a editor model object to entity object to facility working with data access layer.

Relevant patterns:

  • View Model Pattern
  • Façade Pattern
  • Adapter Design Pattern

Hope you found it useful. Cheers!

Subscribe me on Facebook, if you like the post and are interested to learn my latest thoughts!

Every year Microsoft organizes software contest Imagine Cup where young technologists around the world participate based on a theme: to help resolve some of the world’s toughest challenges.

This year, a team from Bangladesh is also going to participate in Imagine Cup final round, which has been selected among hundreds of teams in Bangladesh, through different phases.

As one of the judges of Imagine Cup 2011 to select finalists from Bangladesh, I was very excited to see the efforts that were given by all the participants of Imagine Cup 2011 from Bangladesh.

One of the most exciting things that I enjoyed, besides excellence in software engineering, all participants put their effort on innovation to do some good for humankind, by being encouraged with the theme of this competition.

On 10th May 2011, the result has been announced. “Team Rapture” won the first position, which will participate to the final round of Imagine Cup 2011, to be held in USA on July. Their project was focused on mobile phone client software to make the life easy for visually impaired people.

I believe this is just a good start to show the brightest light from Bangladesh to the world.

Thanks to all who participated and congratulations to the winning team!

 

Few Moments from Boot Camp

  

Few Moments from Bangladesh Grand Finale

    

Ajax enabled data centric applications are getting popular day by day in web development space. While these type of web applications provide rich user experience, building a robust and powerful application quickly is a great challenge for developers. Fortunately Microsoft has started providing great frameworks, plug-ins and APIs to facilitate this process.

Last week Microsoft announced a new version of java-script API “datajs”, which is intended to help web developers to build data centric AJAX applications quickly, along with utilizing modern browsers features (such as HTML5 local storage, IndexDB etc) and protocols (such as oData). Datajs is designed to be small, fast and easy to use.

While datajs includes lots of cool features, today in this post, I will have a very basic introductory quick start so that any developer can have an idea how datajs can be implemented in different application architecture. Checkout last week’s MIX session video to learn few cool features available in datajs.

Download the full quick start sample from here.

Invoking Cross-Domain Service

Netflix has provided an excellent oData API to enable developers to experiment with their data hosted in their infrastructure. The code below, uses NetFlix service and datajs API to show movie data. The cool thing is you really don’t need to build any web or data service to test your app.

<html>
<head>
    <script type="text/javascript" src="datajs-0.0.3.min.js"></script>
    <script type="text/javascript">
        var url = "http://odata.netflix.com/Catalog/Titles";
 
        OData.defaultHttpClient.enableJsonpCallback = true;
 
        OData.read(
                url,
                function (data, request) {
                    var html = "";
                    for (var i = 0; i < data.results.length; i++) {
                        html += "<div>" + data.results[i].Name + "</div>";
                    }
                    document.getElementById("Movies").innerHTML = html;
                },
                function (err) {
                    alert("Error occurred ");
                });
 
    </script>
    <title>Movies - dataJS + Netflix</title>
</head>
<body>
    <div id="Movies">
    </div>
</body>
</html>

 

Invoking WCF Data Service

WCF Data Service is a part of Windows Communication Foundation that exposes REST style data. You can use Entity Framework to build WCF Data Service in literally few seconds.

WCF Data Service code:

    public class WCF_Data_Service : DataService<DatabaseContext>
    {
        public static void InitializeService(DataServiceConfiguration config)
        {
            config.SetEntitySetAccessRule("*", EntitySetRights.All);
            config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
        }
    }

 

and the UI code:

 

<html>
<head>
    <script type="text/javascript" src="datajs-0.0.3.min.js"></script>
    <script type="text/javascript">
        var url = "../App_Service/WCF-Data-Service.svc/Employees";
        OData.read(
                url,
                function (data, request) {
                    var html = "";
                    for (var i = 0; i < data.results.length; i++) {
                        html += "<div>" + data.results[i].FirstName + " " + data.results[i].LastName + "</div>";
                    }
                    document.getElementById("dvEmployees").innerHTML = html;
                },
                function (err) {
                    alert("Error occurred ");
                });
    </script>
    <title>Employees - dataJS + WCF Data Service + oData</title>
</head>
<body>
    <div id="dvEmployees">
    </div>
</body>
</html>

 

Invoking WCF Service

While WCF Data Service enables you to build REST style services pretty quickly, one problem with this approach is, it’s very hard to implement business logic during CRUD operation. One solution in this regard, is to create Ajax Enabled WCF Service, where you will invoke a web method, that contains your business logic.

 

[ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class WCF_Business_Service
    {
        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json)]
        public List<Customer> GetAllCustomers()
        {
            List<Customer> lst = new List<Customer>();
            
            //business logic goes here
 
            return lst;
        }
 
    }

 

For the WCF Service contract, as shown above, you will use datajs, as shown below:

 

<html>
<head>
    <script type="text/javascript" src="datajs-0.0.3.min.js"></script>
    <script type="text/javascript">
        var url = "../App_Service/WCF-Business-Service.svc/GetAllCustomers";
        OData.read(
                url,
                function (data, request) {
                    var html = "";
                    for (var i = 0; i < data.results.length; i++) {
                        html += "<div>" + data.results[i].FirstName + " " + data.results[i].LastName + "</div>";
                    }
                    document.getElementById("dvCustomers").innerHTML = html;
                },
                function (err) {
                    alert("Error occurred" + err.message);
                });
       
    </script>
    <title>Employees - dataJS + WCF Service (Ajax Enabled) + oData</title>
</head>
<body>
    <div id="dvCustomers">
    </div>
</body>
</html>

 

Lets Make it Look Better!

So far the samples we have seen, contains very plain markup in HTML. The sample below shows how we can use in ASP.NET, along with jQuery Template plug-in to make it look better!

<%@ Page Title="" Language="C#" MasterPageFile="~/App_Resources/default.master" AutoEventWireup="true" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContentPlaceHolder" runat="Server">
    <script type='text/javascript' src='<%# ResolveUrl ("~/App_Resources/client-scripts/framework/jquery-tmpl.js") %>'></script>
    <script type='text/javascript' src='<%# ResolveUrl ("~/datajs-oData/datajs-0.0.3.min.js") %>'></script>
    <script type="text/javascript">
        var url = "../App_Service/WCF-Data-Service.svc/Employees";
        OData.read(
                url,
                function (data, request) {
                    $("#employeeListingTemplateContainer").empty();
                    var returnedEmployeeCollection = data.results;
                    $("#employeeListingTemplate").tmpl({ employeeCollection: returnedEmployeeCollection }).appendTo("#employeeListingTemplateContainer");
 
                },
                function (err) {
                    alert("Error occurred ");
                });
    </script>
    <!-- Employee Listing Template -->
    <script id="employeeListingTemplate" type="text/html">
        <tbody>
            <tr class="HeaderStyle">
                <td>
                    <a>
                        First Name</a>
                </td>
                <td>
                    <a>
                        Last Name</a>
                </td>
                <td>
                    <a>
                        Country</a>
                </td>
               </tr>
            {{each employeeCollection}}
                <tr class="RowStyle">
                    <td>
                        ${FirstName}
                    </td>
                    <td>
                        ${LastName}
                    </td>
                    <td>
                        ${Country}
                    </td>
                </tr>
            {{/each}}
        </tbody>
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="BodyContentPlaceholder" runat="Server">
    <h1 class="title-regular">
        Employees</h1>
    <p>
        In this page you will be able to view the list of all employess.
    </p>
    <div>
        <table id="employeeListingTemplateContainer" class="GridView">
            <%-- Employee listing table data will be placed here--%>
        </table>
    </div>
</asp:Content>

 

Here goes the UI:

 

image

Download the entire quick start code sample from here.

Happy coding!

VSIXProject_small

Employee Info Starter Kit is an open source ASP.NET project template that is intended to address different types of real world challenges faced by web application developers when performing common CRUD operations. Using a single database table ‘Employee’, it illustrates how to utilize Microsoft ASP.NET 4.0, Entity Framework 4.0 and Visual Studio 2010 effectively in that context.

Employee Info Starter Kit is highly influenced by the concept ‘Pareto Principle’ or 80-20 rule. where it is targeted to enable a web developer to gain 80% productivity with 20% of effort with respect to learning curve and production.

VSIXProject_large

User Stories

The user end functionalities of this starter kit are pretty simple and straight forward that are focused in to perform CRUD operation on employee records as described below.

  • Creating a new employee record
  • Read existing employee record
  • Update an existing employee record
  • Delete existing employee records

Key Technology Areas

  • ASP.NET 4.0
  • Entity Framework 4.0
  • T-4 Template
  • Visual Studio 2010

Architectural Objective

There is no universal architecture which can be considered as the best for all sorts of applications around the world. Based on requirements, constraints, environment, application architecture can differ from one to another. Trade-off factors are one of the important considerations while deciding a particular architectural solution.

Employee Info Starter Kit is highly influenced by the concept ‘Pareto Principle’ or 80-20 rule, where it is targeted to enable a web developer to gain 80% productivity with 20% of effort with respect to learning curve and production.

“Productivity” as the architectural objective typically also includes other trade-off factors as well as, such as testability, flexibility, performance etc. Fortunately Microsoft .NET Framework 4.0 and Visual Studio 2010 includes lots of great features that have been implemented cleverly in this project to reduce these trade-off factors in the minimum level.

Why Employee Info Starter Kit is Not a Framework?

Application frameworks are really great for productivity, some of which are really unavoidable in this modern age. However relying too many frameworks may overkill a project, as frameworks are typically designed to serve wide range of different usage and are less customizable or editable. On the other hand having implementation patterns can be useful for developers, as it enables them to adjust application on demand. Employee Info Starter Kit provides hundreds of “connected” snippets and implementation patterns to demonstrate problem solutions in actual production environment. It also includes Visual Studio T-4 templates that generate thousands lines of data access and business logic layer repetitive codes in literally few seconds on the fly, which are fully mock testable due to language support for partial methods and latest support for mock testing in Entity Framework.

Why Employee Info Starter Kit is Different than Other Open-source Web Applications?

Software development is one of the rapid growing industries around the globe, where the technology is being updated very frequently to adapt greater challenges over time. There are literally thousands of community web sites, blogs and forums that are dedicated to provide support to adapt new technologies. While some are really great to enable learning new technologies quickly, in most cases they are either too “simple and brief” to be used in real world scenarios or too “complex and detailed” which are typically focused to achieve a product goal (such as CMS, e-Commerce etc) from "end user" perspective and have a long duration learning curve with respect to the corresponding technology. Employee Info Starter Kit, as a web project, is basically "developer" oriented which actually considers a hybrid approach as “simple and detailed”, where a simple domain has been considered to intentionally illustrate most of the architectural and implementation challenges faced by web application developers so that anyone can dive into deep into the corresponding new technology or concept quickly.

Roadmap

Since its first release by 2008 in MSDN Code Gallery, Employee Info Starter Kit gained a huge popularity in ASP.NET community and had 1, 50,000+ downloads afterwards. Being encouraged with this great response, we have a strong commitment for the community to provide support for it with respect to latest technologies continuously.

Currently hosted in Codeplex, this community driven project is planned to have a wide range of individual editions, each of which will be focused on a selected application architecture, framework or platform, such as ASP.NET Webform, ASP.NET Dynamic Data, ASP.NET MVC, jQuery Ajax (RIA), Silverlight (RIA), Azure Service Platform (Cloud), Visual Studio Automated Test etc. See here for full list of current and future editions.

Ever wanted to have a simple jQuery menu bound with ASP.NET web site map file?

Ever wanted to have cool css design stuffs implemented on your ASP.NET data bound controls?

Ever wanted to let Visual Studio generate logical layers for you, which can be easily tested, customized and bound with ASP.NET data controls?

If your answers with respect to above questions are ‘yes’, then you will probably happy to try out latest release (v5.0) of Employee Starter Kit, which is intended to address different types of real world challenges faced by web application developers when performing common CRUD operations. Using a single database table ‘Employee’, the current release illustrates how to utilize Microsoft ASP.NET 4.0 Web Form Data Controls, Entity Framework 4.0 and Visual Studio 2010 effectively in that context.

Employee Info Starter Kit is an open source ASP.NET project template that is highly influenced by the concept ‘Pareto Principle’ or 80-20 rule, where it is targeted to enable a web developer to gain 80% productivity with 20% of effort with respect to learning curve and production.

This project template is titled as “Employee Info Starter Kit”, which was initially hosted on Microsoft Code Gallery and been downloaded 1, 50,000+ of copies afterword.  The latest version of this starter kit is hosted in Codeplex.

VSIXProject_large

Release Highlights

User End Functional Specification

The user end functionalities of this starter kit are pretty simple and straight forward that are focused in to perform CRUD operation on employee records as described below.

  • Creating a new employee record
  • Read existing employee records
  • Update an existing employee record
  • Delete existing employee records

Architectural Overview

  • Simple 3 layer architecture (presentation, business logic and data access layer)
  • ASP.NET web form based user interface
  • Built-in code generators for logical layers, implemented in Visual Studio default template engine (T4)
  • Built-in Entity Framework entities as business entities (aka: data containers)
  • Data Mapper design pattern based Data Access Layer, implemented in C# and Entity Framework
  • Domain Model design pattern based Business Logic Layer, implemented in C#
  • Object Model for Cross Cutting Concerns (such as validation, logging, exception management)

Minimum System Requirements

  • Visual Studio 2010 (Web Developer Express Edition) or higher
  • Sql Server 2005 (Express Edition) or higher

Technology Utilized

Programming Languages/Scripts

  • Browser side: JavaScript
  • Web server side: C#
  • Code Generation Template: T-4 Template
Frameworks
  • .NET Framework 4.0
  • JavaScript Framework: jQuery 1.5.1
  • CSS Framework: 960 grid system
.NET Framework Components
  • .NET Entity Framework
  • .NET Optional/Named Parameters (new in .net 4.0)
  • .NET Tuple (new in .net 4.0)
  • .NET Extension Method
  • .NET Lambda Expressions
  • .NET Anonymous Type
  • .NET Query Expressions
  • .NET Automatically Implemented Properties
  • .NET LINQ
  • .NET Partial Classes and Methods
  • .NET Generic Type
  • .NET Nullable Type
  • ASP.NET Meta Description and Keyword Support (new in .net 4.0)
  • ASP.NET Routing (new in .net 4.0)
  • ASP.NET Grid View (CSS support for sorting - (new in .net 4.0))
  • ASP.NET Repeater
  • ASP.NET Form View
  • ASP.NET Login View
  • ASP.NET Site Map Path
  • ASP.NET Skin
  • ASP.NET Theme
  • ASP.NET Master Page
  • ASP.NET Object Data Source
  • ASP.NET Role Based Security

Getting Started Guide

To see Employee Info Starter Kit in action is pretty easy!

image

  • Download the latest version.
  • Extract the file. From the extracted folder click the C# project file (Eisk.Web.csproj) to open it in Visual Studio 2010
  • Hit Ctrl+F5!

The current release (v5.0) of Employee Info Starter Kit is properly packaged, fully documented and well tested. If you want to learn more about it in details, just check the following links:

Enjoy!

kick it on DotNetKicks.com

A VSIX file enables us to install Visual Studio extensions (tools, controls, template etc) with few clicks. I  have created a simple example of creating multi-project templates with wizard using Visual Studio 2010, which generates VSIX file. Checkout the sample in codeplex here.

Capture

Capture

I just released an open source project at codeplex, which includes a set of T-4 templates to enable you to build logical layers (i.e. DAL/BLL) with just few clicks! The logical layers implemented here are  based on Entity Framework 4.0, ASP.NET Web Form Data Bound control friendly and fully unit testable.

In this open source project you will get Entity Framework 4.0 based T-4 templates for following types of logical layers:

  • Data Access Layer: Entity Framework 4.0 provides excellent ORM data access layer. It also includes support for T-4 templates, as built-in code generation strategy in Visual Studio 2010, where we can customize default structure of data access layer based on Entity Framework. default structure of data access layer has been enhanced to get support for mock testing in Entity Framework 4.0 object model.
  • Business Logic Layer: ASP.NET web form based data bound control friendly business logic layer, which will enable you few clicks to build data bound web applications on top of ASP.NET Web Form and Entity Framework 4.0 quickly with great support of mock testing.

Capture2

Download it to make your web development productive. Enjoy!

team-acc-logo

.NETTER Code Starter Pack contains a gallery of Visual Studio 2010 solutions leveraging latest and new technologies released by Microsoft. Each Visual Studio solution included here is focused to provide a very simple starting point for cutting edge development technologies and framework, using well known Northwind database. The current release of this project includes starter samples for the following technologies:

  • ASP.NET Dynamic Data QuickStart (TBD)
  • Azure Service Platform
    • Windows Azure Hello World
    • Windows Azure Storage Simple CRUD
  • Database Scripts
  • Entity Framework 4.0 (TBD)
  • SharePoint 2010
    • Visual Web Part Linq QuickStart
  • Silverlight
    • Business App Hello World
    • WCF RIA Services QuickStart
  • Utility Framework
    • MEF
    • Moq QuickStart
    • T-4 QuickStart
    • Unity QuickStart
  • WCF
    • WCF Data Services QuickStart
    • WCF Hello World
  • WorkFlow Foundation
  • Web API
    • Facebook Toolkit QuickStart

Download link: http://codebox.codeplex.com/releases/view/57382

tweetmeme_url = 'http://weblogs.asp.net/ashraful/archive/2010/03/19/getting-started-with-employee-info-starter-kit-v4-0-0.aspx';

The new release of Employee Info Starter Kit contains lots of exciting features available in Visual Studio 2010 and .NET 4.0. To get started with the new version, you will need less than 5 minutes.

Minimum System Requirements

Before getting started, please make sure you have installed Visual Studio 2010 RC (or higher) and Sql Server 2005 Express edition (or higher installed on your machine.

Running the Starter Kit for First Time

1. Download the starter kit 4.0.0 version form here and extract it.

2. Go to <extraction folder>\Source\Eisk.Solution and click the solution file

3. From the solution explorer, right click the “Eisk.Web” web site project node and select “Set as Startup Project” and hit Ctrl + F5

ScreenHunter_05 Mar. 19 16.39 

4. You will be prompted to install database, just follow the instruction.

That’s it! You are ready to use this starter kit.

image

Running the Tests

Employee Info Starter Kit contains a infrastructure for Integration and Unit Testing, by utilizing cool test tools in Visual Studio 2010. Once you complete the steps, mentioned above, take a minute to run the test cases on the fly.

1. From the solution explorer, to go “Solution Items\e-i-s-k-2010.vsmdi” and click it. You will see the available Tests in the Visual Studio Test Lists. Select all, except the “Load Tests” node (since Load Tests takes a bit time)

2. Click “Run Checked Tests” control from the upper left corner.

ScreenHunter_07 Mar. 19 16.41

You will see the tests running and finally the status of the tests, which indicates the current health of you application from different scenarios.

ScreenHunter_08 Mar. 19 16.44

tweetmeme_url = 'http://weblogs.asp.net/ashraful/archive/2010/03/19/getting-started-with-employee-info-starter-kit-v4-0-0.aspx';

Employee Info Starter Kit is a ASP.NET based web application, which includes very simple user requirements, where we can create, read, update and delete (crud) the employee info of a company. Based on just a database table, it explores and solves most of the major problems in web development architectural space. 

This open source starter kit extensively uses major features available in latest Visual Studio, ASP.NET and Sql Server to make robust, scalable, secured and maintainable web applications quickly and easily.

Since it's first release, this starter kit achieved a huge popularity in web developer community and includes 1,50,000+ downloads from project web site.

Visual Studio 2010 and .NET 4.0 came up with lots of exciting features to make software developers life easier.  A new version (v4.0.0) of Employee Info Starter Kit is now available in both MSDN Code Gallery and CodePlex. Checkout the latest version of this starter kit to enjoy cool features available in Visual Studio 2010 and .NET 4.0.

image

[ Release Notes ]

Architectural Overview

  • Simple 2 layer architecture (user interface and data access layer) with 1 optional cache layer
  • ASP.NET Web Form based user interface
  • Custom Entity Data Container implemented (with primitive C# types for data fields)
  • Active Record Design Pattern based Data Access Layer, implemented in C# and Entity Framework 4.0
  • Sql Server Stored Procedure to perform actual CRUD operation
  • Standard infrastructure (architecture, helper utility) for automated integration (bottom up manner) and unit testing

Technology Utilized

Programming Languages/Scripts

  • Browser side: JavaScript
  • Web server side: C# 4.0
  • Database server side: T-SQL

.NET Framework Components

  • .NET 4.0 Entity Framework
  • .NET 4.0 Optional/Named Parameters
  • .NET 4.0 Tuple
  • .NET 3.0+ Extension Method
  • .NET 3.0+ Lambda Expressions
  • .NET 3.0+ Anonymous Type
  • .NET 3.0+ Query Expressions
  • .NET 3.0+ Automatically Implemented Properties
  • .NET 3.0+ LINQ
  • .NET 2.0 + Partial Classes
  • .NET 2.0+ Generic Type
  • .NET 2.0+ Nullable Type
  • ASP.NET 3.5+ List View (TBD)
  • ASP.NET 3.5+ Data Pager (TBD)
  • ASP.NET 2.0+ Grid View
  • ASP.NET 2.0+ Form View
  • ASP.NET 2.0+ Skin
  • ASP.NET 2.0+ Theme
  • ASP.NET 2.0+ Master Page
  • ASP.NET 2.0+ Object Data Source
  • ASP.NET 1.0+ Role Based Security

Visual Studio Features

  • Visual Studio 2010 CodedUI Test
  • Visual Studio 2010 Layer Diagram
  • Visual Studio 2010 Sequence Diagram
  • Visual Studio 2010 Directed Graph
  • Visual Studio 2005+ Database Unit Test
  • Visual Studio 2005+ Unit Test
  • Visual Studio 2005+ Web Test
  • Visual Studio 2005+ Load Test

Sql Server Features

  • Sql Server 2005 Stored Procedure
  • Sql Server 2005 Xml type
  • Sql Server 2005 Paging support

kick it on DotNetKicks.com

mvp_logo

Yesterday I’ve been informed that I’ve gained the Most Valuable Professional award again for next year, in ASP.NET category. This is the third time I have received this award, which is pretty exciting.

Here is my MVP profile: https://mvp.support.microsoft.com/profile/Ashraful

Special thanks to few Microsoft employees including Technical Fellow Brain Harry, Sr. Program Manager Joe Stagner, Lead Product Manager Dan Fernandez and South Asia MVP Lead Abhishek Kant who encouraged and supported me in several ways last year.

Thanks Microsoft for this recognition, which will encourage me to keep my passion on MS products continued with more optimization and greater efforts.

Technorati Tags: ,,

Thanks everybody who Participated in the event Microsoft Day @ Dhaka, held on 20 June 2009 at IDB Auditorium, Dhaka. It was an excellent gathering of 250+ professionals, specially developers in Bangladesh.

Besides the knowledge sharing stuffs, the event was very successful to create a social gathering of technical professionals. I was really found it pretty nice that, I have meet at least 20+ guys there, whom I knew and meet virtually before.

The good news for the community is, we will be organizing the similar events in futures and organize it in a better way based on community feedback we received.

Presentation Slides: Overview of Visual Studio Team System 2010

Here goes my presentation slides used in the event.

Pictures:

image-02 image-06 image-04 DSC00139 DSC00117 DSC00130

Community Feedback and Resources:

Check the facebook user group for related resources, other images etc. You can put your suggestions and feedback here in the msdnbangladesh site to make the future events better.

ScreenHunter_02 Jun. 04 16.46

Microsoft Community in Bangladesh proudly presents Microsoft Day @ Dhaka. This is a special day dedicated to all Microsoft technology professionals and students in Bangladesh. We will be having the best Microsoft community technologists from Bangladesh - Microsoft Most Valuable Professionals (MVPs) delivering sessions at the event.

This technology marathon is a great opportunity to learn from the best and network with each other.
Both Microsoft developers and networking professionals would find the event worth attending.

I am really very excited to be a part of this event, both as an organizer as well as as a speaker. I’ll be delivering speech there on Visual Studio Team System 2010.

If you not already registered, but don’t want to miss this cool event, register now at the msdn bangladesh site.

See you there!

Check below the agenda of this event.

AUDITORIUM – Dev Track

9:00 - 9:30: Opening Speech - Feroz Mahmood

9:30 - 10:30: Development in ASP.NET [LINQ, Web Forms, Dynamic Data] - Tanzim Saqib

10:30 - 11:15: My First ASP.NET MVC App - Mehfuz Hossain

11:15 - 11:45 : Unit Testing in MVC and Demo of dotnetshoutouts.com - Kazi Manzur Rashid

11:45- 12:30: Developing in Silverlight - Faisal Hossain Khan

12:30 - 1:30: Lunch

1:30 - 2:00 : Introduction to Sharepoint/ MOSS - Jannatul Ferdous

2:00 - 2:45: Production Challenges of ASP.NET Websites - Omar Al Zabir

2:45 - 3:15: Windows Azure - Ashic

3:15 - 3:45: Tea Break

3:45 - 4:30:  Overview of Visual Studio Team System 2010 - Mohammad Ashraful Alam

4:30 - 5:30:   Features of Windows 7 - IE8 and Windows Live Features - Omi Azad

BREAK OUT – IT Pro Track

9:00 - 9:30: Opening Speech - Feroz Mahmood [IN AUDITORIUM]

9:30 – 10:30: Exchange Server 2010

10:30 - 11:30: Windows Server 2008 - Virtualisation & HyperV

11:30 - 12:30: Talking Windows Server 2008 and R2 [Windows Client & Windows Server 2008 NAP – Better Together] - Anwar Hossain (Technical Specialist, MS Bangladesh)

12:30 - 1:30: Lunch

1:30 - 2:15:  Session on MS Project & EPM : M. Manzurur Rahman (CEO, ICT Alliance)

2:15 - 3:00: Office 2007

3:00 - 3:30: Tea Break

3:30 - 4:30:  Introduction to SQL Server 2008

4:30 - 5:30:   Features of Windows 7 - IE8 and Windows Live Features - Omi Azad [IN AUDITORIUM]

Technorati Tags: ,,

Last month (May 2009) Microsoft has released its first beta for Visual Studio Team System 2010 and Team Foundation Server 2010 release, two of the most waited and wanted  tools in developer community. From my point of view these two releases are going to be one of the most historical releases, as lots of really cool stuffs has been added with respect to the last version.

164__320x240_microsoft-announces-visual-studio-2010-and-ne-framework-4_l

However, as the Beta 1 releases are pretty infant, there are very limited resources available in the web and community, so I just wanted to gather all of the useful resources with respect to these two tools in one place, so that anyone can move forward from installation to first “Hello VSTS/TFS” excitement smoothly!

Step 1. What’s New on VSTS 2010 and TFS 2010

VSTSStadium_3

Well, you are really liking what the tools you are using, however you are pretty interested what are the cool stuffs that MS bring with VSTS 2010 and TFS 2010. Here we go:

Step 2: Installation Planning

Well, you are convinced VSTS 2010 and TFS 2010 new features are really cool. Now you need to plan, if your existing infrastructure is supported.

  • While VSTS 2010 installation is pretty simple, TFS 2010 installation stuffs are pretty large deal. Team System MVP Mike has provided an excellent diagram with respect to Microsoft Fellow Brian Harry’s post, which really shows on the fly which software installation are required/recommended/not supported while installing TFS 2010.

Step 3: Installer Download

Step 4: Installation Walkthrough

TFS

As soon as the required files are downloaded, you are ready to go start the installation.

  • Brian Keller provides an excellent walkthrough explaining the installation process of TFS 2010 Beta 1 in this Channel 9 video. It also includes installation process (along with all relevant download links/instruction) of other pre-requisites of TFS 2010, including Sql Server 2008 Beta 1 and supporting software as VSTS 2010.

Step 5: First Walkthrough with VSTS 2010 and TFS 2010

hero_2010_v3

And finally you are done with the installation! Great and congratulations! What what to do? Take some breath and move forward to the exciting world of VSTS 2010 and TFS stuffs, to see on hand and own eye, what really been implemented by MS guys.

  • Jason Zander, General Manager, Visual Studio, Developer Division provides a quick walkthrough from creating a simple WPF application to testing it using the latest cool features available in Visual Studio 2010 in this two part (part 1 and part 2) blog post.
  • Brian Keller’s video, as mentioned in the earlier section also have a quick walkthrough with TFS 2010 Beta 1. Really cool for beginners.
  • Although the earlier version of TFS (2008) is considered, but I really liked this walkthrough written by Mitch Denny, in this two part (part 1 and part 2) article. Extremely helpful and quick  resource to begin working with such a big developer platform like Team Foundation Server.
  • If you wish to know more about TFS but need a single resource to explore most of the powerful features, you can have a look on this book, hosted at CodePlex and published by the team. The TFS version is 2008, however hopefully they will publish the updated version of this book with respect to the latest version of TFS.

 

kick it on DotNetKicks.com

Definition

Aggregator Provider Pattern is an extension of Provider Pattern, which enables us to create and utilize multiple instance of the class having the same provider interface. In this pattern, there is an Aggregator class which implements the provider interface and contains a collection of instances of classes having the same provider interface.

The underlying caller class of this aggregator is simply unaware of how many provider instances do the caller Provider Aggregator contains, but all of the provider instances will be utilized with a single invocation from the caller class.

image

Comparison with Provider Pattern

Provider Aggregator Pattern is fully compatible with the existing Provider Pattern and the power of provider pattern can be easily extended to use multiple providers concurrently without any modification on the caller classes that were using a provider.

In short Provider Pattern is concerned with the utilization of one of the available providers; whereas Aggregator Provider Pattern is concerned with the utilization of all of the available providers at the same time.

Example Demonstration

Aggregator Provider Pattern is useful when we need a configurable framework to add/remove multiple services used by one caller/user. For instance we can have Logger Provider framework, where we need log info to be saved at text files, save to database and sent to email addresses and so on. Having an easy configurable framework along with Aggregator Provider Pattern will enable us to add or remove more services without requiring the code modification in the code that uses this provider.

image

Regarding the example case that just been described can utilize the Aggregator Provider Pattern, by creating the classes as illustrated above. The code snippet below shows a basic usage of this pattern, where the last line will perform the log operation based in list of log providers loaded in the aggregator class dynamically.

image

Download the latest white paper and samples from MSDN Code Gallery.

 

More Posts Next page »