No brainer

Preview:

DESCRIPTION

NoBrainer is an MVC + CMS Framework, as its name suggests for low-fi developers and savvy business stakeholders. It provides developers the flexibility of MVC as well as the control of WebForm, resulting in a testable and content manageable WebForm infrastructure for you application. NoBrainer currently supports only Web at the launch, however it can easily be extended to work with Desktop as well as Mobile. That way your logic and test code remain the same across different UI layers. Yesterday we had an electrifying event “Open Source in .NET | Open Day” in collaboration with Microsoft Bangladesh, that I have posted earlier about. In my second session I unveiled my shiny new Open Source project “NoBrainer” which is the topic of this presentation. More: http://nobrainer.codeplex.com

Citation preview

Tanzim Saqib

Software Architect Consultant

http://TanzimSaqib.com

Facebook: SaqibRocks | @TanzimSaqib

Microsoft MVP 2010, 2011

My Open Source Projects• Creator:

• No Brainer (An MVC + CMS Framework: cross platform)• Cassini 4.0 (Tiny web server: Windows Forms)• MyStream (Social Streaming: ASP.NET)• News Framework (Windows Phone 7)

• Contributor:• Dropthings

An MVC + CMS Frameworkhttp://nobrainer.codeplex.com/

Caution:This session assumes knowledge of MVC.

MVC Review

View

ControllerModel

CMS Review• Content Management System• Primary objective:

• Being able to feed/change content without requiring developers

Why NoBrainer?• A Framework for frustrated people:

• As an Architect, you can’t feed MVC to your business stakeholders• because it is a very costly process• the decision is not in your hand

• As a business stakeholder, you have a developer pool who are:• reluctant to changes • afraid of the learning curve of ASP.NET MVC

A Frustrated Pool of Developers Who…

• Do not like to learn new technology• Learnt WebForms once and will never try to learn

anything new again• They just can’t think of living without their favorite drag &

drop WebForms environment • Anti-convention• Anti-patterns• Anti-testability• There are tons of people around us.

• Including many in outsourcing companies

WebForms vs. MVC• Control vs. Flexibility• WebForms: Toolbox, and drag & drop

• Rich designer• Familiar life cycle• Event based programming

• MVC: freedom as long as you observe a convention• Testability• Natural to many agile practices

• MVC has not come to take over the world of WebForms• Both will live. Live really long.

A Smart Business Stakeholder Wants…

• Predictability and reliability• Hence, they want both control and convention

• What are they going to get from a frustrated pool of developers?

NoBrainer Features• An MVC Framework that works with WebForms• Built-in CMS capability• Gradual upgrade• Testability of WebForms logic• Automatic View Model Controller mapping• Automatic Error binding• Strongly typed• Intellisense while coding• Built-in Caching mechanism• Content Combining• Can be extended to support different form factors of PC• Serves real production customer-base over millions• Easier to learn than ASP.NET MVC

Quick demo• Overview of NoBrainer

Easy Setup

Model

public class AccountModel : ModelBase{ public string UserName { get; set; } public string Password { get; set; } public string Email { get; set; } public bool PersistentCookieEnabled { get; set; }}

View

View (contd.)

View Codebehind

Controller

Content-driven

Demo• Browse features• Test code

• Webtest• Unit test

NoBrainer Features (recap)• An MVC Framework that works with WebForms• Built-in CMS capability• Gradual upgrade• Testability of WebForms logic• Automatic View Model Controller mapping• Automatic Error binding• Strongly typed• Intellisense while coding• Built-in Caching mechanism• Content Combining• Can be extended to support different form factors of PC• Serves 5M production customers• Easier to learn than ASP.NET MVC

Content Combining• Outside scope of this presentation• An aspx is split into multiple HTML editable files• Each file can host combination of rich ASP.NET controls

• Including Update Panels, nested and any combination of them

• NoBrainer combines those files in sequence per request and serves as one

• Example 1: aspx files can be served extensionlessly or even via html/htm

• Example 2: html/htm is made capable of handling postbacks and server-side controls

Content Combining (a glimpse)

ViewPost.htm

User requests

No Brainer

Header.html

SEO.ascx

BlogContent.ascx

StaticAd.aspx

Footer.htm

ViewPost.htm

Any ComplexNested

level control

hierarchyServes as a dynamic page

Questions?

• Contact:• http://TanzimSaqib • Facebook: SaqibRocks• @TanzimSaqib

• http://nobrainer.codeplex.com

Recommended