Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Discussions

William Kempf wkempf
  • WPF: Another darned revolution

    1.  I can't believe the number of developers who complain about learning new technology.  I've yet to run into the tech that takes me more than a few weeks to be productive using it.  Maybe not an expert, but productive.  For instance, there was nothing radically new in .NET 2.0 (granted, I come from a strong C++ background, so generics are just a new twist on an old concept), and so I was productive with it in less than a couple of days playing around with the new stuff.

    2. WPF, for the most part, makes developing UI applications so much easier than anything we've had in the past, that even if it took you 3 months to become productive with it, it would be 3 months well spent.  Seriously, I've created a lot of functionality in under 2 days of effort with zero knowledge of the platform.  It can be frustrating when you run across something you know should be simple (and it turns out that it is) but you have to spend a few hours spelunking the usenet and even the code (this is .NET) to figure it out.  But I'm still amazed by what I've been able to do with such little effort, while still feeling like I'm in control (something the VB guys of yesteryear don't seem to understand).

    3.  This particular guy has written a rant that we're propogating through the blogosphere, but he wrote it on a topic that he admits to having zero knowledge of.  Shame on everyone who links to this drivel.  I don't care how smart the guy is, or how much experience he has, if he's based his opinion purely on things he's read (probably by other's doing the same thing) and not be spending even 5 minutes of actual work with WPF, well, his opinion isn't worth the digital space it's taking up.

  • C# to VBish in .NET 3.0?

    phreaks, you're not only showing ignorance, but zealotry as well.

    There's nothing about var that leads to a "code smell" (and I'm quite aware of this concept, thank you).  There's nothing unreadable about the code, if you don't write the code to be unreadable.  And this is true of every "feature" in every language... I can write very unreadable code using current C# idioms/syntax.

    Anyone who abuses "var" by using it for all declarations (about the only way to create "code smells" here) deserves to be shot, but the fault lies with the coder, not the language construct.  In fact, the semantic requirements go a long way towards enforcing this, if you'd care to read what I wrote, or the numerous documents on this, or even just try it out with live code.

    When used appropriately, the code is extremely easy to read, no comments necessary.  And since they are necessary, and not syntatic sugar... you'll just have to get used to it.

    Oh, and I can argue quite strongly that true variant types aren't "code smells" either.  I'll agree to the type unsafety being "bad", but note the quotes here.  There are a LOT of languages that don't do strong typing, where the developers have written huge amounts of code that is quite maintainable.  No "code smells" here.  And in fact, the flexibility leads to some very powerful coding idioms.

  • C# to VBish in .NET 3.0?

    "It stinks" can be valid, but in this case you're basing it on zero knowledge of the concept, and it shows.

    var is not a variant.  It's strongly typed from declaration.  You can't reassign it to a different type.  You can't declare it with out assigning it (because it couldn't deduce the type).  You can't use it anywhere but in local scope (you can't even return it from a function).

    var x; // illegal

    var x = 10;

    x = "foo"; // illegal

    In most situations, var would be syntactical sugar, and might be considered a bad idea.  But it's MANDATORY for anonymous types.

    var x = new { Value = 10, Name = "foo" }; // Anonymous type

    Anonymous types may not seem to make much sense at first, but they are quite necessary for queries in LINQ.

    var q = from c in db.Customers, o in c.Orders
       where c.City == "London"
       select new { c, o };

    If you think that the whole LINQ concept is flawed, you should do more research on it before you form your opinion.  Unifying the concept of queries will be very beneficial in so many ways, that I think this is the most exciting tech to come out of MS in quite some time.

  • any plans to make C# more dynamic in future?

    I thought all of the changes coming in C# 3.0 were already revealed. "var" keyword, lamdas, expressions, etc.  Nice new features, but they don't make C# dynamic in the sense that object's can have features added to or removed from them at run time.

    BTW, all of those new features are available today in the LINQ CTP.

  • salvo fired by Java! C#: Is the Party Over?

    Mono is supposed to be supported on AIX.

    As for the libraries... not really relevant.  For every library that's MS specific, there's an alternate, portable, library.

  • salvo fired by Java! C#: Is the Party Over?

    Antitorgo wrote:
    

    Using C# to try and get people to defect to VC++? What crack is this guy smoking? Is he even a developer?

    My language preference in this order:
    C#
    VC++
    Java
    VB.NET

    I wonder what his response is to things like IronPython and RubyCLR? http://www.eweek.com/article2/0%2c1895%2c2001143%2c00.asp

    To me, the JVM party is what is over. The CLR has it beat in so many ways... I just wish it ran on more platforms. Wink



    Name a platform it doesn't run on that Java does.

    There are some MS specific libraries missing, but the CLR is complete in Mono (as well as other's) and runs pretty much every where Java will.

  • Practicing My Vista Salute

    DarthVista wrote:
    
    wkempf wrote: STFU.

    And moderators, Vista, even in his new incarnation, is a troll that's hurting the community and putting a black eye on MS.  Ban him NOW!
    What in the world. I'm talking about putting together a community program and you flip your lid!



    No, you are trolling.  And at this point I suspect you are not really a MS proponent, but rather an undercover OpenSource/Linux troll.  Regardless if that's the case, or if your just hugely demented, you are a troll that needs to be banned yesterday.

  • Practicing My Vista Salute

    STFU.

    And moderators, Vista, even in his new incarnation, is a troll that's hurting the community and putting a black eye on MS.  Ban him NOW!

  • Why is WPF so complicated?

    Which is the worst way to define the styling, and why CSS exists in the HTML world.  XAML goes somewhere in the middle.  You can specify all of the look in the declaration, as you show, or you can separate it out in styles and templates, which happen to still be XML with very similar syntax instead of a seperate concept like CSS.

    Comparing CSS to XAML styles/templates there things to like and dislike about both.  I prefer the XAML syntax (and complete control, which you can only get with CSS by using XBL, which adds yet more complexity), but I miss a lot of the CSS selectors.

    But back to your actual point, I still don't see the complexity in XAML.  Having done a lot of HTML/CSS, and even more XUL/CSS/XBL, the things I've done in XAML so far have been MUCH easier to do... at least once you know how.  There is a learning curve, as with everything else.  But the learning curve so far has been much less than what I went through for HTML/CSS and especially XUL/CSS/XBL.  And all of those are superior to Win32/WinForms and other traditional UI toolkits.  Declaritive markup for UIs vastly simplifies a lot of what I do.

  • Why is WPF so complicated?

    In you're first example, what you have is dynamic styling.  IOW, in response to an event you modify some attributes (usually related to the visual presentation) on the control.  In this case, the all XAML approach is the most appropriate, and "reusing code" is straightforward.  You design a template and apply it to all controls of a given type or to individual controls.  This is superior for numerous reasons to the HTML/JavaScript example.  Of course, as pointed out, you also have the option of doing it in a code behind event handler, the same as you'd do with HTML/JavaScript.

    Your second example isn't a styling thing.  You're doing more than setting some attributes.  In this case, you're going to have to go down the code behind route, and as I just said, this means code reuse is identical to your HTML/JavaScript example.