Blog Home  Home Feed your aggregator (RSS 2.0)  
.Net Jonesie - September, 2005
A simple programmers blog
 
# Friday, September 30, 2005
Well, here I am, schluming it in Seattle for the MVP Global Summit with 1499 other MVP's from around the globe, including a few from NZ.  Yesterday was registration and the regional dinners.  Today was the first real day of stuff, which started with the executive presentations by Steve Balmer (CEO), Jim Alchin (VP of Platforms) and others.
 
I hadn't seen Steve Balmer present (in person) before so it was a treat for me.  He lived up to my expectations.  There was a good Q&A session at the end of his usual lively speech, and he fielded a few tough questions and gave good answers.  There was also the obligatory funny video featuring a couple of dweebs - I found it embarrassing because I think Bill G can dance better than me.  Oh well, better stick to my day job.
 
Jim Alchin provided a great demo of Vista, which I also hadn't seen since the 1st preview.  It was awesome.  I may try installing it on a spare PC I have at home (Nic - found a use for it!).
 
In the afternoon we split into our product groups and I saw YABPOTS (Yet another bloody demonstration of Team System) plus another funny video.  And then Don Box and Dharma Shukla re-presented their PDC session on WinFx, including the W*F stuff - Windows Presentation/Communication/Workflow Foundations.  Don Box is hilarious and it was a great session. 
 
Prediction:  WinFx (and the Workflow Foundation in particular) is going to fundamentally change the way you write applications. But, you don't need to worry about it for a little while yet.
 
There was a few announcements of new services and products, but NDA prevents me giving any details.  However, I think it's ok to say that Microsoft are listening very closely to feedback from the community - via things like the Product Feedback site and MVP's - and you will soon see some great innovations that will improve your life as a developer.  If you have a message for Microsoft, use your MVP's to get it through - that's what we are here for!
 
My hotel is great, the people are great, Seattle is lovely (although weather looks like its going to pack up) and being in the company of so many "famous" people is slightly daunting.
 
Overall, I'd say the 1st day and a half has been pretty good.  Tomorrow also looks interesting, with a couple more sessions and another party.  It's tough, but I'll struggle through :}
 
Friday, September 30, 2005 4:13:28 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General  | 
# Monday, September 26, 2005
My Next Car by peter@jonesie.net.nz
I'm in Frankfurt today.  I was walking around town, wondering where to go and found myself following a large group of people all heading in the same direction.  I ended up at the IAA (?) Auto show.
 
All I can say is wow!  Iv'e never done one of these before but always wanted to.  Darryl/Sean/Nigel, if your listening - the next TechEd should be more like a car show!  Especially the girls everywhere :}
 
Anyway, I found several cars that would do nicely as my next car, but I think this is the best one:
 
The first person to tell me what it is wins it!  Yeah you wish.
 
There was also lots of cars like these ones:
 
and:
 
and some weird and wonderful stuff:
 
Monday, September 26, 2005 4:36:20 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [1]   General  | 
# Sunday, September 18, 2005
Travelling by peter@jonesie.net.nz
I'm off for a trip today.  First stop, a week in Johannesburg to install the first cut of our .Net 2.0 system for the customer, and to do some training.  Then an overnight stopover in Frankfurt and 5 nights in Seattle where I'll be attending the MVP Global Summit.
 
The system I'm delivering to our South African equivalent, ATNS, is a fairly standard 3 tier app, using SQL 2K, a web service wrapper around the data tier and a winform front end.  The system is not quite complete yet, but this will be our first roll-out of a .Net application. I'm not expecting any nasty surprises, but just in case, I'm traveling with 2 notebooks and copies of the source code and binaries on each and CD, plus all the tools I might ever need - MSDN disks, RedGate tools, VS05 beta 2 and August CTP, 12 pairs of socks etc etc.  On the way over I need to complete the training documentation - it's a 20 hour flight via Singapore so as long as I can power either of the notebooks on the flight, I should be ok.
 
I wasn't so sure about the MVP Summit.  I first thought this might be a bit of a talk-fest but given some of the recent announcements at PDC, I now think it will actually be very interesting.  Paul Andrew has old me he is presenting a session, not doubt on WWF and there's a bunch of Aussies and other Kiwis also attending.  I've also arranged to meet with my TAP contact on Team System product group.  I don't think I'll be bored!
 
