views:

185

answers:

4

Fellow stack overflowers,

I'm currently working on a project that has a sizable amount of both client and web code. The client code is written in C# and the web piece is written in PHP. Maintaining consistency between the two worlds is becoming cumbersome, and I want consolidate the web code to .Net.

The issue is that I hate web development in ASP.Net Web Forms. I want something as raw as PHP, just using C# instead. I've read a little about ASP.Net MVC, but it looks like it abstracts too much of the request logic for my liking.

Does anyone know of a lightweight way to allow C# + .Net to handle web requests? Should I be looking more closely at MVC?

Thanks in advance,

-- Breck

Update: For the record, I went with ASP.Net MVC and I've been very pleased so far.

+6  A: 

If you're looking to get away from ASP.NET Web Forms, the I recommend ASP.NET MVC with a custom view engine (like Spark, or NHaml). This will give you the consolidation your looking for and allow you to avoid most of the Web Forms that your not happy with.

AFAIK, to do .NET web development, you are going to have to interact with ASP.NET in some form or another, but the custom view engines in MVC could be exactly the abstraction your looking for.

Alastair Pitts
Agreed although I bet you ASP.NET MVC would be good for you. If you want to quickly learn about ASP.NET MVC, go follow the NerdDinner tutorial. You can get through it in about 12 hours and you will be able to make a very informed decision at that point. http://nerddinnerbook.s3.amazonaws.com/Intro.htm is a main page for it but you can download a PDF towards the bottom of that page for free that is all-inclusive. I STRONGLY recommend this.
Jaxidian
A: 

You should look into the IHttpHandler and IHttpModule interfaces. These are the foundations for ASP.NET WebForms. Brad Wilson has a good intro to the former.

In the bad days when WebForms was the way to do ASP.NET development I was writing my own simple MVC framework with these interfaces. The bit I struggled with at the time was the View engine but now there are a number of these.

You take a closer look at ASP.NET MVC since the source is available and decide for yourself. It may be that you want to change some of the conventions used rather than the whole framework.

BrianLy
A: 

You might want to check out Kayak, which is, to my knowledge, the only standalone .NET web development framework that's not ASP.NET.

Caveat: Kayak's request handling implementation is not the best, so there may be performance or scaling issues. I can't say for sure -- I've only read it, not run it.

Edit: I've taken another look at the source code, and it looks like they've rewritten a significant portion of their server code, and in doing so fixed the major issues. Performance probably won't be a problem.

ShZ
FubuMVC, OpenRasta, Castle MOnoRail
George Mauer
The project page is at http://code.google.com/p/kayak/
BrianLy
@George Correct me if I'm wrong, but don't MOnoRail and FubuMVC depend on IIS/ASP.NET?
ShZ
A: 

MVC.NET is open source, so you can make it do what you want. It is a framework that is overrideable, extensible, etc. I'd look closer at it. It works great for me and I've come from a background of CGI, Struts and Webwork. I love it.

mrjoltcola