Rockford Lhotka

 Wednesday, May 28, 2008
tech_summit_logo_sm Magenic is holding a full-day, two-track mini-conference on June 20.
That is just 3 weeks away, but there are still some open seats, so reserve yours now!

Our first keynote speaker is Jay Schmelzer, GPM of the RAD tools group at Microsoft. He'll be talking about the future of RAD tools (Visual Studio and more).

Our second keynote speaker is me, Rockford Lhotka. I'll be talking about the future of CSLA .NET and CSLA Light, a version of CSLA that will run in Silverlight.

The rest of the day is divided into two tracks for a total of 8 high-quality technical sessions. This will be a full day of hard-core technical content and fun!

This FREE event is being held in Downers Grove near Chicago, IL. It starts at 8:30 AM, we're providing lunch, and the event runs through to a reception at the end of the day at around 5 PM.

If you'd like an invitation to attend, please email info@magenic.com.

Click here more information about the event

Wednesday, May 28, 2008 10:36:55 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, May 27, 2008

Sue, my wife's best friend, and mother of my goddaughter, was diagnosed with breast cancer late last year. Fortunately they caught it early and with surgery and radiation she beat the cancer. It was a rough period of time, but she got through it.

Sue has convinced my wife to do a three day, 60 mile, Walk for the Cure this fall. It is a fundraiser for cancer research, and a worthy cause. I would think there must be better ways to raise money than to walk 20 miles a day for three days, but apparently not...

Here's my wife Teresa's post about the walk, including links to a web site where people (you perhaps?) can donate to the cause.

In fact, just to make it as easy as possible, here's the direct link to the donation page.

I rarely post personal items on my blog, preferring to keep it focused on cool technical stuff. But cancer is such an important issue. Sue beat it through good fortune and perseverance. My mother is living in an ongoing battle against a different type of cancer. A battle that appears unwinnable, and which has altered our lives dramatically over the past few years.

Any help in raising money for this cancer research effort is most appreciated! Thank you!

Tuesday, May 27, 2008 9:36:26 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, May 21, 2008

OK, this is really cool: http://www.devfish.net/articles/inbetween/

It appears that Microsoft, having reserved the convention center for the two weeks of Tech Ed (Dev week and IT Pro week), is allowing the user groups in the region to take advantage of the idle space in the intervening weekend. That is so cool!!

But now, to be fair, Microsoft should provide two days of conference center space and AV in <insert your city here>, don't you think? :)

Wednesday, May 21, 2008 8:12:30 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, May 20, 2008

I was just in a discussion about ClickOnce with several people, include Brian Noyes, who wrote the book on ClickOnce.

I was under the mistaken impression, and I know quite a few other people who have this same misconception, that ClickOnce downloads complete new versions of your application each time you publish a new version. In fact, I know of at least a couple companies who specifically chose not to use ClickOnce because their app is quite large, and re-downloading the whole thing each time a new version is published is unrealistic.

It turns out though, that ClickOnce does optimize the download. When you publish a new version of your app, all the new files are written to the server, that is true. But the client only downloads changed files. All unchanged files are copied from the previous install folder on the client to the new install folder on the client.

In other words, all unchanged files are reused from the copy already on the client, and so are not downloaded again. Only changed files are downloaded from the server.

The trick to making this work is to only rebuild assemblies that have actually changed before you do a publish. Don't rebuild unchanged assemblies, because that could change the assembly - and even a one byte change in the assembly would cause it to be downloaded because the file hash would be different.

Saying that gives me flashbacks to binary compatibility issues with VB6, but it makes complete sense that they'd have to use something like a file hash to decide whether to re-download each file.

Tuesday, May 20, 2008 9:00:29 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, May 13, 2008

Magenic is holding a full-day, two-track mini-conference on June 20. We have put together a great lineup of speakers and topics, including 2 keynotes and 8 sessions. This will be a full day of hard-core technical content and fun!

The event is being held in Downers Grove near Chicago, IL. It starts at 8:30 AM and runs through to a reception at the end of the day at around 5 PM.

The event is by invitation only - specifically invitation by one of Magenic's sales people. If you are already a Magenic customer and you'd like an invitation, please contact your Magenic AE and let them know. If you are not a Magenic customer please email info@magenic.com and let us know you'd like an invitation.

The event is free, and includes both lunch and a reception at the end of the day. You are responsible for any travel expenses involved in getting to the event. Magenic is arranging a block of rooms at a nearby hotel with special pricing and ground transportation between the conference and hotel.

The following link has more information about the event
http://www.magenic.com/Default.aspx?tabid=1225

Tuesday, May 13, 2008 7:45:53 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Thursday, April 24, 2008

Dunn Training has been offering a very good 3 day class on CSLA .NET for some time now, with lots of great feedback. And this class continues (with a sold-out class coming up in Toronto).

As a compliment to that class, Dunn is now lining up a bigger and deeper 5 day master class. The plan is to have just two of these each year.

This master class is quite different from the 3 day class. It will have more lecture, deeper labs and a faster pace. They tell me the intent is to cover everything from OO design to CSLA object creation to WPF/Windows/Web/WCF/WF interface design to LINQ in one intense week.

Not only will this be the ultimate in CSLA .NET training, it'll be some incredibly awesome training on .NET itself!!

