Scott Hanselman

PDC Day 2.5 - The Rotating Restaurant

October 28, 2003 Comment on this post [0] Posted in PDC
Sponsored By

Chillin' at the top of the Westin with Shawn Wildermuth (ADO Guy), Michele Bustamante, Christian Weyer, Clemens Vasters, and Cathie Gero.  Best pretzels in L.A. 
Scott Hanselman - Corillian Corp
scott@corillian.com
--------------------------
Sent from my BlackBerry Wireless Handheld

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Tablet PC scoop

October 28, 2003 Comment on this post [2] Posted in
Sponsored By

I'm at an undisclosed location with the Avalon Team and given the light of some new information, I'm (and you) should wait a month before buying a TabletPC.  The new Toshiba will have 128megs of Video RAM.  I'd like to have my TabletPC support Longhorn, and this was just the information I needed.
Scott Hanselman - Corillian Corp
scott@corillian.com
--------------------------
Sent from my BlackBerry Wireless Handheld

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

PDC - Day 2 - WSV303 - Indigo, Using XSD, CLR Types and Serialization in Web Services

October 28, 2003 Comment on this post [4] Posted in Longhorn | PDC | ASP.NET | XmlSerializer | Tools
Sponsored By

I'm here sitting with Rory in the Xml Serialization talk being given by the legendary Doug Purdy.  Doug's quite a good speaker and very funny.

Lengendary? Why?  Well, not only is he responsible for the goodness that is the XmlSerializer, he's also responsible (or he knows the guy who is) for this undocumented switch:

      <ADD value="1" name="XmlSerialization.Compilation" />

If you add this to a .config file (for your AppDomain) you'll get some temporary files in c:\documents and settings\local settings\\temp.  Try it.  Run some serialization code and checkout the .CS file(s) that are created.  Very damn useful.  This works today with .NET.

But I'm here to hear about new versions of stuff.  Here's some new things about XmlSerialization in the Whidbey version of .NET.

  • There's a tool called SGEN that will “NGEN” your serialization code. That way you don't need to take the initial hit when the Serialization Assembly is emited.  You can basically ship it with the code.
  • Adding support for Generics to the Serializer, both open generics and instatiated generics
  • Support for Extensibility around Schema Importing
  • SqlType support
  • The BinaryFormatter is Version Tolerant
  • Here's some new Attributes:
    • [OptionalSerializable] - Does just what you'd think.  Makes a field optional, and consequently helps you deal with Version changes between Object Heirarchies

Here's what's going on with XmlSerialization in Indigo (after Whidbey, in Longhorn):

  • The Serializer is now in the Core
  • Architecture of the CLR, not just “tacked on“
  • A Tale of Two Type Systems
    • Act One: Whidbey
      • Mapping XSD into the CLR is very challenging, including mapping some of the concepts that exist in XSD that just don't in the CLR
      • Mapping from the CLR to XSD is fairly straightforward
      • CLR to CLR is really easy
    • Act Two: Indigo
      • Big Conclusion - Serialization is different than Xml Programming.  Developers don't think about the format on the wire.  They want the CLR to fix it for them.
      • New stack: XmlFormatteer consiting of Serialization Engine -> Extensibility -> Xml Processing - Representations
      • XmlBinaryReader and XmlBinaryWriter being introduced
      • Allow the developer to express the data contract for a given type Explicitly
      • [DataMember] lets you markup any member and include it into the Data Contract.  It doesn't care about accessiblity.  That means you can mark something private or internal and if it's marked with [DataMember] then it gets serialized.
      • Cool...you can have two totally “different“ CLR types, perhaps one has a private something with a property accessor and another version has the same “semantic“ member but it's public.  You can mark them up with DataMember to make the contract with the serializer the same so the objects will serialize the same.
      • WHY IS THIS IMPORTANT: You can serialize one CLR object from one Assembly and deserialize it into another totally different implemenation (a totally different CLR type).  As long as we both agree on the contract, we can use the same underlying data representation.  Yum.
  • Existing Types continue to work, but you get loose coupling and version resiliance

Doug said he woke up this morning hoping the sky would be Indigo.  It wasn't.  But one day...

P.S. I forgot to mention that Christian Weyer can lift Rory with ease.  If he were Austrian, he could be a governor.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

PDC - Day 2 - CLI302 Avalon Design Time Support

October 28, 2003 Comment on this post [1] Posted in PDC | XML
Sponsored By

