开发者

What would be considered straight asp.net? (not mvc and not webforms)

开发者 https://www.devze.com 2022-12-21 10:25 出处:网络
I know the difference between ASP.NET webforms and ASP.NET MVC and I\'ve seen quite a few videos explaining that they both run on top of ASP.NET (and I\'ve used both).However, my question is, how woul

I know the difference between ASP.NET webforms and ASP.NET MVC and I've seen quite a few videos explaining that they both run on top of ASP.NET (and I've used both). However, my question is, how would one develop right on top of ASP.NET without开发者_Go百科 webforms or mvc.net? Would this be the equivalent of having a project with only .ASHX files?


ASP.NET 1.0 and 1.1 originally consisted of a class library and templating markup (Web Forms). This was a natural extension of ASP 3.0, where HTML and VB code were intermixed in an .ASP file.

The class library is what I would consider the "straight" ASP.NET framework. IMHO, the System.Web namespace represents the efforts to incorporate "ASP" into the .NET framework. You get the top-level objects like HttpContext object and its static properties, as well as a couple objects that do the lifting of the ASP.NET processing pipeline, IHttpModule- and IHttpHandler-derived classes.

Ostensibly, you could invent your own markup language and write an HttpModule (among other components) to render the responses. This is probably why the System.Web namespace has grown to include code for Web Services, AJAX/JSON, MVC, and in .NET 3.5SP1, ASP.NET dynamic data.

My 2 cents.


Where do web services fit into this? A service isn't really a form nor is it MVC, so that would also be on the list of other things you could do with ASP.Net.


New answer: I actually took the time to look up Microsoft's official answer.

ASP.NET is a unified Web development model that includes the services necessary for you to build enterprise-class Web applications with a minimum of coding. ASP.NET is part of the .NET Framework, and when coding ASP.NET applications you have access to classes in the .NET Framework. You can code your applications in any language compatible with the common language runtime (CLR), including Microsoft Visual Basic, C#, JScript .NET, and J#. These languages enable you to develop ASP.NET applications that benefit from the common language runtime, type safety, inheritance, and so on.

ASP.NET includes:

A page and controls framework

The ASP.NET compiler

Security infrastructure

State-management facilities

Application configuration

Health monitoring and performance features

Debugging support

An XML Web services framework

Extensible hosting environment and application life cycle management

An extensible designer environment


You can use an IHttpHandler to intercept raw web requests from IIS and give any responces back whether it is a webform, image, file or whatever. which I guess could be considered basic ASP.NET without a WebForm or MVC. Problem using IHttpHandler


Asp.Net encompasses the System.Web namespace. Webforms is the System.Web.UI namespace. One of the critical differences is that the classes within System.Web.UI typically do not emit standards based html and SEO can be a nightmare.

Asp.Net on it's own can provide a basic templating system similar to many other web frameworks and the developer can make complete websites without using any WebForms controls. This is an atypical situation however because the typical Asp.Net development process, prior to Asp.Net Ajax and Asp.Net MVC anyway, was to use the controls in the toolbox.

0

精彩评论

暂无评论...
验证码 换一张
取 消