Archives

Archives / 2005
  • My Highlights of 2005 and Goals for 2006

    Professional Highlights in 2005:

    • WilsonORMapper Updated Several Times -- Generics, Nullables, Inheritance, Lookup Joins, and more
    • WilsonUIMapper v1.0 Released Publicly -- Several Well-Known Architects also Discussed UI Mappers
    • Speaker at the 1st Atlanta Code Camp -- Released Working Demo App for NHibernate used in my Talk
    • Slightly Better Community Involvement -- ASPInsider Summit, C# User Group, and Podcast Interviews
    • Also Very Busy with my Client Projects -- ASP.NET, WinForms, and most of all major Database Work
    Professional Goals for 2006:
    • WilsonWebPortal to be Released Soon -- This was a hopeful goal for 2005 but definitely to be done soon
    • Update both WebPortal and ORMapper -- There's always more to do, but the ORMapper is very complete
    • Speak more at Atlanta groups and events -- I went from 0 to 1 last year, so maybe I can do several more
    • Write articles on my WebPortal experience -- Lots of custom providers used, especially with O/R Mapper
    • Start looking ahead more at the next wave -- Workflow, Indigo, Linq and even DLing, Avalon, IIS 7, Atlas
    Personal Highlights in 2005:
    • Jenny is cancer free and working now
    • Worked on yard and some of house
    • Tori's dance recital was phenomenal
    • Zack reading great and started piano
    • Small but nice vacation in Gatlinburg
    Personal Goals for 2006:
    • Support Jenny in reconstruction phase
    • Finish the basement and maybe yard
    • Exercise more and get in better shape
    • Another small but nice family vacation
    • Plan for Hawaii vacation in early 2007

  • Atlanta VS/SQL 2005 Launch Today -- And Still Working

    I'm sitting here in the Atlanta VS/SQL 2005 Launch event today -- pretty boring stuff -- even some friends I've talked to that don't have the exposure to it that I've had said the same thing.  Anyhow, my point of writing this post is to note that I'm actually sitting in the back of the room right now posting this after finishing some work for my client -- and there is no open wireless net!  That's right, I'm using my Treo 600 and PdaNet for Treo 600 so that I can use my Treo as a modem -- all pretty slick and not that slow either.  This was my client's idea so that I could always be connected, but its really my first time using it -- and I've been amazed at how many others walking by want to know how I got wireless access.  :)

    On an unrelated note, sorry its been so long since I've blogged -- I've been very busy with my main client, and I'm also working every spare minute I have to finish my next big project.  So look for something from me before the end of the year if all goes well -- I'll be working with custom providers for membership, roles, profiles, and sitemaps that use my database schema and my ORMapper.  I'm very excited and looking forward to the release, although I'm also still working full-time so its wearing me out -- but when its all done I'll be able to rest and blog about it all too.  My apologies for also not getting very timely to some of the emails and requests for help that I get -- I hope everyone understands we all get busy.

  • WilsonORMapper v4.2 Released -- Includes Command Interception and Lookup Queries

    Update: WilsonORMapper v4.2.0.0 (10/15/2005) includes the following:   

    • Added support for Intercepting Database Commands using IInterceptCommand,
    • which can be used for Logging (Log4Net or custom) or modifying actual Sql.
    • Added support for Outer Joins to populate Lookup values in single query.
    • Added Generic ObjectHolder<T> for strongly typed lazy-load many-to-ones.
    • Jeff Lanning added OPath Sorts on Many-to-One Relations and more Functions.
    • Added TotalCount Property to IObjectPage for ObjectSet, List, and Reader.
    • Output Parameters are now Supported on GetObjectSet/XXX and ExecuteScalar.
    • GetObject on ObjectSet/List now returns Null when the Key is not Contained.
    • Exceptions are fully Serializable, Default DateFormat is yyyy-MM-dd HH:mm:ss.
    • Bug Fix for some scenarios where Multiple Many-To-Many Deletes were Failing.
    • Bug Fix so InitialState.Updated will Work with Deletes and not just Updates.
    • Bug Fix so that the LocalStore works correctly for Multi-Threaded scenarios.
    • Thanks to Mark Kamoski (http://www.WebLogicArts.com) for ORHelper options
    • for mapping types, lazy-load false, date-time stamps, and escape keywords.
    This version is also synced up with the .NET v2.0 RC and later builds for nullable types (should hopefully work as is with RTM when it comes out), although you can add a V2BETA2 compilation constant to continue to work with Beta 2.  There are also some sample IInterceptorCommand implementations included in the downloads, to demonstrate how to add support for either Log4Net or a custom log file routine of your own.  I've also updated the example app to demonstrate the new outer join "lookup" feature (thanks to Steve Eichert for the encouragement and beta testing), and I've added versions for 2005 with generics and nullable types.

  • Web Deployment Projects to fix Lack of Web Project Files

    I just saw a demo of a new feature that the MS ASP.NET team will be releasing as an add-on to VS 2005 -- it should be available at launch too.  Its called Web Deployment Projects and its basically allowing you to handle a lot of the scenarios we used to be able to do with web project files -- and more.  Under the cover its just a standard MSBuild file, so its already well documented and very extensible, but its also going to hook in the new aspnet_merge tool and provide a basic UI for common scenarios.  Things you'll be able to do include specifying whether or not you want one assembly per page, folder, or entire web project -- and you'll be able to specify several naming options for those assemblies too.  You'll also be able to have different build configuration options like you can today in VS 2003 -- but even better than today you'll be able to have the build process link or replace parts of your web.config file with configuration specific web.config pieces (like separate connection strings for debug, staging, and release).  You'll also be able to specify things like assembly signing and you'll be able to tell it the asp.net compiler to follow the IIS metabase paths so that sub-webs are effectively excluded.  It looks like its very much on track to give us everything we were missing from VS 2003, and more, as well as giving as an extensible solution for anything else we can dream up since this is just an MSBuild file like all the other project files.  And of course this will be completely optional, so all those that have liked the simplicity of not having a web project file will in no way be forced to use this new web deployment project.  Very cool stuff -- and I'm very glad that MS had listened to those of us that had issues with the lack of the web project.

  • Next Week at Microsoft for ASPInsiders Summit

    I'm looking forward to the ASPInsiders Summit next week (October 3 - 5, 2005) at Microsoft in Redmond, arriving late on Sunday, October 2, and leaving back on Thursday, October 6.  I'm skipping the MVP Summit that is taking place over the next few days since the ASPInsiders Summit should be better for the most part and I just can't take the time to attend both.  So if you're there now that's why you can't find me, but hopefully I'll still get to meet up with many of you next week.

  • Linq is Really Cool -- But DLinq is a Big Mess

    I'm not at the PDC since I instead decided that attending an event at Microsoft in Redmond in a few weeks would be the better use of my time and money, but I have been following things closely.  I had heard that System.Query, now named Linq for Lanquage Integrated Query, and the next version of ObjectSpaces, now named DLinq, would be revealed, but I had not been able to get any details.  Well now we have quite a few details, and after reading the blogs and docs and installing Linq/DLinq, and looking under the covers with Reflector, its now quite clear that Linq is really cool -- and DLinq is a big mistake.

    First, let me be very clear -- Linq is a very significant improvement in being able to query structures in a strongly typed manner with both intellisense and compile-time checking.  Even better is that it looks like Sql, which is something I've long pushed as being simpler for most people to use than yet another query language, but this is old news to anyone familiar with C-Omega.  But Linq by itself only knows how to work with in-memory structures -- in other words, on its own it doesn't know how to interoperate with your other data stores like relational databases and Xml documents.

    So that's where DLinq and XLinq come in -- they are essentially extensions that allow you to use Linq to work with relational databases using DLinq and Xml documents using XLinq.  XLinq seems to be well received so far, although it looks like it expects you to know far too much Xml in my opinion, unlike my open-source XmlDbClient that allows you to use basic Sql with Xml documents.  But DLinq is already getting mixed reviews -- it seems that those that aren't using O/R Mappers think its a big improvement, while those familiar with O/R Mappers, including myself, find it to be the wrong solution.

    What's wrong with DLinq?  Here's the list I have so far: attribute-based, MS Sql Server only, overly complicated, poor stored proc support, no server-side paging, very limited functionality, and no WinFS/OPath integration.  I've commented on why attributes are superior to attributes before, and others are already chiming in on this, so I'm simply going to point out that they've failed in delivering their own goal to be "non-intrusive", which is stated in the DLinq docs.  Next, while many people don't care about being able to simultaneously targetting multiple databases, its also very true that many people that target only one database do NOT work with MS Sql Server!

    By the way, I've looked under the covers using Reflector, and while it may be theoretically possible that they can remedy this before their eventual release, its also pretty clear that they haven't thought about this.  This might be understandable given that this is an early technology preview if it wasn't the third time that MS has previewed an O/R Mapper and been roundly criticized for not supporting other databases.  Yes, this is the third time -- their was an early version of ObjectSpaces in the original .NET v1.0 preview at the PDC in 2000, and then their was the major rewrite in the early versions of .NET v2.0 -- so this is their third attempt.

    I also believe that while Linq is very easy to use, DLinq is needlessly complex because it actually expects you to know a lot more than just ADO.NET and Sql, much like XLinq expects too much Xml knowledge.  Consider their example query "from c in db.Customers where c.City == 'London' select c;" -- note that db.Customers only works because they have elsewhere defined Customers as a Table<Customer> type.  But you've already marked your Customer class with the attribute "Table(Name = 'Customers')", not too mention all the Column attributes -- so why isn't the attribute enough to make it clear what "Customers" refers to?

    Similarly, what if all I want to do is to get a list of all my customers -- why should I have to say "from c in db.Customers select c" when I could just "from Customers" or have a strongly typed Get accessor?  My point is that while Linq really is great, you shouldn't be required to write out all of your sql statements for the simple cases after you've gone to all this trouble to mark everything with attributes.  Instead Linq should be reserved as the query language for the cases where you need more, and then the fact that it looks much like Sql will be its strength -- but there is no reason why it should be required for the many common simple cases.

    Now I've also seen some question whether there is support for persistence and/or stored procs, but a quick look through the docs make it quite clear that both are supported so that isn't an issue.  That said, for MS pushing stored procs so heavily, they haven't really thought out how to support stored procs very well for persistence -- again this wouldn't be a big issue if this wasn't their third attempt.   So you have to write your own insert, update, and delete methods, mark them with the appropriate attributes, and supply all the logic, including the stored proc name and parameters, in your own code -- not really O/R Mapping as I know it.

    And then there are some of the other minor issues which may change as DLinq develops, but again keep in mind that this is NOT a first attempt, so it begs the question of what MS learned from their other attempts -- and all our previous feedback.  There's no server-side paging (nor is there in ADO.NET since that was removed), there's no many-to-many relationship yet, and so far there's no support for inheritance and its not clear if distributed apps have been considered.  Finally, we were told that ObjectSpaces was delayed so it could be synced with WinFS, but I fail to see any integration with WinFS or OPath at all -- so I wonder if anyone is in charge?

    Oh one last thing, since I've already been asked this by several people -- should O/R Mapper vendors be scared, and in particular should I be scared about my ORMapper that was based on ObjectSpaces?  If I were to answer this purely from a logical feature-by-feature comparison approach, then the answer is obvious that O/R Mapper vendors have nothing to fear, nor does my own ORMapper.  But the problem in the Microsoft world, unlike the Java and open-source worlds, is that 99% of the developers never use anything except what MS gives them, and while this may give developers a taste of O/R Mappers, its also unfortunately going to leave a very poor taste.

  • System.Transactions.TransactionScope and IDbTransaction

    I've enjoyed reading about the new System.Transactions namespace and the easy to use TransactionScope object.  But there was always something that I wasn't sure about, and from questions I've received its clear I wasn't the only one.  The question is basically what happens if you have a traditional ADO.NET IDbTransaction and you enclose it in a TransactionScope?  I finally got around to testing out this scenario and I'm pleased to report that everything works exactly as you would hope.  In other words, even though you may have an IDbTransaction that you have committed, it will still get rolled back if its enclosed in a TransactionScope that does not Complete.  This means that you can continue to use all your existing code and libraries that work with IDbTransactions -- and still use the new TransactionScope when you need something more.  It also means that I don't need to do anything special for my ORMapper -- I can continue to use IDbTransaction and my users can use the new TransactionScope also.  By the way, I knew Access didn't support distributed transactions, but I was pleasantly surprised that I got an exception when I tried out of curiosity.  Finally, for all my readers that think this behavior with IDbTransactions should be obvious, I agree but I've also learned to test things instead of assuming.

  • WilsonORMapper v4.1.1 Released -- With a Big Thanks to Paul Welter

    Update: WilsonORMapper v4.1.1.0 (8/13/2005) includes the following:

    • Added new InitialState.Updated enum value for the StartTracking method.
    • This allows immediate PersistChanges -- useful for distributed systems.
    • Now supports generic relation collections -- even for the lazy-load case.
    • This feature was added by Paul Welter -- his templates are also updated.
    By the way, after looking at Paul's code that nicely creates the generic relation collections, I then recalled why I hadn't done that myself -- I couldn't figure out how to do what he did. I remember even doing some googling and convincing myself that you simply could not have a generic type created where the type itself was a variable -- so I just gave up and forgot it. So congratulations Paul -- you're a generic wizard and you have made the ORMapper much better !

  • Is the Sky Falling? Do we need a Beta 3? Do I even care?

    Why do I complain about the lack of project files in VS 2005?  Do I think the sky is falling and that a Beta 3 is needed?

    No, I don't think .NET v2 is going to be a failure, nor do I think there should be a Beta 3.  But the reason I don't think there should be a Beta 3 is because I know how big a deal a beta is and I want v2 as soon as possible and not slowed down -- because I will be gladly using it.

    But then why do I make my "negative" posts and complain about VS 2005?  Because the whole point of the open process is to get our feedback, and I'm giving it -- sometimes loudly.  Why?  Because I want the RTM to be as good as it can be, because I don't plan on waiting until a SP.

    Will I survive without a project file?  Most assuredly YES.  I can make multiple server forms possible, and make web apps stay alive, and do just about anything I want -- given the time.  And that's the rub -- why should it take lots of my time to do something that is very easy today?

  • MS Changes Internal Implementation of Nullable Types

    The MS .NET teams have heard some of our pain with nullables and have implemented some post Beta2 changes described here by Soma:

    After looking at several different workarounds and options, it became clear to all that no amount of tweaking of the languages or framework code was ever going to get this type too work as expected.  The only viable solution was one that needed the runtime to change. . . . The outcome is that the Nullable type is now a new basic runtime intrinsic.
    Hopefully this also addresses a lot of the other issues with nullables not being integrated into the entire platform, but I'm not convinced yet.

  • MS Responded to Yesterday's Post with Another Work-Around

    The MS ASP.NET team has apparently heard some of our pain with web projects no longer having project files in VS 2005 and created another work-around since my last post:

    Closed by Microsoft on 2005-08-10 at 11:42:12
       
    Here is an update on this bug. Based on user feedback, we made a post-beta2 change to allow file-based assembly references to be updated. In VS03, this is equivalent to setting the CopyLocal flag to true and saving the flag and path information in the project file. In VS05, we do not have a project file, so this information is saved into a new type of file called a Refresh file, located in the Bin folder along with the copied assembly. When the compiler sees this file, it will get the path and check to see if a newer copy of the file-based assembly is available and will copy it to the Bin folder if it is found.

    For example, if you have a file-based assembly reference to

    c:\libs\foo.dll

    then your web app will contain

    c:\webapp1\bin\foo.dll
    c:\webapp1\bin\foo.dll.refresh

    I have changed FDBK27472, which was originally postponed, to reflect this new change. Thank you again for your input -- as you can see it makes a difference!

    -- The Web Platform & Tools Team
    Thanks to Andy Miller for pointing this out.  I wouldn't exactly call this the "right" solution (that would be giving us at least an option to have a project file), but they are listening.

  • ASP.NET Simplicity -- When Is Too Much Simplicity a Bad Thing

    I'm a big fan of simplicity -- but some of the things the MS ASP.NET team is doing in the name of simplicity are adding complexity -- and some don't even have realistic workarounds.  I started thinking about this post while writing my last one about multiple server forms, but there are other examples where MS is making things harder in the name of simplicity.

    1.  A big cause of grief going around right now is the impact on real enterprise developers of the decision to have web projects not have project files.  Yes, this was a decision made in the name of simplicity -- and for 99% of the web developers out there that ASP.NET targets it probably was a very good decision.  But once again the problem is that this simplicity is being forced on the rest of us, and many of us enterprise developers really need many of the capabilities the project file gave us.  Should MS have known better -- most definitely yes -- I for one tried to warn them about this very issue at the first Whidbey preview in October of 2002, and I think I was probably the one attendee that best represented real enterprise developers as opposed to authors and trainers.

    2.  Another "problem" that was introduced with ASP.NET v1 and is now getting worse is that MS gives us "rich" web controls with properties like backcolor, font, and width.  Unfortunately, there are no such html attributes -- everyone of these properties is instead actually part of the html element's style.  Yes I realize this simplifies things greatly for newbies, but all its done is "teach" more people that CSs isn't important -- and its made real CSS stylesheets much more troublesome to use in ASP.NET.  Think I'm off my rocker?  Did you know that the Calendar's Title CssClass did not work at all in v1 since no one ever bothered to test stylesheets adequately?  Want another example?  Did you know that WebPartZones, yes that new wonderful portal technology in ASP.NET v2, will not work with the CssClass properties -- and according to MS that's "by design" and "postponed"?  I was really hoping to use WebParts, but all I had to do was try to use it with CSS stylesheets (don't most portals work that way) and I realize they are pretty much worthless -- not to mention take a look at the ugly html they produce.  And what's the work-around for this you ask -- Themes and Skins.  I know that Themes and Skins are one of the cool new features of ASP.NET v2, but have you ever stopped to think that they wouldn't be needed if we just used CSS stylesheets!

    3.  My last example is harder to explain -- its not really an issue with "postbacks" so much as a problem with the way most controls handle the postback to determine what to actually do.  I'll use the ever popular ASP.NET Forums as an example -- specifically the moderator tools to approve a post or unmoderate a user.  I'm looking at a post right now where the Approve link-button has the following link: javascript:__doPostBack('ContentControl$_ctl0$PostRepeater$_ctl0$_ctl0$_ctl0$Approve','').  So what's the problem?  This is all based on the relative position of controls, and the data they are assumed to contain, instead of using the actual data key.  Sure you can make an argument that its more secure to not expose the data key, but the problem is that without it there is no good way to reliably know what data we're supposed to be talking about!  If you use viewstate to move all the data with the postback then its not a problem -- but of course we all hopefully know that moving all of the data in viewstate (the default though in most cases in ASP.NET) is not a good thing.  So instead the data is re-queried on postback to determine what data goes with which control, and therefore what post should be approved in this case.  But the data can and does change on a real website with lots of activity (hmmm, like the ASP.NET Forums)!  So what ends up happening is that the wrong posts are often approved and/or the wrong users are often unmoderated (or we just don't bother to unmoderate anyone).

    Now to their credit, they have fixed a lot of these issues in the ASP.NET Forums over the years -- the delete post link now uses the actual key for instance -- but many of these very real bugs persist.  The standard method of not using the key is also not very performant, since even if you forget the case of data changing you still have to re-query the database just to do something (and then query it again to get the final set of data to display after the change) -- unless of course you put all the data in viewstate.  Note that I do not want to imply that postbacks, viewstate, controls, or any other feature is inherently wrong -- I only want to point out that the simplification has went too far and can actually affect data integrity and/or performance if you use a lot of the defaults.  For me this means that I never use the datagrid for more than the simplest of pages or prototypes (if even then) -- and that's really not even a burden once you've used the repeater a few times, or written your own "grid".  But the problem persists (and most people don't even realize it) -- and just as bad there are now thousands of articles out there to help you figure out how to get around all the various short-comings of these simple controls.  Why?  Because this simplicity is great when it works, but unfortunately its teaching many web developers to never do anything else -- I can't even begin to count the number of "huhs" I get when I respond to questions about the datagrid that I don't know because I don't use it.

    OK, end of post -- I hope I didn't lose everyone -- or make you think I've lost it.  I really do love ASP.NET, and I do appreciate the folks on the MS ASP.NET team, and I do understand the needs for some of this simplicity so that they can reach out to a much wider pool of web developers -- I do not want their job.  I just think that sometimes what is simple in the short-term or small cases ends up being anything but simple in the long-term or bigger cases -- so there needs to be a better balance in some cases to not make things too easy just because someone wants it that way.  I encounter the same types of things even with my ORMapper -- why can't you just do this thing that would make my code go from 3 lines to 1 line, even though it will make other situations far worse -- that's not simplicity to me.

  • Yes Virginia, You Can Have Multiple Server Forms in ASP.NET

    A current article in MSDN Magazine by a respected author is just wrong -- you can have multiple server forms in ASP.NET, and they can post to other pages.  For those of you that still aren't aware of this, my WilsonWebForm has been around for quite some time, and its been totally free and open source for a while now too:

    The ASP.NET WilsonWebForm enables Multiple Forms and Non-PostBack Forms, finally allowing you to overcome this built-in ASP.NET restriction. This is a real Server Form that supports WebControls, ViewState, and Events, as well as the Action attribute to Post to other pages/sites. The only limitation is that Validation controls are not supported, but a single regular server form can still be used at the same time. The typical usage is to continue to use the regular server form for the main page content, with validators, while using the WilsonWebForm for small side forms for things like search, login, or preferences. The source code of this control is available in both C# and VB.NET, along with a simple demo application that fully show's how to use it.

    I can probably even update it to support validators in ASP.NET v2, since the problem was only the fact that the ASP.NET model assumed all validators we're scoped to the whole page, but now with ASP.NET v2 there are validation groups -- so maybe I'll get around to looking at this, or someone else can since its open source.  :)

    Note:  I do agree that the ASP.NET single-form approach simplifies development and it should not be discarded lightly just because you can.  But the fact is that all web browsers do support multiple forms (can someone say "standard"), they do make some things easier (can someone say multiple default buttons without javascript), and they are sometimes even required (ever need to post to an external site).  So while I applaud the ASP.NET team for trying to simplify things, I do not agree with the approach that completely eliminates the use of a wide-spread standard approach that is sometimes even required -- all in the name of simplicity.  Its actually almost funny watching them now add back some work-arounds for cross-page posting, default buttons, and validation groups -- things that would all have automatically been supported in the first place.  :)

  • Tim Haines is putting up $150 to get some AJAX brainstorming underway

    Tim Haines is conducting a "blogversation" to get people brainstorming some ways to use AJAX with his e-commerce store.  The interesting thing to me is the incentive -- he's putting up a $150 Amazon voucher to the "winner".  See his blog post for the rules if you want to compete, and if nothing else leave a comment for one of the participants as your "vote".  Sure I think AJAX is cool (just like it was 5-6 years ago when some of use were doing it without the fancy name), but I'm more intrigued by Tim's method here than anything else -- will this result in some novel ideas?

  • WilsonORMapper v4.1 Released -- Includes support for Medium-Trust

      Update: WilsonORMapper v4.1.0.0 (7/29/2005) includes the following:       

    • Supports medium-trust when mapping to public members (or reflection).       
    • Supports expressions for nullValue (like MinValue) by Jeff Lanning.       
    • Added queryOnly setting for relations for OPath without actual loading.       
    • Additional method overloads for consistency with OPath and Generics.
    • QueryHelper now handles Bool values (configurable for CustomProvider).       
    • Include original Exception for Connection errors for better debugging.       
    • OPath Support for more features: subEntity, relation filters, sortOrder.
    • Allow Enum values to be either Strings or Ints -- thanks to Peter Goetzl.
    • Bug Fixes: Recursive non-LazyLoad Issues, Recursive Cascade Deletes.       
    • Bug Fixes: Unchanged Parent PersistChildren, Update InitialState Always.       
    • Bug Fixes: Oracle String Parameter Type, Relationships with Stored Procs.       
    • Bug Fixes: Composite Key Embedded Objects and ObjectSets by Peter Goetzl.       
    • ORHelper: Include alias for relations to better support OPath Engine.       
    • Demo App: Include defaultNamespace and alias for relations in mappings.       
    • Example App: defaultNamespace, alias for relations, and OPath example.       
    • And another special thanks to Jeff Lanning for continued OPath support.
    Note:  Medium-trust requires mapping to public members or also enabling reflection.

  • In Atlanta? Get FREE Training, Starting with SharePoint

    If you're in Atlanta then check out the new Atlanta Microsoft Professionals User Group created by Dan Attis, Matt Ranlett, Keith Rome, and Brendon Schwartz.  This isn't really a user group by any definition I've ever seen -- its a community driven series of classes for things like SharePoint, BizTalk, and other MS technologies.  That's right, this is FREE training, typically several sessions and hands-on labs for each topic that is choosen -- starting with Windows SharePoint Services on August 15th.  I'm thinking I might even get out to some of these classes since its a deal that's hard to beat, although that may depend on my kids' schedules now that school is starting back.

  • Yet More FireFox Issues -- This Time With v1.0.6

    I installed FireFox v1.0.6 this afternoon since I've been running a daily build of FireFox since v1.0.5 quit working and broke my ability to even go back to v1.0.4.  All I can say is v1.0.6 did NOT work either -- it had the exact same problems as v1.0.5 did when it decided to quit working (see previous post).  Yes I tried to start it in safe-mode and it still did not work, and I tried uninstalling and reinstalling and nothing I did helped in any way.  I think of myself as pretty computer savvy and able to install and fix most any software issues, but this one is perplexing and has no error messages to help at all.  So for now I'm still stuck running a daily build of FireFox, and if I can't get things working soon I guess I should return to IE for the latest security patches.

  • Issues with FireFox v1.0.5 -- And their Lack of Openness

    It seems there are some really weird problems with FireFox v1.0.5 -- really weird.  I installed it since it was supposed to be an important bug-fix release, and it worked fine for a day or two.  Then all of the sudden it just quit working -- and I mean it quit working.  The main window would display, but no page would load, my bookmark toolbar was gone, and all the menus and functions just quit working.  I could not even type into the navigation box to try another url, nor could I type into the Google search box -- FireFox was broken.  I could not even get a second window to ever appear when I tried to start another instance, I got no errors or warnings, and there did not appear to be anything unusual going on when I looked at my task manager.  I tried reinstalling it, I uninstalled it and tried it again, I uninstalled it and tried reinstalling v1.0.4 (which I luckily still had since Mozilla doesn't seem to keep old versions around in any obvious place, if at all) -- nothing worked.  Luckily IE was still working just fine, and I was able to determine that this is apparently something that is happening quite a bit with v1.0.5 -- so much so that they told their developers to quit working on localizing it and just wait for v1.0.6 very soon.  It seems some people have found some spyware on their machines and once they got rid of it then it started working again, but that doesn't seem to be the case for many others -- nor did I find any spyware on my system so that plan didn't help me.  The only thing that seemed to be the universal fix was reported to get the current build, which I believe is reported to be a release candidate for v1.0.6 -- so I got the latest build, installed it, and everything now works again.  Now the most frustrating thing about all of this is that I could not find any official confirmation from the Mozilla folks that this is a confirmed issue -- just like its been reported many times before that they don't seem to be very open and forthcoming on security issues.  I'm not saying I have any clue how to manage issues like this any better, especially when its such a critical component in the security of our computers as web browsers are in today's world -- but it seems that at this rate FireFox may end up being their own worst enemy.

  • What's Up with 2 Custom Collection Articles in MSDN ?

    Dino Esposito's latest MSDN column is "DataSets vs. Collections" -- definitely a good read on this topic from one of the best in the business.  And if that weren't enough, Paul Ballard also has an MSDN article on "Give Your Everyday Custom Collections a Design-Time Makeover" -- another very good read with hard-to-find details on data-binding.

    Note that neither of these articles push O/R Mappers, but they are just interesting discussions on using Custom Collections for your business objects.   And just in case it isn't enough to find two such articles from some of the best in the same issue of MSDN, what's going on with these posts that hint at something in the future?

    And back a few months ago, Karl Seguin had an online MSDN article on "On the Way to Mastering ASP.NET: Introducing Custom Entity Classes".  So maybe, just maybe, we're starting to see the first wave of something better than the simple ObjectDataSource in ASP.NET v2.0 coming out of Microsoft at some point in the future -- maybe.

  • Family Update -- Jenny is Cancer Free

    My wife Jenny finished her rounds of radiation a week ago, and the tests all look positive -- so as far as we know she is cancer free!  At some point, probably around the end of this year or early next year, she'll still need to have some reconstructive surgery -- but for now she's finally a free woman.  She even got to get in the swimming pool with me and the kids yesterday evening -- I don't think she could stand seeing us go swimming without her before.

    By the way, speaking of swimming and my kids, I still can't believe that both of my 7-year old kids can already swim so well that you hardly have to even worry about them this summer.  They both swim just fine in the deep end, and they can dive down to the bottom and pick up toys -- even in my sister's 8 foot deep pool on July 4th.  Its just never ending amazement how much kids can do when given the opportunity -- they also already know PowerPoint!

    While I'm giving family updates, I should also mention how amazing Tori did in her dance recital back a month ago -- and while I may be biased, I'm also quite serious that she is very talented.  This was her 5th year of dancing -- the first year was just a little ballet class at the community center without a recital.  Then she spent 3 years doing combo ballet/tap classes at a school on the other side of town where we lived before moving recently.  This year we enrolled her in 3 separate classes -- ballet, tap, and jazz -- at the school closer to our new house -- made possible since I work from home now.  Note that this is her thing -- its not something we make her do -- she loves dancing (and singing) and it shows all the time -- its actually incredibly hard to make her stop dancing.  Anyhow, she was in all 3 classes this year and as far as I know there were no other kids anywhere near her age that had 3 different numbers in the recital (certainly older girls often have a lot of routines).  She was one of the oldest girls in her ballet class and definitely the most experienced -- it was actually comical watching her at the recital since there were a few times that she was pointing to other younger girls with instructions!  :)  Her tap class had herself, 2 other girls about the same age, and 2 young boys -- the other school never had any boys but there are several at this school, so it was cool watching her dancing with a boy for the first time.  They all did good, but of course Tori was the best -- she knew every part and you can tell just how natural everything comes when you watch her dance.  Finally the jazz class was just her and 2 other girls about the same age -- and once again she knew every part and just shined -- she just blew me away since I really didn't think she would remember every part in 3 different routines, and do them all nearly perfect.  She's truly an amazing dancer already -- watch out for Tori Wilson in another 15 or 20 years!

  • Wait a Minute -- Where is All the Code and Sql -- I Can't Find It

    I get an interesting question sometimes when someone downloads my WilsonORMapper demo -- they want to know "Where is all the code and sql?".  Now this is exactly one of the main points of using an O/R Mapper -- that being that there really is very little code, and even less sql!  Another common statement that I hear is that "I'm doing just fine right now" or "I don't have any problems when it comes to data access".  Of course you don't have any "problems" -- you just have lots of repetitious code and boring sql, and new features require a lot more of it.  Yea, yea -- you've heard it all before -- but once again I ask if you have ever REALLY looked at the small amount of code needed with O/R Mapping?  So let's look at a real example -- lets consider a MS Sql table named Categories with fields (CategoryId INT, CategoryName VARCHAR(50)).

    Here's the bare minimum amount of sql you'll have to create/generate/maintain (you'll need more procs for filtering, sorting, and paging):

    CREATE PROCEDURE RetrieveCategoryList () AS
        SELECT CategoryId, CategoryName FROM Categories;

    CREATE PROCEDURE RetrieveCategoryById (@CategoryId INT) AS
        SELECT CategoryId, CategoryName FROM Categories WHERE CategoryId = @CategoryId;

    CREATE PROCEDURE InsertCategory (@CategoryName VARCHAR(50)) AS
        INSERT INTO Categories (CategoryName) VALUES (@CategoryName);
        SELECT CategoryId = SCOPE_IDENTITY();

    CREATE PROCEDURE UpdateCategory (@CategoryId INT, @CategoryName VARCHAR(50)) AS
        UPDATE Categories SET CategoryName = @CategoryName WHERE CategoryId = @CategoryId;

    CREATE PROCEDURE DeleteCategory (@CategoryId INT) AS
        DELETE FROM Categories WHERE CategoryId = @CategoryId;
    Here's the total amount of "sql" that I'll have to create/generate/maintain for my O/R Mapper (includes filtering, sorting, and paging):
    <entity type="Demo.Category" table="Categories" keyMember="id" keyType="Auto">
        <attribute member="id" field="CategoryId" alias="Id" />
        <attribute member="name" field="CategoryName" alias="Name"/>
    </entity>
    Now I'll also have to create/generate/maintain my business object, but you will to (and much more) unless you're using DataSets here:
    namespace Demo {
        public class Category {
            private int id;
            private string name;

            public int Id {
                get { return this.id; }
            }

            public string Name {
                get { return this.name; }
                set { this.name = value; }
            }
        }
    }
    By the way, there's nothing inherently wrong with DataSets, but I would like to point out that I still have no more code in that case.  And the more features you need (filtering, sorting, paging) the more you have to continue to create/generate/maintain -- but I am done!  But wait, there's more -- we still need to look at how much code is required to actually use this O/R Mapping business class and mapping.  I'll assume you know what your own ADO.NET code or DAL code will look like, and of course you'll also have a lot of code that fills your business objects with the data your return, and you'll also have a lot of code to set the various parameters for the persistence later.  Oh yea, and don't forget that the more features you've had to implement, the more cases of setting up those stored procs there will be.

    In the meantime, here's the code that's required to initialize my O/R Mapper and to get all the Categories (and bind them to your grid):

    ObjectSpace manager = new ObjectSpace(mappingFile, connectString, Provider.MsSql);
    CategoryGrid.DataSource = manager.GetObjectSet(typeof(Category), String.Empty);
    // .NET v2.0: CategoryGrid.DataSource = manager.GetObjectSet<Category>(String.Empty);
    Now here's all the code that's required to create a new Category and to insert it into the database (initialization has already happened):
    Category category = manager.GetObject(typeof(Category)) as Category;
    // .NET v2.0: Category category = manager.GetObject<Category>();
    category.Name = "Insert";
    manager.PersistChanges(category);
    Here's the code that's required to retrieve an existing Category and to update it into the database (it should look very similar I hope):
    Category category = manager.GetObject(typeof(Category), id) as Category;
    // .NET v2.0: Category category = manager.GetObject<Category>(id);
    category.Name = "Update";
    manager.PersistChanges(category);
    And here's the code that's required to retrieve an existing category and to delete it from the database (still pretty similar I think):
    Category category = manager.GetObject(typeof(Category), id) as Category;
    // .NET v2.0: Category category = manager.GetObject<Category>(id);
    manager.MarkForDeletion(category);
    manager.PersistChanges(category);
    To make it interesting, what code would I need to write if I decided I wanted to delete all of my categories in one batch statement:
    manager.ExecuteDelete(typeof(Category). String.Empty);
    Note that this really will be a batch statement -- there will NOT be a bunch of objects loaded and then a bunch of individual deletes!  I should also point out that I have so far only talked about a single type of object -- but what if you need to look at object graphs? Once you starting adding related objects, your sql and business objects and ADO.NET or DAL usage can get an order of complexity greater.  But all I have to do is to do the same type of mapping, and also add an additional xml declaration to describe the relationships needed.  Then my related objects will be loaded (or lazy-loaded) automatically, and I can also easily persist an entire object graph at one time.  So download it and REALLY try the demos to see it for yourself, either with one of the provided demo/example apps, or with your own app.

    Note that most everything I've said will also be similar with other O/R Mappers should you prefer -- so find the one that's best for you.

  • Does anyone really know what they are missing until they try it?

    A few of my friends were recently talking about their favorite fruits when another friend walked up and said he avoided all fruits.  His rationale was that fruits were bad for you, and don't taste good anyhow, so we would all do well to stop eating these fruits.  Of course we told him he was very wrong and that fruits are not only very tasty, but also very healthy and part of a balanced diet.  It turns out that this fellow had a bad experience once a very long time ago with some fruit that caused him to get a little sick.  Now he is convinced, without a doubt, that all fruit must therefore be very bad for you, not to mention that all fruits taste bad.  I thought it would be easy to point out all the scientific evidence that claims to prove fruit is actually very healthy for you, but his personal "proof" was that he was very healthy without fruit, so even if it wasn't unhealthy it also wasn't of any value.

    Now if you knew this fellow you would get a good laugh since he's extremely overweight and out of shape from eating lots of junk, but so far he hasn't had to go to the doctor or hospital with any major problems -- but we know its probably just matter of time.  So we next tried to encourage him to just try some fruits for himself, since this would prove quite well how tasty they really are, and then given time he would also come to realize that they were quite good for him too -- but he's convinced he knows far better.  Its easy to just leave him be, but we also really believe this fellow is in very bad shape, even if he doesn't realize it himself -- so what should we do?  We can't make him try some fruit, but I suppose we can continue to give him evidence fruit is healthy, and wouldn't we be very poor friends if we let him continue in his unhealthy ways, especially since he has a family to care for.

    P.S.  The subject of this story was changed to protect the innocent -- the real story was about o/R Mappers and business objects.

  • Craig Shoemaker's Polymorphic Podcast

    Check out Craig Shoemaker's Polymorphic Podcast.  He's had a lot of really good shows, including several about O/R Mapping.  Yours truly is featured on his most recent one -- and while I sound better this time, I'm also facing reality that I just sound terrible no matter what.  That's hard to accept since I used to do a lot of singing, but I guess speaking somehow isn't the same.  :)

  • The Data Mapping Application Block

    Lenny Fenster has released a preview version of the Data Mapping Application Block.  It uses the Enterprise Library, although a modified Data Access Application Block.  My understanding is that this will be rolled into the Enterprise Library sometime.  I'd heard rumors of this being worked on for quite some time, so it was no surprise.  I suppose you could think of it as the Enterprise Library's O/R Mapper -- kind of.

    What do I mean by "kind of"?  There are no objects here, unless you like typed datasets, and you're required to use stored procs, which is great if it were just an option.  But if you like to use your own objects and/or want to avoid the bloat of datasets and/or enjoy the flexibility and maintainability of runtime generated dynamic sql, then you won't find what you're looking for in the Data Mapping Application Block.

    Of couse, if you follow all of Microsoft's "guidance", and are already using the Enterprise Library, then this is probably exactly what you have been dreaming about.

  • How/Why I Added a Wiki for WilsonDotNet

    I've had several users of my ORMapper and UIMapper suggest that I add a Wiki to WilsonDotNet -- and I agreed it was a good idea.  My first problem was finding the time to setup a Wiki, since I'm typically pretty busy already with my work and other projects.  Of course this shouldn't be a big deal I was told since there are already some really good Wikis freely available, like FlexWiki.  So a while back I downloaded FlexWiki and proceeded to setup a simple test Wiki on my local system -- took about an hour or so.  At this point I was convinced that this would work out, but I still needed to integrate the Wiki with the rest of my existing site.

    And this is where things started to go downhill.  First I wanted to allow anonymous users to read my Wiki, but I only wanted my existing subscribers to be able to edit and create topics -- yes, this isn't a "pure" Wiki concept, but its what I wanted to do.  I proceeded to look through the documentation and I found that this was something that others had also requested -- and failed.  I did more searches and again found more people wanting this type of feature, but it just isn't supported out of the box so far.  Of course you can always modify the app yourself, since its open-source, but I discovered that the codebase is quite involved.

    At this point I thought I would just try some modifications to the web.config file in the authentication/authorization sections.  Surely this wouldn't be too hard, but things didn't work out so easily -- I think because the Wiki needed to be its own IIS app.  So now I decided to just give up and try it on my real site, again since I don't have a lot of time to waste getting this to work.  This resulted in discovering that you can't just create your Wiki locally and simply upload and expect the links to work correctly.  Another search showed that I wasn't alone in finding this to be an issue -- and there doesn't appear to be any solution to this.

    At this point I had certainly put in more than a couple of hours, although I didn't track it to say it was 4, 8, or more hours.  So I tabled this whole Wiki thing for a good while, and then recently I decided to think about this Wiki thing in another way.  What is a Wiki?  Its a set of topics, viewable as formatted Html, which can be edited and/or created, and a history is kept too.  If you think about it that way, a Wiki does not sound very hard at all -- especially if you use the FreeTextBox for Html edits.  So I did it -- in 30 minutes at most!  And in my opinion its far better, at least for me, since it integrates with my site too.

    So there you have it.  I have my own Wiki that fits seamlessly into my already existing site and ties into my existing set of users.  Its also far easier to use for someone like myself that isn't up on all the special codes needed to edit/create the formatted Html because I'm just letting my users have the full power of the FreeTextBox -- maybe this isn't a "real" Wiki, but its better for me.  I also maintain a complete history of all edits, although I haven't exposed this yet (if ever), which I do think is a good idea.  And I got all of this up and running in no time at all -- far less when compared with trying to figure out an existing free Wiki.

  • Check out my "Real" NHibernate Example App

    As most of you know that follow my blog, I not only have my own WilsonORMapper, but I've also been tinkering with NHibernate some.  Why?  I needed to use a "free" set of code for my recent presentation on O/R Mapping at the Atlanta Code Camp.  Anyhow, here's the long promised link to download my "real" NHibernate example app.  What do I mean by calling it "real"?  Well to put it bluntly, my experience is that its impossible to find a realistic and decently complex app for NHibernate (or Hibernate).  My example app is the exact same one I updated for my WilsonORMapper, except I modified it slightly to support NHibernate.  This means that it is first of all a real and fully functioning WinForm app -- complete with data-binding in grids and all your basic CRUD.  It also means that this example includes several types of primary keys, relationships, and inheritance -- and did I mention it works!

    Sure there is lots of documentation for Hibernate (and thus for NHibernate too), including books, but the examples are either typically small snippets, and many are outdated and just don't work with NHibernate v0.8.  Some people have criticized the small amount of documentation I have for my WilsonORMapper, and rightly so, but I've always included a real example app that goes a long way in getting people started -- and without this I found it quite difficult to get up to speed on NHibernate since I was forced to dig into scattered documents, forums, and just plain old-fashioned trial-and-error in many cases!  Here's an example -- NHibernate has multiple ways to model related collections (sets, bags, lists, and maps), which certainly is an advantage if you need flexibility, but just try to figure out which one to use for a many-to-many related collection that you want to be bindable -- the answer is use the bag.

    Anyhow, what's intriguing to me is how close both the basic approach and the mapping file syntax is for my WilsonORMapper and NHibernate -- they are remarkably similar and there's very little effort to switch between them.  Of course there are certainly differences too -- NHibernate is more flexible if you need that (most don't), while my WilsonORMapper is a little easier (far simpler codebase), supports more databases (including Access), and provides DAL capabilities as well as O/R Mapping.  Both mappers have features the other lacks -- but they both have the basic set of features that most people need -- and both work as my example apps demonstrate.  What are some other features my WilsonORMapper has?  Supports stored procedures, custom collection types, real batch updates/deletes, server-side paging, lazy-loading without keeping "session" open, interface to avoid reflection, null values even in .NET v1.1, and I'm sure there are others I could list.

    What about NHibernate you ask?  I can't do it much justice to be fair since I'm not that experienced with it, but a few come to mind: more caching options, normalized inheritance, built-in one-to-one, two-way graph syncs, more cascade options, eager load option -- and again there are bound to be more.  But the basics are pretty similar (although I prefer my WilsonORMapper of course) -- so if you're an NHibernate fan, then please download and enjoy my "real" NHiberate example app -- and feel free to add your own comments here on either mapper (or others), although please include some real details if you do.

  • WilsonORMapper v4.0 Released -- Includes .NET v2.0 Generics and Nullable Types

    My WilsonORMapper v4.0 has finally been released out of beta with support for another database inheritance type,
    as well as .NET v2.0 support for generics and nullable types -- and even more OPath support thanks to Jeff Lanning.
    Download the updated demo package which contains both the usual simple demo and a more complex example.

    Update: WilsonORMapper v4.0.0.0 (5/26/2005) includes the following:

    • Supports "shared inheritance" in the database using type discriminator.
    • This is also referred to as "single table with type discriminator".
    • Always supported "redundant inheritance" or "one table per concrete type".
    • Added support for .NET v2.0 Generics and Nullable Types -- VS 2005 Beta.
    • Allows you to initialize you own relation collections, as long as IList.
    • Works for all new objects, as well as non-lazy cases for existing objects.
    • QueryHelper GetExpression expanded with ComparisonOperators by Paul Welter.
    • Also includes nearly complete OPath engine (Longhorn Specs) by Jeff Lanning.
    • Added ExecuteScalar and GetDataSet methods to the Transaction class.
    • Added defaultNamespace for types that do not include the Namespace.
    • Breaking Change: ExecuteCommand/Update/Delete returns int (not bool).
    • Bug Fixes: Enum support, ObjectSet indexer, two types with the same name.
    • Bug Fixes: Exceptions and Parameter are now marked Serializable also.
    • And a special thanks to Jeff Lanning for help with both OPath and Generics.

  • Preparing for the Atlanta Code Camp

    I'm scheduled first thing in the morning to present an "Introduction to O/R Mapping" at the Atlanta Code Camp.  I've given many presentations to my teams in the past, but this will be my first public presentation -- so wish me the best.  Will I make a good trainer -- or should I stick to designing and implementing solutions for clients -- we'll find out tomorrow.  :)  Of course, as luck would have it, my allergies are acting up in a major way yesterday and today -- just like every May -- so hopefully I'll feel better.  By the way, since code camps are supposed to be free code only, I'll be using NHibernate for my set of examples -- I've actually got a nice little reference app with both an NHibernate implementation and a WilsonORMapper implementation.  It demos just about every type of relationship and key type, as well as making use of a lot of inheritance (supported in v4.0 of my mapper, currently in beta).  I'll post both versions in the coming week or so, when mine gets out of beta -- I think the NHibernate crowd will appreciate it since I've failed to find a good example app in my search.  Maybe I'll also share some of my experiences working with NHibernate, which isn't bad at all -- of course I still like mine better.  :)  Finally, for all those who have asked, I've added a Wiki to my WilsonDotNet site where anyone can view it but only subscribers can edit it -- maybe I'll share some information about why I did it the way I have soon also.

  • Nullable Types are NOT Integrated in .NET v2.0

    Nullable value types have been added to .NET v2.0, but they have NOT really been integrated.  The C# team has done a good job incorporating support for nullable types into the syntax, but the VB team has done nothing, which once again leaves VB behind the curve in features.  But that is not what this post is about -- this post is about the fact that nullable types have NOT been integrated into the rest of the .NET framework -- and obvious places at that.

    (1) Reading Data: Given a data reader, you can't just assign a value to a nullable type!  This one just seems incomprehensible -- nullables obviously already exist in the database, and the .NET SqlTypes support them already, so this seems to be a key integration point.  But alas, you simply can NOT assign a value from your data reader to a nullable type.  Instead, you still have to explicitly test for DBNull, and handle that case separately:
     
        int? nullInt;
        if (dataReader.IsDBNull(index)) { nullInt = null; }
        else { nullInt = dataReader.GetInt32(index); }

    Note that Julia Lerman observed this before -- see her comments for more viewpoints.

    (2) ConvertType: C# does at least support casts to/from regular types and nullable types, and it even gives you a handy way to convert nulls to a default by using the ?? operator, but just try to do any generic type conversions with Convert.ChangeType -- not supported!  Again this seems like an obvious integration point, if nullable types are to be "builtin", but once again the new nullable types just feel like an afterthought -- and NOT integrated.

    (3) WinForm Controls: The official story is that the data grids support nullable types, but what happens when you try to use a NumericUpDown or a DateTimePicker -- not supported!  That's right, once again you'll find that you still have no real integration for nulls, and you'll have to continue resorting to magic values or checkboxes and manual conversions.  These controls seem like another obvious place where there should be support for nullables.

    All of this lack of integration makes me wonder what the point of nullable types really is?  We could always create our own structs that supported the concept of null very similarly, but they lacked the builtin syntax support that C# is including, not to mention they failed to work with data-binding in grids, but the new nullable types simply aren't much better.  The one thing they have going for them is that they will at least be a "standard" nullable.

    Note that none of these issues prevented me from adding support for nullable types to my O/R Mapper, but I just thought I'd pass along what I observed since I do think the support I discovered was very disappointing.

  • Personal Update -- Progress Report on Cancer

    I've had several people ask me how my wife Jenny is doing since we found out she had breast cancer back in December, so here goes:

    Jenny had 8 treatments of chemotherapy, each one 2 weeks apart, between December and March.  The first 4 treatments caused a great deal of tiredness and weakness, and change in appetite to a lesser degree, especially during the first week.  The last 4 treatments were a different drug and caused significant bone pain and some numbness, and the pains seemed to accumulate and get worse each time.  These 16 weeks were definitely not very pleasant for Jenny, but they also weren't as bad as the chemotherapy required for some other types of cancer we've known people to have.  Then, after recovering from the chemo, Jenny went in to the local hospital last week, April 19, for her first surgery, and she came home two days later on April 21.  She was definitely in an awful lot of pain, and unable to do much of anything for a while, but she is doing very well now, with just a little pain left at this point.  Most basic things she can also do now, although she won't be able to do much lifting for some time -- and she still can't sleep in bed or a solid night in the recliner.  Next up, in a few weeks, will be radiation, which is expected to be every weekday for 5-6 weeks, which will be an annoying way to spend an hour or two every day when you consider the drive back and forth too.  Finally, later this year Jenny will finish up with another surgery or two for reconstruction, and then yet another recovery of course after that.

    Of course all I've told you so far is the technical details -- but hey, what do you expect from a technical guy.  :)  First, we were very blessed that we bought and moved into our new house, and sold our old house, before all this happened, since things would have been very different if the timing had been reversed.  Its also been great that I've been working from home with a mostly flexible schedule and a very understanding client, since I've been able to be there for Jenny at every point.  That alone I think has made things much easier and therefore made this a very doable experience for Jenny, even though its certainly not been a pleasant experience in any way.  On the down side though, this does pretty much make you put your whole life on hold for a whole year, and that means no vacations, and not much of anything else.  Its also difficult with two young kids, since they still depend on us for everything, and since they are both involved in several extra-curricular activities too.  On another positive note, everyone has been very supportive -- family, friends, and even complete acquaintances -- its actually quite amazing how people go out of their way to help.  So while things are hard at times, and our lives have been put on hold, we're still doing well in many ways, and we expect Jenny to have a long life ahead when this is all over.

    By the way, I downloaded and installed Beta 2 of VS 2005 the weekend it came out, right before Jenny's hospital stay.  That means that I was able to spend a lot of time working on extending my O/R Mapper instead of just fretting and worrying.  So right now I have a Beta of v4.0 of my O/R Mapper out there which supports .NET v2.0 Generics and Nullables, as well as having a few other new features!  I've also been getting ready to give a presentation on O/R Mapping at the upcoming Atlanta CodeCamp, which will necessarily feature NHibernate due to the credo requiring only free code.  So stay tuned for a couple of posts in the coming weeks that will feature some of what I've experienced.

  • How do you make FlexWiki readonly to Anonymous Users ?

    I've been asked to add a wiki to my sites to enable collaboration -- sounds like a great idea.  I have downloaded and played around a little with FlexWiki -- but I have one issue.  Is there any way to make it readable to anonymous users and editable only by authenticated users?  I've seen others asking this question also, but the suggested web.config solutions completely lockout anonymous users from viewing.  I'd appreciate any options, even if its another wiki solution since I see nothing special about FlexWiki.  Note that my users are in a MS Sql database and already authenticated in my main ASP.NET app -- so whatever I do should ideally work with my current users.  Thanks.

  • Visited Atlanta C# User Group

    I made it to the Atlanta C# User Group tonight -- it was a very nice meeting.  Keith Rome discussed asynchronous programming -- great job on locks and events.  I also got to catch up with a few buddies I used to work with -- Jerry Dennany and Clark Allen.  Of course I also got to say hi to everyone else -- I won't name others since I'll miss some no matter what.  Finally, I loved the new Alpharetta offices of Microsoft (its less than 30 minutes from my home), although I'm not sure why I had to buzz security to get out of the complex since I was obviously already in.

  • Enterprise Manager Tip

    This is probably common knowledge, but I didn't know it -- copy (ctrl-C) an object in Sql Enterprise Manager and paste (ctrl-V) it into a text editor to get its script!

  • WilsonORMapper v3.2.0.0 Released

    Update: WilsonORMapper v3.2.0.0 (3/30/2005) includes the following:

      The following important new feature is why this is a major update:   
    • Added IsolatedContext Property to Create New Isolated ObjectSpace
    • Use IsolatedContext to Isolate all Tracking/Caching to that Instance
      Then there are these important bug-fixes as well that were rolled in:   
    • Fixed Delete with Lazy-Loaded Many-To-Many removing Related Objects
    • Fixed StartTracking clearing any pre-existing Relations on Objects

  • WilsonORMapper v3.1.0.2 Released

    Update: WilsonORMapper v3.1.0.2 (3/25/2005) includes the following:

    • Fixed Case where Delete with Lazy-Loaded Many-To-Many Timed Out
    • Fixed GetObjectCount to Support Oracle's return of Decimal Type
    • Thanks to Jeff Lanning for substantial Performance Improvements
    • Thanks to Paul Welter for Null Byte[] and Insert of keyType=None
    • Continued to Improve Exception Handling and Exception Messages
    • Also, see the Continued Improvements to Paul Welter's Templates

  • Atlanta .NET Regular Guys and Code Camp

    Matt Ranlett and Brendon Schwartz, aka the Atlanta .NET Regular Guys, met up with me recently for lunch and blogged about our chat in their "Tales from the Trenches" series.  I really enjoyed getting to learn more about both Matt and Brendon since I don't get out to the local user groups very often.  If you're in the Atlanta area then you really should have their blog in your reader since they are the definitive source for everything going on in Atlanta.  Their calendar has all the meetings in one place, often more accurate than the groups themselves, and they give attend all the meetings and summarize them.  They are also running the Atlanta Code Camp site, where I am going to be presenting "An Introduction to O/R Mapping" on May 14 at 8:45, using NHibernate in my examples due to the code camp "rules".   By the way, I'm always open to meeting anyone in the Atlanta area for lunch in Woodstock, Roswell/Alpharetta, or Marietta/Kennesaw -- its especially important when you work from home.

  • Job Available using the WilsonORMapper

    I don't intend to start posting jobs for everyone, but since this one is about jobs using my stuff it just makes sense.  :)

    IMS is hiring - looking for a passionate intermediate .Net developer.

    Tim Haines is looking for contractors to work from home on ASP.Net projects.  He's putting together a crew of people who use the Wilson O/R Mapper tool in their development strategy.  If you have an interest, get on over to http://ims.co.nz/blog/archive/2005/02/18/393.aspx and check it out.

  • Mats Helander has released ObjectMapper

    Mats Helander has released his ObjectMapper, with support for both NHibernate and his own NPersist (others, possibly my WilsonORMapper, may be supported in the future):

    MatsSoft ObjectMapper 2005 is the flexible, power-packed yet easy-to-use O/R Editor that finally turns Object/Relational Mapping into a visual experience!  Whether you prefer to begin by modeling your domain classes in UML or you have an existing database that you want to wrap, ObjectMapper is the tool for you!  With ObjectMapper's powerful code generators and reverse engineering engines, you can go from database to code and mapping files in less than a minute. And ObjectMapper creates a real, object oriented class model from your relational database - not just a class model that looks like a relational database!  Conversely, ObjectMapper is just as happy when asked to figure out a fully normalized relational database schema for the classes in your UML Diagrams - and to generate the actual database as well.  ObjectMapper 2005 is the must-have tool for all .NET developers who are serious about their O/R Mapping.  With one-click generation of all O/R Mapping settings, the room for mistakes is minimal - and if, despite this, some error should find its way into your model, the built-in Model Verifier will immediately let you know what is wrong - and usually tell you how to fix it, too!
    I pointed ObjectMapper at an existing database of mine and successfully created some NHibernate mappings (very similar to my WilsonORMapper) and entity classes -- yeah !

  • WilsonUIMapper v1.0 Released

    Why use a UI Mapper? Most reasons are centered around flexibility and maintainability. A good UI Mapper lets you target both Web and Windows applications, as well as making it easy to support multiple layouts and localization. Multiple layouts make it easy to provide role-specific views and/or user personalization, and the integration with your DAL or O/R Mapper makes it easy to support full paging and sorting, as well as multiple databases. A good UI Mapper also makes your UI very consistent and your code base much smaller, while letting you focus on your business logic, instead of worrying about how to create routine admin-like screens. Note that a good UI Mapper does not generate code that you have to compile and maintain.

  • JavaScript Oddity in FireFox

    I have a web page that opens another popup page, and now I needed to also have it automatically redirect back to a previous page after it opened the popup.  I thought this would be very easy to do, and it was in IE, but it turned out to not be so easy in FireFox.

    This is what I thought would work -- it does in IE, and each of the individual lines works on their own in FireFox, but together in FireFox you don't get a popup:
        window.open('NewPage.aspx');
        document.location = 'PreviousPage.aspx'; // window.location doesn't help, neither does location.href

    The following is what turns out to work in both IE and FireFox -- I hope this trivial piece of JavaScript helps someone out there since it took me a few minutes:
        window.open('NewPage.aspx');
        location.replace('PreviousPage.aspx');


  • Yang Cao started a Blog Finally

    Yang Cao has finally started a blog -- he's one of the best .NET and C++ developers I know -- and he taught me quite a bit when I had the pleasure of working with him for 2 1/2 years.  I remember trying to get Yang to give us a presentation on threading for a good while and he finally did -- I have never ever seen anyone else create such a complex app (multi-threaded socket server) without using little steps along the way to try to compile and fix mistakes -- no Yang just wrote it all and it compiled and worked the first time!  Jerry Dennany was another of our colleagues back then that has taught me a few things -- not to mentioned saved my hide a few times.

  • VS 2005 CTP and SQL 2005 Beta Together

    I swear I've seen it mentioned several times that you can run the December CTP of VS 2005 and Beta 2 of SQL 2005 together on the same machine.  Can anyone tell me if it is possible, and if so where I can find the correct procedure to do so?

  • Atlanta Code Camp - Register Now

    Registration for the Atlanta Code Camp, to be held on May 14 at the MS Alpharetta offices, is now open -- but limited to 200.  I'm thinking of presenting something, possibly on O/R Mapping or UI Mapping, but no commitments have been made yet.

  • When Do You Recommend DNN and When Do You NOT

    My client is looking at expanding into a new venture soon and I've been asked what I thought about using DNN (DotNetNuke).  The rationale for this request as I understand it is that DNN can get us up and running really fast, we can build on it easily, and its proven to work, perform, and be scalable.  Now I'll be the first to admit that while I have looked at DNN, I've also not actually used it in a long time, so I may be biased or ignorant.  But I honestly don't see DNN getting a site up any faster than anything else unless that site consists of the canned modules or other existing modules.  That may be the case for a lot of "portals" and "community" sites out there, in which case I'd recommend DNN (or Rainbow) myself, but is it really helpful in other cases?  I already have MasterPages for site consistency, I already have a lot of the "content" and business-specific knowledge that my client depends on, and I already have a working role-based security and menu implementation.  We'll also need to create lots of new "content" or "modules", but I don't see how DNN will simplify or speed that up -- it just seems to add constraints that aren't necessary to me -- unless of course we were creating a "portal" that DNN met most of the needs for already.  I also seriously question the notion that DNN is proven -- so hopefully I can get some feedback on this one here -- no matter what the outcome.  I've searched, and while I see lots of sites running DNN, I can't seem to find any hard numbers or case-studies about sites that run across multiple servers and support a very large number of concurrent users.  My personal experience is that DNN is very functional if it has what you need, but the sites I've seen are typically not very "pretty", and the few larger ones I've seen seemed to really suck when it came to performance (I know of one such large community site that switched to a different CMS since they found their site basically unusable on DNN when the site kept growing).  Maybe my personal experience is very limited, and maybe my googling isn't very good -- but I can't find any huge success stories (sure they are numerous small-to-medium successes) while I can easily find some people with complaints and other issues.  I'm also a little concerned about the fact that I won't get to control my own schema completely, nor use things like MasterPages (and CSS seems hard too with DNN from what I've read), and I don't like having to give the aspnet user account full control over the website directories either.  But I know there are a lot of people out there with real DNN experience -- so please post or email me your thoughts, both positive and negative, keeping in mind that my client is not really going to be able to use the existing modules out there for the most part (if any at all), so this is going to be a custom application -- its just a question of using DNN as a quick and proven starting point.

  • Getting Ready for my UI Mapper Release

    As my readers know, I've been working on something I've called a "UI Mapper" for a little while now.  Well I'm hoping to finally release something soon and I was wanting to get some opinions on how to actually do that.  The "issue" is that there are several pieces to this "product", some of which I want to make an open-source standard, but some of which I would still like to make a little bit of money on ($50).

    First there is the central UIMapper "framework" which totally makes sense to be open-source so that anyone can target it as a standard.  This piece defines and parses the actual xml UI Mappings and contains the interfaces that must be implemented for the actual UI functionality.  For instance, there is an IORMapper interface so that theoretically you can use any ORMapper, or even your own "old-fashioned" DAL for that matter.  There is also an optional IResources interface so that you can localize all text using any approach you prefer.  Then there are IListView, IEditView, and IEditWidget interfaces that the actual UI controls should implement if they want to be "standard" and somewhat interchangeable, at least as far as the basics go of course.  My idea here is that you should be able to "map" your UI and later change the actual UI controls between those available by myself and other vendors.  I hope you realize at this point that I'm trying to avoid vendor "lock-in" since you can swap any of the parts, using my ORMapper and UI controls today, and some other ORMapper/DAL and/or set of UI controls tomorrow.  So this part I feel very comfortable making open source -- but I have a few questions even about this part -- should I name this part something different than "WilsonUIMapper" to make it feel more open, and does using ProjectDistributor for this make sense?

    Then there are the actual UI "controls" that I have made, but which should in no way be required since I hope and encourage others to also make UI controls that target my "UI Mapper" framework.  These are what I want to somehow try to sale for $50 since they represent some significant work -- but I still have several options so I still need some feedback.  What I have are both Web and Windows versions of ListView (think grid) and EditView (think details) UI controls.  The ListView controls allow you to specify which properties, and in which order, are columns in the list, as well as letting you specify header labels (localizable), width, alignment, format, and sortable.  The built-in functionality is full support for selecting a row and paging and sorting, and filtering if you add the UI you want, as well as "links" for CRUD with optional deleting from the ListView with a confirmation dialog.  A lot of people will say this isn't that different from the standard grids, and that's somewhat true, but the benefit here is that you can easily layout multiple "views" on the same data, either for more flexibility or for different languages or for different "roles", and you can even make it all user-definable if you save their preferences in your database.  I also think the automatic support for paging and sorting, and deleting if you like it, is pretty slick, since the built-in grids use huge bloated datasets to "simulate" paging and sorting.  So what are my options here, before I describe my EditView controls -- I can release the real executables for these ListView controls and keep the source for sale, or maybe release just one of the Web or Windows versions, or release just demos like I do now for my ORMapper.  Maybe I even release the source for both of these and rely on only selling the EditView controls -- what do you think is a reasonable compromise to get people interested in "UI Mapping" while still making a little bit of money?

    Finally there are my EditView and EditWidget controls, all of which come in both Web and Windows versions.  The EditView controls create the overall "details" view of a single entity, existing or new, in either an editable or read-only manner.  But note that the EditView controls do NOT actually "handle" the individual fields -- instead it creates an EditWidget for each field, and you can specify any EditWidget you want that implements my IEditWidget interface.  I have 10 EditWidgets right now (maybe I'll have a couple more before release) that use the standard .NET controls, but you could very easily create (or get one from somewhere else maybe) versions that support your favorite 3rd party controls or your own business-specific needs.  The types of things I have are "widgets" that represent single-line text, multi-line memos, read-only fields, boolean check-boxes, integer fields, number fields, date fields, single-select combo-boxes, multi-select list-boxes, and double-entry passwords.  My integer and number boxes use just the standard text-boxes in Web and Windows flavors, with the appropriate validation, but you could easily create your own version using Infragistics or something else and plug them in with just a single configuration line in the mapping file.  You may also want to create a more complex business-specific control, like an Address control or a custom Person Selection control -- that should also be easily doable.  I think the EditView and the EditWidgets are where its more obvious how this can be a significantly "better" way to do things, at least for most of your basic "admin" screens anyhow.  No longer do you have to carefully lineup 100 controls on a 100 different screens -- nor change them all when the designers want something slightly different.  No longer will you have inconsistencies in your UI because integers or dates were handled one way on some screens and another way on another.  No longer do you have to create separate versions for the Web and Windows, or different languages/locales -- you could even create another version of controls for cell phones if you wanted.  So this I'm thinking I would only release in demo form, but I'm certainly still willing to hear your opinions as long as you keep in mind that I'm NOT going to just open-source everything.

    So what do you think I should do -- and why?  And what do you think of what I've laid out here -- any concerns or things you see missing that simply must be included from the beginning.  Again my vision is to release the "framework" as open source so that others can also build on this, although my hope is that people will buy something from me to help compensate for my time.  I also think there's a lot of value in a community of paid users from what I've seen with my ORMapper -- that may sound weird but its been very true.  I get tons of feedback and suggestions and even bug-fixes and new features from my paid ORMapper users -- but I get nothing from my open-source things, unless you count tons of newbie questions that paying users seem to avoid for the most part.  So please give me your thoughts now while I still have some choices remaining -- and thanks.

  • Improved CodeSmith Templates for ORMapper

    The following is news from Paul Welter, who's been gracious enough to create and update CodeSmith templates for my ORMapper:

    I've updated the tempates on the CodeSmith site above. This update contains many new features. The biggest new feature is merge support. Now you can author new code in the generated entity class file and not loose your changes when the templates are re-run. The merge works by updating marked regions in the file. All your modifications will be saved as long as you don't edit regions marked as 'do not modify'. Another improvement is that it now generates a DataManager class that contains a singleton instance of the ObjectSpace class. Having this common singleton allows for generation of some default methods for each entity like Retrieve, RetrieveAll, Save and Delete. The goal of these updated templates was to abstract the ORMapper from the UI layer by creating methods off the entity objects. This leads to more of a true object oriented design. No longer does a consumer of the entity objects have to know any ORMapper syntax. Working with the entity now looks like ...

    Customer cust = new Customer();
    cust.FirstName = "Paul";
    cust.LastName = "Wilson";
    cust.Save();

    All the ORMapper tracking and persisting is handled internal to the customer class. This is a much more intuitive syntax to work with.

    There is also a new set of templates to generate NUnit test classes for each entity class. The test classes are very basic and designed as only a starting point. Another advantage of the improved way of working with the entity classes is that it is much easier to author tests for.

    The templates should be used in the following order ...

    1)MappingFile.cst - This generates the mapping file for the WilsonORMapper.
    2)ClassGenerator.cst - This generates or updates the entity classes defined in the mapping file. This template also generates a DataManager class if it doesn’t already exist.
    3)TestGenerator.cst - This generates NUnit test classes for each enity class. This is an optional template to use.

    Thanks
    Paul Welter

  • I did not know SQL Server Views are Static

    I have a SQL Server view defined to be "SELECT * FROM Table WHERE MyCriteria".  I intentionally coded it with "SELECT *" since I wanted it to be all fields no matter what -- just a subset of records.  A new field was added to my table recently -- no problem -- at least that's what I thought anyhow.  But this new field did not show up in my view afterall -- and Enterprise Manager still shows my view as being defined with "SELECT *".  So I dropped the view and recreated it -- that did the trick -- my new field is now in my view where it should be.  What's up with this behavior?

  • The Latest Crap on Code-BePart in ASP.NET v2.0

    Fritz Onion has a new post about the latest twist to the ASP.NET v2.0 Code-BePart (code-behind, code-beside, code-bewhat, ...) saga.  This really makes me think they should have just left code-behind as it was in v1.*. I was initially opposed to these code-behind changes when it was introduced back at the first private preview in October 2003 to a few of us.  But most of us relented when the ASP.NET team insisted the code-behind model was too "brittle", as well as too difficult. While there was certainly truth in this, and certainly beginners in OO have issues understanding code-behind, it just doesn't look like they've succeeded in the end here. Now it appears to be a monstrosity that's not OO, not simple, and not even as functional as the original model which at least allowed you to pre-compile the code-behind while leaving the design non-compiled so designers could modify small things in it if necessary.  Yes, they've added the ability to pre-compile everything, including the aspx design pages, which is important to many, but just as many of us depend on the aspx design being left as is while still protecting our code-behind.  Code-behind was at least pretty standard OO, and now that you get full intellisense in a single file there isn't much of a reason to try to bring simplicity to the code-behind model, so why oh why did we muck with this?

  • Bug Fix: WilsonORMapper v3.1.0.1

    I inadvertently broke most custom providers in my WilsonORMapper v3.1 -- this is fixed in v3.1.0.1.  Those that were manually adding their own parameter names in their mapping files were not affected, which was also why I didn't notice this in my testing.  Of course the recent change in the MySql provider did not help make this any easier to spot.  Thanks to David Dimmer for helping me track down the bug in my code -- and just when I was bragging about stability.

  • MySql ADO.NET Provider Change

    MySql recently acquired ByteFX which made the ADO.NET provider for MySql.  They recently released a new version of their provider with the MySql namespace instead of the ByteFX namespace which also introduces a small but significant change that will affect all .NET MySql users.  You now have to prefix your parameters with "?" instead of "@"!  For backwards compatibility you can add "old syntax=yes;" to your connection string to force "@", but I'm not sure if this will be supported forever or not.  Note that with the WilsonORMapper this means that you specify yourCustomProvider.ParameterPrefix = "?", or add the "old syntax=yes;" to your connection string (but don't do both).

  • UI Mappers Making News -- OR Mappers Are Common

    Jimmy Nilsson recently hosted a small architecture workshop in Lillehammer that is making the news now.  Oh how I wish I could have went, but alas it was a little too far way and costly for me.  Anyhow, so far I've found two things of interest to me in Mats Helander's posts.  First, they didn't spend much time discussing O/R Mapping because its pretty much a given now!  Its been that way in Java for quite some time, and I do believe its getting there in .NET with your top architects too.  Unfortunately, I don't think any such claim should be really made in .NET just yet, since most typical .NET developers still haven't even heard of O/R Mappers in my opinion.  But it is nice to see that at least among my peers that you don't have to spend time justifying O/R Mappers any more.

    The other item of interest to me was the discussion of "UI Mappers" -- apparently both Patrik Löwendahl and Roger Johansson are building their own UI Mappers now (update: Roger is building an O/O Mapper).  Of course, as my readers know, I've had a UI Mapper in beta for some time, and in production at a client, so this really makes me think I need to find the time to finish it up.  :)  By the way, I'm sorry for tooting my own horn, but I'm just thrilled to see them use the term "UI Mapper", especially with the likes of Martin Fowler being present, since I invented the term on this blog 6 months ago (at least to my knowledge) !  Oh well, now I need to find the time to finish it up, adding support for other O/R Mappers and 3rd party controls -- what do my readers think about the concept?

  • SQL Server 2005 and Limitations to Assembly Loading

    I've recently started reading "A First Look at SQL Server 2005 for Developers" in my spare time (yea, I'm not getting very far since I don't have much spare time) and I came across something rather limiting I think.  It says that you must be logged into SQL Server using an integrated security login, as opposed to a sql server account, in order to create a .NET assembly in SQL Server 2005.  The rationale given was that this was necessary in order to check if the user should have access to the file system location where the .NET assembly is to loaded from.  That does make sense, but it seems that implies that shared web hosts won't be able to easily allow us to use .NET assemblies on their SQL Servers -- am I missing something here?  Of course I'm not convinced that I would actually want a shared SQL Server on a shared web host allowing .NET use anyhow, since I don't want my data access slowed down by someone else playing with .NET stored proc, but I hadn't realized this limitation would exist either.

  • Unusual Chinese Fortune Cookie

    My son Zack (nearly 7) got the following fortune in his cookie:

    "You have an unusual equipment for success, use it properly."

    Hmmm . . .

  • The Best O/R Mappers: NHibernate, LLBLGen Pro, and EntityBroker

    Frans calls me to task on my last blog post where I said:

    "By the way, this is also the one of the few things that I think still makes my mapper stand out as unique against the likes of NHibernate, LLBLGen Pro, and EntityBroker.  The others may have more features, and NHibernate is open source, but just try to use any of these others for the first time in 30 minutes, or just try to extend any of those to have a new feature you desire.  Of course the other main thing mine has to offer is provider support -- I don't think any other can claim to support so many databases.  And that's not just a claim -- its also a reality that many have proven -- a reality that is possible primarily due to simplicity and not targetting every possible feature."

    Sorry Frans if this offends you, as that was not my intent at all.  I've tried most of the mappers out there, and there's a reason why I mentioned LLBLGen Pro, NHibernate, and EntityBroker -- they are the best out there in my opinion!  I think I've also proven that I do in fact recommend many people to your mapper and the others, so I was not trying to say anything negative at all.  Do I think your mapper is easy to use -- absolutely -- and I also think most other mappers are easy to use.  LLBLGen Pro is also probably unique in that it actually gets easier to use over time, due to the code gen approach that you take which makes intellisense possible.  But I still think that too many people totally new to O/R mapping get frustrated and quit when it takes longer than 30 minutes to get working the first time.  Is that fair?  No, its not, but that's the type of developer that the MS community often brings us -- they download our cool products and get frustrated when our products can't read their minds and tell them what they are doing wrong -- then they quit and go on their way content in their belief that O/R mappers are not the right approach.  And that's been one of my goals -- too give people an entry point that is simple enough that anyone can use it in 30 minutes or less -- then if they need more they will be much more willing to consider the other mappers.  Are there people that get yours working in 30 minutes?  I'm sure there are, but I seriously doubt that the average MS developer can get most O/R mappers, and many other cool tools for matter, in 30 minutes or less -- and I don't think that's a negative statement about your mapper.  As I said earlier, LLBLGen Pro is probably unique in its code gen approach, which probably makes it actually get easier to use over time -- and that's very cool.  Your mapper is hands down the only mapper I would recommend to anyone that those that prefer code gen -- yours and not mine -- although that's not my personal preference.

    Next Frans, you asked how many databases my mapper supports really supports?  MS SQL Server, Oracle, Access, MySql, PostgreSql, Sqlite, Firebird, DB2, VistaDB, Sybase, and lastly I think SqlCE.  All of those have people that I know for a fact are using my mapper with them, except for SqlCE which I know some people were interested in using but I never heard back to know if they succeeded or not.  Furthermore, unlike other mappers, if you work with another database that I have not listed, you can probably get it to work with my mapper without writing or modifying any driver code -- no recompile necessary.  But yes, you are absolutely correct too when you say that I don't "really" support all theses databases, if you what you mean by that is supporting features that are peculiar to individual databases.  Do I support sequences?  Yes, but it does require that you know how to set it up in your database, which yours probably does automatically.  Do I support joins, aggregates, group by, having clauses?  No, not even on one database -- as I have said on many occasions, LLBLGen Pro has far more features than mine, as does NHibernate and EntityBroker -- mine simply targets the most common 80-90% (or more) of CRUD, with or without stored procs, while giving the user a decent DAL for the other cases.  Many people may read that and immediately choose your mapper, or one of these others, and that's absolutely the right thing to do if you need these features, but many people have also apparently decided that they were quite content with a mapper like mine too.  For instance, I actually do work with joins, aggregates, group by, and having clauses -- in my databases -- that's right, I'm quite comfortable writing a view or stored proc and mapping it.  That's a "heresy" too many purists -- but I like databases -- my mapper doesn't shield me from the database -- it simply allows me to avoid writing all the boring and repetive CRUD and start working with objects right away.

    I thought about ending here by saying when I would recommend LLBLGen Pro vs. NHibernate vs. EntityBroker -- but that would probably just cause more issues since I would be making some generalizations to some degree.  So instead I'll end it by just challenging everyone that reads these blogs but still hasn't tried an O/R mapper to just try one and see for yourself for a change.  And I'm very sorry if any of my statements, here or earlier, are generalizations that may be debateable -- that was not my intent and I apologize sincerely.  I consider myself an O/R mapping evagelist more than an O/R mapping vendor (and I'm certainly not a fulltime vendor, nor do I make enough money to quit my day job) -- but there is a fine line that sometimes I inadvertently cross in my comments.

  • How do you decide what features to add or cut?

    Ever since my WilsonORMapper hit v3.0 back a few months ago things have been very smooth.  By that I mean both that there have been very few bugs and very few new feature requests.  In other words, its reached a mature point and it meets most expectations.  Lately I've been readying v3.1, and I had to make some decisions on what to include.

    Some feature requests are easy to decide to include -- they are easy to code, affect little else, and are often requested.  Examples of this were the desires to map properties (as opposed to just member fields) and to have a public ExecuteScalar method.  Note that I actually don't like mapping properties and ExecuteScalar isn't really necessary, but they were still included.  There were also some other requests that were easy to decide to include, even though they were not often requested.  These were still easy to code and affected little else, but they also provided some real value even if they were seldom requested.  Some examples of these were adding support for multiple mapping files (or multiple embedded resources) and output parameters for stored procs.

    Next there were a few requests that were easy to not include -- these aren't easy to categorize, so lets look at examples.  One case was Whidbey generics and nullable types -- these were often requested, and they may be easy to code and affect little else.  But's let be realistic -- these are still in beta 1, changes may be possible, and few really need them yet.  But note that these will be one of my top priorities for v4.0, probably in the beta 2 timeframe when there is a go-live license.  Another case is that a few people don't agree with my assumption about unchanging primary keys, also called surrogate keys.  I try not to force my personal tastes on others, thus I decided to allow properties to be mapped now, but this is one assumption that is to integral to my mapper.  I hesitate to say that those that disagree are doing something wrong, but there must be a few basic assumptions, especially with a "simple" product.

    But then there are the requests that are hard to decide on whether they should be included or not -- these are especially difficult when people send you code.  My mapper does support entity inheritance, but only the most minimal database inheritance -- this would be a huge plus to add to my list of features.  But this is a big change, probably affecting a lot, no one has sent me any code, and this is a minor point update.  So this did not make the cut -- it might make sense in v4.0 though.  Another thing my mapper supports is composite keys, but not composite key relationships -- at least not until now.  This was also a big change, and it certainly did affect a lot, but someone did send me some code on this one.  Now I should point out that just because someone sends me code does not mean its done -- someone else's code usually solves their cases, but not all the other generic cases, so it can still be a lot of work.

    Finally, there was one case that really required me to make a difficult call -- one-to-one relationships.  My mapper supports one-to-many, many-to-one, and many-to-many relationships, but not one-to-one relationships.  This is not trivial to implement, and it also affects a lot of things, but it would be a big plus on my feature list -- and someone sent me some code!  But this did NOT make the cut -- that's right one-to-one relationships are still not supported by my mapper, and likely never will.  Why you ask?  First, there is an easy work-around -- one side of a one-to-one relation is actually a many-to-one relation, and the other side is a one-to-many relation where the many is always equal to one!  If you don't like to see that, then that's what a property is for -- leave the member field an IList, but make the property be the strongly typed object with the getter and setter hiding the fact that you are actually always working with the 0th index object in a list.

    But isn't this requested enough to justify making it easier?  That's where the hard call came in -- and I decided that it is not worth the additional complexity.  That would be one more thing to have to explain on the end-use side, and it would complicate the codebase greatly.  That's because every relationship type has to be handled for new and existing objects, lazy-loaded and not, dynamic sql and stored procs, and now for single and composite keys.  That's a lot of cases -- a lot to code (the code sent me handled only the few pertinent to that person), a lot to test (I still haven't tested all the cases of composite key relationships), and a lot for the next person to worry about!  And that last part is one of the most important things for my mapper -- the simplicity of the codebase itself.  This is why I get so many user contributions -- they find it easy to extend when there is something else they want.

    So I have consciously chosen to keep my mapper "simple", although I think that I can safely say that it does meet most people's needs already -- far beyond the most common 80-90% that I was originally shooting for.  By the way, this is also the one of the few things that I think still makes my mapper stand out as unique against the likes of NHibernate, LLBLGen Pro, and EntityBroker.  The others may have more features, and NHibernate is open source, but just try to use any of these others for the first time in 30 minutes, or just try to extend any of those to have a new feature you desire.  Of course the other main thing mine has to offer is provider support -- I don't think any other can claim to support so many databases.  And that's not just a claim -- its also a reality that many have proven -- a reality that is possible primarily due to simplicity and not targetting every possible feature.

  • WilsonORMapper v3.1 Released One Year Exactly After v1.0

    WilsonORMapper v3.1.0.0 (released on 1/7/2005) includes the following:

    New Features:

    Map Properties or Member Fields -- My Preference is Member Fields
    Mappings can be in defined in Multiple Files or Embedded Resources
    New ExecuteScalar Method and Stored Proc Override for ExecuteCommand
    Relationships for Composite Keys -- Warning: Very Little Testing
    Added Support for Output Parameters with Stored Procedure Options

    Improvements:

    Improved Embedded Objects -- Multiple Levels, Interface Optional
    Mapper attempts to Resolve Mapping Paths or Load Embedded Resources
    Better Exception Handling, No longer Catching and Eating Exceptions
    Improved Parameter Typing necessary for Providers that do not Check
    Recursive BaseType Check for Inheritance Support in ObjectSet Add

    Bug Fixes:

    Added Date Delimiter for Access, Date Format for Access and Oracle
    Support Providers that do not support Timeouts, like MySql ByteFX
    Default Parameter Names for Fields with Spaces/Dashes in their Names
    ObjectHolder Key Setter for Null Values, Other Isolated Bug Fixes
    ORHelper: Small Improvements and Fixes, VB Code for Initialization

    And a special thanks to each of the following contributors to v3.1
    :
    Chris Schletter (http://www.thzero.com) -- Mapping Properties, Embedded Objects
    Nick Franceschina (http://www.simpulse.net) -- Help with Composite Key Relations
    Stephan Wagner (http://www.calac.net) -- Command Timeouts, Parameter Names
    Ken Muse (http://www.MomentsFromImpact.com) -- Date Delimiter, Date Format
    Alister McIntyre (http://www.aruspex.com.au) -- Stored Proc Output Parameters
    Stephen Roughley (http://www.RedBlackSoftware.co.uk) -- Default Parameter Names
    Gerrod Thomas (http://www.Gerrod.com) -- ObjectHolder Key Setter

  • Beautiful Weather in Atlanta -- Great for Rock-Climbing

    We took the kids to the Atlanta Zoo today -- beautiful weather to get out -- so much for winter.  They had a kids area with a small rock climbing area big enough for adults too (barely) -- so I gave it a try and made it to the top -- a lot harder than it looks, but great exercise.  The monkeys seemed well behaved, and of course they know how to groom each other, but there didn't seem to be a way to trade my monkeys for theirs.  :)

  • My Highlights of 2004 and Goals for 2005

    Professional Highlights in 2004:

    • WilsonORMapper Released and Matured -- Simplest O/R Mapper and Supports Most Databases
    • WilsonXmlDbClient Released OpenSource -- Work with Xml Data using ADO.NET and SQL Syntax
    • WilsonWebForm moved to GDN OpenSource -- Multiple Server Forms and Non-Postback in ASP.NET
    • WilsonUIMapper in Development and Beta -- Runtime UI based on Mappings to Business Classes
    • Mixed ASP.NET Security Article on MSDN -- Mix Forms and Windows Authentication in Single App
    • Quit Corporate Job and went Independent -- Work From Home and Control Application Architecture
    • Develop App with OR/UIMappers for Client -- Doing an ASP.NET Application the Right Way Finally
    • Large Successful Server Installation for Client -- About 20 Servers at MCI supporting Tons of Traffic
    • Worked with .NET WinForm App on Citrix -- More than I wanted to know about GC and .NET Memory
    • Attended MVP Summit and Met Many MVPs -- IIS7 Goes Modular and ObjectSpaces Delayed til 20??
    Professional Goals for 2005:
    • Update WilsonORMapper Periodically -- v3.1 ASAP has Composite Relations, Properties, Multiple Files
    • Release and Mature WilsonUIMapper -- Need to Add 3rd Party Control Support and WinForm Runtime
    • Develop the next Killer .NET Project :) -- I've got an idea for this one although how much time will I have ?
    • Update Site and Projects to Whidbey -- Add Generics and Nullable Types to the WilsonORMapper v4.0
    • Articles, MVP/PDC, User Group, etc. -- Attend MVP and/or PDC Conference and More User Groups too
    Personal Highlights in 2004:
    • Sold our own House without an Agent
    • Built and Moved into our new House
    • Setup our Home Office with new Desks
    • Family Vacation at Discovery Cove
    • Worked at Home with Kids in Summer
    • Zack's 6th Birthday at Hobby Store
    • Tori's 7th Birthday at Horse Farm
    • Tori and Zack Finished Kindergarten
    • Read and Helped in School Classes
    • Jenny Diagnosed with Breast Cancer
    Personal Goals for 2005:
    • Support Jenny to Beat Breast Cancer
    • Celebrate with Nice Family Vacation
    • Exercise More and Get in Better Shape
    • Help Read More with School Classes
    • Start Finishing Basement and Yard