Posts Tagged .net

ASP.NET Controls, How I Hate Them

MSDN Error
Image by ttrentham via Flickr

I’ve always, for some reason, felt innately that PHP allowed me more control over my code than ASP.NET. My brain kept saying “but .NET is more organized! It compiles! It’s faster! It’s easier to write,” but my mind kept saying “PHP lets me do what I want how I want it… screw .NET!”

What I finally figured out was that I love C#, I even like the .NET framework, but I hate is, in fact, ASP.NET.

Every time I see an example of simple, elegant code, the most complex control on the page is a label or a panel. While the intentions behind FormView may be good, writing my own forms and hooking them up saves hundreds of lines (literally- I just refactored almost 800 lines of code into 150 by removing a formview) as well as reduces complexity and maintenance (now I no longer have to maintain view and edit and whatever other modes FormView has.) ASP.NET perhaps made sense in a day before OO principles and ORMs came into play; the controls were written for the same kind of people that use the drag-and-drop design mode. Easy to slap down haphazardly, not so easy to maintain.

We replaced every ASP.NET Ajax control we used anywhere (after I evangelized it, to my chagrin) with jQuery after about 6 months of use; while the controls did what we needed on the surface, underneath there was always some caveat, like the linked DropDowns needed web services, or the datepicker control had missing options… there was always something somewhere that I needed a bit of flexibility on that just wasn’t there, or was buggy. It seemed very odd for it to be out of beta in such a state. So, I ended up starting my own control library using jQuery, and now it’s easily extensible, easy to modify from the client, and I can control the markup.

Oh, and the markup… don’t get me started on the markup. Tables for everything. I can’t rearrange the otherwise useful Wizard control because it’s so static in its display.

So, I guess the point I’m trying to make is, that the longer I use .NET, the less and less I use the complex controls and the more I roll my own. Because it’s easier.
Kind of ironic.

Reblog this post [with Zemanta]

Tags: , , , , , , , ,

Snakes on a Compiler

I went to the Day of .NET, an all-day “geekfest”, a sea of polos and khakis; and there, I made the final decision of what language I would learn next: Python. Well, specifically, IronPython. I guess a normal Python isn’t scary enough, so we’ll make it out of metal. (Presenter’s website; presenter’s slides; presenter’s twitter)

CPython
Image via Wikipedia

The really, really cool thing about IronPython is the ease in which I can pull in other CLR languages; namely, C#. This will supposedly get better when Visual Studio 2010 comes out and the DLR is revamped and IronPython support grows. What this will allow me to do is build all of my base classes, and my data layer, which I’m more comfortable with, and use Python for all the fun stuff- services, and display. I’ve been considering writing my next game in Python anyway, influenced by Eve Online‘s incredible sucess using the language, so this fits in perfectly with my prior knowledge.

I’m pretty excited. I’ve never heard a negative thing about Python; everyone I’ve ever heard who uses it loves it.

Reblog this post [with Zemanta]

Tags: ,