July, 2009

Fighting against GhostDoc abusing

GhostDoc by SubMain is great tool for documenting source code. It is able to generate documentation from methods and properties names. It analyzes names and then offers appropriate description. GhostDoc is also able to use description of interface member that current property or method implements. And it takes only one simple key press.

Modeling people and organizations: Class Party

Classes for people and organizations are often modeled incorrectly in object models. These faults cause heavy implementation problems. In this posting I will analyze some legacy models, introduce class Party as generalization of people and organizations and provide some implementation details. Information here is based on my own experience, like always.

Visual Studio 2010: Database projects

Visual Studio 2008 introduced us database projects. These projects are also present in Visual Studio 2010. I noticed some differences already when building my photo gallery application. Let’s see how these projects work under Visual Studio 2010.

ASP.NET MVC Calendar component

I am writing simple ASP.NET MVC system that I plan to publish with source code pretty soon. I needed some simple calendar component that doesn’t require ASP.NET server-side form to work. I found different JavaScript based calendars and only one pretty oldcalendar that was specially written for ASP.NET MVC. I updated it and here is the source and binary downloads for Visual Studio 2008 and ASP.NET MVC 1.0.

OpenForum – new ASP.NET MVC based forum

There is new project in CodePlex called OpenForum. With source code you get also some samples you can run on your machine. OpenForum is pretty new and simple. There are no advanced forum features and currently it is suitable for smaller forums. You can change the look of OpenForum and write your own user repositories. Let’s see how OpenForum looks like.

Packaging my gallery code

In this posting I describe how I prepare my gallery application for automated testing. As a first thing I plan to write some unit tests because some of my classes have now logic to be tested. The other thing is database that is living outside my Visual Studio solution. Let’s make now first steps in my gallery code packaging.

SharePoint: Creating HttpHandler for user profile images

I have custom authentication and user profiles solution where user profiles are stored in list. This list is directly accessible only to administrators. Users can register to site and modify their profiles through special pages that run profile operations under elevated privileges. Users have three versions of their avatar: 64×64, 32×32 and 16×16. These avatars are saved as user profile attachments when user uploads his or her avatar. Because avatars are used at almost every page in portal I wrote IHttpHandler that provides avatars based on user profile ID.

Reordering invoice lines using jqGrid and TableDND extension

In one of my ASP.NET MVC applications I needed flexible interface for inserting invoice lines. Sometimes invoice lines are inserted in incorrect order and it saves accountants some time if they are able to change the order of invoice lines quickly. In my application I used jqGrid with TableDND extension. Here’s how I got it work.

What do you think of my ASP.NET MVC gallery layouts?

To try out Visual Studio 2010 and .Net Framework 4.0 I decided to write simple gallery application based on ASP.NET MVC Framework. In this posting I show you my very first layouts I created for gallery. These layouts are modifications of ASP.NET MVC default blue-white-black layouts. I also added some photos of my first layout drafts. My question is – what do you think about my first draft-level layouts (I am not designer)?

Entity Framework 4.0: On the way to Composite Pattern

In my last posting about Entity Framework 4.0, Entity Framework 4.0: POCOs and table-per-type inheritance mapping, I made first generalization to my photo gallery model. I introduced GalleryItem class that is base class for all that can be added to gallery: new albums, photos and maybe videos too. Although everything works as expected my model needs some modifications because it is not very foolproof.

Entity Framework 4.0: How to use POCOs

Entity Framework 4.0 will provide us with POCO support. That’s good because Entity Framework supports more inheritance mapping strategies than LINQ To SQL but currently it doesn’t support POCOs. To try out Visual Studio 2010 and ASP.NET 4.0new features I started writing simple photo gallery web application. Today I got my first simple POCOs work with Entity Framework 4.0.

Previous Posts