Monday, March 06, 2006
I'm sure Paul Wilson will be announcing this soon, but just noticed this morning that he's updated his web sites, and added a new one: http://www.wilsonwebportal.com

It appears that Paul is releasing the WilsonWebPortal as a free download with sample source code demonstrating how to create modules for the portal.  I'm really looking forward to taking the WilsonWebPortal for a spin.

Congratulations on relasing version 1.0, Paul!

Monday, March 06, 2006 8:08:44 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 
 Thursday, March 02, 2006
Just spotted this over at Scott Watermasysk's blog
The Open Web Design project was founded in November 2005 by Aaron "MonkeyMan" Nikula as a resource for users with no design skills to quickly put up a site and showcase their content and as a way for designers to share their designs and showcase their talent.
Currently it appears there are nearly 1,000 templates to peruse.  Very cool!

http://openwebdesign.org/

Thursday, March 02, 2006 12:26:15 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  | 
 Wednesday, March 01, 2006
While I'm in the mood for shopping, I decided to take Nathan Smith's advice and order a copy of CSS Mastery.  It seems I can never find the time these days to do any reading, but this is one subject I sure would like to know more about.

While you're here, check out these links.
  • Hoverbox Image Gallery - Nathan Smith's image gallery CSS tutorial based on things he learned from the CSS Mastery book.  No JavaScript -- just pure CSS.  Good discussion going on there, too.
  • The CSS Experiment - Greg describes his journey from table-based layouts to CSS and the reasons why it's worth the trip.
  • CSS Creator - A tip from Greg's post.  Nice little CSS layout "wizard" that can generate the code you need to get started.  Haven't tried it yet, but looks promising.  Check out the CSS Forum while you're there.
  • In Search of the Holy Grail - A List Apart consistently produces some high quality articles.
  • One True Layout Interactive Example - Another CSS layout wizard based on the In Search of the One True Layout articles.  I haven't had much luck getting these to work consistently in IE, so your mileage may vary.
  • CSS Templates - A collection of CSS layouts
  • UPDATE: Glish.com CSS layout techniques - Joe Audette pointed me to this one, which I've seen in the past but forgotten about.
Other CSS Links

Wednesday, March 01, 2006 6:46:48 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 
I'm fed up with my Netgear RangeMax wireless router.  I've had the router for more than a year, and it has worked great.  Connection quality and range throughout my house have been far better than with the D-Link I had before.   However, over the last several weeks it has started flaking out.  Performance has been terrible and every once in a while it just completely dies and I have to reset it.  The problem has become increasingly worse, and today I've had to reset it five times so far.

So, taking the advice of Scott Hanselman I've purchased the Linksys WRT54GL.  The WRT54GL is the "new" old WRT54G with a Linux Kernal.  There are several Open Source firmware alternatives that add or improve its features.  I sure hope I'm not disappointed...

Wednesday, March 01, 2006 5:46:30 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  | 
 Monday, February 27, 2006
I think I just wasted somewhere around 10 hours over the last several days trying to track down an issue I've been having.  It started out as what should have been a painless project upgrade from VS 2003 to 2005.  This particular project happens to use Crystal Reports XI. 

"Well, that's your first problem!"

Yes, I know.  Crystal.  A fool to be pitied, am I.  Alas, it's a customer requirement... on with the story.

Everything compiles and runs great.  However, now none of the reports are working.  I'm getting all kinds of weird exceptions.  I fight with references and what-not for a couple of hours.  Turns out, for .NET 2.0 you need to download Crystal Reports XI Release 2.  No problem.  It's only a 1GB download.  That should only take, what, three days?

Fast forward download and 2 hour upgrade install.  Everything compiles and runs great.  However, now none of the reports that have parameters are working.  I'm getting a weird exception whining that ParameterDiscreteValue can't be cast to ParameterValue, even though ParameterDiscreteValue inherits from ParameterValue.  Only makes sense, right?

I run through and fix all my references again, and then start narrowing down and eliminating all the possible culprits.  I double-check my code against all samples and Google results I can find.  No dice.  So, I give up and open a support case with Crystal.  Insert typical support response: "Have you tried running the samples?"

At this point I'm so desparate that I actually do run a sample project that sets parameters dynamically.  It works.  So, I set out to plug one of my own reports into the sample project.  It works.  WHAT?!

After stepping through every line of code for the millionth time (give or take 3 builds), I finally go back and check my references again.  Hmm... that's odd.  All my Crystal references are OK except the Crystal Engine is pointing to the 10.0 version that ships with VS 2005.  Update the reference and recompile.  Run a report.  Exception.  Check my references again.  Hmm... that's odd.  The old reference is back again.

OK... the fix??  After setting the reference, I have to set the "Specific Version" property to "True."  If I don't, VS 2005 is kind enough to automagically change my reference back to the previous version.

This is actually not the first time this issue has happened to me.  At this point I'm so frustrated I could spit.

Hey, wait. These spots on my laptop might be dried spittle.  I'm not sure.

Monday, February 27, 2006 11:27:11 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 
Annoucement link.  "Free to develop, deploy, and distribute" and suited (among other things) for "developers working on PHP, Java, .NET, and Open Source applications."

According to the FAQ, the Express Edition has the following limitations:
  • Limited to 4GB of user data
  • Only one instance per server
  • Only executes on one processor if running on a multi-processor server
  • Will only utilize 1GB of memory, even if the server has more
Oracle 10g Express Edition comes with a "browser management interface" which I assume is better than Microsoft's MSDE command-line OSQL.

My company is considering Oracle as an alternative product platform, so I'm sure I'll be giving this a try sooner or later.

Monday, February 27, 2006 10:28:28 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Sunday, February 26, 2006
Scott Guthrie points out the new "How Do I?" series of videos on MSDN.  According to Scott, these are 10-15 minute "pure code" walkthroughs using some of the new ASP.NET 2.0 features and the free Visual Web Developer.  There are currently 11 videos available, and Scott says that more are on the way.

Sunday, February 26, 2006 4:40:29 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Wednesday, February 22, 2006
In case someone else would like to know how to create a singleton DataManager class for WilsonORMapper that uses IsolatedContext and works in ASP.NET...

View DataManager.cs

using System.Configuration;
using System.IO;
using System.Reflection;
using System.Web;
using Wilson.ORMapper;

namespace Portal.Data
{
    /// <summary>
    /// The DataManager class is the singleton instance of the ObjectSpace class
    /// </summary>
    public sealed class DataManager
    {
        private const string MAPPING_FILE = "Mapping.config";
        private static readonly Guid CONTEXT_KEY = Guid.NewGuid();
        
        /// <summary>The application connection string read from app.config</summary>        
        /// <example>
        /// Add the following key to the "appSettings" section of your config:
        /// <code><![CDATA[
        ///     <configuration>
        ///            <appSettings>
        ///                <add key="IMI.Portal.Framework.Data.ConnectionString" value="Data Source=(local);Initial Catalog=DATABASE;User ID=USERNAME;Password=PASSWORD;" />
        ///            </appSettings>
        ///     </configuration>
        /// ]]></code>
        /// </example>
        public static readonly string ConnectionString = ConfigurationSettings.AppSettings["ConnectionString"];
        public static readonly string CurrentProvider = ConfigurationSettings.AppSettings["Provider"];

        /// <summary>The singletion instance of an ObjectSpace Class</summary>
        private static ObjectSpace objectSpace; // = GetDefaultInstance();
        private static object syncLock = new object();

        private DataManager()
        { }

        #region public static ObjectSpace ObjectSpace