Now all I need is a connection so I can update my blog.  The AirNZ Lounge at Christchurch doesn't have any visible connections - wired or otherwise -so I suspect I'll have to update in Singapore.
Sunday, September 18, 2005 12:36:23 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General  | 
# Friday, September 16, 2005
Here's a small review of some tools I've been using lately for SQL Server work.
RedGate SQL Bundle Developer Addition
RedGate produce a number of must have tool for any serious SQL Server developer or DBA.  These come seperately or in bundles.  I purchased the Developer bundle. With this you get SQL Compare, SQL Data Compare, SQL Packager, DTS Compare and the API to use these tools programatically.
SQL Compare
For my current project I have 2 copies of the database, 1 for day to day development and the other for testers.  When I release a new version for testing, the test database needs to be updated but the testers get snarky if I drop and replace it as they lose all there lovely test data.  This is where SQL Compare comes in.
 
SQL Compare lets you select 2 databases and compare the schema and other objects.  After you select the relevant databases it compares the 2 versions and displays the differences.
 
 
With this window you can see the differences for each object and even the scripts necessary to synchronise from one to the other. Object types include tables, procs, functions, users & roles.  You can synchronise all selected objects directly to the database or via Query Analyser.
 
SQL Compare works very well in most cases but I did have one problem with a table that I added a non-null column to.  The generated update script was unable to add this column to the destination table as there was already existing records. It was easy enough to fix this problem myself but I would have hoped it could ask me for a default value for the column.
 
Overall, SQL Compare is a tool I use several times a week.  If I was a DBA or specialist SQL developer I imagine I'd be using it much more.  My advice is if you do any serious SQL Server work then you MUST have this.
SQL Data Compare
SQL Data Compare performs a similar job as SQL Compare except on table data.  After selecting the 2 databases, you select the tables and columns to compare.  You can also select the comparison key to use.
 
After comparison you can view the record differences and scipts.
 
 
You can then synchronise the selected tables directoy to the database or to a script.
 
I use this tool to make sure our deployed database it setup correctly but it's also great for debugging data issues.  If I was a DBA or had to manage a large application database then I'm sure I'd use it a lot more.  Either way, this is another MUST have tool.
 
SQL Packager
SQL Packager is used to create an installation program for your database. It generates a .Net executable or C# project that will create a new database or upgrade an existing one.  I'm more than happy with the executable it spits out as we don't need to create a shrink wrapped setup, so I haven't looked at the code it generates.  The executable lets you select the database server and other creation options for the database, but the UI is a little basic and bland. However, this is much more preferable than using a script or creating your own installer from scratch. 
Summary
I haven't had a chance to look at the DTS Compare or the API yet and it's not likely I ever will. Overall, I'd say that this is a great set of tools for anyone using SQL Server for application developement or support.  If any part of your job entails DBA type work then you simply MUST have them.
 
The price of the tools seems a little expensive to me but I suspect I will be getting lots of use from it.  The Developer Bundle cost us $US1238 including 12 months support and upgrades.  You can purchase the normal bundle minus SQL Packager and the API or other bundles or individual tools.
 
For more information see http://www.red-gate.com
 
 
Friday, September 16, 2005 10:01:44 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [2]   General  | 
# Thursday, September 15, 2005
The secret project that Paul Andrew has been working on is Windows Workflow Foundation. It was announced at PDC yesturday.  This could be a very cool technology - I will certainly be using it for a few applications. I just wish it was not so far away from full release.
 
I created my own worklow engine a couple of times and on the face of it I wasn't too far off what MS have done.  However I didn't have a team of hundreds so there was no nice designers or languages behind it. 
Thursday, September 15, 2005 12:24:59 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General  | 
# Friday, September 02, 2005
Looks like Paul is busy these days with something new and exciting.  Checkout his post on PDC & some upcoming MSDN Web Casts.  This also explains Chris's hectic schedule over the next month.  I sense an announcement or two coming out of PDC.  :}
 
It's great to see some local talent on a global platform.  Show your support and watch the web casts (live at 3am probably!)

