This blog has been moved to Redwerb.com.

Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Friday, November 30, 2007

Multi-threading just got a little bit easier

Microsoft has just announced that they have "released an early preview of the Parallel Extensions to the .NET Framework (ParallelFX) technology." I haven't had a chance to check this out yet, but it looks like it will provide a new API for managing threading. What looks especially interesting are the multi-threaded foreach loops.

I don't want to say too much because I really don't know much about it, but check out the announcement on Somasegar's blog, Parallel Extensions to the .NET FX CTP.

Friday, November 09, 2007

.Net 3.5 Poster Available

The Commonly Used Types and Namespaces poster for version 3.5 of the .Net framework is now available.

PosterThumbnail

It main sections are Windows Presentation Foundation/Windows Forms (in green), ASP.NET (in yellow), Communications and Workflow (in orange), Data, XML and LINQ (in purple), and Fundamental (in blue).

The poster lists new types as well as what will be available in the 3.5 version of the compact framework and Silverlight 1.1.

There is a lot of new stuff in here. Here is a quick list of what's new in each section:

  • WPF/WinForms
    • Nothing
  • ASP.Net
    • System.Web.ApplicationServices
      • AuthenticationService
      • ProfileService
      • RoleService
    • System.Web.ClientServices
      • ClientFormsIdentity
      • ClientRolePrincipal
      • ConnectivityStatus
    • System.Web.ClientServices.Providers
      • ClientFormsAuthenticatonMembershipProvider
      • ClientRoleProvider
    • System.Web.Configuration
      • WebConfigurationManager
    • System.Web.UI
      • ScriptManager
      • UpdatePanel
      • UpdateProgress
  • WCF/WF
    • System.Net.PeerToPeer
      • Cloud
      • PeerName
      • PeerNameRecord
      • PeerNameResolver
    • System.Net.PeerToPeer.Collaboration
      • ContractManager
      • PeerApplication
      • PeerCollaboration
      • PeerContact
      • PeerNearMe
    • System.ServiceModel.Persistence
      • PersistenceProvider
      • PersistenceProviderFactory
      • SqlPersistenceProviderFactory
    • System.ServiceModel.Syndication
      • Atom10FeedFormatter
      • Rss20FeedFormatter
      • SyndicationFeed
      • SyndicationItem
    • System.ServiceModel.Web
      • WebGetAttribute
      • WebInvokeAttribute
      • WebOperationContext
      • WebServiceHost
  • Data/XML/LINQ
    • System.Data.Linq
      • DataContext
      • EntityRef<T>
      • EntitySet<T>
      • Table<T>
    • System.Data.Linq.Mapping
      • AttributeMappingSource
      • Metamodel
      • XmlMappingSource
    • System.Xml.Linq
      • XAttribute
      • XDocument
      • XElement
      • XName
      • XNamespace
      • XNode
      • XText
  • Fundamentals
    • System
      • TimeZoneInfo
    • System.AddIn.Contract
      • IContract
      • INativeHandleContract
    • System.AddIn.Hosting
      • AddInProcess
      • AddInStore
      • AddInSecurity
      • AddInToken
    • System.AddIn.Pipeline
      • ContractBase
      • ContractHandle
      • CollectionAdapters
      • FrameworkElementAdapters
    • System.Collections.Generic
      • HashSet<T>
    • System.Diagnostics
      • EventSchemaTraceListener
    • System.Diagnostics.Eventing
      • EventDescriptor
      • EventProvider
      • EventProviderTraceListener
    • System.Diagnostics.Eventing.Reader
      • EventLogInformation
      • EventLogReader
      • EventLogRecord
      • EventLogWatcher
      • EventRecord
      • ProviderMetadata
    • System.Diagnostics.PerformanceData
      • CounterData
      • CounterSet
    • System.IO.Pipes
      • AnonymousPipeClientStream
      • AnonymousPipeServerStream
      • NamedPipeClientStream
      • NamedPipeServerStream
      • PipeSecurity
      • PipeStream
    • System.Linq
      • IQueryable<T>
      • Queryable
    • System.Linq.Expressions
      • Expression<T>
      • Expression
    • System.Runtime.Serialization.Json
      • DataContractJsonSerializer
      • JsonReaderWriterFactory
    • System.Security.Cryptography
      • ECDsaCng
    • System.Threading
      • ReaderWriterLockSlim