        /// <summary>The singleton method for retrieving the global ObjectSpace</summary>
        public static ObjectSpace ObjectSpace
        {
            get
            {
                if (objectSpace == null)
                {
                    lock (syncLock)
                    {
                        if (objectSpace == null)
                        {
                            objectSpace = GetDefaultInstance();
                        }
                    }
                }
                
                HttpContext context = HttpContext.Current;
                if (context != null)
                {
                    ObjectSpace isolatedContext = (ObjectSpace) context.Items[CONTEXT_KEY];
                    if (isolatedContext == null)
                    {
                        // Cache the isolated context in the current request so that it is used
                        // throughout the entire request

                        isolatedContext = objectSpace.IsolatedContext;
                        context.Items[CONTEXT_KEY] = isolatedContext;
                    }
                    return isolatedContext;
                }
                else
                {
                    return objectSpace;
                }
            }
        }

        #endregion

        #region private static ObjectSpace GetDefaultInstance()

        private static ObjectSpace GetDefaultInstance()
        {
            Assembly assembly = Assembly.GetAssembly(typeof(DataManager));
            
            using (Stream mappingStream = assembly.GetManifestResourceStream(
                typeof(DataManager),
                MAPPING_FILE))
            {

                switch(CurrentProvider)
                {
                    case "MySQL":

                        return new ObjectSpace(
                            mappingStream,
                            ConnectionString,
                            GetMySQLProvider(),
                            20, 5);

                    case "PostgreSQL":

                        return new ObjectSpace(
                            mappingStream,
                            ConnectionString,
                            GetPostgreSQLProvider(),
                            20, 5);

                    // TODO: Oracle?

                    default:

                        return new ObjectSpace(
                            mappingStream,
                            ConnectionString,
                            Provider.MsSql,
                            20, 5);

                }
                
            }
        }

        #endregion

        #region private static CustomProvider GetMySQLProvider()

        private static CustomProvider GetMySQLProvider()
        {
            //Provider provider;
            CustomProvider provider;
            provider=new CustomProvider("MySql.Data", "MySql.Data.MySqlClient.MySqlConnection", "MySql.Data.MySqlClient.MySqlDataAdapter");
            provider.StartDelimiter="";
            provider.EndDelimiter="";
            provider.LineTerminator=";";
            provider.IdentityQuery= "SELECT LAST_INSERT_ID()";
            provider.SelectPageQuery="SELECT * LIMIT {0} OFFSET {1}";
            provider.ParameterPrefix = "?";
            provider.GuidDelimiter = "'";

            return provider;
            
        }

        #endregion

        #region private static CustomProvider GetPostgreSQLProvider()

        private static CustomProvider GetPostgreSQLProvider()
        {
            // Npgsql, the .NET provider for PostgreSQL can be found here:
            // http://pgfoundry.org/projects/npgsql

            CustomProvider provider;
            provider=new CustomProvider("Npgsql", "Npgsql.NpgsqlConnection", "Npgsql.NpgsqlDataAdapter");
            provider.StartDelimiter="[";
            provider.EndDelimiter="]";
            provider.LineTerminator=";";
            provider.IdentityQuery= "SELECT currval('{1}_{0}_seq')";
            provider.SelectPageQuery="SELECT * LIMIT {0} OFFSET {1}";
            provider.ParameterPrefix = ":";
            //not sure about this
            provider.GuidDelimiter = "'";

            return provider;
            
        }

        #endregion
    }
}
       
Wednesday, February 22, 2006 8:43:01 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Saturday, February 18, 2006
Version 0.9.2 of MySQLSchemaProvider for CodeSmith and MySQL 5.0 is now available for download.  Changes include:
  • Updated GetTableKeys() to provide not only the foreign keys for the table but also the foreign keys of other tables that point to the given table. Code update graciously provided by Dug Steen.  Thanks!
  • Added .NET 2.0 version for CodeSmith 3.2.5 or higher
  • .NET 1.1 version requires CodeSmith 3.1.6
Keep in mind that the version requirements are for the assemblies that ship with the current download.  If you are using a previous 3.xx version of CodeSmith, you can simply recompile from the source code and it should work.

Saturday, February 18, 2006 12:38:57 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  | 
 Thursday, February 16, 2006
Read the announcement here.

Thursday, February 16, 2006 1:16:10 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |