Wednesday 15 October 2008

VISUG event : ASP.NET MVC

Hello

Yesterday (14/oct/2008) , I attended a presentation on ASP.NET Model-View–Controller (MVC) framework by Maarten Balliauw that was organized by VISUG ( a Belgian .NET community). Last web development I did was in Netscape (Who?) LiveWire (What?) and I also some ASP (thus pre .NET era). So I somehow skipped ASP.Net webforms but still followed it from the side-line. So this was an excellent opportunity to keep up-to-date with web-development.

These are some points that I learned from the presentation:

  • ASP.NET MVC model is built on top of the ASP.NET framework.
  • It is something you have to install separately.
  • Fully integrated into Visual Studio
  • It is NOT a replacement for the current ASP.NET Webforms framework
  • The main goal is to allow programmers to clearly separate responsibilities according the MVC pattern. This clear separation of presentation logic, UI and the “rest” of the application is not only conceptually but also reflected in the code and project structure as created by the ASP.NET MVC project template
  • You can use ASP.NET infrastructure in an ASP.NET MVC application. Cohabitation of the webform way of working and the MVC way of working is possible. You can also use ASP.NET providers like membership and roles. You can also re-use ASP.NET session and so fort.
  • ASP.NET Server controls can be used as long as they don’t rely on the ViewState mechanism.
  • The filter-mechanism to create attributes to annotate parts of application tha can do reccuring activities for you (err handling, logging, etc)
  • A special routing mechanism for your requests is available.By default relies on a special convention of naming and structure to kick start the right controller. But you have the ability to intervene in this routing mechanism
  • Also the View parts must follow a convention (naming , folders)
  • You can more easily test the controller logic in “classic” unit test by controlling the dependencies with dependency injection and mocking frameworks. ASP.NET MVC plays along.
  • The “car and Motor-cycle” analogy : Webforms -> car , ASP.NET -> Motor-cycle. I guess it has to do with protection , speed, and so fort . Or with the fact that you can choose between them

Some questions I still have

  • Still in CTP. Maarten thinks at PDC 2008 a beta will made available and a V1 will soon follow. But how it will be packaged, I’m not sure.
  • What about a MVP style implementation of ASP.NET webforms. Don’t you also get clean(er) separation, testability of presentation logic, understandability , etc ?
  • Is the Web Client Software factory from Patterns& practices a viable alternative?
  • In the examples Maarten showed I show a lot of in-line code in the View pages. So while server controls in webforms spit out the markup. Apparently I have to do the most your-self though Maarten mentioned some tools that can help you to alter the view rendering (Nhaml)

Some questions from the audience

  • Can the controller be in separate assemblies? In the examples shown the relation between view and controller was very tight in the sense of the “actions” you can trigger from a view (so no reference dependencies). So in first line I would think this is a part of the presentation layer But according to Maarten there is someone who tampered with the routing mechanism to achieve this.
  • Hooking up Winforms in this MVC mechanisms: It is called the ASP.NET MVC framework. It uses the System.Web namespace. So in the lower parts of the framework I guess all Http-stuff (get, post, etc). Maybe the MVP pattern is better suited? Has anyone used the Smart Client Software Factory?
  • There was also a question about comparison , I believe, between Monorail , classic Web forms and ASP.NET MVC. I think this could be a valuable for many in order to have some “framework” to base a decision on what web development model to use (car-motorcycle analogy). One of the bullets is the presenation was : Not for everyone. So I guess there are some points to think about before embarking in a ASP.NET MVC implementation .

I’m sure I forgot some things from the presentation. If you have any comments or would like to add some points (benefits or concerns) , feel free to drop a line.

Visug has some more interesting sessions coming up ;

  • ASP.NET 3.5 sp1 novelties,
  • Rosario(VSTS 2010) ,
  • Entity framework & WCF and
  • a session by Juval Lowy (hardcore WCF).

Thanks for reading.

Best regards,


Alexander

8 comments:

spadamchrist said...

ASP.NET MVC in Action is a comprehensive guide to MVC-based development using this powerful new framework. It offers a clearly-written introduction both to the ASP.NET MVC Framework and to the MVC approach. The focus is on creating real, maintainable web applications.so don't expect toy examples and short snippets. The authors lead you from first-use through real-life scenarios.
-------------------------------------
jacksen
Social Network Advertising

Richard Majece said...

Try to have a look here if you want to know more about APA style format. You can use it in your academic future

Hazel Audrin said...

During the development of the Unix V7, the efficiency of construction and testing was one of the most difficult problems. The reason for this is obvious. When a system software program is compiled and installed, the entire test environment is actually "polluted".
autobiography writing

Kane Williamson said...

This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. thanks from emotional support certificate online

Anonymous said...

Motivation for learning funmathgamesforkids is based on the principle of game learning, which helps to build an interesting and exciting lesson. Educational games on the online platform, interactive presentation of materials, game functions, tasks to be performed use this effective effective program free online multiplication games will help your child love math.

John Carlson said...

Hire the best Custom Home Builders USA for all your home renovation and construction needs.

Ghostwriting Professionals said...

Ghostwriting Professionals are here to deliver instant help for any type of Writing, Design and Marketing Service. We are a team of highly creative, active and dedicated people. With a staff of New York Times bestselling authors, ghostwriters , and former acquisitions editors from Big-5 publishers, we provide our clients with the very best in talent, publishing expertise, & professionalism.

Our list of clients includes the bestselling writers, editorial agencies, businesses, publication companies, journals, and various first-time authors. We stand as the well-reputed firm in the ghostwriting industry and our clients have achieved their publication goals effectively. Whether you require a traditional book, or comprehensive ghostwriting services , we ensure your book is readily available to the target audience.

Charles Maynes said...

According to animated video productions Unix V7's development was hampered by issues with the construction and testing efficiency. The explanation for this should be fairly self-evident. All of the test data is effectively "polluted" whenever system software is compiled and installed.