I found the add-in support particularly interesting. I have been planning on implementing add-ins for the next major version of our product and am hoping to be able to use the add-in support in .Net 3.5. If you are interesting in finding out more about this, check out the article .NET Application Extensibility and the CLR Add-In Team Blog.

Thursday, June 28, 2007

Orcas Workshop: Day Four

Last day of the workshop went well. I'll be sad to leave the prepared lunches, snacks, ice cream, etc at Microsoft, but I won't be sad to leave those horrible chairs (my back is killing me).

Most of today was on Microsoft Office integration with a short bit at the end for Team System. I left a few minutes early hoping to avoid the traffic on my way home, unfortunately my plan didn't work out that well (2 hours!).

Office Integration

  • OBA (Office Business Applications) enable MS Office products to deliver business services in the form of add-ons. It is not a product, but a technical concept. OBA bridges the gap between unstructured processes (individuals making up their own process, such as storing notes in Word documents) and structured processes (line-of-business applications).
  • SharePoint is an important aspect of OBA.
  • VSTO (Visual Studio Office Integration) is the bridge between Visual Studio and Office. It will be shipped with Visual Studio 2008 Professional edition.
  • The visual designers that come with VSTO look great. If you are extending a Word document, you get a designer that looks like Microsoft Word. If you are extending just the ribbon control, you get a designer that looks like the ribbon. You can add controls and hook up event handlers the same way as with WinForms development. Very easy.
  • Debugging is easy too. Simply press F5 and the Office product that you are extending is started and your add-in is loaded and run. You can place breakpoints in your code in order to step through it just like any other VS project.
  • VSTO for Orcas has improved security and deployment. I'm not entirely sure what this means since I'm not a VSTO developer, but if you are, this might be interesting to you.
  • VSTA (Visual Studio Tools for Applications)  is the underlying infrastructure for VSTO. It is essentially managed code macros.
  • The code that you write for VSTO is separate from the document. The assembly must be installed on the client in order to be used. You are also able to deploy it on a remote server, but the client will need to be able to access that server in order to use the macro (it is configured using a manifest file).
  • The Office ribbon control is extensible through XML.

Visual Studio Team System

  • There isn't much new stuff coming out in Orcas for Team System (it is considered a point release for VSTS).
  • Rosario is the next major version of VSTS. It will offer better project level management and test case management. I'm not sure what the release date for this is.
  • Rosario will support dependencies between work items.
  • The source control built-in to VSTS allows for cherry picking changes. This allows you to make a hot fix to production code within the development branch without having to include all of the changes since that was released (of course a person will need to determine if that is reasonable or not).
  • You can setup a proxy for remote offices that will cache source code so that when you request a version that is already cached, you get that instead. This is very useful when dealing with remote locations with slow connections.
  • If after setting up your VSTS project you need to add a field to your work items, Power Tools 1.2 provides the ability to do this graphically. (apparently there is a video that was posted somewhere recently that shows how to do this, I wasn't able to find it though)

PowerPoint Presentation

I downloaded the PowerPoint presentations from the workshop. If you would like me to email you one, just mention which one you want and leave your email address. I don't feel comfortable just putting them on the Internet, but I don't see why Microsoft would care if I shared them (they said it was ok to download them and there wasn't any NDA that I remember anyway). If you want one, please note that they were built with PowerPoint 2007. If you don't have PowerPoint 2007 you will need to download a 28MB Office Compatibility pack.

Well, this ends my Visual Studio 2008 and .Net Framework 3.5 Workshop journal. I hope you enjoyed it. I'm excited to see the final release of VS 2008.

Saturday, June 23, 2007

Compiling Multiple Projects Without a Solution

I've posted a new article on Code Project. It is titled Compiling Multiple Projects Without a Solution. The article shows how to compile a multi-project application without using solution files (yes, it includes source code).

The code creates a MSBuild project file that will allow MSBuild to compile a list of VB.Net or C# projects in the correct order. The list can be loaded based on a root directory that contains .vbproj and/or .csproj files or a text file that can contain a combination of directories, project files, and/or other text files.

Visual Studio "Orcas" and .NET Framework 3.5 Training Workshop

I was invited to the Visual Studio "Orcas" and .NET Framework 3.5 Training Workshop at Microsoft next week (June 25th through June 28th). I'm pretty excited about going, it looks like a high level overview of all the major new features of VS 2008 and .Net 3.5.

I included the agenda for the workshop below (hopefully that's ok with MS, it doesn't say anywhere that I can't share it). I'm most looking forward to .NET Language Integrated Query (LINQ), What’s new in Visual Basic 9.0?, Introduction to Silverlight, Integrating Office & line of business systems using VSTO, and the Company Store Visit, though all the sessions look interesting other than maybe the one on C++ (I am beginning to think I will never program in that language again). 

Day

Start

End

Session

Monday, June 25

8:00

9:00

Registration & Breakfast

9:00

9:15

Welcome & Introductions

9:15

10:00

Lap around Visual Studio 2008 & .NET Framework 3.5

10:00

11:00

.NET Language Integrated Query (LINQ)

11:00

12:00

Using LINQ with relational data

12:00

1:00

Lunch

1:00

2:00

Hands-on lab: LINQ

2:15

3:15

What’s new in C# 3.0?

3:30

4:30

What’s new in Visual Basic 9.0?

4:45

5:45

What’s new in C++ 9.0?

Tuesday, June 26

8:30

9:00

Breakfast

9:00

9:30

Introduction to the Microsoft Client Continuum

9:45

11:00

Building Web Applications with Visual Studio 2008 and the .NET Framework 3.5

11:15

12:30

Introduction to Silverlight

12:30

1:30

Lunch

1:30

2:30

Essential Windows Presentation Foundation

2:45

4:00

Building Smart Client Applications with Visual Studio 2008 and the .NET Framework 3.5 using WPF and “Cider”

4:00

5:30

Hands-on lab

5:30

7:30

Evening Event: Barbeque at building 20

Wednesday,

June 27

8:30

9:00

Breakfast

9:00

10:15

Building WCF and WF Applications with the .NET Framework 3.5

10:30

12:00

Web Programming with WCF

12:00

1:00

Lunch

1:00

2:15

Workflow Services

2:15

3:30

Hands-on lab

  •  

3:30

5:00

Building Mobile Applications using Visual Studio 2008 and the .NET Compact Framework 3.5

5:00

6:00

Company Store Visit

Thursday, June 28

8:30

9:00

Breakfast

9:00

10:00

Overview of Office Business Applications and VSTO

10:15

11:30

Extending the Office Fluent UI using VSTO

11:30

12:00

Hands-on lab

12:00

1:00

Lunch

1:00

2:30

Integrating Office & line of business systems using VSTO

2:45

3:45

Hands-on lab

3:45

5:00

What’s new in Visual Studio Team System 2008?

Friday, June 01, 2007

Beautiful Code

I was reading a post on Jeff Atwood's blog (Coding Horror) titled The Best Code is No Code At All the other day and in the comments many people were discussing the "beauty" or aesthetics of code. I've heard that phrase used before, in fact, I've used it myself, but what does it mean? What makes code beautiful?

The answer that I've come up with over the years is that "beauty" is simply the combination of all the aspects that makes code good, approaching perfection. When code is simple, concise, easy to read, correct, flexible, and perhaps some other qualities that makes code good that we know when we see it, but can't quite define, it is considered beautiful.

Unfortunately this is very difficult to achieve in real-world applications. Often times features must be complex due to real-world situations (data entry errors, government regulations, odd business practices, external APIs that don't quite work the way you want, etc). However, every once in awhile, you write that perfect bit of code and you just sit and stare in awe at it. Perhaps you post it on your company bulletin board, or hide it away so nobody can mess with it. Perhaps you force everybody to "code review" your code, or maybe you just move on to the next feature realizing that few people have the training, experience, or skill to appreciate it the way you do.

Thursday, May 17, 2007

VB.Net Vs. C# (part 2)

Anybody notice that .Net is very similar to our political system (USA)? It's essentially a two-party system where the parties (in this case VB.Net and C#) are substantially the same. There are some 3rd party candidates, such as J# or IronPython, but they don't have enough support to be taken seriously.

Even though the language are so similar, people get very passionate about their language of choice and argue at great length over minutia such as case sensitivity. Not that there is anything wrong with discussing the pros and cons of such language features, however, in the end, both languages are fairly equal in their ability to accomplish the task at hand and in the level of productivity they allow.

Personally I'm glad that there are multiple competing languages. As an example, look what happened with the browser wars. Netscape owned the market only to lose it to Microsoft due to some great innovations. Once MS owned the market, they stopped innovating and we were stuck with IE6 for years. Along came Firefox which started gaining enough market share to get the attention of MS and suddenly we have IE7. Both Firefox 2 and IE7 are great browsers, but imagine what would have happened if Netscape never faced any competition. Would we still be stuck with Navigator?

Although the two primary .Net languages (C# and VB.Net) are both developed by MS, they still compete (for professional pride if nothing else) and we still get to take advantage of the benefits of that competition.

The 3rd party languages are also valuable for competition and experimentation. For instance, dynamic languages seem to be getting somewhat popular again. There has been a lot of talk about Ruby lately, Microsoft even announced they were going to support a version of it for .Net called IronRuby. We can already see some of these dynamic language concepts finding their way into the mainstream languages, for instance, anonymous methods, LINQ, extension methods, lambda expressions, and anonymous types (many of these are coming in .Net 3.5 due later this year or next).

Thankfully this two-party system doesn't include national elections. People are free to pick whichever language suits them best. Of course, you might still end up with elections at the local, project team level, but if they pick a language that you really don't like, you can probably find a new job without having to leave the country :).

Wednesday, May 16, 2007

VB.Net Vs. C# (part 1)

Jeff Atwood from Coding Horror wrote a blog post the other day about C# and some of the deficiencies in the IDE, specifically the lack of automatic background compilation (C# and the Compilation Tax). The comments were very interesting. I love the fact that there are so many people out there that are passionate about development, but sometimes I find it a bit strange what they choose to debate.

I develop in both VB.Net and C#. I spend most of my time in VB.Net because that is the language that the company I work for chose (prior to me getting hired) due to their experience working with Visual Basic (VB6 and VBA). Before I went to work for them, I worked at Microsoft (as a contractor) on a C# project. I also do all of my own personal development using C#.

For all intents and purposes the languages are the same. They are both based on the same libraries and can accomplish the same tasks (perhaps with a couple of minor, mostly esoteric, exceptions). They both compile to the same bits and can easily work with one another when needed. If asked which language I prefer, my answer would probably depend on my mood at the time :).

For the most part, I think VB.Net is a better language, especially when working with events. C# forces you to write far more code into order to create or use events than VB.Net and using the handles keyword in VB.Net really makes removing event handlers easy. I also appreciate the background compilation and case insensitivity of VB.Net (as long as the auto-correct feature is on). I also like optional parameters, as long as they are used judiciously, and the greater flexibility of the Select statement over the C# equivalent switch. Other things I like about VB.Net is that I only have to declare the root namespace in the project settings which means I only have to declare a namespace if I am adding to it.

Of course, C# has some nice features as well. My favorite is that the language is designed to be terse. It also is closer to the underlying MSIL than VB.Net which means that when you write code in C# you will have a better understanding of what is going on behind the scenes (I am always having to explain how events work to VB.Net developers, I think most of them think it's some sort of magic). C# also has anonymous methods and coming in .Net 3.5 are automatic properties.

It seems that if you are working on a LOB (line-of-business) application and want maximum productivity, you should stick with VB.Net. If you want to learn .Net then C# is definitely the language for you.

However, I doubt that the productivity gains from using VB.Net are truly significant when compared to the overall schedule of any software project. I spend far more time eliciting requirements, designing, meeting, testing, etc then I do actually writing code. So in the end, personal preference will probably prevail. Of course, the whole team should be in agreement over which language a particular project should use. Just because it's possible to mix multiple .Net programming languages for a software project doesn't mean that you should.

Wednesday, February 14, 2007

NLog, NUnit, NDoc, NAnt. DotNet development tools brought to you by the letter N.

Do all developer tools that target the .Net platform need to start with N? Ok, I have to admit that it makes it easy to identify .Net developer tools and that I might be influenced by the naming convention when looking for such tools.

For instance, the other day I was looking for a good .Net library for logging and found a few that looked interesting. The one I decided to download and install was NLog.

NLog Project

Although I don't have much experience with NLog yet (or experience with other logging libraries for that matter), I like what I've seen so far. Within a few minutes of installing it, I was logging simple messages. I was able to figure out how to log different levels of messages (simply call different methods on the logger) and how to change what gets logged.

NLog uses a XML config file that is separate from the application config file which is very convenient for portability reasons (I can send somebody a NLog config file and not have it mess up their app settings). It also has a XSD file that makes it very easy to discover the elements and attributes that are available.

According to the website, NLog claims that their interface is similar to Log4Net (a port of the log4j framework for java by the Apache Software Foundation), but simpler to configure and use.

The main gripe I have with it is the documentation. Perhaps I just haven't spent enough time with it to understand how it's put together, but for the most part, the documentation seems to be comprised of a dump of the code comments with a couple of incomplete tutorials thrown in. Of course, lack of good documentation for development tools is as common as development tools that start with the letter N.

Friday, November 17, 2006

Securing Text Data

Perhaps it's just me, but trying to figure out how to secure text data is confusing. Based on all of the articles available, if you are creating an application that uses passwords or other sensitive information, you should use a SecureString, that much is clear. However, a SecureString isn't very useful since it is encrypted (you can't compare a SecureString against a database value, pass it to your credit card processing, etc).


After many hours of research, I was able to find a single example of how to secure text in an MSDN article (of course, it's only mentioned in passing). How to encrypt and decrypt a file by using Visual Basic .NET or Visual Basic 2005 contains a reference to the ZeroMemory API that allows you to clear a string from memory and GCHandle to make sure you don't end up with a bunch of copies of the string.


The following code will create a string, pin it in memory using GCHandle (to make sure it doesn't get moved or have multiple copies made), then destroy the contents of the string so that it can't be held in memory.


    Sub Main()
Dim str As String = "HI"
Dim gh As GCHandle = GCHandle.Alloc(str)
Console.WriteLine(str)
ZeroMemory(str, str.Length * 2)
gh.Free()
Console.WriteLine(str)
End Sub

Private Declare Sub ZeroMemory Lib "kernel32.dll" _
Alias "RtlZeroMemory" _
(ByVal Destination As String, _
ByVal Length As Integer)



The idea behind this is to leave the text in memory for a very short period of time to make it very difficult for a hacker to get. The sensitive text can be stored in a SecureString until you are ready to use it.


Before I found the ZeroMemory solution, I had written another one that I'm going to post here just because it seems interesting. Basically, I use reflection to call a method on System.String that is intended to be used by StringBuilder that will replace a char without making a copy of the string (typically Strings are immutable, any changes to it result in a copy of the string).



    Public Shared Sub DestroyString(ByVal str As String)
Dim mi As MethodInfo
mi = GetType(String).GetMethod( _
"ReplaceCharInPlace", _
BindingFlags.NonPublic _
Or BindingFlags.Instance)

For i As Integer = 0 To str.Length - 1
Dim ch As Char = str(i)
Dim args() As Object
args = New Object() {ch, ChrW(0), i, 1, 0}
mi.Invoke(str, args)
Next
End Sub

I am currently working on another article for Code Project on securing text data, complete with a PasswordBox WinForm control, SecurePassword class, and more. Once it is available, I will post a link to it here.

Saturday, November 11, 2006

Event-Based Asynchronous WebRequest

I've created my first Code Project article! I was looking for a place to upload some code so I could share it from my blog, but the only place that I could find was Code Project, of course that meant that I had to write an article too.

If you are interested in reading about using the WebRequest/WebResponse classes (including processing of the response stream) or implementing the Event-Based Asynchronous Pattern (the pattern used by the BackgroundWorker component), you can read my article at Event-Based Asynchronous WebRequest.

The article includes a project that contains a BackgroundWebRequest component that can be used to perform asynchronous web requests from a WinForm application.

Friday, November 10, 2006

The Holy Grail of .Net Threading

The Epiphany

I was working on a project that needed to be able to process a WebRequest/WebResponse from a thread within a WinForm application. I tried several approaches, including using a BackgroundWorker, however, what I really wanted to do was create my own component similar to the BackgroundWorker, but specifically for WebRequests. Unfortunately, I didn't know how they did it.

As I was driving home from work I had an epiphany. The obvious solution would be to use Reflector for .NET to figure out how Microsoft did it.

Meeting Up With Sir Galahad

I opened the class up in Reflector and used the File Disassembler (an add-in to Reflector) to output it as a VB class. I waded through the code trying to understand what it did when I found the first hint as to the location of the Holy Grail, the AsyncOperation class.

This class looked important in the threading for BackgroundWorker, so I looked up the documentation for it. In the first sentence of the remarks, it contained a link to the Holy Grail.

The Holy Grail of .Net Threading

The Event-based Asynchronous Pattern is a design pattern that is useful for creating a class that can run operations on a separate thread, but will raise events on the main thread (very useful for threading in WinForms).

MSDN has a series of articles that clearly describe this pattern and how to implement it. The Asynchronous Programming Design Patterns node in the MSDN documentation discusses several different asynchronous patterns that you can use.

Wednesday, November 08, 2006

ClickOnce Deployment Rocks!

Just recently I configured an internal tool I'm working on to use ClickOnce deployment. It is the first time I've used it and I have to say that it certainly lives up to it's name.

At least for a small, simple application like the one I've been working on, all you have to do is open up the project properties and push the "Publish Now" button under the Publish tab (VB.Net anyway).

It automatically generates a webpage that other people can use to install the application and, if the application is updated, it will automatically reinstall the next time the user opens it.

For the app I was working on, the most difficult thing to figure out was how to include some assemblies I was referencing from the GAC. To do this, open the project properties, go to the Publish tab, open Application Files, and change the Publish Status to Include. When somebody installs the application, the assemblies are automatically copied locally (they are not installed to the GAC).

If you are interested in where the files are installed on the users machine, it appears they are placed in C:\Documents and Settings\<user>\Local Settings\Apps\2.0\. The application will be in a directory with a randomly generated name.

Monday, October 30, 2006

Protecting Data in .Net

Security is a big issue in computing these days. One way you can protect user's data is by using the DPAPI (Data Protection Application Programming Interface) available on Windows.


The article Managed DPAPI Part I: ProtectedData provides a very good explanation of what this is, so I won't bore you with the details here, but I will provide you with a code sample that you can use. To use this code sample, simply create a C# console application in VS.Net 2005 and paste this into the main file (I believe it will be called Program.cs).


One thing that should be mentioned, this does not protect the data in memory. It can be used to protect data that is written out to disk, but an industrious hacker can get the sensitive information out of memory. Check out Managed DPAPI Part II: ProtectedMemory for more information on protecting data while it is in memory.



using System;
using System.Security.Cryptography; // reference assembly System.Security.dll
using System.Text;

namespace DPAPIExample
{
class Program
{
static void Main(string[] args)
{
string test = "hello world";
string encryptedValue;
string decryptedValue;

Console.WriteLine(test);
encryptedValue = Encrypt(test);
Console.WriteLine(encryptedValue);
decryptedValue = Decrypt(encryptedValue);
Console.WriteLine(decryptedValue);
Console.ReadKey();
}

// This is an article on using the ProtectedData API (a wrapper around DPAPI)
// http://blogs.msdn.com/shawnfa/archive/2004/05/05/126825.aspx
private static byte[] sEntropy = System.Text.Encoding.Unicode.GetBytes("put whatever you want here");

public static string Encrypt(string text)
{
Byte[] data = Encoding.Unicode.GetBytes(text);
Byte[] protectedData = ProtectedData.Protect(data, sEntropy, DataProtectionScope.CurrentUser);
return Convert.ToBase64String(protectedData);
}

public static string Decrypt(string encryptedText)
{
Byte[] protectedData = Convert.FromBase64String(encryptedText);
Byte[] data = ProtectedData.Unprotect(protectedData, sEntropy, DataProtectionScope.CurrentUser);
string text = Encoding.Unicode.GetString(data);
return text;
}
}
}

Sunday, September 17, 2006

Palm OS Programming is Hard

I've been wanting a project calculator for my Palm for quite awhile now, however, I haven't found any online, so I decided to try writing one myself. I've written Palm OS applications before (many years before) and figured I would be able to create something fairly quickly.

I was wrong. It's taken me all day just to get a Hello World application to run in the debugger (using the Palm OS Garnet Simulator), and I can't seem to launch the debugger from the Palm OS Developer Suite IDE <grrr>. There seems to be plenty of documentation for advanced concepts, but no basic tutorials.

Oh well, hopefully I will get the hang of it and have my project calculator soon. Of course, I could really use one now to figure out how much it will cost to remodel my bathroom. I guess I will just have to do it the hard way :(.

Saturday, September 16, 2006

A Lament of Tableless HTML Layout

I haven't worked seriously with web application development for a number of years and recently decided to try my hand at it again.

On the whole, I like ASP.Net 2 and master pages. ASP.Net 2 is much more like the original ASP which allowed for rapid development of web applications. I'm not saying that ASP.Net wasn't an improvement over ASP, but they did move away from some of the core benefits of ASP (such as being able to view changes to code without recompiling).

However, in my recent exploration of web development I decided to try out tableless layout, basically using divs and CSS to create a layout instead of using tables (Why avoiding tables (for layout) is important). After playing with it for a few hours, It seems that CSS (and CSS compliance) still has a way to go before this becomes as robust as tables are. It's difficult, and sometimes impossible, to get divs to work the way I want (often things that were trivial using tables).

[Table Senryƫ...]

Tables are so lovely

so easy to design

now they are no more

Now you know why I'm a programmer instead of a poet :).