Why code blocks in the UI is a good thing

A very common argument against the asp.net mvc framework is that people don't want to use server side code in the same place as you have the html code. Some say it makes the code unreadable or that it is a step backwards in development and closer to asp 3. In my opinion, this is a very thin argument ...

Using the MVC pattern in javascript

As anyone who have ever worked on a javascript heavy page knows, javascript can very easily get out of hand and become a mess. Roy Osherove thinks we should fix this problem by generating our javascript using a server side programing language. I didn't realy like this idea, nor did Jimmy Bogard. But ...

What I look for in a ORM

In just about every application I build that use a relational database, I also use a orm tool to handle my data access. The reason I do this is to save myself the time it takes to handroll a data access layer in ADO.Net and to eliminate buggs that can come from writing sql queries. I do have a few t ...

Promise only what you can keep

When I write a method I often try using interfaces as return type and parameters, as long as it's not a method that should return a domain object. The reason for this is that I don't wan't to promis to much to the calling code. The parameters to your method should be of the lowest type in the inher ...

Building a forum application, Part 9

This is the ninth part in a series of posts where I build a forum application. The other posts can be found here: Building a forum application, Part 1 Building a forum application, Part 2 Building a forum application, Part 3 Building a forum application, Part 4 Building ...

Do not be afraid of adding new files to a project

Is it wrong to have a lot of files in a project? Is it hard to maintain a application that has a lot of files? Well, my answer to those two questions is: No, It is not. Its quite the opposit in my opinion. In my opinion a file should only have one public type, and be named after that. This makes it ...

I would not abstract away my javascript

Yesterday I saw this post by Roy Osherove where he talks about Script# and writing c# code to generate javascript code. I dont realy like this idé, as javascript and c# are two very different languages. While c# is a static programing language, javascript is a dynamic scripting language and i ...

Fluent twitter search API

The other day I was working on a application at work that needed to use the twitter search api. I Figured I might just as well build a small wrapper for the api as I will probably use it in other applications as well. I decided to make a fluent interface, as I think that is the most readable way of ...

<< [1] >>