Here's a sample of some XAML that's being written on the screen in CLI302.

<FlowPanel>
   <Text Height=”150px” Width=”75px”>1</Text>
   <Text Height=”150px” Width=”75px”>1</Text>
   <Text Height=”150px” Width=”75px”>1</Text>
</FlowPanel>

Feels like the different layouts that I used to do in Java AWT, but as XML and without all the dancing to get it to display right. 

One thing i'll give Microsoft, is that they have been exceeding thoughful about who is going to use this stuff and how their minds work. 

Remember when you first wrote C# and felt a connection with your lizard brain?  As if this language was the language of your own neurons?  That's what XAML feels like for UI.  Standing on the shoulders of giants and reaching back to the lizard brain, if I may mix metaphors.

 

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

PDC - Day 2...

October 28, 2003 Comment on this post [0] Posted in PDC | ASP.NET | XML | Web Services | Tools
Sponsored By

I'll blog as interesting things happen.  There's a thousand interesting things going on here, so it's hard to break it all down into sound bites.  But I guess that's what makes blogs better than typical media, right? Fewer sound bytes.

Indigo is great, no doubt.  Clemens puts it best:

Indigo is the successor technology and the consolidation of DCOM, COM+, Enterprise Services, Remoting, ASP.NET Web Services (ASMX), WSE, and the Microsoft Message Queue. It provides services for building distributed systems all the way from simplistic cross-appdomain message passing and ORPC to cross-platform, cross-organization, vastly distributed, service-oriented architectures providing reliable, secure, transactional, scalable and fast, online or offline, synchronous and asynchronous XML messaging.

But, being a Web Services guy, and being deep in the muck of WS-*.* for the last several months I was confident that this would work itself out. 

What I'm really digging on (as you should be) is Avalon.  I will say this once:

The ramifications of putting Microsoft's weight behind a vector based composition engine can't be overestimated.

I've been all about SVG for a while, as has Patrick Cauldwell.  He's worked on declarative UIs using Adobe's SVG tools.  The Early and Adopter guys have a great explanation about Avalon and how it works.

Here's why I think it's so significant.

Today, when you sit down to write a WinForms app, you do your “File|New Project|WinForms Project” and there's a little section created for InitializeComponent() and then they hide it in a Region. They even put a little comment there to warn you from messing around.  Something like:

//Good luck to you if you edit this and piss off the Designer.

And when you open the little hiding region you see:

this.components = new System.ComponentModel.Container();
this.Size = new System.Drawing.Size(300,300);
this.Text = "Form1";

Isn't this fairly declarative?  It's really just saying, “Hey, here's how it oughta be“ or “Make it like this.“ 

You wouldn't expect to see if statements or for loops in here.  It's just a lot of C# (or VB.NET) code that lays out the Form.  Golly wouldn't it be cool if we could borrow another declarative language, maybe a markup language, preferrably an extensible one. :)  So, they take all that InitializeComponent stuff and move it out to another Source File.  Except this source file is a XAML file instead of C#. 

Imagine the ramifications of this on designers.  The people that we think of today as UI Developers may not be the people who drag buttons onto a Form in 2005-6.  You know how developers always say, “I'm a lousy UI Developer“?  I say, let the designers do that.  The guys that make UI now will write UI interaction code in the future, and interface with XAML files that will be created by Macromedia This or Adobe That.  It brings the ASPX and CodeBehind model to Windows Smart Clients.

Since the forms can almost entirely expressed with XAML, this could usher in a new era in design, with ACTUAL DESIGNERS and lots of 3rd party design tools saving XAML files.  Note that when Adobe showed the Adobe AfterEffects demo in the keynote, all they had to do was add an export plugin to their app to create XAML.  They didn't even need a new app!

Also, it creates a single markup for UI development that is independant of VB.NET and C#.  Now, I overheard some folks saying, “Oh, they just generate the same C# from that XAML file, so really nothing's changed.”  Kind of a simplification, but so what?  That's the whole point of declarative programming models like that.  WHO CARES WHAT THEY DO WITH THE XAML, as long as it brings up a usable UI?  If it's Code Gen, some interpreter, or Black Magic, it's all good.

The last thing that's cool about having a declarative markup for UI development is how it complements the concept of partial classes.  Versions of .NET > 1.1 will have support for a single “logical class definition” being spread across multiple files.  What the means is that the XAML file and the C# file ARE THE SAME CLASS just spread across two files (who also happen to be in different languages.)

It's pure sex.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.