Friday, September 02, 2005 9:15:22 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General  | 
# Thursday, September 01, 2005
I have a large dataset that is exposed to the client via a web service.  At the server end I have extended the dataset to include methods that fill it via TableAdapters, e.g:
 
namespace MyWebService.MyDataSet {
    public partial class MyDataSet : DataSet {
 
        public void FillEmployees() {
            EmployeeTableAdapter eta = new EmployeeTableAdapter();
                    eta.Fill(this.Employee);
            }
    }
}
 
On the client side I have extended the proxy version of the dataset to add methods to rows and tables to manipulated data contained therein.
 
namespace MyProxy.MyDataSet {
    public partial class MyDataSet : DataSet {
 
        public List<MyDataSet.SomeRow> GetListOfEmployeesByName(string name) {
        // blah
      }
    }
}
 
I have a few methods that I need at the client and server end.  It would be nice to have this code in a shared library and just wrap this in the dataset partial class, e.g:
 
// ws version
using MyDataSet.Shared;
namespace MyWebService.MyDataSet {
    public partial class MyDataSet : DataSet {
 
      public List<MyDataSet.SomeRow> GetListOfEmployeesByName(string name) {
          MyDataSetHelper helper = new MyDataSetHelper();
          return helper.GetListOfEmployeesByName(this, name); 
      }
    }
}
 
// proxy version
using MyDataSet.Shared;
namespace MyProxy.MyDataSet {
    public partial class MyDataSet : DataSet {
 
            public List<MyDataSet.SomeRow> GetListOfEmployeesByName(string name) {
          MyDataSetHelper helper = new MyDataSetHelper();
          return helper.GetListOfEmployeesByName(this, name);     
      }
        }
}
 
// shared code
namespace MyDataSet.Shared {
    public class MyDataSetHelper {
            public List<MyDataSet.SomeRow> GetListOfEmployeesByName(MyDataSet ds, string name) {
          // blah
      }
  }
}
 
 
But this wont work because of the the different name spaces.  What I really need it a generic helper:
 
 
// shared code
namespace MyDataSet.Shared {
    public class MyDataSetHelper {
            public List<R> GetListOfEmployeesByName<T,R>(T ds, string name) {
          // blah
      }
  }
}
 
And I use this in the proxy and server code thus:
 
 
// ws version
using MyDataSet.Shared;
namespace MyWebService.MyDataSet {
    public partial class MyDataSet : DataSet {
 
      public List<MyDataSet.SomeRow> GetListOfEmployeesByName(string name) {
          MyDataSetHelper helper = new MyDataSetHelper();
          return MyDataSetHelper.GetListOfEmployeesByName<MyDataSet, MyDataSet.SomeRow>(this, name);     
      }
    }
}
 
// proxy version
using MyDataSet.Shared;
namespace MyProxy.MyDataSet {
    public partial class MyDataSet : DataSet {
 
            public List<MyDataSet.SomeRow> GetListOfEmployeesByName(string name) {
          return MyDataSetHelper.GetListOfEmployeesByName<MyDataSet, MyDataSet.SomeRow>(this, name);     
      }
        }
}
 
In some simple scenarios this might actually work, but if MyDataSetHelper.GetListOfEmployeesByName() needs to manipulate MyDataSet properties then I need to have a constraint on the generic so it knows what members it has, e.g:
 
namespace MyDataSet.Shared {
    public class MyDataSetHelper {
            public List<R> GetListOfEmployeesByName<T,R>(T ds, string name) where T : MyDataSet {
          // blah
      }
  }
}
 
But then we are screwed again because MyDataSet is in 2 different namespace and you can only have a constraint on a single base class.  I could however set the constraint on DataSet, e.g:
 
namespace MyDataSet.Shared {
    public class MyDataSetHelper {
            public List<R> GetListOfEmployeesByName<T,R>(T ds, string name) where T : DataSet {
          // blah
      }
  }
}
 
And then I'd have to use untyped methods on the dataset within the helper method and I wouldn't be able to use typed methods.
 
So, basically, the only solution is to include all the methods on the server dataset and create my own proxy to used a shared library where this is implemented.
 
Or maybe you have another solution?  Or maybe I've just confused you more than I confused myself?

 

Thursday, September 01, 2005 3:26:19 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [1]   General | Visual Studio  | 
Copyright © 2010 Peter G Jones. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: