WebForms
ASP.NET MVC New Project Replace Webforms with Spark
Note: This demo is in VB.NET and based on my use of spark on a real project; I can say that this will be the first of a few Spark MVC for VB.NET developers. Spark uses C# in the views; I think its going to be a good way, for me at least, to keep up to speed with both syntax.
It seems that bootstrapping Spark in the global.asa (code in general) is not working for namespaces. I’ll have another post early next week about all my next steps but for now just know you need to add your namespaces to a _global.spark
This demo is the process of getting running with spark and replacing the webforms view engine in a new asp.net mvc project. From soup to nuts as they would say…I guess.
Links:
Spark Download:
http://sparkviewengine.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27109
Spark Master Layout (Master Pages)
http://sparkviewengine.com/documentation/master-layouts
Project Source:
ASP.NET MVC new project with Spark view engine (coming soon)
A somewhat less biases comparison of MVP and MVC
What is it called?
First off; what are we calling “Classic ASP.NET Development using Webforms and the MVP Pattern” today? I’d like to suggest we stick with a discussion of the patterns and the surrounding technology.
Component based development using the MVP pattern…or MVP for short
and
Non-Component based development using the MVC pattern…or MVC for short
And I am aware that there are companies working on MVC components/html helpers…so what else are we going to call it? Then again you might be write…what % of “Webforms” developers are using the MVP pattern? 5%?…hmmm…anyway I am sticking with MVC and MVP until I read something better on stackoverflow.com
Don’t be such an ass
Here is the document that I presented to a client when they asked for…well a comparison of “Classic ASP.NET Development using Webforms” and “MVC”
Introduction
In the .NET world the MVC pattern is relatively new but it has been the staple development architecture for Java and Ruby for over a decade. Most of the current the debate between what technology is “better” is argued from a developer’s point of view. While the technical underpinnings of a technology can often translate to the projects success; I feel that both WebForms and MVC are mature enough that most projects will do fine with either.
ASP.NET WebForms
Through the abstraction of HTML, CSS, and JavaScript; ASP.NET WebForms attempts to recreate the experience of developing a desktop application. The entire HTTP protocol is successfully abstracted away and developers are present with a faux statefulness that mimics desktop applications. Development teams are able to use a WYSIWIG style of development.
ASP.NET MVC
Out of the box ASP.NET MVC forces developers to understand HTML, CSS, and JavaScript. There is little to no abstraction which can be a double edged sword. On one hand your development team has access to the raw power of the markup & languages that make up the web. On the other; if your development team is not experienced with HTML, CSS, and JavaScript there might be a learning curve.
Decision Matrix
|
Number
|
Topic
|
ASP WebForms
|
ASP.NET MVC
|
|
1
|
Size, Extensibility, Maintainability
|
Your project is small and your team is not experienced with MVC
|
Your project is large (experience with MVC not required)
|
|
2
|
3rd Party Components
|
Your project requires many specific 3rd party vendor components
|
Your project is not bound to 3rd party vendor components (The UI can still be very rich)
|
|
3
|
Open Source
|
Your project team is not comfortable with open-source libraries
|
Your project team is comfortable with open-source libraries (especially jQuery)
|
|
4
|
Extensibility, Maintainability
|
Your customers requirements will not change during development
|
Your customers requirements may change during development
|
|
5
|
Extensibility, Maintainability
|
Your project will never be "extended" or have a feature "added"
|
Your project maybe be "extended" or have features "added"
|
|
6
|
Testability
|
Unit testing is not required for this project
|
Unit testing is required for this project
|
|
7
|
Extensibility, Maintainability
|
|
Your project is limited in maintenance hours
|
|
8
|
Compliance
|
There is little to no concern with regard to HTML compliance
|
HTML markup compliance (compliance, screen readers, etc)
|
Notes
- The convention built into the MVC framework helps enforce a separation of concerns design pattern what helps developers built applications that are inherently more extensible and maintainable.
- If your project/company has an existing large investment in 3rd party components you should consider sticking with whatever framework the components are developed for (Webforms or MVC)
- component suites are available for both frameworks but many developers have found that jQuery, and to a less extent other open source frameworks, is a better solution for building rich UI
- The convention built into the MVC framework helps enforce a separation of concerns design pattern what helps developers built applications that are inherently loosely coupled.
- See note #4
- ….
- ….
- ….