6 Replies - 6200 Views - Last Post: 09 July 2013 - 06:55 PM

#1 W3bDev  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 42
  • View blog
  • Posts: 379
  • Joined: 15-March 09

MVC: An Intellegent Conversation

Post icon  Posted 25 August 2009 - 10:54 AM

How do you do this???

So, I've seen a few posts on here with some users who have some questions regarding the MVC(Model-View-Controller) framework, but very little discussion has been implemented upon this subject, I want to break the ice and try to drum up an intelligent conversation on the topic. First, if you haven't introduced yourself to the framework, it's time to say hello:

Quote

Hello MVC


Good, we're off to a great start. Just kidding lol. Here's some documents I've introduced Myself to:

Overview of the Framework

MSDN:

Model View Controller

Front Controller

Rear Controller


Some Good :^:

-Separation of input logic, business logic, and ui logic
-Separation of view state
-Easy to test
-Compatible with large team projects
-Very expendable
-Dynamic mapping for enhanced url mapping


Some Bad :v:

-Can add a great deal of complexity


Some thoughts :bananaman:

I think as software developers, such framework is important to take a look at to adapt to if can influence our organization of projects, ease maintainability and encourage reuse. After further reading, I come to find out a simple implementation of MVC is to use the Page Controller Pattern, but for more complicated systems, the front controller may be more applicable, and require more advanced features based upon role management.

I guess, generally, you would need to make the decision based upon how large (or complex) your web application needs to be before moving this way. I think we, as a community should try to formulate a case study in which would overview general deployment of such an architecture.

:magic: /sits in corner.

Is This A Good Question/Topic? 0
  • +

Replies To: MVC: An Intellegent Conversation

#2 baavgai  Icon User is online

  • Dreaming Coder
  • member icon

Reputation: 5763
  • View blog
  • Posts: 12,580
  • Joined: 16-October 07

Re: MVC: An Intellegent Conversation

Posted 25 August 2009 - 01:09 PM

In the most fundamental way, most ASP.NET applications are intrinsically MVC. Also, web development offers are very clear and natural division of the labor.

The view is HTML and anything that directly generates it. For an ASP.NET web page, the view is the stuff in the designer and the controller is the stuff in the code section. The model, in a standard .NET application, is the typed DataSet that holds the Model(DataTables) and the abstraction that services the model, the Adapter pattern.

If you make an ASP.NET site using the standard best practices, you've implemented a MVC design.

I generally move my Controller farther away from the Web pages and implement a common Helper or DataAdapter that all the pages can call. I like the code under the page to only deal with the logic of the page itself.

There is, of course, a certain degree of subjective judgment as to whether any code conforms to a MVC design.
Was This Post Helpful? 0
  • +
  • -

#3 W3bDev  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 42
  • View blog
  • Posts: 379
  • Joined: 15-March 09

Re: MVC: An Intellegent Conversation

Posted 25 August 2009 - 01:35 PM

Baavgai,

I see where you are coming from here, I understand that applications programmed in such a way, are intrinsically MCV, but I am referring to community experience with the ASP.NET MVC framework specifically. I agree fully that there should defiantly a separation between business functions, display and data access, I was looking more toward implementation of such ideology using the framework provided through this framework.
Was This Post Helpful? 0
  • +
  • -

#4 baavgai  Icon User is online

  • Dreaming Coder
  • member icon

Reputation: 5763
  • View blog
  • Posts: 12,580
  • Joined: 16-October 07

Re: MVC: An Intellegent Conversation

Posted 25 August 2009 - 02:49 PM

Ah, I see. The Microsoft MVC. Hard coded into a framework because most of our programmers still work in VB and we think they're idiots... ;)

Just glancing at a few pages one thing is obvious; this is ASP.NET on Rails! They're even doing RESTful URLs. And unit tests, and evoking the CRUD acronym, and, and... wow, not since C# ripped of Java. :P

Curiously, I actually scrapped a small ASP.NET project in favor of a Ruby on Rails model recently. This was somewhat due to being bored and wanting to learn Ruby. However, I was also annoyed by the amount of work I had to do for just a handful of DataTables that were nothing special. I also needed the ability to react quickly to schema changes.

While this type of design is logical and easy to follow after you've played with it a bit, the initial learning curve is steep. Rather than just doing, you have to play puzzle master with all the pieces. Eventually you know which piece to jump to when working on the project. That, or stuff a lot of square pegs into round holes.

I see this doing as well as most high minded design paradigms. Your average programmer will take what is useful and ignore the fundamental concepts. Then will then find they've boxed themselves in and call it crap. Some programmers will find it extremely useful, but they'll be in the minority. They will then cry when Microsoft ultimately marginalizes it for some other shiny toy.
Was This Post Helpful? 1
  • +
  • -

#5 W3bDev  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 42
  • View blog
  • Posts: 379
  • Joined: 15-March 09

Re: MVC: An Intellegent Conversation

Posted 25 August 2009 - 04:06 PM

View Postbaavgai, on 25 Aug, 2009 - 01:49 PM, said:

...Hard coded into a framework because most of our programmers still work in VB and we think they're idiots... ;)

...I actually scrapped a small ASP.NET project in favor of a Ruby on Rails model recently. ... I was also annoyed by the amount of work I had to do ....

...the initial learning curve is steep...

....They will then cry when Microsoft ultimately marginalizes it for some other shiny toy.



First of all, thank you for your input, I appreciate intelligent conversations like this :).

Second, some comments on the above:

Yes, I do think they are idiots as some of my current posts might note. LOL

Second, I actually did the same with a project of mine and got pretty annoyed as well.

Third, I agree the learning curve is sharp due to the way it's laid out, somone illogical in some ways, and would really take a lot of getting use to.

Finally, true, I do think Microshaft is playing with some different technologies, and waiting for the next trend to take off.

I'm going to play around with this a little more, but probably not too much. I think smart coding in general eliminates the need of using such framework, and frameworks like this target more individuals who would rather point and click, inside a WYSIWYG environment... not me lol.

Thanks again... oh and more intelligent conversation is welcome here.

:^: :D :w00t:
Was This Post Helpful? 0
  • +
  • -

#6 W3bDev  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 42
  • View blog
  • Posts: 379
  • Joined: 15-March 09

Re: MVC: An Intellegent Conversation

Posted 27 August 2009 - 02:28 PM

Okay after rolling on the floor several times, I wanted to post this here... its a great quick tutorial about implementing MVC in the .NET framework, and the guy who does it is incredibly amusing.

ASP.NET MVC Tutorial: NerdDinner.com


I recommend anyone interested in getting their feet wet in MVC, or interested in being amused with some geek talk as well :P.
Was This Post Helpful? 0
  • +
  • -

#7 gonzaw  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 18-December 12

Re: MVC: An Intellegent Conversation

Posted 09 July 2013 - 06:55 PM

I prefer using something I'd call "MVVMC" or Model-View-ViewModel-Controller.

The client calls an action method, which takes the specific model, transforms it into a specific viewmodel that depends on the view, and calls said view.

The bad thing about is that you have to replicate validation and behaviour in the viewmodel that's the same as the model (for client-side validation for instance). Hopefully in the future of MVC this can be done more fluently.


I just can't see any web development WITHOUT MVC. It has all the best practices, if you know what you are doing you can make pages and stuff very very fast, it's easy to understand, easy to read, easy to reuse, easy to change.
Other than the aforementioned MVVMC (which is basically MVC) I don't really see anything else that can convince me to not use MVC
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1