tag:blogger.com,1999:blog-295346942024-03-07T01:25:34.734-05:00Bender's BlogWhatever is on the top of the stack.Unknownnoreply@blogger.comBlogger77125tag:blogger.com,1999:blog-29534694.post-28496912982739220242008-02-23T22:23:00.003-05:002008-02-23T22:28:28.276-05:00This is not the blog you are looking for....I have upgraded to SubText! You can find this blog now at <a href="http://jamescbender.com/">http://jamescbender.com</a><br /><br />For those of you still getting this via RSS fieed, you're obviously not using the feedburner feed since I'be already switched that over. To switch, point your reader at <a href="http://feeds.feedburner.com/BendersBlog">http://feeds.feedburner.com/BendersBlog</a><br /><br />I'm not moving all the old posts (probably just the recent WCF ones), so this blog will continue to operate, but there will be no new content.<br /><br />See you on the other side.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-29534694.post-2280049346968948752008-02-22T10:58:00.002-05:002008-02-22T11:05:42.339-05:00How "WCF Guy" packs<p>So, <a href="http://brianhprince.blogspot.com/">Brian Prince</a> is leaving our company for Microsoft, and he's not the only one packing his stuff! Just so happens this is happening at a time when the whole company is moving to swanky new digs on the other side of the freeway.</p><p>Trust me, it's nicer than it sounds.</p><p>By way of documenting this, Brian has started a little Meme; how does <insert characteristic of you choice>guy pack.</p><p>I got tagged as the WCF guy (naturally) so I started thinking about how a WCF guy would pack. I quickly realized that I would probably want to do as much of it in configuration as possible.</p><p>Enjoy!</p><pre class="code"><span style="color:blue;"><?</span><span style="color:#a31515;">xml </span><span style="color:red;">version</span><span style="color:blue;">=</span>"<span style="color:blue;">1.0</span>" <span style="color:red;">encoding</span><span style="color:blue;">=</span>"<span style="color:blue;">utf-8</span>"<span style="color:blue;">?><br /><</span><span style="color:#a31515;">configuration</span><span style="color:blue;">><br /> <</span><span style="color:#a31515;">system.PackingModel</span><span style="color:blue;">><br /> <</span><span style="color:#a31515;">activities</span><span style="color:blue;">><br /> <</span><span style="color:#a31515;">activity </span><span style="color:red;">name</span><span style="color:blue;">=</span>"<span style="color:blue;">packing</span>" <span style="color:red;">behaviorConfiguration</span><span style="color:blue;">=</span>"<span style="color:blue;">packingBehavior</span>"<span style="color:blue;">> <br /> <</span><span style="color:#a31515;">container </span><span style="color:red;">address</span><span style="color:blue;">=</span>"<span style="color:blue;">sittingOnADolly</span>"<br /> <span style="color:red;">binding</span><span style="color:blue;">=</span>"<span style="color:blue;">box</span>"<br /><span style="color:red;">bindingConfiguration</span><span style="color:blue;">=</span>"<span style="color:blue;">providedMovingBoxes</span>"<br /> <span style="color:red;">contract</span><span style="color:blue;">=</span>"<span style="color:blue;">IHoldsYourCrap</span>"<span style="color:blue;">/><br /> </</span><span style="color:#a31515;">activity</span><span style="color:blue;">><br /> </</span><span style="color:#a31515;">activities</span><span style="color:blue;">><br /> <</span><span style="color:#a31515;">bindings</span><span style="color:blue;">><br /> <</span><span style="color:#a31515;">box</span><span style="color:blue;">><br /> <</span><span style="color:#a31515;">binding </span><span style="color:red;">name</span><span style="color:blue;">=</span>"<span style="color:blue;">providedMovingBoxes</span>"<span style="color:blue;">><br /> <</span><span style="color:#a31515;">material </span><span style="color:red;">plastic</span><span style="color:blue;">=</span>"<span style="color:blue;">true</span>"<span style="color:blue;">/><br /> <</span><span style="color:#a31515;">port </span><span style="color:red;">mode</span><span style="color:blue;">=</span>"<span style="color:blue;">flipOpenTop</span>"<span style="color:blue;">/><br /> <</span><span style="color:#a31515;">transport </span><span style="color:red;">mode</span><span style="color:blue;">=</span>"<span style="color:blue;">onADolly</span>"<span style="color:blue;">/><br /> <</span><span style="color:#a31515;">security </span><span style="color:red;">mode</span><span style="color:blue;">=</span>"<span style="color:blue;">hopeNobodySeesAnythingTheyWantAndTakesIt</span>"<span style="color:blue;">/><br /> </</span><span style="color:#a31515;">binding</span><span style="color:blue;">><br /> </</span><span style="color:#a31515;">box</span><span style="color:blue;">><br /> </</span><span style="color:#a31515;">bindings</span><span style="color:blue;">><br /> <</span><span style="color:#a31515;">behaviors</span><span style="color:blue;">><br /> <</span><span style="color:#a31515;">packingBehaviors</span><span style="color:blue;">><br /> <</span><span style="color:#a31515;">behavior </span><span style="color:red;">name</span><span style="color:blue;">=</span>"<span style="color:blue;">packingBehavior</span>"<span style="color:blue;">><br /> <</span><span style="color:#a31515;">breakableProtection </span><span style="color:red;">bubbleWrapEnabled</span><span style="color:blue;">=</span>"<span style="color:blue;">true</span>"<span style="color:blue;">/><br /> <</span><span style="color:#a31515;">containerReturn </span><span style="color:red;">returnContainer</span><span style="color:blue;">=</span>"<span style="color:blue;">true</span>"<br /><span style="color:red;">fineIfNotReturned</span><span style="color:blue;">=</span>"<span style="color:blue;">$45.00orSomething...</span>"<span style="color:blue;">/><br /> <</span><span style="color:#a31515;">bubbleWrapReturn </span><span style="color:red;">returnBubbleWrap</span><span style="color:blue;">=</span>"<span style="color:blue;">true</span>"<br /><span style="color:red;">fineIfNotReturned</span><span style="color:blue;">=</span>"<span style="color:blue;">20Bucks?!</span>"<span style="color:blue;">/><br /> </</span><span style="color:#a31515;">behavior</span><span style="color:blue;">><br /> </</span><span style="color:#a31515;">packingBehaviors</span><span style="color:blue;">><br /> </</span><span style="color:#a31515;">behaviors</span><span style="color:blue;">><br /> </</span><span style="color:#a31515;">system.PackingModel</span><span style="color:blue;">><br /></</span><span style="color:#a31515;">configuration</span><span style="color:blue;">></span></pre><br /><a href="http://11011.net/software/vspaste"></a>I apologize for the weird layout. I'm in the process of making some "major" changes to accommodate stuff like this in the future.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-29534694.post-29935861263979508242008-02-14T11:45:00.001-05:002008-02-14T11:45:07.608-05:00Is There Something I'm Missing Here...?<p>So, I guess as much as I hate to admit it, it looks like HD-DVD has lost and Blu-Ray has won. HD-DVD fought hard, but in the end Blu-Ray  had enough money to <strike>bribe</strike> "create synergies" with all but two of the major movie studios. Add to that the one-two punch from Best Buy and Netflix this week and it looks like it's all over. Frankly, I was hoping the war would just stalemate until the next big thing, probably streaming media, came in and crushed both with one blow.</p> <p>So what we end up with is admittedly a technically superior format, however one that is controlled by one party: Sony.</p> <p>Now that the war seems to be over, I'm seeing a lot of people posting on various on-line forums that prices of players will be coming down.</p> <p>Wait.</p> <p>As is my understanding Blu-Ray is controlled by Sony. Companies that want to make said hardware pay a licensing fee to Sony to use the Blu-Ray technology. No matter who you are, if you want to make a Blu-Ray disc player you have to pay Sony. This creates a situation where there is one company that controls creation and distribution of a product. </p> <p>So, what incentive does Sony have to lower the prices? They are the only game in town, and could charge whatever they want. Now, I know that Sony isn't going to do something stupid like price themselves out of the market, and I don't begrudge them the right to make whatever they feel they deserve out of their creation. But seeing as they just spent a ton of money to "synergize" with all these studios, I don't see how the this is going to translate into lower prices for Blu-Ray players.</p> <p>Am I wrong here? I hope I am because I can't see myself paying $300 for a Blu-Ray player. And yes, I know the Play Station 3 plays Blu-Ray movies and games. I barely have time to use the XBox I have, I don't need (or really want) another gaming console.</p> <p>On the plus side, the HD-DVD fire sales have already begun. If you're a movie collector now might be the time to pick up an HD-DVD player and some movies on the cheap.</p> Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-29534694.post-3339963990039505672008-02-11T09:07:00.001-05:002008-02-11T09:07:44.256-05:00Making WCF "Behave" - Part Two<p>If you read my <a href="http://benders-blog.blogspot.com/2008/02/making-wcf-part-one.html">last post</a>, you should have a pretty good idea of how Behaviors fit into the WCF stack and know that they have the ability to effect the runtime <em>behavior</em> (clever, huh) of your WCF host and/or client runtime by effecting the communication between dispatchers. If you missed this post, go ahead a read it now, I'll wait.</p> <p>Done? Good.</p> <p>In this post we are going to focus on service side behaviors (I'll cover client side behaviors soon). </p> <p>Before we start slingin' code, it important to understand where the extensibility points for WCF behaviors are. On the service side there are two classes you can attach behaviors to. That are the System.ServiceModel.Dispatcher.DispatchOperation and the System.ServiceModel.Dispatcher.DispatchRuntime. Within each of these are properties that take a specific kind of interface which will be implemented by our custom behavior. Here is a quick guide to which property of which class takes which kind of interface.</p> <p>DispatchRuntime</p> <ul> <li>MessageInspectors takes IDispatchMessageInspector </li> <li>InstanceContextProvider takes IInstanceContextProvider </li> <li>InstanceProvider takes IInstanceProvider </li> <li>OperationSelector takes IDispatchOperationSelector </li> </ul> <p>DispatchOperation</p> <ul> <li>ParameterInspector takes IParameterInspector </li> <li>OperationInvoker takes IOperationInvoker </li> <li>Formatter takes IDispatchMessageFormatter </li> </ul> <p>Each property/interface pair performs a specific function in the WCF plumbing. Some are pretty obvious based on their names, others are not. I'll cover these in more detail in my upcoming seven part series "Better Know A Dispatcher Behavior."</p> <p>If that doesn't make a whole lot of sense yet don't worry. As we work with behaviors just refer back to it and it will start to make sense</p> <p>OK, enough theory, lets write some code!</p> <p>Here we have an extremely basic WCF service:</p> <blockquote> <p>[ServiceContract] <br />    public interface IHelloWCF <br />    { <br />        [OperationContract] <br />        string Hello(string name); <br />    } </p> <p>    public class HelloWCF : IHelloWCF <br />    { <br />        public string Hello(string name) <br />        { <br />            return String.Format("Hello {0}", name); <br />        } <br />    }</p> </blockquote> <p>This is hosted in a console application:</p> <blockquote> <p>class Program <br />    { <br />        static void Main(string[] args) <br />        { <br />            using (ServiceHost host = <br />                new ServiceHost(typeof(HelloWCF))) <br />            { <br />                host.Open(); </p> <p>                Console.WriteLine("Service is available."); </p> <p>                Console.ReadLine(); </p> <p>                host.Close(); <br />            } <br />        } <br />    }</p> </blockquote> <p>As you would imagine, you call this service by passing in a name, like "James" and get a warm greeting from the service ("Hello James") as you can see below:</p> <p><a href="http://lh5.google.com/James.C.Bender/R7BWpVe_87I/AAAAAAAAAEQ/xbfEwrVwksQ/image7"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="173" alt="image" src="http://lh4.google.com/James.C.Bender/R7BWqFe_88I/AAAAAAAAAEY/mac2lpdf-jA/image_thumb3" width="424" border="0" /></a> </p> <p>We're gonna have a little fun here with a behavior based on the IDispatchMessageInspector. We are going to write a behavior to return a different message. The first step is to create a new class which implements this interface:</p> <blockquote> <p>public object AfterReceiveRequest(ref Message request, <br />    IClientChannel channel, <br />    InstanceContext instanceContext) <br />{ <br />    return null; <br />} </p> <p>public void BeforeSendReply(ref Message reply, <br />    object correlationState) <br />{ <br />    return; <br />}</p> </blockquote> <p>As you can see, there are two methods where we need to provide implementations for. AfterRecieveRequest gets fired when a message is coming into your service. You can take this opportunity to examine and change the message if need. Today we are more concerned with the BeforeSendReply method. As the name suggests this method gives you an opportunity to change the outgoing message. The above implementation will compile and work, but it doesn't do much. Let's change that:</p> <blockquote> <p>public void BeforeSendReply(ref Message reply, <br />    object correlationState) <br />{ <br />    MemoryStream memoryStream = new MemoryStream(); <br />    XmlDictionaryWriter xmlDictionary = <br />        XmlDictionaryWriter.CreateBinaryWriter( <br />        memoryStream); <br />    xmlDictionary.WriteStartElement("HelloResponse", <br />        "<a href="http://tempuri.org/" );?=");?">http://tempuri.org/");</a> <br />    xmlDictionary.WriteStartElement("HelloResult", <br />        "<a href="http://tempuri.org/" );?=");?">http://tempuri.org/");</a> <br />    xmlDictionary.WriteString <br />        ("Ha ha! I stole your message!"); <br />    xmlDictionary.WriteEndElement(); <br />    xmlDictionary.WriteEndElement(); <br />    xmlDictionary.Flush(); </p> <p>    memoryStream.Position = 0; </p> <p>    XmlDictionaryReaderQuotas quotas = <br />        new XmlDictionaryReaderQuotas(); </p> <p>    XmlDictionaryReader xmlReader = <br />        XmlDictionaryReader.CreateBinaryReader <br />        (memoryStream, quotas); </p> <p>    Message newMessage = <br />        Message.CreateMessage(reply.Version, <br />        null, xmlReader); <br />    newMessage.Headers.CopyHeadersFrom(reply.Headers); <br />    newMessage.Properties.CopyProperties <br />        (reply.Properties); <br />    reply = newMessage; <br />}</p> </blockquote> <p>The first section of code uses an XmlDictionaryWriter to create the new message body we are going to be sending back. It creates our message text, which is wrapped in a Result, which in turn is wrapped in a Response. The next section creates an XmlDictionaryReader which is used in the last section to "read" the XML we just created into a new blank WCF message. We copy the headers and properties from the original, then set the "reply" reference parameter to our new message. That's it. </p> <p>Well, that's not it. He have our behavior, but right now we don't have any way to bind it to our service runtime. To do that we have to have our class implement the System.ServiceModel.Description.IEndpointBehavior. There is an interface for operation behaviors as well, but we'll worry about those at another time.</p> <p>Here is how we implement the IEndpointBehavior:</p> <blockquote> <p>class MyCustomMessageFormatter : IDispatchMessageInspector, <br />    IEndpointBehavior <br />{</p> <p>    public void AddBindingParameters( <br />        ServiceEndpoint endpoint, <br />        BindingParameterCollection bindingParameters) <br />    { <br />        //Not implemented <br />    } </p> <p>    public void ApplyClientBehavior( <br />        ServiceEndpoint endpoint, <br />        ClientRuntime clientRuntime) <br />    { <br />        //Not implemented <br />    } </p> <p>    public void ApplyDispatchBehavior( <br />        ServiceEndpoint endpoint, <br />        EndpointDispatcher endpointDispatcher) <br />    { <br />        endpointDispatcher.DispatchRuntime. <br />            MessageInspectors.Add(this); <br />    } </p> <p>    public void Validate( <br />        ServiceEndpoint endpoint) <br />    { <br />        //Not implemented <br />    } <br />}</p> </blockquote> <p>Of the four methods added the one we are really only concerned with right now is the ApplyDispatchBehavior. This method is called when this endpoint behavior is applied by the runtime and it is being used here to add our message inspector (which just happens to be the same class) to the stack. You could have this endpoint behavior implemented in a separate class and have it add multiple dispatch behaviors all at once. This allows you to aggregate several dispatch behaviors into one endpoint behavior.</p> <p>We're almost there now, we just need to bind our new behaior to our endpoint. First we'll do it in the hosting logic (below in bold):</p> <blockquote> <p>class Program <br />{ <br />    static void Main(string[] args) <br />    { <br />        using (ServiceHost host = <br />            new ServiceHost(typeof(HelloWCF))) <br />        { <br />            <strong>host.Description.Endpoints[0]. <br />                Behaviors.Add( <br />                new MyCustomMessageFormatter());</strong> </p> <p>            host.Open(); </p> <p>            Console.WriteLine("Service is available."); </p> <p>            Console.ReadKey(); </p> <p>            host.Close(); <br />        } <br />    } <br />}</p> </blockquote> <p>Now, when we run the service we can see the effects of our new behavior:</p> <p><a href="http://lh3.google.com/James.C.Bender/R7BWq1e_89I/AAAAAAAAAEg/ZnjsFCiKYuc/image11"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="161" alt="image" src="http://lh6.google.com/James.C.Bender/R7BWrle_8-I/AAAAAAAAAEo/1yo1KJBvZl4/image_thumb5" width="426" border="0" /></a> </p> <p>Pretty easy! In part three I'll show how to add this behavior to the service through configuration instead of the hosting code shown above.</p> Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-29534694.post-59261825904785194092008-02-07T19:40:00.001-05:002008-02-07T19:40:04.506-05:00THANK YOU OMAHA, GOOD NIIIIGHT!<p>Even though I've hemmed and hawed about it for at least six months, I have yet to purchase either Guitar Hero or Rock Band. The primary reason being that I know if I do it's just going to make me feel guilty about neglecting the six <em>real</em> guitars I already own.</p> <p>So I was thrilled today when I saw that a company called <a href="http://gametank.com/">Game Tank</a> announced a game called <a href="http://www.guitarrising.com/">"Guitar Rising"</a> Basically, if you ever playing Rock Band or Guitar hero and thought "This would be cooler if I could use a real guitar." than this game is for you.</p> <p>The way it seems to work,from the video, is that you will have the familiar "piano roll" type of interface you get with guitar hero, except instead of just having you press a specific button it shows you which string and fret combination to hit. You will be plugging your guitar into the computer somehow (sound card? USB interface? MIDI interface?) and the game will let you know how accurate you are.</p> <p>To me, this is more than a game, it's a powerful teaching tool. It's more effective than sitting in a practice room with a metronome, and easier than getting a whole band together to practice whenever you want (what do you mean sleep, I wanna jam!).</p> <p>Some things that I think would be great in this game:</p> <ul> <li>Amp modeling. Presumably you are going to have to plug your guitar into this thing somehow. Line 6 has already show that PC based amp and effect modeling is possible. It would be cool to be able to not only practice the songs by your favorite band, but to do it with the same "rig" that they are using.</li> <li>Composition mode. Basically, a type of "musical notepad" that would allow you to "dictate" notes into a song WHILE showing you the piano roll of what you have played. A lot of players try to do this with tape, but lack the "ear" to be able to figure out what they played afterward. </li> <li>I have a small mountain of sheet music I have collected over the years. A great feature would be the ability to somehow transcribe the sheet music into songs in the game. This would make practice much more rewarding!</li> </ul> <p>Suffice to say, unless there is some HUGE barrier to this game (huge price tag, need to "mutilate" one of my guitars, requirement that you wear spandex while playing) I am TOTALLY getting this! </p> Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-29534694.post-84596119603819113742008-02-04T13:51:00.001-05:002008-02-04T13:51:31.607-05:00Making WCF "Behave" - Part One<p>Some of the most misunderstood features of WCF are behaviors and channels. While these elements of the WCF stack offer a tremendous opportunity to customize the way WCF works, there is the perception (especially with channels) that it involves a lot of  "down to the metal" coding the requires an in-depth understand of of how communication stacks and network protocols work. While this knowledge would be helpful in any distributed computing paradigm, they are hardly required knowledge for extending WCF.</p> <p>There is also a tendency to confuse behaviors and channels. While on a conceptual level these two types of objects are similar in that they effect communication  in some manner, they do so in different ways.</p> <p>If you read my last post, you may remember that channels live in a stack between the binding and the transport. Therefore we can see that they impact how messages are communicated to a client and vice versa.</p> <p>On the other hand, behaviors control the internal communication of the service by changing the way dispatchers function within the service host. It is fair to say that behaviors change the way the service host functions at runtime, while channels customize the way a particular endpoint communicates with a client. </p> <p>So, a good follow up question is "What is a dispatcher?" </p> <p>Dispatchers are basically traffic cops. The take incoming messages and route them to the appropriate service method. There are three types of dispatchers; channel, endpoint and operation. </p> <p>Channel dispatchers receive messages from the channel stack. The channel dispatcher examines the address the message was sent to and sends it to the appropriate endpoint dispatcher. The endpoint dispatcher examines the action header of the message, and passes the message to the appropriate operation dispatcher. Finally, the operation dispatcher deserializes the message to get a set of parameters, and uses those parameters to call the method for the selected operation.</p> <p>The use of dispatches in this manner allows us to create custom behaviors to act on endpoint operations by implementing the System.ServiceModel.Description.IEndpointBehavior interface or on an operation by implementing the System.ServiceModel.Description.IOperationBehavior interface. The separation of duties here is important as there are going to be behaviors that we wish to apply to all calls to an operation, in which case we would create an operation behavior, and others that we are only going to want to act on calls made through a specific endpoint, which would necessitate the creation of an endpoint behavior.</p> <p>So, now we have a basic understanding of what behavior are, what they do, and where they fit in the WCF world. Next time we will create a basic custom behavior of our very own!</p> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-29534694.post-77300284842408069572008-01-25T14:10:00.001-05:002008-01-25T14:10:54.091-05:00ENOUGH WITH THE DAMN CODE COVERAGE ALREADY!<p>Whew!</p> <p>Sorry about that, I just need to rant a little...</p> <p>Here's what's got me so upset; TDD is a great cool thing. Everybody should be doing it. It's just the best thing since sliced bread, fluffy puppies and free Wi-Fi as Starbucks all rolled into one.</p> <p>Now, I am NOT a TDD guru by any means. I've read some articles, tried rolling it into my approach and have had great results. I learn a little more everyday, and my understanding increases over time. If you really want to geek out on it you should talk to guys like <a href="http://stevenharman.net/blog/Default.aspx">Steve Harman</a> and <a href="http://jrwren.wrenfam.com/blog/">Jay Wren</a>!</p> <p>But there is an evil specter lurking that is threatening to ruin it all.</p> <p>Code coverage.</p> <p>Well, maybe not code coverage, but the way people with only a passing knowledge of TDD cling to code coverage like it's the last Red Bull in the fridge. The people who don't understand that the point of unit testing is not to increase code coverage at all cost, but to ensure your code does exactly what it is supposed to do; no more and no less.</p> <p>I come not to bury code coverage, it's a perfect way to see what code is being tested, and more importantly what code is not being tested.</p> <p>Here's where I get frustrated with peoples attitudes to code coverage (henceforth referred to at CC because I'm a lazy typist); there is a perception that a high CC number will guarantee quality code. That's simply not the case as you can hide a lot of skeletons behind a big enough door.</p> <p>One "trick" I've seen to increase CC is to simply test EVERY method on the public interface of an object. This sucks. </p> <p>My philosophy is that I really don't care about the individual gets/sets on a class. And to be honest, I don't like explicit tests of public methods on entities either. My belief is that you test the features. If you then find that there are methods and properties on a class that aren't being covered you have two options; either your tests suck or you don't need that property/method. </p> <p>So maybe your tests suck. The best way around that is to make sure you write your tests first, THEN write your code. If you approach your tests like you approach your business requirements (user stories drive unit tests maybe?) and your test are meaningful this shouldn't be a problem, right?</p> <p>Or maybe you don't need the property/method in question. I'm a big fan of pruning classes. If there is a method property on a class that never gets used why keep it? It sits there like a parasite, consuming maintenance costs and provides nothing in return. I say get rid of it! </p> <p>We as developers/architects/information workers/whatever need to educate ourselves, our co-workers and are clients on this. High CC is NOT a panacea! The quality and intelligence of your tests is what ensures you are not developing crap-ware! Please, write your tests first, make sure all the features you develop are well tested. Review your co-workers tests and have them review yours. And if a high CC number is your goal look at what you are testing and don't be afraid to trim unused code!</p> <p>OK, I feel better now. Code on!</p> Unknownnoreply@blogger.com6tag:blogger.com,1999:blog-29534694.post-49566959431033491052008-01-21T09:16:00.001-05:002008-01-21T09:16:53.710-05:00The basics of the WCF stack<p>During CodeMash I did two "Ask the Experts" sessions where it was my intention to talk about WCF, which I've really been "geeking-out" on for several months. In the combined two hours that I "served" I only had one person come in with an issue, and it was really more of a complaint about why he couldn't use WCF. </p> <p>I spoke to him for a few minutes and while his communication needs were not exactly run of the mill, they certainly weren't outside of the scope of WCF, given a few extension to the stack with a custom behavior or a custom channel. </p> <p>After talking to him and a few other people I came to a realization; while there are many people who are using WCF, the vast majority of them don't really know how powerful it is. Most people seem to be content using the out of the box features of creating the normal endpoints. And granted, for 90% of the situations you face those may be fine. </p> <p>But WCF offers a lot more. It is a open and extendable architecture, and with a little knowledge of the stack, what piece does what and how to extend those pieces, you can have almost unlimited power over the universe!</p> <p>OK, I'm exaggerating a little. But you can still do some pretty cool stuff!</p> <p>Lets review the WCF stack. This will provide the foundation for subsequent posts about extending WCF.</p> <p><a href="http://lh4.google.com/James.C.Bender/R5SpU47ooHI/AAAAAAAAAEA/ONumvIEvMbA/Basic%20WCF%20Stack%5B15%5D"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="321" alt="Basic WCF Stack" src="http://lh5.google.com/James.C.Bender/R5SpVI7ooII/AAAAAAAAAEI/0hfNvRVjvjY/Basic%20WCF%20Stack_thumb%5B9%5D" width="416" border="0" /></a> </p> <p> As you can see from the diagram there are a lot of pieces of functionality between your service code and the client. In actuality the client side of the stack also consists of dispatchers, at least one binding, a channel stack and a transport as well. To keep this diagram simple I've aggregated those down to the proxy object that developers use everyday with WCF but keep in mind that these things exist on the client side and the ability to customize WCF extends to that side as well (There are a few things you have to keep in mind with that, more in another post)</p> <p> When a client makes a call to your service, it invokes a method on the proxy. A transport carries the message across a network to the transport on the service side. Between the transport  and the binding element is the channel stack. For an incoming message, each channel on the stack has a channel listener that receives the message from the previous channel (or in the case of the first channel in the stack, the transport) and creates your custom channel object. The custom channel then performs some action, which may or may not be based on the message, and passes it on to the next channel listener in the stack (or the binding element if it's the last channel in the stack). </p> <p>This binding/channel/transport stack is what is know to most WCF developers as and endpoint. When you create an endpoint for your WCF service you are selecting a binding/channel/transport stack to for your service to use to communicate with the world. Your service can support as many endpoints as you wish, each with a unique and independent binding/channel/transport stack.</p> <p>The binding hands the message off to a series of dispatchers. I'll get into these in more details when I discuss custom behaviors, but the three dispatchers that the message passes through in it's way to your service code are the channel dispatcher, the endpoint dispatcher and finally the operation dispatcher. At each one of these dispatchers, behaviors have an opportunity to be invoked. As I'll demonstrate in a future post, while custom channels are responsible for controlling how your service communicates with external applications, behaviors influence how messages are communicated internally to your service.</p> <p>The response from your service back the client is essentially the reverse of the path the request just took; the response is passed through the dispatchers (this time operation, then endpoint and then channel) to the binding. The binding passes the message to the channel stack, however this time the channel listeners have been replaced with channel factories. The transport passes the message to the network where the it is returned to the client via the proxy.</p> <p>With all these steps it's clear to see that there are several opportunities for customization. The ability to create these extensions give WCF it's power to allow unlimited ability to tailor how users consume your service and gives a great amount of flexibility that allows systems on disparate technologies to communicate with each other without having to worry about it at the service layer.</p> <p>Up next, custom behaviors...</p> Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-29534694.post-70825414393428437082008-01-16T20:51:00.001-05:002008-01-16T20:53:12.273-05:00WCF Brain Fart (and why you "need" base addresses)<p>Well, you don't really <em>need</em> them, unless you are using the basicHTTPBinding and want to see the WCF help page. </p><p>Or want to create a proxy from metadata.</p><p>Hmm... OK, maybe you DO NEED base addresses!</p><p>Maybe I should back up.</p><p>The other day I was showing someone how to throw together a quick WCF service hosted in a console application. This was strictly a "Hello World" type of service, and I got everything written and wired up in about 5 minutes. I didn't worry about setting up a metadata behavior or endpoint, just wanted to get the service up an running as fast as I could. I started the app and fired up IE to show the person the WCF help page (a sure sign that it works and I'm brilliant) but instead of the help page I got this error:</p><blockquote><p><faultcode >a:ActionNotSupported</faultcode></p><p><faultstring xml:lang="<b>en-US</b>">The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).</faultstring></p></blockquote><p>That really sucked.</p><p>In my haste, and my eagerness to show how fast and easy it was to get a service up and running, I forgot one minor but important thing; if you want to see the help page, you need to specify the base address if you are using the basicHttpBinding.</p><p>It makes sense; if you don't use a base address, you are sending an HTTP Get to your endpoint. Unless your endpoint knows what to do with it, it throws a fault. The wsHttpBinding is able to handle it, but the basic binding rely's on the Service Host which has some internal functionality that gives you the help page.</p><p>But since you need base addresses to use the service metadata behavior, you're just better off making sure you use it.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-29534694.post-13893500723776300362008-01-11T08:35:00.001-05:002008-01-11T08:37:23.529-05:00Codemash Day 1 part 2<p>After my "Ask the Exports" time, I headed over to see <a href="http://keithelder.net/blog/Default.aspx">Keith Elder</a> talk about Microsoft Workflow. The meat of his presentation can be found <a href="http://keithelder.net/blog/archive/2007/05/12/Part-1-Leveraging-Workflow-Foundation--It-is-just-an.aspx">here.</a> It was an bit of an entry level talk, which I think is desperately needed. There are still a lot of misconceptions out in the Enterprise community about what Workflow is, how it works and how it fits in with things like the .NET framework overall and Biztalk. He's doing an more "advanced" talk later today "custom activities" which I'm looking forward to.</p><p>After that I went to see <a href="http://diditwith.net/">Dustin Campbell</a> do some <a href="http://research.microsoft.com/fsharp/fsharp.aspx">F#</a> stuff. I was playing with F# a bit before my laptop died (Note to Dell, you actually have to plug the fans in for them to cool the laptop down.) I haven't really had time to re-install and get back into it. Dustin's talk was almost SRO; functional programming, F# in particular, seems to be something that has gathered a lot of interest. </p><p>After dinner, I got to play a lot of "Rock Band" with Keith Elder and <a href="http://www.hanselman.com/blog/">Scott Hanselman</a>. Keith is scary good at the "Guitar Hero" type games. Scott claims he's never played the game before, but he did a great job on the drums! As for me... well, have I even mentioned how much "Guitar Hero"is NOT like really playing the guitar...</p><p>... speaking of playing guitar, the "CodeMash jam session" also happened last night. I didn't feel like dragging my rig up (I already got enough shit from Kaufman and Wingfield about my "larger-than-necessary suitcase) and I'm kind of glad I didn't. Most of the group seemed to be older guys with acoustics play country and CSN stuff. I doubt any of them know any "Iron Maiden", "Helloween" or even <a href="http://www.homestarrunner.com/sbemail126.html">"Limozeen</a>!" I'll track Dustin down later and make him a deal for next year; if he brings his stuff, I'll bring mine.</p><p>OK, drink now, more writing later.</p>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-29534694.post-574817638878290362008-01-10T16:01:00.001-05:002008-01-10T16:03:13.363-05:00CodeMash, Day One Part One<p>Well, day one for me got off to a "bumpy" start. I request a wake up call for 7:00 intending to work out, and get downstairs in plenty of time for a little breakfast and the beginning of Neal Ford's keynote. Well, unfortunately, my wake up call didn't arrive till 8:00, so I didn't get to work out, missed breakfast and missed the first few minutes of the keynote. </p><p>One that subject...</p><p>I really dig what <a href="http://www.nealford.com/">Neal Ford</a> is saying about dynamic languages. I've been playing with Iron Python for a little while now and I see a lot of benefit in it, although it's still a bit "rough" in my opinion. If I never end up using it in a production project, it has made me re-think the way I do things in C#. He said something in his presentation that got a little chuckle out of me; compilers are basically weak unit tests and spell checkers. I remember being in school and hearing a lot of my fellow students in the computer lab "I can't understand why it didn't work, it compiled." I didn't think I would hear that after I left school, but I hear it at least once a year from co-workers. He also beat the testing drum, which I'm all for. I really wish this philosophy would catch on more widely in software development. I don't know why, but I'm still surprised when I meet with a client and find out that they have NO unit testing practices in place at all! I've been doing it so long myself, that I can't imagine developing without it. </p><p>From there I went to see Joe O'Brien present "Ruby:Testing Mandatory." I have to admit, I was definitely handicapped here since I have zero experience with Ruby, but I'm always interested in anything that can enhance my test-driven chops (very helpful when I evangelize this to clients). It did get me more interested then I had been in Ruby. I have been playing with Iron Python for awhile now, but I've decided I need to make some time for Ruby as well. </p><p>After that I went to see <a href="http://jrwren.wrenfam.com/blog/">Jay Wren</a> talk about Castle. I've heard a lot about Castle, but never really used it. It was pretty interesting. </p><p><a href="http://www.hanselman.com/blog/">Scott Hanselman's</a> keynote was great! Had a great, funny intro followed by some very cool stuff for IIS 7. I've been playing with IIS 7 for a few months, but clearly haven't even scratched the surface with the HTTP Modules. More stuff to start playing with when I get home.</p><p>Served my first tour of duty in the "Ask the Experts" lounge. It was pretty cool; I didn't get a lot of people coming in for "hard-core" stuff; got one person looking for book recommendations (but that's another blog post), one person who had an interesting challenge which I will blog about later, but for the most part it was kind of an hour and hanging out and talking with <a href="http://catherinedevlin.blogspot.com/">Catherine Devlin</a> and <a href="http://www.darrellhawley.com/">Darrell Hawley</a>. I've never met Catherine, and if I want to continue learning Python, I should definitely start reading her blog. I hadn't seen Darrell in awhile and it was fun to talk to him again.</p><p>Off to the next session. To be continued...</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-29534694.post-1584593912536441092007-11-08T22:08:00.001-05:002007-11-08T22:11:12.155-05:00Sympathy<p>As an unbridled capitalist, I never thought I would be siding with a union of any kind. I've never been a member of a union and have never desired to be. Don't get me wrong, I think there was a time for unions. But we don't have children working in coal mines anymore. And from my point of view the unions have succumbed to the very greed they claim to rail against.</p><p>But as I learn more and more about the Writers Guild of America strike I become more sympathetic to their arguments, but not for the reasons they would like.</p><p>The crux of the complaint is probably best explained by this video the writers of "The Office" posted about the strike.</p><p><object height="355" width="425"><param name="movie" value="http://www.youtube.com/v/b6hqP0c0_gw&rel=1"><param name="wmode" value="transparent"><embed src="http://www.youtube.com/v/b6hqP0c0_gw&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p><p>Some people watch that and see people complaining about their boss screwing them out of pay for extra work. What I see is ANOTHER indication that the Hollywood STILL doesn't "get" the Internet and the change it is going to make in the way media is consumed. They still view it as nothing more than a marketing media, when in reality it is a delivery medium.</p><p>I see the television changing so much in the next five or so years that the concept of a "television channel" will be completely obsolete. It all started with Tivo. I remember the day I got mine (generation one) and it's not an exaggeration to say that it completely changed the way I watched television. I never had to worry about being home in front of the TV when my favorite show started. I'm not what I would call a "TV Junkie" by any means, but there are a handful of shows I really hate to miss. I now longer had to make a choice, or be worried about missing my favorite show. I just knew that at a certain point in time the show would just be on my Tivo for me to watch whenever I wanted. It seems so simple now, DVRs are pretty much everywhere, but it was a big change at the time.</p><p>The next step was the Internet. Well, more specifically it was the widespread available of cheap high-speed access to the Internet. To be honest, I think the only people I know who still use dial-up are my parents! I'm hoping this changes before I arrive for Thanksgiving next week, but I'm not holding my breath.</p><p>Anyway, this wide availability of high-speed Internet made high quality video over the Internet a practical reality. It took iTunes to demonstrate that not only was there a market for this type of media consumption, but that people were even willing to pay for it! Now all the major networks offer (or are preparing to offer) their content (meaning whole shows, albeit with commercials) for download. Products like <a href="http://www.microsoft.com/windowsxp/mediacenter/default.mspx">Microsoft Windows Media Center</a> and <a href="http://www.slingmedia.com/">Slingbox</a>, not the mention the new generation of <a href="http://www.tivo.com/">Tivo</a>, will continue to offer new possibilities for using the Internet as a delivery method of content.</p><p>So, it's really discouraging to hear what is behind this strike. Clearly the networks think of "web content" as a sort of second class form of entertainment. Instead of trying to keep their customers rooted in the past they should be embracing these changes and finding new models to do business in. Instead of fighting this new market they need to find a way to embrace it. Consumers want these things. It's in Hollywood's best interest to provide them.</p><p>And don't get me started on movies!</p>Unknownnoreply@blogger.com6tag:blogger.com,1999:blog-29534694.post-85210226068455967182007-11-05T19:15:00.001-05:002007-11-05T19:18:52.743-05:00A Blast From The Past<p>I had a bit of an unusual assignment from a client last week. I had to find a copy of Visual Interdev. Yeah, that one.</p> <p>  <a href="http://lh3.google.com/James.C.Bender/Ry-yMEW3BVI/AAAAAAAAADw/QMoBL1QSOBM/MS_VStudio6Pro%5B5%5D.jpg"><img id="id" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="349" alt="MS_VStudio6Pro" src="http://lh5.google.com/James.C.Bender/Ry-yMkW3BWI/AAAAAAAAAD4/8uLd380OUqM/MS_VStudio6Pro_thumb%5B3%5D.jpg" width="288" border="0" /></a> </p> <p>The client in question has system that exports information from their common data model into a specialized one depending on client and purpose. Basically it dynamically crates an Access database from scratch and then copies data into it. The problem is that it does all this in VBScript. It's a ton of processing, and it all occurs in the pages life cycle. Understandably, this causes issues when the client has either a lot of data to export, or a complex destination schema. They are running into the inevitable problem now; processes are timing out. </p> <p>The application is a ASP Classic web application written in notepad. For the time it was written, and the tools that were available to the developer, it's a pretty well designed and built application, but it's definitely showing its age.</p> <p>The client wants to convert this to .NET, which I am 100% behind. The problem comes when a client with a system based on old technology wants to simply "convert" the application from one platform to another. The client in question hasn't indicated that this is their mind set, but I've had several clients in the past who have felt I should just be able to run their ASP Classic application through a conversion wizard and be done with it, so I'm mentally getting my ducks in a row if this turns out to be the case.</p> <p>Not only does technology change, but architectural techniques and practices evolve. A design which may have made sense even five years ago can easily be rendered obsolete by changing business needs just as much by advances in technology. </p> <p>The key problem with the current application is that the majority of the heavy lifting takes place in the page life cycle. Doing a "one-to-one" conversion from ASP Classic to .NET will make it run a bit faster, but you still have the underlying problem; the wrong part of the application is doing all the work. Sure, the increased performance may help for a while, but eventually there is going to be more and more data as their client base increases and they are going to have the same problem again. By performing a conversion like this the client is just reinvesting  in the wrong architecture.</p> <p>In this case, it's clearly time for a ground-up redesign of the application.  Clients can often balk at this as on the surface it can present a larger investment; discovery must be done, a design phase is required and it's likely that nothing from the previous version can be salvaged. </p> <p>But this situation also presents a lot potential positives that may sway a client as well. For one thing, the promise of a system that will grow with the business, not require the business to grow around it. An opportunity to overhaul the user experience may be a way to increase productivity. Perhaps your client have been clamoring for services that your current architecture can't support. Now is the time to look into including these and perhaps introducing new revenue streams. There are lots of ways to find ROI (besides just "Oh, it will work better") in situations like these, and it's very important to find these to make the redesign attractive to the client.</p> Unknownnoreply@blogger.com5tag:blogger.com,1999:blog-29534694.post-43699034937703273582007-10-29T09:50:00.001-04:002007-10-29T09:50:43.206-04:00If You're Reading This, It Means I'm Dead<p>That's right, dead-tired of not having my own website!</p> <p>I am now the proud owner of <a href="http://jamescbender.com/">JamesCBender.com</a>, although like the second Death Star, this site is not yet fully operational. However, thanks to the magic of <a href="http://silverlight.net/getstarted" target="_blank">Microsoft Silverlight</a> you will soon be seeing the most elaborate "Under Construction" page the net has ever known!</p>Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-29534694.post-36797231841007476282007-10-20T14:43:00.001-04:002007-10-20T14:45:38.030-04:00Reliable Messaging with WCF at Day of .NET<p>Thanks to everyone who came to my session this morning. I really enjoyed presenting it and hope you all enjoyed it and got some valuable information. I would love to hear from you all in the future about how you are using WCF, and how the information I presented has helped you design your services infrastructure.</p> <p>As promised, here is a link to a zip file with my slide deck and the two demos I presented. If you are running Vista the MSMQ demo will have to be run in Visual Studio running with elevated privileges the first time you use it. This is because, as I pointed out, if the queue it uses does not exist it will try to create it. As I mentioned I DO NOT condone this as a best practice in an actual application, but it made the demo easier.</p> <p>Thanks again for coming out!</p> <iframe style="border-right: #dde5e9 1px solid; padding-right: 0px; border-top: #dde5e9 1px solid; padding-left: 0px; padding-bottom: 0px; margin: 3px; border-left: #dde5e9 1px solid; width: 240px; padding-top: 0px; border-bottom: #dde5e9 1px solid; height: 66px; background-color: #ffffff" marginwidth="0" marginheight="0" src="http://cid-406fd667236b701a.skydrive.live.com/embedrowdetail.aspx/Public/Reliable%20Messaging%20with%20WCF.zip" frameborder="0" scrolling="no"></iframe>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-29534694.post-48580937853883086932007-10-01T14:35:00.001-04:002007-10-01T14:36:27.668-04:00Twittering Away The Day...<p>Last week I attended the <a href="http://www.arcready.com/">Arc Ready</a> event Microsoft hosted here in Columbus. <a href="http://www.joshholmes.com/Default.aspx">Josh Holmes</a> spoke about "Web 2.0" (and no Tim, writing about it in a blog is not that same as saying it, so you can't punch me) and mentioned, among other web sites, <a href="http://www.twitter.com/">Twitter</a>.</p> <p>For those of you who aren't familiar with Twitter, it's been described as 'blogging on crack." In reality, it's a web-based "micro-blogging" service that allows it's users to send frequent, short updates about what they are doing at any particular moment. This can be done via it's web interface, an instant messenger client (Windows Live Messenger is conspicuously absent from the list of supported clients) or from you phone via a text message.</p> <p>I had played with Twitter in the past, but I didn't do much with it. Mostly because I didn't realize how many other people were using it. I also didn't realize that it was accessible via IM, which makes it much more appealing then having to fire up the web page every time I want to "twitter" about something.</p> <p>I'm going to give "twittering" a try over the next couple weeks and see how it goes. </p>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-29534694.post-63937614234614018022007-09-17T19:56:00.001-04:002007-09-17T20:02:50.181-04:00DevCares recap<span xmlns=''><p>Thanks to all the people who came out for my DevCares presentation last Friday in Cincinnati. I had a great time and I hope the material was helpful. It was almost as fun as watching my Browns rack up 51 points on Sunday. <span style='font-family:Wingdings'>J</span><br /> </p><p>Just kidding. But any win for us this year is going to be welcome.<br /></p><p>Anyway, I'm providing a link to the materials as promised. I'm including the "ppt" files for those of you with Office 2007 and slide shows for those of you without. I'm also including the completed solution for the "Custom Channels" presentation.<br /></p><br /><iframe scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:240px;height:66px;margin:3px;padding:0;border:1px solid #dde5e9;background-color:#ffffff;" src="http://cid-406fd667236b701a.skydrive.live.com/embedrowdetail.aspx/Public/Dev%20Cares%2009-2007"></iframe><br /><p>As I mentioned, I will be at the <a href="http://daytondevgroup.net/default.aspx">Dayton .NET Developers</a> next Wednesday the 26<sup>th</sup> presenting <a href="http://www.codeplex.com/servicefactory">Microsoft Patterns and Practices Service factory for WCF</a>. I will also be presenting the <a href="http://www.devcares.com/">DevCares</a> content again in Columbus on Friday September 28<sup>th</sup>. And if you can't just get enough of me, or just want some more .NET goodness, I will be speaking on "Reliable Messaging with WCF" at the <a href="http://www.dayofdotnet.org/AnnArbor/Fall2007/default.aspx">Day of .NET</a> in Ann Arbor on October 20<sup>th</sup>.<br /></p><p>Hope to see you all there!</p></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-29534694.post-25463632054262498802007-08-26T19:26:00.001-04:002007-08-26T19:46:00.974-04:00Beware the Workspaces of Team Foundation Server<div><span xmlns=""><br /><p>I've been using Team Foundation Server since its first beta at quite a few clients and I like to think that I know a bit about it, but I learn something new every day.<br /></p><br /><p>Today I learned a little bit about workspaces.<br /></p><br /><p>For those of you new to, or unfamiliar with TFS, your work is done in the context of a workspace which maps local working folders to source control folders. This is a cool way to manage your source control mappings and allows you to do some pretty cool things such as cloaking folders (more on that in another post) and maintaining multiple working versions of the same project (helpful for sandboxing). It's similar to a working folder in Visual Source Safe, but with more features. Think of it as your working folder on steroids.<br /></p><br /><p>However, there are some little… idiosyncrasies that you need to be aware of.<br /></p><br /><p>By way of background, I am working on a project that requires Windows XP. I run Vista at work and home and since this is a short-tem project (which I actually hope to upgrade to Vista at some point) I didn't feel like setting my machine up to dual-boot. Another reason is that I have someone helping me on this project, and I didn't think he'd take kindly to me telling him "… oh, by the way, I need you to re-image your machine and set it up for dual-boot. I know you have deadlines and all, but you know, whenever you have a few minutes…" So, I created a Virtual PC for my development environment. My plan was to get the Virtual PC all set up with the appropriate third party software and drivers and get it configured so that it could just be copied to any developers working on it and we could start rolling.<br /></p><br /><p>This is where I found out that Team Foundation Server Workspaces are NOT strictly local creatures. This was discovered when, in an effort to get the VPC's setup for each developer, we managed to delete workspaces that not only were not associated with the project in question, were not in use on the VPC at all. We got them back, but it was a bit of a pain in the rear.<br /></p><br /><p>When you select "Manage Workspaces" from the "FileSource Control" menu in Visual Studio, you will see all workspaces listed that your account has access to, regardless of which physical computer they are listed on (see below). The killer is that you can actually delete and change a workspace from a remote location.<br /></p><br /><p><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbqVNNZ_4nn62K9GZHz8Hq8ZgiOYkPrF_9o2Bg1bMDpY-TZXinH0RxfJ_H2k-1gYLpEnQHcY-9vbnKXochCJy4WJ-ItmpR0d2ZWVcD3gHH4stZnBVIom7WR3AN44BcAZfxTkK6/s1600-h/TFS+Workspaces.jpg"><img id="BLOGGER_PHOTO_ID_5103158542358003218" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbqVNNZ_4nn62K9GZHz8Hq8ZgiOYkPrF_9o2Bg1bMDpY-TZXinH0RxfJ_H2k-1gYLpEnQHcY-9vbnKXochCJy4WJ-ItmpR0d2ZWVcD3gHH4stZnBVIom7WR3AN44BcAZfxTkK6/s400/TFS+Workspaces.jpg" border="0" /></a></p><br /><p>Keep this in mind when working with Team Foundation Server. And be careful out there!</p></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-29534694.post-8558737970047447472007-08-06T16:26:00.001-04:002007-08-06T16:29:58.248-04:00PWN3D!<span xmlns=''><p>This is probably old news, but I can't stand these "news" shows that do this, so to see them on the other side is a nice change. If nothing else, it's payback for "outing" <a href="http://fakesteve.blogspot.com/">Fake Steve Jobs</a>.<br /></p><p>Enjoy!</p></span><br /><p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/nCvmkxO5hoQ"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/nCvmkxO5hoQ" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-29534694.post-51079977761295615922007-07-27T08:46:00.001-04:002007-07-27T09:11:01.891-04:00Long Time, No Blog<span xmlns=''><p>Hi everyone!<br /></p><p>I've been busy for awhile, but I'm starting to get some time freed up, so you should start seeing more regular content here.<br /></p><p>For now, you'll have to accept the following rant to make up for the lapse:<br /></p><p><Rant><br /></p><p>I have a latest pet peeve: tools or applications that claim to be Vista compatible where the first step in the installation instructions is "disable UAC." This was doubly troublesome due to the fact that this particular tool required UAC to be disabled not just for installation, but for using the tool!<br /></p><p>In my opinion, if you're going to claim Vista compatibility, you should support something as important as UAC. To require it to be disabled while you're installing is bad enough, to insist that you KEEP it disabled is ridiculous! <br /></p><p></Rant></p></span>Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-29534694.post-24876060280964868962007-06-21T21:12:00.001-04:002007-06-21T21:15:49.326-04:00Coming to Findlay!<span xmlns=''><p>For anyone in the area, I will be presenting "Building SOA based .NET applications with Microsoft Patterns & Practices Service Factory" at the Findlay Area .NET User Group Tuesday, June 26<sup>th</sup> at 5:30PM. You can get more details about my presentation and FANUG at their website <a href='http://www.fanug.org'>www.fanug.org</a><br /> </p><p>See ya there!</p></span>Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-29534694.post-76335632229546427502007-06-03T19:58:00.001-04:002007-06-03T20:01:39.644-04:00I’ve been published!<span xmlns=''><p><a href="http://aspalliance.com/articleviewer.aspx?aId=1283">Sweeet!</a></p><p>I hope you all find it informative, and please don't forget to rate it.</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-29534694.post-39122502396238334302007-05-07T21:54:00.001-04:002007-05-07T21:56:26.556-04:00Day of .NET Recap<span xmlns=""><p>I should probably start this blog post by apologizing to everyone who attended my session for not being able to show a working demo. I did find out that I made two small errors; my resource file (the one I created in the first step) was miss-named. Therefore, when my pre-compile step tried to execute, it failed as it was unable to fine the file. I renamed the file, complied and it worked. Also, the "completed" solution didn't work because I tried to run it from Visual Studio when it was not in an elevated state. I will be sending the starting solution and the completed solution to the DODN organizers to post, with the slide deck, on the website. In the meantime, you can drop me an e-mail if you just can't wait and I'll mail it off to you.<br /></p><p>But, this reminds me of something I didn't get to in my presentation; once you add the request for elevated privileges to your application, you MUST run Visual Studio with elevated privileges in order to run your application. If you'll remember from the presentation, your applications by default run under your standard user token. Once the application begins, without being elevated, it does not have access to the administrative token anymore. This will also affect you if your application attempts to perform an action requiring elevation and you HAVE NOT run Visual Studio in elevated mode. The solution it to right-click Visual Studio and select "Run as Administrator" which will ask you to confirm that you want to launch the application in elevated mode before starting the application.<br /></p><p><h2>Search (the part we ran out of time for)</h2><br /></p><p>Those who were disappointed with the search capabilities of Windows XP will be happy to know that the search facility in Vista is completely new and much faster and more user friendly.<br /></p><p>Newer Microsoft applications (Windows, Office, SharePoint, SQL Server, Exchange, etc.) are built on a common search technology engine. It's important to understand that the engine technology, NOT the binaries are the same; the new search technology is simply packaged into a number of different forms. While the binaries are not the same, the similarity in the underlying technology allows for techniques used for one system to be used in another.<br /></p><p>From a user standpoint, this translates into faster searches with the ability to be more specific about what you are looking for. This is possible because Vista takes a documents metadata into account when performing a search. For example, if you wanted to find all e-mails about vacation from Michelle, your search term would by "from:Michelle vacation." The "from:Michelle" property/value pair tells Vista to find all document with a property of "from" and a value of "Michelle." This can be used for any metadata property that is exposed by any document type in your system.<br /></p><p>This common search functionally being deployed to the desktop also allows for Vista search functionality to be used in your application utilizing a specialized OLE DB provider and some extensions to standard SQL.<br /></p><p>In order to utilize this search, you need to use a special OLE DB provider capable of accessing the operating systems indexing service. Out connection string is:<br /></p><p><span style="font-family:Courier New;">Provider=Search.CollatorDSO;Extended Properties=\"Application=Windows\";</span><br /></p><p>For example:<br /></p><p><span style="font-family:Courier New;">SELECT System.Title,<br /></span></p><p><span style="font-family:Courier New;">System.ItemFolderPathDisplay,<br /></span></p><p><span style="font-family:Courier New;">System.ItemNameDisplay,<br /></span></p><p><span style="font-family:Courier New;">System.Document.CharacterCount,<br /></span></p><p><span style="font-family:Courier New;">System.Document.LastAuthor<br /></span></p><p><span style="font-family:Courier New;">FROM systemindex<br /></span></p><p><span style="font-family:Courier New;">WHERE SCOPE = 'file:C:/Users/Public' AND<br /></span></p><p><span style="font-family:Courier New;"> CONTAINS('Day Of Dot Net')<br /></span></p><p><br /> </p><p>This SQL is very similar to any other query you might write to query data from a table; you are selecting fields from a data store where certain conditions are met. In this case the values we are selecting are system values that will return metadata about files. We are searching "systemindex" (Vista's search index data store) where the file contains the string "Day of Dot Net" in the c:/users/public folder. In this case we are treating the systemindex like any other database table.<br /></p><p>You can take this query and use it to populate either a data reader or a data set and manipulate the data just as you would for any other SQL query.<br /></p><p>This provides us with another powerful tool that can be utilized in our Vista applications to enhance our applications value and provider a better user experience. And best of all, the other things discussed in the Day of .NET session, this is already built into Windows Vista. It's there, ready for you to use today!</p></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-29534694.post-43330261045692298072007-04-25T20:04:00.001-04:002007-04-25T20:07:05.778-04:00Guitar Hero… too?<span xmlns=""><p>Well, I was planning on making this blog a review of Guitar Hero II for the Xbox. But, I have been unable to find a copy. Every store that I've been to (both of them!) have been sold out. Not hard to understand, since each store only seems to get one copy at a time.<br /></p><p>So, as time goes on the odds of me getting GH2 soon decline. The primary reason is that as the weather starts to get nice, I tend to spend less and less time inside, and less of that time playing video games. I also refuse to be one of those guys who spends his weekend going from store to store looking for the one copy of the game in the city. This explains why I still don't have a Wii; I refuse to buy one until I can casually walk into a store and pick one off the shelf without being crushed in a throng of people. I also refuse to pay $800 for a console on eBay that retails for $250 in the store. Maybe if I were a hard-core gamer it would be different, but I'm not.<br /></p><p>I did try the Playstation 2 version as Best Buy last week.<br /></p><p>As someone who has been playing guitar for quite a while, I wanted to see how the game compared to the real thing. Best Buy has a two song limit on the demos. I choose "Carry on Wayward Son" by Kansas and "YYZ" by Rush on the basis that they were the two songs I was remotely familiar with (being a prog-headed music snob) and have actually played in a band scenario.<br /></p><p>Well, big shock, but the game is nothing remotely like really playing the guitar. It's primary skill requirement is rhythm, but basically the game is Simon with a fancy control. Having said that, I did find the game to be a lot of fun. And will probably pick up a copy.<br /></p><p>But at this rate, probably not till the fall.</p></span>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-29534694.post-42925142632403649832007-04-05T21:47:00.001-04:002007-04-05T21:51:40.023-04:00Dawn of a New Day… of .NET<span xmlns=""><p>The Great Lakes Area .NET User Group, The Ann Arbor .NET Developer Group and the Northwest Ohio .NET User Group are all co-sponsoring the "Day of .NET" on May 5<sup>th</sup> in Ann Arbor. More information can be found at their <a href="http://www.dayofdotnet.org/default.aspx">website</a>.<br /></p><br /><p><a href="http://www.dayofdotnet.org"><img alt="Day of .Net May 5, 2007 - I'll be there!" src="http://www.dayofdotnet.org/images/DoDNBadge.png" /></a><br /></p><br /><p>This is a great opportunity to come and see some cool .NET stuff, learn some new tricks and participate in the .NET community.<br /></p><p>There will be some great <a href="http://www.dayofdotnet.org/Sessions.aspx">speakers</a>, and I will be presenting "Windows Vista for Developers" for anyone who missed it at the February DevCares event.<br /></p><p>See you all there!</p></span>Unknownnoreply@blogger.com1