2014/08/09

A programmer's Journey: MVC architecture of ASP.net


As I was looking for a starting point to start my web development career, I did some research in regards with MVC architecture of ASP.net. Normally, I'll choose ASP.net because of my existing knowledge working with .net framework.
It was not long ago when I've tried MVC, in fact it was supposed to be my choice over Webforms. But, things are starting to get hard when I started to learn it by myself. It's not the syntax but how MVC flows.

I find MVC hard to grasp because of the following:

  • Unfamiliar with the 3 paradigms(Model View Controller)
While its true that I have an experience developing desktop applications, this one is getting hard to understand. From how the controller pass the instructions to the view, and how model molded the view in order to have the results coming from a database. There is a little or more ambiguity on how the controller handles things. Like, for example the controller can issue that the username is *required*. You'll just add some data annotations and poof! It will work on the view automatically. How did it work? I can't seem to follow.

  • Lack of knowledge in Entity-Framework ORM
This one is another challenge. According to my research thus far, MVC architecture relies heavily in Entity Framework - an ORM Database Access Layer to cater the database mapping within a database.

  • Lack of knowledge in JavaScript and web development as a whole
This is my primary reason why I can't catch up with MVC so easily. Though I have knowledge in php and web development and/or C#.net in .net framework, it was not exercised thoroughly so the end result is I can't keep up that much.

Although struggling, I find MVC very appealing in almost every way. Not to mention it’s one of the successful architectures Microsoft has made over the years.

I solely chose to learn MVC because of the following:
  • Separation-of-concerns were emphasized neatly
I'll give a point to the man who invented and designed MVC in every possible way. Not only the MVC were able to mixed-up the existing conflicts between client-side and server-side scripting using Webforms, but it also executes and enforces a better "Separation of concerns". This is really an important factor when developing a system since you need to separate the Business Logic Layer(BLL) and Data Access Layer(commonly known as DAL) from the Design Interface Layer or UI web design layer(html/css, etc.).
  • Better controls to the system
Better separation gives us better controls. And better controls in return gives us better productivity without having to worry about the project deadlines and inconsistencies of the codes.
  • Testable codes
If you're familiar of using Unit Testing, this one is for you.

*Bottom line: In the end, its how you adapt faster using the latest technologies to accomplish your task. But for me, learning MVC is a good starting point in my journey toward web development.

No comments: