September 21, 2002

A Pure Object-oriented Domain Model by a DB Guy, Part 1

ore than a year has now passed since I wrote my book (.NET Enterprise Design with Visual Basic .NET and SQL Server 2000[1]. The book discusses solutions to common design problems for large-scale applications, so several pages are spent discussing an architecture that can be used as a starting point

GetWordOccurrences – Number of occurrences of each word in a string

‘ Returns a Hashtable whose keys are the unique words in a source string’ and whose elements are the number of occurrences of each word” Example:’ ‘ Dim de As DictionaryEntry’ For Each de In GetWordOccurrences(sourceText)’ Console.WriteLine(“‘{0}’ = {1} time(s), de.Key, de.Value)’ Next” Requires the following Imports’ Imports System.Collections.SpecializedFunction GetWordOccurrences(ByVal

Preload subject and body when offering an email URL

You can easily add a link in your ASP and ASP.NET pages that, when clicked, runs the default mail program (e.g. Outlook) and allows the user to send a message to the email address you provide:Click here to send a message Interestingly, you can preload other fields in the email

SplitQuoted – A split variant that deals correctly with quoted elements

‘ split a string, dealing correctly with quoted items” TEXT is the string to be split’ SEPARATOR is the separator char (default is comma)’ QUOTES is the character used to quote strings (default is “”””,’ the double quote)’ you can also use a character pair (eg “{}”) if the opening’