简体   繁体   中英

ASP.Net MVC VS Javascript UI

I haven't done any web development for the last 6 years apart from a small silverlight project two years ago. So 6 years ago I was working on a web project project using ASP.net and I must confess that I never liked Web Forms. Because ASP.Net was a requirement I and because I was starting to get interested in Restfull web services, I used markup free ASP.Net pages, each being a controller, and in each there was a big if, which was looking for the method name in xml message being sent from the front-end. Around that time I started seeing web application using web services for the back-end and javascript only interfaces, which were using Ajax requests.

So for the last 6 years I´ve worked mainly in the Services Layers, with SOA and more recently with Event SOA, so to me I don´t understand the need for ASP.Net MVC, I am learning it, because it seems to be a requirement everywhere this days, but in the times of SOA why do you need ASP.MVC if you are using just MSFT stack?

Say I want to build a new system, with a web front-end, and I built it in Layers, like the example bellow:

DAL -> SOA Services -> Web API (WCF) -> Front-End (JavaScript only)

Would it be better if a built it using ASP.NET MVC? I mean don't take me wrong but I just don´t see it fit anything but small non-layered projects.

ASP.Net MVC is a huge improvement over Web Forms, and I was hoping you guys could give me some insights on this; I am not trying to be cynical here, I've been away from Web Developmental for a long, time and I just need to know why people seem to prefer ASP.Net MVC over plain JavaScript front-ends.

Thanks a lot.

This will get closed as you're really asking for opinions.

But the reasons include:

  1. Purely javascript front-ends are still extremely hard to do well. Extremely .
  2. ASP.net MVC came out a couple of years before you could really do that anyway
  3. Code reuse is much easier in a server-side framework still
  4. WCF webservice vs ASP.Net MVC is personal preference. Both have their weird black magic quirks that shows MS still doesn't quite get HTTP, HTML or javascript. They did just bring out a Web API for MVC, though it's still not clear why they did as it seems to adds very little.

I understand that major question is "where to build views and UI logic - on server side or client side" Shortly speaking - it depends on priorities. If you need quick results - use server side language to generate views and only plug in javascript into your pages. If you need to have responsive design with many dependences between components on the same page - probably javascript is your only choice.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM