Cerquit Solutions Inc.

PATTERNS & PRACTICES

Our Design Patterns

Model View Presenter (MVP)

Model View Presenter is a user interface design pattern engineered to facilitate automated unit testing and improve the separation of concerns in presentation logic.

The model is an interface defining the data to be displayed or otherwise acted upon in the user interface.

The view is an interface that displays data (the model) and routes user commands to the presenter to act upon that data.

The presenter acts upon the model and the view. It retrieves data from repositories, persist it, manipulates it, and determines how it will be displayed in the view.

This can be applied across different OOP languages, IDE, and frameworks

MVP pattern of Cerquit:

MVP Approach

Click Image to enlarge

MVP benefits for Cerquit:

•    Simplified testing. Ability to test the presenter (UI Logic) independently without having to worry about the UI.
•    Reusability and Portability. Ability to reuse and plug presenter in different user interface  platform (web, mobile, windows form)
•    Parallel development. Separation of responsibility of UI design, business logic, data access developer.
•    Cohesion. Ability of the objects to carry on specific and precise task.
•    Orthogonality. Ability to change the conceptual design of the application with minimal impact to the entire application.
 

Model View controller (MVC)

Model View Controller is both an architectural pattern and design pattern, depending on where it used.  It is a concept of encapsulating data together with its processing (the model) and isolates it from the manipulation (the controller) and presentation (the view) part that has to be done in the user interface.

•    A model is an object representing data or even activity, e.g. a database table.

•    A view is some form of visualization of the state of the model.

•    A controller offers facilities to change the state of the model.

Cerquit team uses ASP.NET MVC Framework which applies model-view-controller pattern.

MVC at Cerquit

MVC Approach

Click Image to enlarge

ASP.NET MVC advantages:

•    It enables clean separation of concerns, testability, and TDD by default.

•    It is highly extensible and pluggable.  Everything in the MVC framework is designed so that it can be easily customized.

•    It includes a very powerful URL mapping component that enables you to build applications with clean URLs.  URLs do not need to have extensions within them, and are designed to easily support SEO and REST-friendly naming patterns.

•    The MVC framework supports using the existing ASP.NET .ASPX, .ASCX, and .Master markup files as "view templates”. It does not, however, use the existing post-back model for interactions back to the server.  Instead, you'll route all end-user interactions to a Controller class instead - which helps ensure clean separation of concerns and testability.

•    The ASP.NET MVC framework fully supports existing ASP.NET features like forms/windows authentication, URL authorization, membership/roles, output and data caching, session/profile state management, health monitoring, configuration system, the provider architecture, etc.

Our Practices

Test Driven Development (TDD)

Test Driven Development requires developers to create automated unit testing that define code requirements before writing the code itself. The tests contain assertions that are either true or false. Passing the tests confirms correct behavior as developers evolve and refractor the code.

Cerquit developers uses testing frameworks, such as NUnit and NMock to create and automatically run sets of test cases.

TDD process at Cerquit:

TDD Approach

Click Image to enlarge

TDD benefits for Cerquit:
•    Quick results. Developers can see the effects of design decisions within minutes.

•    Flexibility. Changes are easy because of the short distance between commits.

•    Simpler, better and clean designed code that delivers business value and has fewer defects.

•    Automatic catalog of regression tests. If developer modifies code that is covered by unit tests, then you can use the tests to immediately determine whether you have broken existing functionality.

Continuous Integration (CI)

Continuous Integration is a software development practice where team members integrate their work frequently. All integration is verified by an automated build (including test) to detect errors as quickly as possible. Many teams find that this approach leads to significantly reduced problems and allows a team to develop cohesive software more rapidly.

Advantages:
•    When unit test fails, developers might revert back the code to a bug free state without wasting debugging.•    Integration problems are detected and fixed continuously.
•    Early warning of conflicting changes/broken/incompatible code
•    Immediate unit testing of all changes
•    Improves team work.
•    Delivers latest best build product

 

TECH TALK



QUICK CONTACT

Fullname:  
Email Address:  
Message:  
 
Security Code:
Please enter the characters seen from the image above.