سؤال

ASP.Net is Active Server Pages using .Net Framework

Wikipedia says

It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology.

While answering this question following thought came to me – why Microsoft named it’s Web API as “ASP.Net Web API”. There are no Pages involved in Web API. Then why do some people call it as “Active Server Pages .Net Web Api” ?

I believe there are some fundamental features of ASP.Net shared with Web API. So what are they?

Another observation - why is the tag in programmers naming it as "asp.net-mvc-web-api"?

Reference:

  1. ScottGu's Blog- ASP.NET Web API
هل كانت مفيدة؟

المحلول

As you probably know, Web API used to be a part of WCF and NOT part of the ASP.NET family. Microsoft tried to develop the technology under the WCF Web API moniker for several years, but eventually decided that they were probably trying to fit a square peg in a round hole.

I think that makes sense. After all, WCF always does seems to be more "Service" oriented (I don't like to use that term, but I can't think of a better term), while Web API seems to lean more to the RESTful end of things. So adding it to the ASP.NET family makes a lot of sense to me, as the ASP.NET family relates to everything Microsoft is doing that involves HTTP/Web.

Try not to take the ASP.NET name too seriously, as the original ASP name was conceived in 2000. Think of it more as the .NET stack for building full-fledged web applications, whether that involves web pages or not.

نصائح أخرى

Because it's part of the ASP.NET framework. Sure, ASP used to stand for "Active Server Pages" but it's really grown to be beyond that now. I've never heard anyone call it "Active Server Pages .Net Web Api", and I would be confused if they did.

While their earlier attempts at .Net API were under the WCF namespaces (we wont go into asmx services, they just failed) people found it much easier to use MVC controller classes and route patterns to do rest style APIs and WCF was always a bit awkward at simple rest as it was designed around a bunch of complex soap or binary use cases like replacing remoting.

Many use cases for APIs shifted toward sites and services consuming them and keeping the API in a completely separate app was tedious, so over time the WebAPI style apis have moved closer and closer to being the same thing, in the same namespaces and event model and MVC controllers. If you were working in the guts of security or httpmodules at time time the designation of which event model you were stuck with was a very important detail in what you needed to implement manually to accomplish a task. Saying that they are part of the ASP pattern was important before the push to unify those namespaces.

The active server pages name itself goes back to the mid 90's and was mostly a designation between pages that did something through script versus cbi-bin where dlls just took over the whole process.

If you ignore the original meaning of the name and look at it as a category that has evolved over the course of almost 20 years it does make some sense.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى softwareengineering.stackexchange
scroll top