ASP.NET is Microsoft’s flagship web development framework. Released together with the .Net framework in the early part of the twenty first century, it’s goal was to revolutionize web development and create a more structured and effective way of web development. Far from reaching its goals, the framework has turned into a bloated caricature of itself, unable to adapt to the times and requirements of modern software.
The basic premise of ASP.NET was to take the old ASP server-side scripting language, and create event bindings to simplify the coding required to build web apps. In addition, C# was added as the primary language for coding, in order to bring classes and all the benefits of modern object-oriented coding to the application. Unfortunately, the design team made three fatal mistakes here, along with in the Windows Forms package, which eventually brought the framework to its knees: event-driven coding for simple operations, extensive meta data, and creating their own “world” for web development.
The first evil in ASP.NET is the event-driven coding paradigm. While a small amount of events is good for any language, handling a large number of events will create major problems. With many events come many problems with synchronization and data access. Different events can tap into the execution sequence at different times, resulting in serious problems trying to fix bugs or perform advanced operations. The biggest culprit for this is the GridView, which has proven to be the Achilles heel in any .Net-based language. The solution to event-driven coding is simple. For the vast majority of operational scenarios – client-side validation, server-side validation, client-side updates, server-side updates, etc. – the software should handle the entire process with only a few primary events. If the software cannot do that, it is not well written and needs to be simplified.
Next, the meta-data. To quote Antoine de Saint-Exupery, “Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” The creators of the ASP.NET meta language had definitely missed that age-old adage. Comparing a well-structured HTML page to an ASP.NET page can make a designer cry. Tags should have been short and to the point, and server-side controls should have been skipped entirely, in favor of a more unified way to retrieve their content later. Creating new controls parallel to the basic HTML controls, without adding significant functionality, was a big waste of resources, which brings us to the next point:
Don’t reinvent the wheel. The creators of ASP.NET were somehow unsatisfied with how HTML worked, and decided to create their own virtualization of the world. Instead of working around the technology and delivering a framework around the client-server interaction, ASP.NET creates its own paradigm, and tries to let developers pretend that websites are the same as desktop applications. This makes very simple forms easy to do, however more complex applications quickly degrade into reinventing the wheel and trying to find ways to work around the limitations of the framework.
If the ASP.NET framework had instead successfully bypassed these three errors, it would have been a powerful tool that would have withstood the test of time. Instead, it will now be relegated to the annals of history, while other frameworks and languages with more flexibility gain ground.
Written by Andrew Palczewski
About the Author
Andrew Palczewski is CEO of apHarmony, a Chicago software development company. He holds a Master's degree in Computer Engineering from the University of Illinois at Urbana-Champaign and has over ten years' experience in managing development of software projects.