This is really handy, especially when there are many projects in Visual Studio. From http://blog.catenalogic.com/post/2009/01/09/Sort-Visual-Studio-2008-Projects-alphabetically-inside-Solution-Folders.aspx, here is how you do it:
- Right-click on a project and select rename (or simple select a project, wait 1 second, and click it again or press F2).
- Don’t change the name, simply select another project with your mouse.
This will cause Visual Studio to resort the projects.
I also highly recommend the PowerCommands for Visual Studio 2008 because it allows you to collapse all the projects in a solution with a single click.
Every so often, I forget that non-team editions of Visual Studio do not define the CODE_ANALYSIS constant by default. If you are wondering why FxCop seems to be ignoring your SuppressMessage attributes in your source code, this is probably the reason why. See FAQ: Why does FxCop ignore my in-code (SuppressMessageAttribute) suppressions? [David Kean] for more information on this topic.
If you have ever worked with an application that has a large number of assemblies, it can be daunting at times to manage the entire set. In particular, you will find that developers may reference external assemblies that perhaps they should not be referencing. For instance, would you want to deploy an ASP.NET application where developers reference and use types in System.Windows.Forms?
Here is how you can find those pesky references in your build output directory. From a command line in the path of your build’s binaries, type in the following command:
(FOR %i IN (*.dll) DO ILDASM /TEXT /PUBONLY /ITEM=Assembly %i | FINDSTR /L System.Windows.Forms) > Output.txt
Then, open the Output.txt and search “.assembly extern System.Windows.Forms.” This will show you which assemblies are referencing System.Windows.Forms, if any.
Configuration is improved and is now similar to ASP.NET.
- Convention over configuration allows default endpoint configurations to be created by the framework. Those default endpoints will be very helpful for simple scenarios where you want to get going quickly without the overhead of the configuration.
- Empty binding names are defaults at the top of the config hierarchy. Nice!
- Behaviors now follow config inheritance rules, just like ASP.NET configuration.
- Config-based activation. SVC files are no longer required and can be replaced by config entries. This is really cool if you have a lot of SVC files to manage. As a result, you can replace 20 SVC files for example with a single config file.
Monitoring WCF Apps.
- AppFabric is integral to monitoring. Search for Windows AppFabric to get an overview of this new product from Microsoft. A dashboard is integrated into the IIS 7 console. This is really nice and makes it easier to visualize than monitoring WCF performance counters in perfmon. This does not replace specialty tools like Avicode Intercept Studio or BMC AppSight, but is better than nothing.
Message Pump as a Service.
- RoutingService is a new feature. You host it like any other service. It supports RequestReply, sessionful RequestReply, One Way, sessionful , and sessionful Duplex. You build a message filter table that get evaluated at runtime. The RoutingService then performs the actions as specified by matching filters.
- The filter table can be replaced at runtime to respond to network changes for example.
- Using a Routing Service enables scenarios like:
- Protocol bridging. Examples: net.tcp to basic http; soap 1.1. to soap 1.2.
- Security bridging.
- Alternate endpoints. You can use this for failover routing. This one got applauses. Very cool!
- Ad-hoc discovery. Clients can multicast probe messages to discover services on the network. Probe match messages are sent to the client in multicast. The scale is limited by the transport being used.
- Managed discovery. A discovery proxy receives unicast hello messages from clients. Probe multicast messages are intercepted by the discovery proxy. Disco proxy sends unicast messages to the clients that send out probes, at which points those clients now switch to unicast messages to the proxy.
- New classes to look for. ContractDescription, DynamicEndpoint, ServiceDiscoveryBehavior, AnnouncementService, UdpAnnouncementEndpoint, FindCriteria, and EndpointDiscoveryMetadata.
- Demo. Client was able to respond to a service being taken down and re-discover where else it could go and start using a backup service that was brought online before taking down the primary service. This was really cool!
It seems to me that managed discovery is the better model for enterprise discovery of services. I can see applicability of discovery in the projects I am currently working on and simply the hub-and-spoke model we are currently using.
It is interesting to me that this functionality is similar to what BizTalk can perform with some ESB toolkit. I can’t wait to see what models are going to emerge and what role BizTalk will play in a WCF 4 environment.
The demos on this got many applauses from the audience. 🙂
Well, Microsoft never disappoints on the second day of the keynote. I was wondering why breakfasts had been suppressed and the traditional Universal Studios party taken away. This morning’s keynote gave the answer. All PDC attendees are receiving a brand new laptop, custom configured for developers. NICE!!!!
Now on to my favorite talk. Scott Guthrie spoke and showed Silverlight 4. I no longer have an excuse to delay getting up to speed on Silverlight. As far as business applications are concerned, there is a concerted effort to address typical concerns of business applications in Silverlight 4. It is now available as a beta, and was announced as planned on being released first half of 2010. Silverlight 4, here I come!
Quite a few sessions were offered throughout the day. I picked a few based on my interests, and wanted to share my take on some of my favorite sessions today (Monday 27 October 2008).
Scott Henselman’s session (TL49 Microsoft .NET Framework: Overview and Applications for Babies). This session was based on a set of demos centered around the BabySmash application; it ties into the current food court offerings of the .NET framework, and also included some elements of upcoming .NET 4.0 features. OK – so what was so likeable about Scott’s delivery? Well, he is used to speaking to audiences; after all, he hosts the Henselminutes podcast. The other thing I really liked: he comes from the point of view that he is a develop who knows C#, but he is not an expert on Silverlight 2, the MS surface, or WPF for that matter. And it is with this premise that he makes a convincing point that these technologies are not that hard to pick up. Granted, he had some “insider” help. Still, I could not help but think that he was rather convincing and effectively acting as an evangelist. Great demos tying in a number of technologies, from WPF to Silverlight, and yes, even the Surface with its touch capabilities. Thanks a bunch, Scott.
- Phil Haack on the ASP.NET MVC framework, with a segment on StackOverflow.com by Jeff Atwood (PC21 ASP.NET MVC: A New Framework for Building Web Applications). This was a real good session too. I have to admit I had not gotten a chance to look into ASP.NET MVC much, and this session filled my knowledge gap in no time. I came to appreciate the ASP.NET MVC framework as another food vendor in the cafeteria; yes, it does not intend to replace the web form model, it only intends on providing an alternative model. Effectively, this is an additional tool in the toolbox. Use the Phillips head when you need a Phillips head.
- Here is what I liked about it:
- The developer has to know how HTTP works. Not a bad thing in my book. I have seen too many developers make mistakes in web forms because of their lack of understanding of HTTP.
- It is naturally “search engine optimized” because of its alignment on REST principles.
- Developers have to embrace HTML and in fact have complete control over the HTML being emitted. I think Phil Haack’s analogy about transmissions is not bad at all. Think of web forms as an automatic transmission, and think of ASP.NET MVC as a manual transmission. Not a bad analogy indeed.
- Here is where I think it falls short today:
- Lack of support for bi-directional data binding. In my experience, developers spend too much time pushing data into the UI and coding the events for the changes made to the data by the user. Better bi-directional data binding is needed. So it’s not there in ASP.NET MVC, but it is there in ASP.NET 2.0 and is also there in Spring.net. As far as I understood during the session, however, bi-directional data binding is planned in future versions of the ASP.NET MVC framework.
Well, that’s it for day 1.
Here I am at my third PDC (I attended PDC03 and PDC05), and I have to say that the mood at the keynote was the most lukewarm I have seen in the last 3 PDCs. Perhaps it had to do with the topic: cloud computing. Not that developers don’t care about it, but I think it tends not to be foremost in developers’ minds. Now I think of the operations people I work with, and I think they would be impressed in the advances that are being made in manageability within the Microsoft platform.
It’s eratly in this PDC, but my take on this so far is that we are in a transition PDC. Developers are still absorbing or getting educated on a large number of technologies like ASP.NET MVC, LINQ, Silverlight 2.0, etc… This PDC might jsut be incremental, showing a glimpse of the direction in which Microsoft is heading, with opportunities for feedback from the developer community.
The rest of this week will tell.
I was reviewing the Commonwealth Bank of Australia Case Study (http://msdn2.microsoft.com/en-us/architecture/bb190159.aspx) and comparing it with my own experiences developing two smart client applications using the Smart Client Software Factory and the Service Factory from Patterns and Practices.
One item in particular resonated loudly: it is the premise that services can be either private or public. Public services are intended for broad consumption and interoperability is key. Private services are services intended for consumption by the presentation tier and thus are tightly coupled. Private services may or may not consume public services.
I very much agree with this premise. In fact, I have struggled with designing services intended for a UI while trying to adhere to principles of service design. This validates my own experience and is a helpful framework for structing SOA discussions.
What about your own experiences? Do you agree with this premise?
I read quite a few trade magazines, and every so often I read a segment on mobile workers and telecommuting. While VPN has made it more easy to stay connected with the office, there are a couple of “best friends” that have worked well for me.
The first one is Remote Desktop Connection. Once I have the VPN established, I often use Remote Desktop Connection to access my PC at work. This is great because it’s like being in the office. I have access to all my applications and data in one easy step.
The other “best friend” I have developed lately is my Western Digital 250 GB 2.5″ external hard drive. Using Virtual PC 2007, I created a virtual hard disk on my external HD. I then built my virtual machine like I would a physical. The advantage is that I can carry my virtual machine in my pocket and fire it up from any computer that has Virtual PC 2007 and a USB 2.0 port. At one point, I was pursuing having a bootable thumb drive; having a Virtual PC hard disk on my external HD has turned out to be quite a welcome substitute.
Well, it wasn’t exactly without some pain, but I got to where I thought I should get, and that is I installed the Smart Client Software Factory – May 2007 (SCSF) in Visual Studio 2008.
Here is a helpful resource in getting this done: http://staff.southworks.net/blogs/ejadib/archive/2007/08/27/How_2D00_To_3A00_-Smart-Client-Software-Factory-_2800_SCSF_2900_-_2600_-Visual-Studio-Orcas-Beta-2.aspx.
Nonetheless, it took a while to get there. Here are the issues I ran into and the configuration that ultimately worked:
- I used Virtual PC 2007 to do this in an isolated environment.
- My first virtual PC was Windows XP with Service Pack 2. I downloaded and installed Visual Studio 2008 Beta 2, Professional Edition, and could not see the Smart Client solution when creating new projects. This seemed odd so I installed the source code of the SCSF. I proceeded to enable Guidance Package Development and ran into type load exceptions here there and everywhere. Not good… I researched and tried many different approaches, but nothing worked.
- Then, talking with a friend made a lightbulb go off in my mind. What if the particular edition of Visual Studio had an impact? After all, this is a beta 2 and there are bound to be some issues. So I proceeded to download Visual Studio 2008 Beta 2, Team Suite Edition, on a prepackaged virtual hard drive (see http://www.microsoft.com/downloads/details.aspx?FamilyID=3b72271c-e996-4989-898d-72d684966ce6&DisplayLang=en). The OS in this virtual machine is Windows Server 2003 SP2. I performed the same SCSF installation steps as before, and, SUCCESS. It worked. I even exercised most recipes to make sure this was valid. And it was.
Conclusion: SCSF can be used with Visual Studio 2008 Beta 2, and presumably, with Visual Studio 2008 RTC once it’s available. Note that I have not tested making an installed from the SCSF source, so I cannot ascertain that it could be modified under Visual Studio 2008.