Main Points

Our contact form development was our first time writing C# code. However, the real programming involved in converting it from VB.NET to C# was quite minimal. That was our first attempt, and a bit clunky in some respects, since most of what was required was manipulating objects in the .NET class libraries which is almost identical. However, it did give us a taste of C# syntax and get us into writing our first .aspx.cs files. Now we're trying to do more than get the job done, but build ASP.NET objects and applications with best practices and put together some code that may (or may not) work as a library for the App_Code folder.

Beginning C#

Here are our first forays into writing .aspx files in C#. The emphasis obviously is on developing ASP.NET best practices, and creating some classes that will serve as tools to make bigger things.

  • 1. Shared Sample C# Class - This is an important step in developing best practices. I have a bunch of pages using the Default.aspx.cs code behind. Not exactly elegant. Now that I'm deploying master pages I want to get into shared classes.

    [chroniclemaster1, 2008/08/04]

  • 2. Link Factory - This is our first major class. I want to run SEO-optimized links off a database to make them more maintainable. But first that means creating a Link Factory to build links from from the relevant pieces of the link which will be stored on the database; there's no point storing them in the database if I can't get them back out again.

    [chroniclemaster1, 2009/10/10]

  • 3. Fine-Grained XHTML Rendering - In order to perform large scale XHTML output, we need to explore what .NET is capable of doing.

    [chroniclemaster1, 2009/12/10]

  • 4. Custom Data Adapter - Not a .NET DataAdapter class, this is a custom class that implements the adapter pattern between the database and the UI layer which have very different formatting needs.

    [chroniclemaster1, 2009/12/31]

    • 4 - 1. Adapting ADO.NET Data - Our previous attempts ran into technological limitations (SQL first, then ADO.NET), so we'll try a different approach, writing to a DataTable cell by cell.

      [chroniclemaster1, 2009/12/31]

  • 5. Interfaces and Namespaces - A page for testing the syntax of fully implemented namespaces and using interfaces. The alternative, inheritance, has a number of drawbacks and in many cases using interfaces is a much better choice.

    [chroniclemaster1, 2010/01/06]

    • 5 - 1. Object Composition and Enums - Now that we've restored some faith in C#'s handling of interfaces, here's more intensive treatment of object composition, including enumerations.

      [chroniclemaster1, 2010/01/07]

  • 6. Security Measures - Building .NET security measures to facilitate a login system.

    [chroniclemaster1, 2010/01/23]

  • 7. Custom Website Analytics - There are no public domain web stats packages available so once again, we're looking at building are own.

    [chroniclemaster1, 2010/01/30]

    • 7 - 1. Extending Custom Analytics - Applying the whitelist inherently causes this to blow up. I therefore need a revised version. Or see the testing page.

      [chroniclemaster1, 2011/09/18]

    • 7 - 2. Parsing Server Variables - I've got a manageable way to gather the HTTP server variables for analytics, now I need to get information out of them. Or see the testing page.

      [chroniclemaster1, 2011/09/21]

      • 7 - 2.3 Parsing OSes - I've the browsers squared away, time to wrap up the OS parsing and start testing with a variety of HTTP_USER_AGENT strings. Or see the testing page.

        [chroniclemaster1, 2011/09/27]

    • 7 - 3. Analytics DAL - Now that we have the logic sorted out, we just need to store the data in the database and be able to retrieve it as needed. Or see the testing page.

      [chroniclemaster1, 2011/10/18]

      • 7 - 3.1 Analytics GeoIP - Now that our basic analytics are up and running, let's extend that to GeoIP, identifying the physical location of the server based on IP address. Or see the testing page.

        [chroniclemaster1, 2011/11/01]

      • 7 - 3.2 Live Analytics and Bots - Before I plug the new GeoIP logic into the live code, there are some other things I'd like to update at the same time. Primarily coping with bots. Or see the testing page.

        [chroniclemaster1, 2011/11/06]

  • 8. DateTimes - DateTimes have proven to be substantially more "interesting" than most data types. Time to do a little testing.

    [chroniclemaster1, 2010/02/22]

    • 8 - 1. Custom DateTimes - Times themselves are simple, but calander systems are so complex I've tried to avoid redoing the DateTime, but it's time to explore if that isn't the lesser of two evils.

      [chroniclemaster1, 2011/07/08]

      • 8 - 1.5 EcDateTime Code - EcDateTime code for our most fundamental class to date.

        [chroniclemaster1, 2011/08/02]

      • 8 - 1.6 EcDateTime Changes - EcDateTime is very effective at identifying a point in time, but there's a whole other level of complexity with adding or subtracting times. Or see the testing page.

        [chroniclemaster1, 2011/08/07]

      • 8 - 1.7 Write Calendar - Almost everything is put together, but the elephant in the room is that I've hardcoded all months as 31 days. I need to be able to go day by day, year by year through a calendar. Or see the testing page.

        [chroniclemaster1, 2011/08/07]

    • 8 - 2. Custom Operators - I need to compare dates and add timespans. While there are workarounds using custom functions, it makes the most sense to verify if dates are equal or not and to really add dates. Time to learn how to develop my own operators.

      [chroniclemaster1, 2011/07/16]

  • 9. Generic Collections - ADO.NET is an excellent tool, but it's time to explore other ways of storing and transporting data in my programs.

    [chroniclemaster1, 2010/05/05]

  • 10. HttpModules - After building my custom analytics, I needed a sensible way to implement it quickly and easily across the entire website. Here's one good way to apply code site wide.

    [chroniclemaster1, 2011/10/23]

Major Projects

Girl Scout Site Sales Application

I have a lot of programming to do and new components to build. I also volunteer periodically for the Girl Scouts here in San Diego. In 2008, I was asked to put this application together, and ran into problems with my dynamic version. With the clock ticking I was forced to implement a static page which required 2 hours of updating every night. So planning ahead, I'm building this project to provide me with components for other applications, as well as get a maintenance monkey off my back. Check out our Girl Scout Site Sales Index for more information.

[chroniclemaster1, 2009/11/30]

Perrill Translation Tool

This is a much more aggressive project that will certainly stretch out for awhile and possibly absorb other technologies into the final solution as well. The idea is to provide a tool that will help us build and display complete Perrill translations of foreign language texts. This could be a larger project but we'll need to adjust our goals upwards later and get something usable on a more immediate timeline.

[chroniclemaster1, 2008/08/07]

EC Beta Testing Suite

We need a number of testing administration tools for the website, and they're not just going to build themselves. We need this broad testing suite for Earth Chronicle to perform manual as well as automated testing which can save us some work.

[chroniclemaster1, 2010/03/14]

Server Application

There are a number of things about the .NET framework that I like immensely, however, there is still a fair amount of underlying structure to it and without the proper support it is frequently not possible to to do true professional web development. For houses which have only back end people and for clients that are only interested in functionality, this can be used to implement fairly cookie cutter sites for small, medium, or large-scale use. The scalability is absolutely one of the great achievements of ASP.NET. However, from a web design standpoint it is a complete failure. You cannot use the web server control model to match a statically hand-coded XHTML prototype, web server controls were never designed for that level of functionality. Tools are needed that allow UI designers to render their designs as directly, uncomplicatedly, and quickly into dynamic XHTML output. Here's the Server Application project we're building to complete that.

[chroniclemaster1, 2010/07/21]