Thursday, April 24, 2008 2:45:39 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, April 23, 2008

I spent some time over the past few days using my prototype Silverlight serializer to build a prototype Silverlight data portal. It is still fairly far from complete, but at least I've proved out the basic concept and uncovered some interesting side-effects of living in Silverlight.

The good news is that the basic concept of the data portal works. Defining objects that physically move between the Silverlight client and a .NET web server is practical, and works in a manner similar to the pure .NET data portal.

The bad news is that it can't work exactly like the pure .NET data portal, and the technique does require some manual effort when creating the business assemblies (yes, plural).

The approach I'm taking involves having two business assemblies (VS projects) that share many of the same code files. Suppose you want to have a Person object move between the client and server. You need Person in a Silverlight class library and in a .NET class library. This means two projects are required, even if they have the same code file.

Visual Studio makes this reasonable, because you can create the file in one project (say the Silverlight class library) and then Add Existing Item and use the Link feature to get that same file included into a .NET class library project.

I also make the class be a partial class, so I can add extra code to the .NET class library implementation. The result is:

BusinessLibrary.Client (Silverlight class library)
  -> Person.cs

BusinessLibrary.Server (.NET class library)
  -> Person.cs (linked from BusinessLibrary.Client)
  -> Person.Server.cs

One key thing is that both projects build a file called BusinessLibrary.dll. Also, because Person.cs is a shared file, it obviously has the same namespace. This is all very important, because the serializer requires that the fully qualified type name ("namespace.type,assembly") be the same on client and server. In my case it is "BusinessLibrary.Person,BusinessLibrary".

The Person.Server.cs file contains the server-only parts of the Person class - it is just the rest of the partial class. The only catch here is that it can not define any fields because that would obviously confuse the serializer since those fields wouldn't exist on the client. Well, actually it could define fields as long as they were marked as NonSerialized.

Of course you could also have a partial Person.Client.cs in the Silverlight class library - though I haven't found a need for that just yet.

One thing I'm debating is whether the .NET side of the data portal should just directly delegate Silverlight calls into the "real" data portal - effectively acting as a passive router between Silverlight and the .NET objects. OR the .NET side of the data portal could invoke specific methods (like Silverlight_Create(), Silverlight_Update(), etc) so the business developer can include code to decide whether the calls should be processed on the server at all.

The first approach is simple, and certainly makes for a compelling story because it works very much like CSLA today. The Silverlight client gets/updates objects in a very direct manner.

The second approach is a little more complex, but might be better because I'm not sure you should blindly trust anything coming from the Silverlight client. You can make a good argument that Silverlight is always outside the trust boundary of your server application, so blindly passing calls from the client through the data portal may not be advisable.

Either way, what's really cool is that the original .NET data portal remains fully intact. This means that the following two physical deployment scenarios are available:

Silverlight -> Web server -> database
Silverlight -> Web server -> App server -> database

Whether the web/app server is in 2- or 3-tier configuration is just a matter of how the original .NET data portal (running on the web server) is configured. I think that's awesome, as it easily enables two very common web server configurations.

The big difference in how the Silverlight data portal works as compared to the .NET data portal is on the client. In Silverlight you should never block the main UI thread, which means calls to the server should be asynchronous. Which means the UI code can't just do this:

var person = Person.GetPerson(123);

That sort of synchronous call would block the UI thread and lock the browser. Instead, my current approach requires the UI developer to write code like this:

var dp = new Csla.DataPortal();
dp.FetchCompleted +=
  new EventHandler<Csla.DataPortalResult<Person>>(dp_FetchCompleted);
dp.BeginFetch<Person>(new SingleCriteria<int>(123));

with a dp_FetchCompleted() method like:

private void dp_FetchCompleted(object sender, Csla.DataPortalResult<Person> e)
{
  if (e.Error != null)
    // e.Error is an exception - deal with the issue
  else
    // e.Object is your result - use it
}

So the UI code is more cumbersome than in .NET, but it follows the basic service-calling technique used in any current Silverlight code, and I don't think it is too bad. It isn't clear how to make this any simpler really.

Wednesday, April 23, 2008 8:08:36 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, April 22, 2008

Yes, I'm a comic book collector :)

FREE COMIC BOOK DAY 2008 - MAY 3RD 2008

FCBD LogoIt seems that every year FREE COMIC BOOK DAY gets bigger and bigger and it looks like this year is going to be no exception! It's a great opportunity to introduce someone new to the world of comic books! Over 2.5 million comic books will be given away this year. In addition, this year is featuring the widest variety of Free Comic Book Day Comics ever! Support your local comic book store and grab some family and friends and get some free comic books and a great time!

www.FREECOMICBOOKDAY.COM

Tuesday, April 22, 2008 1:08:03 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, April 21, 2008

Shannon Braun and I were interviewed by Jeff Brand, the Twin Cities .NET Developer Evangelist for Microsoft. Jeff does a podcast titled Spaghetti Code, and we discussed our experiences at the MIX 08 conference earlier this spring.

http://www.slickthought.net/post/Spaghetti-Code-Podcast---Recapping-MIX-with-Rocky-Lhotka-and-Shannon-Braun.aspx

Monday, April 21, 2008 7:14:22 AM (Central Standard Time, UTC-06:00)  #    Disclaimer