So I’m giving a talk at a local user group in about two weeks about building large applications. I don’t feel as if I am the definitive expert on the topic, but I do know one thing, and it is the fact that software complexity needs to be reduced. I think that most developers out there today would agree with that sentiment, at least on the surface, but few people actually realize how hard it is to create simple software. Simple can be elusive, complex solutions can be deceptive, and solutions that looked like the simple choice can actually end up being horribly complex.
It is with these thoughts in my head that I started exploring and reevaluating my take on certain technologies within the web development space. My first adventure into this landed me squarely in the lap of Django. Django, for the uninitiated, is a lightweight framework, build on Python, for creating web applications. It has a MVC architecture, even though they don’t refer to it as such. I’m sure that there are a few differences, but I am no Django aficionado. What I found interesting about Django was the fact that it tries to automate or generate a large amount of what you need in order to get a simple web application up and running. In fact, if you use the admin application that comes with Django, it provides a fairly rich, pre-built, admin interface that you can plug your models right into. Complete with a full solution for authentication by providing users, roles, etc… which are already baked into the admin.
You can create different sections in the admin, tell Django what items can be filtered, what columns can be searched on, how you want things to be displayed, etc… And it will generate admin screens that allows you to search, sort, and filter data all without having to write anything. It will do fairly complex validation without writing code, and even allows you to customize templates so that you can change the way that different things display. It wires up models based on relationships and allows you to easily link between them. Overall, for a simple application (or even moderately complex application), it is an excellent solution. Allow the developer to focus on the consumer side of the application, and let the framework generate "simple" admin screens. But I put simple in quotes, because I have seen many custom admin sites that look far worse and are far less functional than what Django can give you right out of the box. In fact, I would say that most sites could easily do with the admin site generated by Django. Check out this screenshot from the Django Documentation:
Like I said before you have a search box which you tell what columns to look through, and filters on the side so that you can filter through the data. You can tell it what columns can be ordered, and it handles all of the paging for you.
You could create a Django application with a few models and have a fairly robust admin section up and running in a matter of minutes (I’ve seen it happen in some tutorial applications). The Django and Rails worlds embrace solutions such as these, yet many in the .NET world really look down on these types of solutions. Take for instance, ASP.NET Dynamic Data. Now, ASP.NET Dynamic Data in its first release is extremely limited compared to what Django can do out of the box, but for the most part this is the direction that I think the ASP.NET Dynamic Data team is taking this tool. They want it to be an easy to use tool for dynamically generating CRUD operations on top of some data source. In the first release this is only Linq To Sql or Entity Framework, boo! But apparently they are working on that.
I’m not saying that ASP.NET Dynamic Data is the solution to your problems, in fact, I played around with it, and I think that they need a few more releases and some extra features before it really becomes a useful OOTB solution. The lack of search and the inability to sort by anything other than foreign keys are two huge missing features. And yes, I know I can go in and start creating custom templates, etc… but most of this is solved problems that need to be addressed by the framework.
But all of this isn’t the point, the point is that the Ruby on Rails and Django worlds have realized that not every application is an "Enterprise" application. Even most applications that are in Enterprises are not "Enterprise" applications. We don’t need five nines. We don’t need custom data layers. We have gotten ourselves in the habit of building every application as if we are solving a brand new problem each time, but the reality is that a lot of the times we aren’t. Sometimes we just need a CRUD application that can dump a bunch of data in and out with some simple validation, and we can no longer justify the cost of building these types of applications from scratch.
The .NET community needs to take a good hard look at ASP.NET MVC and ask ourselves what we can build that can make it a tool whose productivity for building everyday application is truly on par with what the Django and Ruby on Rails libraries provide. The 1.0 release is a huge first step, and I think that we are going to get there, but admitting we have a problem is the first step to recovery.
Loved the article? Hated it? Didn’t even read it?
We’d love to hear from you.