ChrisAn beat me to it: Uri vs Strings


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Last night I caught up on a 50+
message thread over one of our design aliases with many of the “big dogs” on the
WinFX team vehemently disagreeing. It is the issue of href="http://www.simplegeek.com/permalink.aspx/95710b54-71ac-4a76-9136-142e801297a1">Strings
vs. Uri instances.  Honestly, I
don’t know where I personally come down on this one yet. style="mso-spacerun: yes">  I am a huge, huge fan of making
developers lives easier – anything we can do to push work ON developers at
Microsoft that takes works OFF out customers is goodness to me. style="mso-spacerun: yes"> That is, after all, the point of the
framework. "urn:schemas-microsoft-com:office:office" />


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I mean, do we gain a lot by making
developers type


style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Foo (new Uri (“ href="http://foo.bar.com”)/">http://foo.bar.com”)) style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> rather than style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Foo (“ href="http://foo.bar.com/">http://foo.bar.com”) style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">? style="mso-spacerun: yes"> Can you imagine the number of new Uri()
calls there will be in reasonable Indigo code? style="mso-spacerun: yes"> This not a performance argument, as the
2nd option will undoubtedly just create a Uri instance to validate
the argument.  It is simply a
question of developer satisfaction.


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> 


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">On the other hand I have a sneaking
feeling (no, I am sure) I don’t really appreciate the effect of pushing this
work on MS developers… Are we just leading developers into a pit of despair by
using strings for Uris?   style="mso-spacerun: yes"> Will FxCop and design guidelines be
enough to keep us out of trouble?  I
just don’t know… yet 😉


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> 


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Please comment on href="http://www.simplegeek.com/commentview.aspx/95710b54-71ac-4a76-9136-142e801297a1">Chris’s
blog so we have it all in the same place as the debate internally
continues.

Comments (0)