activa's blog

.NET, Web, Mobile and more stuff I can't stop talking about

Browsing Posts in Architecture

Generated code is great… if it was generated by you,or you fully understand the generated code! Imagine the following situation: You have been working on a large project that has been around for years and you need to make a small change. The change seems insignificant so you dive in the code only to find [...]

What’s worse than: Global variables? Badly chosen variable names? ASP.NET WebForms ? Leaky abstractions? … enter your worst coding nightmare … I’ve got one word for you: Dependency Injection (well, that’s two words actually) Why? Remember 20 years ago? All of a sudden, WYSIWYG word processors were all the rage. For a good reason. WHAT [...]

One of the most powerful features in .NET is the ability to use reflection to do all kinds of neat stuff at runtime, like Find out what properties, fields, methods, etc. are in a class Create objects without knowing their type at compile time Call methods by name (even private ones) Check attributes on classes, [...]

Yesterday, an old article resurfaced on dotnetkicks.com about validating Guid strings. Several comments hinted at the possibility of letting the .NET Framework convert it to a Guid and catching the FormatException. WTF !? I must be very old-fashioned, because I am still very religious about (mis)using exceptions in normal application flow. Exceptions were designed for exceptional [...]

In the early days of web development, it was common procedure to write application logic inside your HTML pages using ASP, JSP, PHP, Perl or another early web application development framework. Of course, back then we didn’t know any better, but don’t you just cringe when you see something like this: <table border=”1″> <% For [...]