views:

197

answers:

5

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 webforms or mvc.net? Would this be the equivalent of having a project with only .ASHX files?

+3  A: 

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.

JB King
hey good point!
Allen
+7  A: 

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.

Jeff Meatball Yang
+2  A: 

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

sadboy
aspx pages are not unique to webforms, they're the html part of the templating system asp.net provides.
marr75
edited. thanks.
sadboy
+1  A: 

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.

marr75
+2  A: 

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

David Stratton
I know this is gonna sound weird but I think that first bullet point is incorrect since its clearly talking about the system.web.ui namespace
Allen
Ah, true but, (and I mean this in a lighthearted way because I see your point and agree with it) since it is Microsoft and Microsoft alone that can officially define what ASP.NET is, mine is technically the "right" answer because it's copied verbatim from their site. However, I am still giving my support to the point leader as having a good answer. I just wanted to be nit-picky for a change.
David Stratton
It's like with Star Trek TOS - the books can say what they want, but the TV series is considered the "official" source of truth.
David Stratton
lol yeah, I will give you a +1 either way and for the star trek reference :) Someone should email Scott Gu and see what he has to say about this
Allen
+1 for this answer and comments! Time for Scott Gu to do some retconning: "MVC? oh yeah, it was a secret 'page and controls framework' that we were sitting on, until RoR forced our hand..."
Jeff Meatball Yang
Wow I had to lookup what retcon meant, learn something every day I guess lol
Allen