Free CSS Based Web Site Templates

Where can I get some free web site templates for my new web site?

A friend of mine was putting together a new web site for an idea that he’s tossing around. He IMd me to take a look at it. I was very impressed. It looked very sharp.

Knowing that he’s not a graphics or GUI guru, I was going to ask him who helped him on the design. Before I could ask, I noticed at the bottom of the page a reference to I clicked on the link and found a Mecca of great web site designs–all for free.

Check them out the next time you want to throw up a nice looking web site in a hurry.

Rounded Corners on Web Pages

How do I create rounded corners on web page blocks?

I found a nice tutorial with images and everything for creating really nice looking rounded corners on web pages. I was able to quickly round off my tables with this tool.

One problem that you’ll really want to solve is the color. Using your favorite graphics tool, you can first find the hue and saturation of the color that you want. Then, pull up each of the corner images and change the hue and saturation. This will allow you to match the colors.

You’ll probably have to create several sets of the rounded corners for each of the colors.

Application Service Provider Architecture Models

How do you architect an ASP web site?

I was recently asked by a new acquaintance how I might create an application service provider (ASP) oriented architecture for a new product his company is creating. They must be able to customize the application per customer while still maintaining a core, code-base. The system they are trying to create is actually pretty complex even as a single site.

In my experience, the solution to a complex system is extremely difficult to arrive at on the very first try. This point is discussed a bit in the fantastic book, "Wicked Problems, Righteous Solutions" (more about wicked problems). I suggested to him that—instead of trying to create the perfect application on the first attempt—he should aim towards perfection and temper his feature choices to only those specifically requested and prioritized by his alpha customers and then iterate.

This allows you time to learn more about the problem. It allows you time to learn the industry, the customers and the patterns of the application. As you learn, you can innovate and move the application further along. You can work with your customer to learn what works and what doesn’t work. As we discussed solutions, I pointed out that Windows Vista could never have been imagined when Windows 1.0 came out—it had to evolve.

What Does the Customer Want?
It is import in product development—especially early on when resources are limited—to make sure that you are creating only what customers are asking for. This seems obvious but is often over misunderstood. Marketing and Business Development can easily muddy the line between what the customer wants and what they believe will make the product “strategic”. If you’re not careful, you’ll find yourself working on elaborate, whiz-bang features that no one has asked for and that may never be used. Also, watch out for the Business Analyst or Subject Matter Expert that “knows what’s best for the customer” and orders up features that only they find useful.

Make absolutely certain that if the customer hasn’t asked for a feature, you have a darn good reason for implementing it. Sometimes, on smaller projects, you can get away with this and hide the costs for your gold bricking. I wouldn’t recommend it though. The guessing is just not worth it when you can simply ask the customer.

Partitioning Databases
“Do we have one big database for everyone that is hosted or a database for each customer?” he asked. "The answer depends upon the nature of the application and the data," I told him.

Consider my application Diggermajig. This site allows you to upload Accelerated Reader Exams for schools, display lists of book information, and create personal user accounts for monitoring progress and wish lists. I have one database for all of this because of how the information is all related. I use relationship tables between users and organizations and books to keep things separate. I don’t need to have a separate database for each "customer".

However, Fog Creek’s FogBugz software is a little different. If you create one of their risk free offer sites, you’ll get your very own personal database for storing your bugs, code sets and other information. Nothing you do to your database will impact anyone else’s in any way. This is required because of the nature of what is being stored in the database.

There’s also the hybrid—a combination of the two. One database for the static, application-wide data and a separate database for each of the customer’s data. We took this approach with Loan Complete. We had a single hybrid database for pricing information and a database per customer for company specific information like loans, code sets, users and status information.

When choosing an approach, keep in mind upgrading and maintenance costs. I’ll leave it to you to explore the pros and cons of each approach.

Partitioning Web Sites
You have the same considerations as the databases when customizing the look-and-feel of the site. This web site——allows you to customize the look and feel of the site. The content is custom as well but you are still only hitting one site. Contrast this with–a hybrid approach.

If you are getting into the ASP world with a new product, try to learn from what you can gather about what other people are doing with similar structures. Don’t be afraid of making mistakes. Be prepared to move fast and don’t look back. Creating an ASP site can be a lot of fun and a fantastic learning experience.


What is causing this exception?

Today, I was pushing out an old .NET 1.1 application in Visual Studio 2003 that was using the Microsoft Enterprise Data Blocks 1.1 to a new development image in our pre-production environment. It had been a while since I had to install the application in a development environment and was bumping into all sorts of nice surprises.

Every time I ran the application, I would get the following error message when I made a database call:

System.TypeInitializationException: The type initializer for "Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataCommandFailedEvent" threw an exception. ---> System.UnauthorizedAccessException: The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.
   at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly)
   at System.Diagnostics.EventLog.SourceExists(String source, String machineName)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type)
   at Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.PerformanceCounterInstances.ReportCounterFailure(String message)
   at Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.PerformanceCounterInstances..ctor(String categoryName, String counterName, Boolean createNewInstance)
   at Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.InstrumentedEvent.AddPerformanceCounter(String category, String[] counterNames, Boolean createNewInstance)
   at Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.InstrumentedEvent.Initialize(String counterCategory, String[] counterNames, Boolean createNewInstance, String eventLogSource, EventLogIdentifier[] eventIds)
   at Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.InstrumentedEvent..ctor(String counterCategory, String[] counterNames, Boolean createNewInstance)
   at Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataServiceEvent..ctor(String[] counterNames)
   at Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataCommandFailedEvent..ctor(String[] counterNames)
   at Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataCommandFailedEvent..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataCommandFailedEvent.Fire(String commandText, String connectionString)
   at Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.CommandFailed(String commandText, String connectionString)
   at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoLoadDataSet(DBCommandWrapper command, DataSet dataSet, String[] tableNames)
   at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DBCommandWrapper command, DataSet dataSet, String[] tableNames)
   at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DBCommandWrapper command, DataSet dataSet, String tableName)
   at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(DBCommandWrapper command)
   at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(CommandType commandType, String commandText)

I checked and rechecked my references to insure that everything was there and being copied over into the debug environment. I started digging and then I had a faint memory of having to do something special to one of the DLLs when it hit me.

I needed to run InstallUtil on the Microsoft.Practices.EnterpriseLibrary.Common.dll. You can tell if you have done this or not because the installer in the .dll that gets called will create a file named microsoft.practices.enterpriselibrary.common.InstallState.

You’ll want to start the SDK command window so that the paths for the utility will be available. That’s the easiest way. Just change to the folder where the DLL is and execute the following:

InstallUtil Microsoft.Practices.EnterpriseLibrary.Common.dll

What is happening in the above error is that there are instrumentation configuration settings that aren’t on the server in the registry and elsewhere. The InstallUtil installs server resources needed by the application blocks for logging and other things.

Let me know if this helped you out. Hopefully I can remember this next time now that I’ve blogged it.

This link has some more discussions on the subject.

Posted in C#