in

ASP.NET Weblogs

Philip Rieck

Phil in .net

October 2003 - Posts

  • gSOAP 2.3.8, and you do care.

    From Dave Bettin - gSOAP 2.3.8:

    We are pleased to announce the gSOAP 2.3.8 stable release for C and C++ Web services: ** Support for ANSI C and C++, including STL and templates
    ** Full support for SOAP 1.1 and 1.2
    ** Full support for WSDL 1.1 (WSDL document import and generation)
    ** Proven interoperability (including all SOAP encoding types, SOAP sparse arrays, bitmasks, and Schema simpleTypes and complexTypes)

    Why do you care about a C++ soap library on sourceforge, oh ASP.net blogger?  Indigo will work with this. This will work with Indigo .  With IBM proving interoperability with MS, with BEA working on full interoperability, and with open source actively producing specification-compliant libraries, this means that producing truely interoperable services is within your grasp - and in fact may be very easy to grab.  As your services are easier to consume and consumable by more people and technologies, the value of those services goes up.  And producing value is what it's all about (note that I didn't say revenue - value).

    So cheer when Java has a library implementing advanced WS-* standards.  Cheer when open source libraries are produced that can generate and consume services... Don't dispair that that asp.net loses value when other technologies can do the same thing - being able to interoperate adds value, and makes asp.net and .net in general an easier choice for the enterprise.  This means that your boss will be more receptive when you contend that .net wins in other areas and should become your tool of choice.

     

  • Don Box deletes Powerpoint, takes notes in code

    After the fun PDC Session where the Indigo Panel sings "Give Soap a Chance", Don is giving a talk which is his "last chance" to talk to us all. Since he has no powerpoint anymore ( it was deleted last session in a fit of power-point overload rage) he is taking notes in code. I like it, this is very succinct:

    /*
    Indigo Connector = {Port, Channel, Message, Service};
    */
    

    Giving the concept that the Indigo connector model consists of only four concepts. Can you guess what they are?

  • Monad

    Monad (an unfortunate codename from greek philosophy meaning "indivisible unit") has me excited. It's the "new command shell" from MSFT. You may have heard of it by now, some have said "like unix"... I think I'll say it's "like a .net shell".

    How so? Think classes passing objects from one to the other, perhaps giving a UI, taking input, or performing actions - all in managed code (.net). Hmm, you say, isn't that like any application? Yes! One exception only - you string together the classes (called "commandlets") that will get executed at the command line, passing in attributes for each class, and implicitly giving the order in which to execute them.

    get/process | sort "handles"  | out/xml
    

    Okay, perhaps not excatly right syntax, but pretty close. What this will do is instantiate an object of the managed class that (with attributes) says it provides the commandlet get/process. It will then call special methods on that class, and pass the output object (in this case an array of System.ProcessInfo objects) to the next object - the one that provides "sort".

    Awesome. simply awesome. The ease of extensibility for us .net developers is great. Option processing and validation is provided by the shell, and not by the commandlet developer. I can't wait to learn more.

  • Ask the experts .. a wonderful community move

    One of the things that Microsoft is now doing really, really well is getting the community of developers involved. Part of that is blogs, part is gotdotnet, part is just Scoble... and a small but really cool part is the PDC ask the experts.

    I had the great fortune to have Jeffrey Schlimmer sit down next to me with a churrito in hand and chat with Dave Bettin and myself about web services, Indigo, WSE and wsdl. It's great to know that a person like that is working on ws-policy and wsdl. Great chat, and perhaps we convinced him to blog a bit more...

    He did mention that the new spec for WSDL is no longer known as WSDL 1.2, (although it was published as such), but is now "the spec formerly k.." no, I mean it's now known as WSDL 2.0. As he said "we didn't just turn some knobs like the new soap spec, we added new knobs and removed old ones..." It needed a new major version

    He also mentioned the work with IBM and other (unnamed) companies, and I'm very happy to see that they are working for complete interop. To Jeffrey, Thanks!

  • Lorem Ipsum backfires in ironic manner.. film at 11

    Don Box is pointed to the Lorem Ipsum page by Nikhil...

    Hoax or not, many people use Lorem Ipsum text to keep people from being distracted by real text.  It's supposed to stop things like these in a graphic layout design session:

    • A business stakeholder interrupting the session saying “those figures aren't right... Sam always produces more than one million sales per year!“..
    • A user not listening to the demo because he's interested in the text you copy-pasted into the main content area from slashdot
    • And other equally annoying interruptions / problems stemming from people not focusing on the purpose of the meeting / presentation, and instead being distracted by a trivial “space-filler“

    So we use “Lorem ipsum dolor sit amet...” (see the page for further details). 

    But beware!... True story - In demos to different groups of users of different products (but in the same company) that used Lorem Ipsum, a comment was shouted out - “Cool! - our new site will automatically translate text - look, they have it in french!” (or italian, and even one spanish).    This caused me to have to stop and explain that no, our site does not translate text - and then have to discuss the prioritization of that now critical feature. 

    I now explain the “fake text“ used in the demo before showing a single screenshot.

     

     

     

  • Longhorn available to non-PDC

    To those of you not at the PDC, reliable sources (?) say that Longhorn will be available as a public beta (for an undisclosed small fee) in November, and to MSDN subscribers in December.

    I wonder if this means that PDC-attending MSDN subscribers will see two different builds of the beta.  That seems like pretty quick turn-around for creating distributions, but it would be great - give me early bits, and keep the updates coming!  It's great that as a developer I get to see what I'll be writing software for soon (very soon for me), but not if what I get changes in major ways before release, and I never see the updates that are happening.

    I wonder if the delay from public to MSDN is so that prolific copying by subscribers does not remove the need for the public to register and pay a small fee?

  • PDC ... so much to do, and so little time - go faster, time!

    The human aggregator, says this:

    Sorry I'm a little light on the blogging. Got tons going on preparing for the PDC.

    I have nothing to do with the PDC, other than attending -- and I have lots to do. I can't imagine having to prepare for a 7000 attendee conference, and blog 20-30 posts per night.  Wow. 

    Sometimes I don't think I have enough time to prepare properly, but I still want the week to zoom by faster than it is.  What could an attendee possibly have to do, you ask?  Well, when you're paying for the PDC from your own pocket (and my wife is happy about it), you want to get as much as possible out of it.... so I want to:

    • Memorize all WS-* specs.  Okay, maybe not memorize, but know really, really well.
    • Clear up lots of space on my laptop for cool bits.  I'll probably repave and make sure to install VirtualPC
    • Research what's been leaked or said about Yukon.  I'm stoked.
    • Prepare the TabletPC.  I have an Acer TM C110, so my main concern is the external DVD drive (it has no internal drives)... it needs to be powered by AC to work. Portable, no. I think I have a solution, but I'm not sure - hopefully I don't have to bee the geek that takes a laptop and a Tablet to the PDC. (I would only have to fear Techno-Bill, then!).  I would also like to put some cool toys on it to demo to the unwashed masses that don't have Tablets yet (they will. They may not know it yet, but they will). However, I also want to leave lots of space on it for... cool bits.
    • Do my job. Yes, I have to pay the bills, too - most notably, the bill for the PDC
    • Oh, and see my wife and son, maybe

     

  • Why you MUST use Option Explicit... er, Strict

    I'm not all that against VB.NET, but I'll be honest -- I normally cringe when going to a client site that uses it exclusively.  The reasons are many and varied, but most of the time my fears are groundless... But one thing that gives me night terrors is seeing VB.NET projects with Option Strict not turned on.

    Back in the days of VB6, those people wishing to write second-rate and error-prone code had the nifty switch called “Option Explicit” - To simplify it, we'll say it's a compiler switch that said “Error the compile if variables aren't explicitly declared before use”.   It stopped you from saying Dim Abcde as Integer on one line, and DoSomething(Abce) on another.  I can't tell you the number of times I'd get handed code, turn Option Explicit on in a file and immediately have the build break.  Yikes!  Never once was there an acceptable reason to do this. (One person did start in on performance nit-picks - don't let me get started).

    The best part was that the great (no sarcasm, VB6 was, and a great tool for many purposes) people who brought us VB6 turned the option off by default for what I imagine was compatibility reasons.  So most people never turned it on, and many of them turned out poor-quality code (I don't know what's cause and what's effect here, did great developers turn it on, or did turning it on make developers great? My bet is more the latter than the former, but I'm sure it helped to catch errors at compile-time)

    Now we have Option Strict ( I don't need to explain all of what it does, this is the web - I link ) Which restricts implicit type conversions.  It also verifies that functions have return types and all paths return a value -- all things that that the C# compiler always verifies.  It's a performance helper(by elimitating hidden type conversions), catches lots of possible errors, and is generally a must... but again, it's off by default (AAARGH!).  I'm sure the reasons for that are many and good, but.... AAARGH.

    Why is it a must?  Well, I've been fixing lots of code, and here's something I must have fixed four times, just this week - a bug that can be very subtle and hard to track down without Option Strict.

    Public Function Something(Arg1 as AnEnumType) As SomeObject
       Select Case Arg1
          Case AnEnumType.A
              Return New SomeObject(1)
          Case AnEnumType.B
              Return New SomeObject(2)
          Case AnEnumType.B
              Return New SomeObject(3)
       End Select
    End Function

    Why is this bad? Well, what if I add a new enum to AnEnumType, say AnEnumTypeD... what gets returned? Nothing, that's what.  And when you just know that a code path has to return an object this can be fun to track down.  There are lots of other cases where this happens, involving catch blocks that don't rethrow but cause the return to be skipped, If's with no Else's, and so on, but they're all bad.

    So please, code with Option Strict on -- if you start with it off, it can be hell to go “strict-ify” your code later.  Us poor slobs who have to add features later will sure appreciate it.

  • Your baby is ugly

    One of the hardest things about being a contractor is working with smart developers who have transitioned to a new technology and don't understand it.  Many of them (not the best ones) think that they are doing great with the approaches and code they have.  Lord forbid you tell them otherwise.

    A few contracts ago I ran into this in a major way.  The lead developer was in way over his head but couldn't be given any advice at all -- if you softened it up, he ignored it. If you pushed it, he pushed back... if you argued it he let you go (and did, to three contractors who agreed that changes should be made).   Sure, we've all done the thing where you give it to them as their idea, but sometimes nothing seems to work.

    My consulting company is owned by a great woman with lots of tech industry savvy.  Just lately she gave me the phrase for it: "You can't tell someone their baby is ugly, no matter how you disguise the statement".  And it can be very true.  No matter how many people laugh at the pictures behind their back, it will never be ugly to a parent

    I was just thinking about this today - my code was under the gun for a poor class design.  Yes, it was an ugly design, but I found myself defending it for a bit longer than I should have.  Looking at what was come up with I know that the new design is much cuter... er, better... but I still can't shake the feeling that we didn't nurture my baby quite enough.  

    Now when I come across this development attitude, I'll realize just how hard it can be to shake for either party.  Perhaps the next proud parent of a hideous monstrosity will get a bit more sympathy from me.  Or perhaps I'll just show the pictures to others for cheap laughs.

  • VB.net operator overloading, static methods

    Came across this this evening:

    A brief description of the Operator Overloading feature.
    [Cameron's Visual Basic Blog]

    And liked what I read.  VB.NET gets what it's needed from day one (if you ask me); the ability to consume overloaded operators.. Being able to create operator overloads is a great bonus. Not that ClassName.op_Addition(left, right) is so bad to type, but... it's ugly.

    While we're on it, it really exposes one of the things I hate (perhaps irrationaly) about VB.net - using static methods from an instance variable.  I'm sure that this is one of those things that now can never change (“it would break code“, they say), but I certainly consider it a mistake.  What does this mean:

    Dim inst As Foo = New Foo
    inst.prop = 1
    inst.SMethod()
    inst = Nothing
    Foo.SMethod()
    inst.SMethod()

    If you ask me, it means that I'm going to be explaining what "shared" subs are to a bunch of people. I've lost count of the number of times I've seen a class with only Shared methods instantiated because that's what the developer thought they had to do to call methods on it.. After all, when I see the inst.SMethod() call, don't I have to use New on inst in order to prevent a NullReferenceException? VB.net and the Shared concept would probably be easier to teach (and learn) without this feature.

More Posts Next page »