The Hunt For Simplicity

Writing

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:

image

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.

Reach Out

Comments (8)

  1. Great post, I could not agree more. I have been doing ASP.NET for many years and one of the most frustrating parts of coding is recreating the same-old admin screens, data access layers, authorization, etc. I have been using ASP.NET MVC since a very early CTP and it is more (or less) of the same. The fact that there is plenty of choice in the framework is great, don’t get me wrong, but for those developers just starting out or those developers who want to toss something up and see if it sticks, they are out of luck without a whole lot of coding.

    I have also spent much time over the past 2 years with Ruby on Rails and this framework has it over anything in .NET with respect to getting an app up fast, as you point out. I have played with Django to compare and contrast and their admin tool is top-notch.

    So, from here we can either learn from other frameworks or continue business as usual. Maybe it is time to create an open source template to create an MVC app as easily as Rails. I know projects like Sharp-Architecture do this to some extent but there is just too much crap in there to be useful to a beginner or someone wanting to get an app up fast.

    I am willing to work on something like this, why don’t a few from the community come together to build this?

    My 2 or 3 cents.

  2. @Rob Agreed. I think that many of the tools are there to create a similar experience for ASP.NET MVC. It would just be a matter of pulling them into a single cohesive package.

    I really like Django’s admin tool, and I would certainly love to see something like that in ASP.NET MVC. I’ll have to explore Django’s implementation a bit more, and put some thought into how that could be accomplished in a semi-generic way since the ASP.NET MVC framework doesn’t have a built-in model implementation.

  3. Hi,

    From my part, the biggest difference between the Rails world and the ASP.NET MVC world is the fact that Rails is highly optionated while MVC is not, and that’s understandable, because it wants to be used in all kinds of application.

    Sharp Architecture is a good attempt to fix this, but it’s still too big, too complex, and I don’t believe there will be a solution for this anytime soon. I hope to be wrong.

    Cheers

  4. [quote]In the first release this is only Linq To Sql or Entity Framework, boo![/quote]
    I think you should be thankful that it is not requires you to use DataSet. I wouldn’t be surprised 🙁

  5. @Vladimir: MvcMembership is specific to user administration, whereas Justin is referring to more general-use administration screens. Thanks for reminding me though, I should go ahead and finish updating MvcMembership for v1.0. Whoops!

  6. @Vladimir The MVC Membership stuff is helpful, but as Troy said, I was looking for a more general purpose solution.

    @Troy Yes, you do need to get the MvcMembership stuff updated to the release version! 🙂

Leave a comment

Leave a Reply

Your email address will not be published.

More Insights

View All