Monday, May 28, 2012

MVC - Introduction

Introduction

Welcome. This is my first blog on Model View Controller (MVC). I am blogging about it because I love programming in MVC so hopefully you will learn from my experiences. I also maintain a blog on Building Information Modelling (BIM) called BIM Manager, as aside from programming I have a passion for Architecture also. I think this puts me in a very small but growing group of individuals.

Through a series of posts over the next few months I plan to cover topics on MVC, Databases, Entity Frameworks (stuff that connects MVC and databases) and jQuery (very smart JavaScript). I may wander into other interesting MVC and Object Oriented related stuff but will try to keep focused.

MVC

MVC stands for Model View Controller. MVC is a bit of a buzz word at the moment as it is recently increasing in popularity. But what is MVC?

MVC is a pattern based framework for building applications. Software systems use MVC to basically put manners on code by ensuring code abides by strict rules. With a little bit of time and some coffee, you could even develop your own MVC pattern but there are plenty of good patterns out there and life is about more than just programming. MVC is a pattern or a set of rules. Applications such as Ruby on Rails, iOS and ASP.NET MVC now have some very well defined rules for how MVC code is structured. MVC is not new as it has been around since 1979 and was originally named Thing-Model-View-Editor.You will now find MVC in many applications both for the web and desktop. For example, if you plan to write an app for an iPhone, you will need to use MVC. Many organisations are using MVC to simplify very complex applications and websites.

I primarily develop web applications and also dabble in desktop and iPhone development. I started web programming in VB and Classic ASP which for a long time got a lot of productive programming done. When I switched to ASP.Net, I had great hope that it would remove some of the repetition involved in scripting while promoting reuse through Object Oriented programming. The reality was not so good. ASP.NET added so much baggage trying to make web sites work like windows based applications, that I soon was fed up and used it sparingly. I looked at a few bolt-on applications such as Devexpress for Visual Studio to automate some tasks but it was still clunky. The viewstate functionality of ASP.NET especially annoyed me, this wasn't web development any more.

I started to look at Ruby on Rails which has led the way in web MVC programming and then came across ASP.NET MVC which was still at the early stages of development. I found the Model View Controller a bit puzzling at first, but soon things started to click as I realised I was relearning the basics of HTML again. I was also starting to learn iOS programming for the iPhone/iPad online from Stanford University and was surprised that MVC was being used here also. Ruby on Rails is a great programming environment and credit must be given to David Heinemier Hansson for having the insight to bring MVC to the web. HTML has recently evolved to version 5 is now changing the web again with the introduction of media related functions that were long needed. It is exciting times indeed to be looking at MVC.

I opted to develop in ASP.NET MVC mostly because I was familiar with Microsoft applications and also because I program for AutoCAD and Revit which until recently were solely Windows based. I switched most of my programming tC# when I started MVC as most of the material and samples on the web were C#. VB will work just as well and there are websites that will convert VB to C# and vice versa.

Onward and Upward

Slightly convinced? Try MVC out, you won't regret it. It is suitable for beginners or experienced programmers alike.

I would recommend learning some basics of HTML first. W3Schools and HTML Goodies are excellent web sites to get you started on basic HTML and JavaScript. Many tutorials and books start with the Model or the View but my first meat and bones post will look at the HTML form. Yes, this is the basic HTML form that has been around since the beginning of HTML. MVC relies surprisingly heavily on HTML forms. I will include code with each post and build up to a useful everyday application.

Enjoy.


25 comments:

  1. great stuff. i have several mvc websites and now is my chance to learn how to improve them.

    ReplyDelete
  2. The MVC concept is new to me , it is really good thanks for sharing this information it is useful too.


    dotnet training in chennai

    ReplyDelete
  3. Informative Post!!! .Net is most preferred programming language among software developers all over the world. It is also considered as most trusted and effective platform to build high performing desktop or enterprise application. DOT NET Training Institutes in Chennai|DOT NET Training in Chennai

    ReplyDelete
  4. This substance makes another trust and motivation within me. A debt of gratitude is in order for sharing article this way. The way you have expressed everything above is entirely amazing. Continue blogging this way.
    Regards,
    DOTNET Training in Chennai | DOTNET Training Chennai | dotnet courses in Chennai

    ReplyDelete
  5. Wonderful blog.. Thanks for sharing informative blog.. its very useful to me..

    iOS Training in Chennai

    ReplyDelete
  6. Thank you for Sharing. I'm working in brave technologies private limited, We are the best erp software developers based in chennai. erp providers in chennai

    ReplyDelete
  7. Nice blog. Thank you for sharing. The information you shared is very effective for learners I have got some important suggestions from it. erp in chennai.

    ReplyDelete

  8. Hai nice ap.net information keep updateing usefull postd like the, if it is possible update some interview realted stuff.thanks

    ReplyDelete
  9. Thanks for sharing this webpage. Dot net is an emerging technology, your blog gives a detailed information on MVC. Continue sharing more like this.
    SAS Training in Chennai | SAS Institutes in Chennai | SAS Course in Chennai

    ReplyDelete
  10. Thanks for your informative blog!!! Your article helped me to understand the installation process...Selenium Training Institute in Chennai | Selenium Training Institute in Velachery

    ReplyDelete