Download pptx - No brainer

Transcript
Page 1: No brainer

Tanzim Saqib

Software Architect Consultant

http://TanzimSaqib.com

Facebook: SaqibRocks | @TanzimSaqib

Microsoft MVP 2010, 2011

Page 2: No brainer

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

Page 3: No brainer

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

Page 4: No brainer

Caution:This session assumes knowledge of MVC.

Page 5: No brainer

MVC Review

View

ControllerModel

Page 6: No brainer

CMS Review• Content Management System• Primary objective:

• Being able to feed/change content without requiring developers

Page 7: No brainer

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

Page 8: No brainer

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

Page 9: No brainer

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.

Page 10: No brainer

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?

Page 11: No brainer

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

Page 12: No brainer

Quick demo• Overview of NoBrainer

Page 13: No brainer

Easy Setup

Page 14: No brainer

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; }}

Page 15: No brainer

View

Page 16: No brainer

View (contd.)

Page 17: No brainer

View Codebehind

Page 18: No brainer

Controller

Page 19: No brainer

Content-driven

Page 20: No brainer

Demo• Browse features• Test code

• Webtest• Unit test

Page 21: No brainer

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

Page 22: No brainer

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

Page 23: No brainer

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

Page 24: No brainer

Questions?

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

• http://nobrainer.codeplex.com


Recommended