Sunday, December 25, 2005
I would like to wish you, wherever you are, a very Merry Christmas!  May God bless you and your loved ones.
There were sheepherders camping in the neighborhood. They had set night watches over their sheep. Suddenly, God's angel stood among them and God's glory blazed around them. They were terrified. The angel said, "Don't be afraid. I'm here to announce a great and joyful event that is meant for everybody, worldwide: A Savior has just been born in David's town, a Savior who is Messiah and Master. This is what you're to look for: a baby wrapped in a blanket and lying in a manger."

At once the angel was joined by a huge angelic choir singing God's praises:
Glory to God in the heavenly heights,
Peace to all men and women on earth who please him.
As the angel choir withdrew into heaven, the sheepherders talked it over. "Let's get over to Bethlehem as fast as we can and see for ourselves what God has revealed to us." They left, running, and found Mary and Joseph, and the baby lying in the manger. Seeing was believing. They told everyone they met what the angels had said about this child. All who heard the sheepherders were impressed.

Mary kept all these things to herself, holding them dear, deep within herself. The sheepherders returned and let loose, glorifying and praising God for everything they had heard and seen. It turned out exactly the way they'd been told!

-- Luke 2:8-20, The Message
Sunday, December 25, 2005 10:45:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Sunday, November 27, 2005
While recuperating from massive quantities of turkey and trimmings, I began work on a CodeSmith custom schema provider for MySQL 5.0

As Josh frequently says, “Nerd alert! Nerd alert!”

The journey has been quite a learning experience so far.  Creating a custom schema provider requires that you create a class that implements the IDbSchemaProvider interface.  This interface exposes a couple of properties and several methods required to query definitions for all tables, views, stored procedures, keys, indexes, and so forth.  Since I’m targeting MySQL 5.0, I’m using the new INFORMATION_SCHEMA support wherever possible.  The provider also depends on the latest MySQL Connector/Net.

Download ChristianASPNet.MySQLSchemaProvider version 0.90

Instructions:
  • Make sure you have MySQL Connector/Net 1.0.7 or later installed
  • Make sure CodeSmith is not running
  • Extract and copy the ChristianASPNet.MySQLSchemaProvider.dll assembly to /Program Files/CodeSmith/v3.0/SchemaProviders (or wherever you have CodeSmith installed)
The next time you run CodeSmith and create or modify a data source, MySQLSchemaProvider should now show up in the list of available Provider Types.

UPDATE (12/23/05):
Apparently you will need CodeSmith version 3.1.4 or later to use the assembly in the download.  You may be able to use a previous version of CodeSmith 3.xx if you compile the source yourself.  Also, be sure to use the following format for your MySQL provider connection string.

Server=localhost;Port=3306;Database=databaseName;Uid=userName;Pwd=userPassword

UPDATE (12/29/05): Download the latest version 0.91.

For more nerdy details, read on...

I’ve also included a simple SchemaTest.cst template that I created as I was writing the custom provider.  It doesn’t do anything special or even demonstrate best practices.  It’s just an ugly test harness. I include it in case you are interested in having a quick way to query the objects in your MySQL database.

There are a few methods I have not been able to implement (yet).  GetCommandParameters() returns parameter definitions for a given stored procedure.  MySQL 5.0 INFORMATION_SCHEMA does not support the PARAMETERS table at this time.  I tried to use MySQL Connector/Net’s MySqlCommandBuilder.DeriveParameters() method, which is supposed to work in version 1.0.7, but threw a NULL reference exception in my testing.

GetCommandResultSchemas() returns the schema of the result sets that are output from a given stored procedure.  However, if the stored procedure requires parameters, then we’re back to the previous issue.

I also chose not to implement GetExtendedProperties(), since I don’t yet know what would be relevant to a MySQL developer.  I am a MySQL newbie, after all.

Happy templating!
Sunday, November 27, 2005 11:50:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  | 
 Monday, November 21, 2005
New version 1.0.7 of the MySQL ADO.NET provider Connector/Net has been released.  From the press release:

MySQL Connector/Net 1.0.7, a new version of the fully-managed, ADO.Net provider for the MySQL database system has been released. This release is the latest production release of the 1.0 series and is suitable for use with any MySQL version including MySQL 4.1 or 5.0.
Continue...

The new version includes binaries for .NET 2.0, but they are simply compiles of the existing source code and do not take advantage of any new ADO.NET 2.0 features.

Download Connector/Net
Monday, November 21, 2005 1:05:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 

