I blogged a while ago about creating a series of posts on building an ASP.NET MVC application. To be honest I had already built one. It took me three months. And I haven’t touched it for about two months, so I thought at least I can share it with you geek readers.
The main difference between MVC in Rails and MVC in ASP.NET is that Rails generates the infrastructure from the commands you type, as for the ASP.NET MVC part you are responsible for building the infrastructure.
What do I mean when I say infrastructure? Well basically all the plumbing that goes into accessing the database, talking to services, generating rss content etc.
What is Universum? It’s meant to be a community web site where teachers and students can collaborate. And it’s a basic framework on which you can develop applications that are based on article publishing. I am only interested in sharing the code with you, if it helps you good, if not.. well no harm no fowl.
That’s about all the talk, if you have the time please review it and tell me if it can walk the walk.
The application provides simple management for blogs, resources, questions, courses. There are areas where I could improve it, but I no longer have the time.
A bit of info on the database. I decided to use Db4objects. It was pretty nice to tell you the truth, but I hope the Repository pattern I found and used is good enough to accommodate different implementations.
User roles. If you are not authenticated then you are considered an anonymous user and don’t have access to nothing except the main page.
An authenticated user can be – one special user that can register students and teachers, a student or a teacher.
Determining if a user is a student or a teacher is done via regular expression ( that’s how student names are configured at my faculty ). The implementation is easy to change however so that is not a problem.
Indexing articles is done through Lucene.NET. I have to say I had a lot of problems with it, and I’m not sure I solved them all.
Not much testing, there was no time. Usually I have confidence in my coding style, and I tried getting as many things in as possible in a short amount of time.
The project was built as part of my bachelor degree, and I have to admit I whished I didn’t do so much, since in the end it didn’t even matter, 20 minutes to rate three months of work is hard to fit.
If enough people find it interesting I’ll blog about the parts of the application some more, until then download the source code from codeplex, and log in with secretary / asdf1234qwer. In the web.config you can set up the paths the project requires on disk, the sample uses C:\Universum. Also I recommend having IIS7.