Project Description
WebDotNet is an experiment in web frameworks. Inspired by the python web framework, web.py, it is an exercise in extreme minimalism in a framework in about 250 lines of c#.

What is this framework?

WebDotNet is a minimalist implementation of a web.py or Google App Engine style framework in c#. The entire framework is around 250 lines of code.

What the project does consist of is a routing mechanism using the built in IRouteHandler functionality in asp.net, a HttpHandler that accepts the defined requests and routes them to the appropriate class, and a few extension methods to form a very rudimentary view engine.

000_Framework.png

Controllers are simply classes that support GET and POST requests, that take the specified parameters defined in the routes as parameters. The first parameter always being the HttpContexBase of the request, so by default, the controllers are very easy to test.

I will put together more documentation on this project on my blog when I can get a few moments. For now, this is how you would create the Hello World project.

Hello World

First, create an empty asp.net project.
001_NewProject.png

The solution should look like this (Ignore the other sample projects for the moment.):
002_Solution.png

Add a global.asax for loading the routes on startup.
003_GlobalAsax.png

Add a reference to the WebDotNet framework.
004_AddReference.png

Add the routing to the global.asax file.
005_SetupRouting.png

Add a standard cs class to the project. (I added a Handlers folder in the project, and inserted the class there.)
006_Index.png

And, finally, create the hello world controller.
007_HelloWorld.png

Then, run the app, and you will see the final result.

In the solution, there is a project that is a port of an extremely simple todo application written for the web.py framework located here http://svn.natalian.org/projects/todo/. The solution shows a quick example of how to structure your solution, how to use ajax with the framework, and is backed with a super simple xml data store.

If time permits, I will add more examples and docs either here or on my blog.

Why

This project is insanely simple. And I like simple. As it stands, this project is not a production class implementation, and it probably will never be. I uploaded this project to inspire people to think of different ways to make things simpler. Please do not focus so much on the examples provided, but the framework, and how vastly different it is from anything else in the .net world.

Is this better than asp.net mvc or fubumvc?

Its not better than either of those solutions. But, it is different, and it may give you an idea for your next framework that is better than those two solutions.

Discussions are welcome.

Last edited Sep 10, 2010 at 3:40 AM by jf26028, version 6