I've mentioned before about forwarding e-mail to Google GMail.  Here's a summary of the benefits and features.

  • Backup of all e-mail
  • Online, accessible from any computer with an Internet connection
  • Simple, easy-to-use interface
  • Searching for old e-mail is a snap
  • Spam filtering
  • POP3 access, so you can use any e-mail client (Outlook, Thunderbird, Eudora, etc.)
  • You can customize the Reply-To address so that other people never have to know you're using GMail.  Replies will still be sent to your regular address instead of GMail.
  • Over 2,600 MB of storage (as of today) and growing

I know there are many of my customers who could benefit from using GMail just for the spam filtering alone.  I used to provide spam filtering with my hosting, but it became too much of a hassle.  It only takes about 5 seconds for me to modify an account to start forwarding all e-mail to another address.

If you're one of the few people on the planet who doesn't already have a GMail account, let me know and I'll send you an invitation.

Monday, November 21, 2005 12:18:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 
 Friday, November 18, 2005

One of the guys here at work was asking for a utility that would quickly show the size of each folder on his disk.  Josh did a search and came up with Folder Size for Windows.  This utility integrates with Windows Explorer and gives you more options (columns) when viewing the file system in Details view.  New columns that you can add to your display include:

  • Folder Size
  • Folder Size Sort (same as Folder Size but formatted to sort properly)
  • File Count
  • Folder Count
  • Sibling Count

Sizes are cached and updated automatically as things change on your system.  Plenty of other features to enhance performance.

Friday, November 18, 2005 8:56:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 
 Monday, November 14, 2005
Seth Godin (the bald marketing guru that writes about purple cows) has posted his take on Google Analytics, which is supposed to be a free web site tracking/analysis tool hosted by Google.  The site is currently undergoing some kind of "maintenance" so I haven't been able to check it out for myself yet.  More info here.  Very interesting... 
Monday, November 14, 2005 12:14:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Saturday, November 12, 2005
Perhaps a bit overdue, but I've added an About page to the site.  I've even included a few pictures.  Uh... enjoy... I guess.
Saturday, November 12, 2005 11:39:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  | 

Part 2 in the MySQL series is now up.  This article is an introduction to MySQL stored procedures including the benefits of using stored procedures, creating stored procedures using MySQL Query Analyzer, and executing stored procedures from ASP.NET. 

Comments certainly welcome and appreciated!

Saturday, November 12, 2005 2:25:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Thursday, November 10, 2005

I forgot to mention in my previous post an important aspect of the Web Part Framework.  There is the concept of Web Part Zone controls that allow you to set up containers for Web Part controls or other specialized management features.  Specifically, there is a WebPartZone container class used for Web Part controls, an EditorZone used to change properties on selected Web Part control instances, a CatalogZone used to add new Web Parts to a page, and a ConnectionsZone that can be used to manage connections between Web Parts.

There are five Web Part display modes: Browse, Design, Catalog, Editor, and Connections.  Under Design mode, for example, users can drag and drop (IE) web parts around on the page.  Under Catalog display mode, the CatalogZone container is visible and users can choose from a list of available Web Part controls to add to one of the available WebPartZone containers on the page.

Web Parts Control Set Overview on MSDN

Thursday, November 10, 2005 5:37:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 

One of the best new features in ASP.NET 2.0 I have seen this week is the new Web Part Framework.  I assumed this was only for building SharePoint components.  Not at all.  This is a very rich tool set of components and controls that allow you to easily build a web portal application.  For example, you can allow users to:

  • Edit the layout of your page by dragging and dropping Web Parts around on the page
  • Add Web Part controls to a page (and restrict which controls are available to add)
  • Collapse/Minimize Web Parts
  • Remove/Hide Web Parts
  • All changes are automatically stored away in the Personalization framework so that they are remembered each time the user returns to your site

Adding the Web Part Framework to your site appears to be extremely easy.  There are some base classes you can implement for maximum functionality, but you don't have to.  You can take your existing User Controls and drop them on the page inside Web Part containers and the framework will automatically provide a wrapper around your controls.

Another great feature is that Web Parts can communicate with each other.  It is possible to allow a user to dynamically add a Web Part to a page and it automatically detect and consume data exposed by one or more other Web Parts on the page.

One thing to note: Not only is SharePoint not required, but Web Parts created in ASP.NET 2.0 are currently not compatible with the current version of SharePoint.  The next version of SharePoint will be based on the Web Part framework in ASP.NET 2.0, and there may be a service pack in the meantime to allow 2.0 Web Parts to be used.

Thursday, November 10, 2005 3:39:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |