Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

Poor code in ASP.NET Portal Starter Kit

I am working on my company's web publishing engine and one of the features we want is a more flexible framework for customizing or adding new features for our customers.

The ASP.NET Portal Starter Kit is built on a beatiful, plugable concept. It is a shame it's so poorly coded. Or is it just me?

Here's my dislikings:
1. The comments. Too many, too scattered. They split up the code and makes it hard to read and understand.

2. The xml config file. It's also too big. Some part of the meta data belongs there but not all. It's also nice to see it is possible to build and store a relational table design without a database, but this is too much.

3. All database access is crammed into the Configuration class.

4. All data management is done by retrieving a siteSettings object from Configuration.GetSiteSettings(), then retrieve the wanted object from siteSettings, ie the Tab object. Do changes on Tab then call Configuration.SaveSiteSettings(). By some magic my Tab is saved!

The data access code is the worst part I have found by now. The gui/business logic gets their siteSettings instance from the HttpContext.Current.Items, while SaveSiteSettings() gets it from HttpContext.Current.Cache and just call WriteXml(). SaveSiteSettings() also checks the cache and retrieve a fresh instance if it's empty, completely ignoring the fact that if the cache is empty, then there is nothing to save, hence it is a serious error.

The Portal Starter Kit is found at:

Thomas Eyde
Monday, September 1, 2003

This reminds me of two young boys on the playground.

"Oh man, I just farted - it smells disgusting !!!"

Other boy leans in for a good whiff...

"Gross !!! You're right, that is disgusting !!!"

Sunday, September 14, 2003

Well the portal starter kit is a variation of the IBUYSPY portal, where all configuration is held in the database.

If your looking for a good framework, check out, its an evolving version of the IBS

Andrew McTeer
Wednesday, September 17, 2003

*  Recent Topics

*  Fog Creek Home