What do you want to see on endpoint.tv?

This morning I awoke to a bright sunny day and thought to myself… What shall I do today?

Unlike most people I have a great deal of freedom to be as creative as possible at helping people to build great applications with .NET using WCF, WF4 and AppFabric,.  I have a long list of things that I could do but then after talking it over with my colleague Wade Wegner we decided that we should allow you to tell us what you want.  We have created a survey site where you can add your own ideas or vote on suggestions from others. 

So let us know….

What do you want to see on endpoint.tv?

P.S. This includes things about Windows Azure AppFabric as well.

Improved Productivity with BizTalk Server 2010 Mapper

The current mapper was an award winning tool when it was released. But lately we have been hearing from our customers that although mapper is great for simple maps, they are finding it increasingly difficult to develop and maintain maps with the BizTalk Mapper. The problem is that when mapper was developed schemas used to be small and mappings used to be simple. With the increasing complexity of integration challenges being solved using BizTalk, the size of the messages/schemas and the complexity of maps has been increasing rapidly.

The above map is an example of a complex map where user faces many challenges. Both source and target schemas have hundreds of nodes making it difficult for users to identify nodes to map. Even after mapping user faces challenges in trying to follow the relationships end to end as the huge number of links in the map reduces it to a jumble of black lines. Understanding and updating this map becomes a time consuming process.

Improving usability of the mapper was a key focus area to enhance developer productivity for BizTalk Server 2010. For solving the challenge of making maps easier to understand while maintaining the immense flexibility provided by BizTalk Mapper, we collaborated with Microsoft Research and worked with highly respected researchers like George Robertson and Phil Bernstein. Our focus was to bring simplicity in both creation and maintenance of maps.

One of the problems in big maps was the amount of background noise that distracted user from task at hand. BizTalk Mapper solves the problem by first hiding and/or dimming out the links that are not relevant to the page area of the map you are currently viewing. The links where both ends are not currently in view are now hidden. Even the links where only one end is currently in view are dimmed out by using a thinner dashed line types. When you select any schema node, link or a functoid in the map, BizTalk Mapper now activates highlight propagation. In highlight propagation Mapper brings selected item in prominence along with all the relationships associated with it. This in turn allows you to focus on the selected object and its relationships while reducing all the background noise. If the relationships are not in the current view, Mapper automatically scrolls the mapping grid surface to bring the selected relationship in view. This drastically reduces the amount of scrolling you had to do previously, to view end-to-end relationships. Apart from this, during design time you can now document the mapping logic by providing comments for the functoids. This can be used later for understanding the usage of a functoid by hovering over the functoid shape on the grid surface. The picture below illustrates how you can quickly understand the end to end relationship by using commenting functionality along with highlight propagation described above.

For the initial map creation, we targeted on making it easier for you to identify elements to map. When you have big schemas and are looking to have direct links from the source schema to the destination schema, one of the biggest issues is to find the relevant nodes in the schemas. Now in BizTalk Mapper if you select any element in the source or destination schema and invoke “Indicative Matching” mapper, it will suggest you the possible matches in the other schema. These matches are generated based on a complex algorithm, which was developed in collaboration with Microsoft Research. This algorithm looks at various parameters like how words are shortened by dropping alphabets, relative position in the schema tree, etc. to generate possible matches. We have also made it easier to discover AutoLink functionality. Now when you link two records, we display a context menu where you can choose the type of link you require. Mapper also provides messages on the status bar when an attempt is made to create invalid link.

For a multipage map, it is tough to figure out where a certain schema node is being used. Mapper already indicates that a particular schema node is linked in another page by showing a link icon in the schema tree. But if you have same schema node linked in multiple pages, it is difficult to find all the pages in which the node is being used. To solve this problem mapper will now also show indication on the page tabs below mapper grid surface to indicate that the selected schema node is linked.

The map development experience has also been greatly enhanced by consolidating all the functoid configuration activities into a single dialog. This dialog will provide tabs for various configuration tasks like input configuration, script configuration, table looping configuration etc. The input configuration also has been enhanced to make inputs easier to configure and understand. The mapper will give you error indication about the inputs in the configuration dialog and a visual cue (just like IntelliSense) with error information on the mapper grid. For scripting functoid, you can set your favorite scripting language as default and all the new scripting functoid will be automatically offer you that as the first choice. You can also import scripts from existing files on disk.

The new incremental search will help you find the relevant object quickly. You can not only search through the schema nodes, but also through functoids. You can also select schemas and which properties of functoids you would like to search using the search options dropdown. Mapper displays the number of search matches and their distribution in the status bar. All the matches in the schema trees are highlighted. The matching functoids in the current view are highlighted. If there are matching functoids that are hidden, mapper will indicate that by showing a glowing directional arrows at the edges towards which you need to scroll towards to uncover the results. If there are results on other pages, mapper will indicate that by highlighting those page tabs.

Another feature which makes it easy to understand a map quickly is “Relevance View”. As a map developer you might be interested only in nodes that are actually part of the map, hiding the other nodes makes it easier for you to understand the full map better. You can turn on this feature on either the source or destination schema using toolbar buttons. This makes it easier for you to focus on only the relevant schema nodes when looking at the map without getting distracted with unused nodes. When the unused nodes are hidden, they are still easily accessible through tooltips. You can also expand a collapsed node to override the default collapsing of all non-relevant nodes.

Making design time experience much better is the support for cut/copy /paste within and across maps. This should help you reuse repeated logic or segments common across maps. Undo and redo adds to the goodness by making development by trial and error easier. Apart from these zooming and panning in the map is much easier, making moving around the map a breeze.

These are only some of the enhancements in the BizTalk Mapper. Our usability tests have shown that these enhancements in the BizTalk Mapper have increased developer productivity in creating and maintaining complex maps. We now want to hear from you! How much productivity improvements have you observed while using BizTalk Server 2010’s Mapper.

Deepak Jain

Program Manager, BizTalk Server Team

RESTing from MEF (or The MEF dealer is at REST)

 

Note: Reposted from post at blogs.msdn.com/gblock on 6/30/2010

Side note: I am having serious writer’s block these days.or maybe it’s twitter’s block 🙂

Continuing the tradition of overdue posts.It’s been over a month since i left the MEF team. Before moving on let me say that working on MEF was a fantastic experience! The team is very excited to see all the community interest and adoption we’re seeing with MEF in commercial products, internal applications, as well as OSS projects. Thank you all for your support over these past two years.

Where am I?

I’ve moved over to the WCF team where i am now RESTing 🙂 My focus is on providing platform support for distributed applications that communicate over HTTP and which conform to a RESTful style. If you are using WCF, then you may be familiar with WCF WEB HTTP which shipped with the .NET Framework and the REST Starter kit which shipped out of band. That’s my team.

Why HTTP and REST.

HTTP is the application layer protocol that the web is built on. Browse to any web page and you immediately see HTTP in action in this case for delivering HTML web pages. HTTP is not limited as a transfer for HTML, it’s much richer. You can use  HTTP for delivering data as well as core application functionality, and you don’t have to use SOAP to do it. Applying the constraints of REST lets you take direct advantage of the capabilities HTTP provides in order to achieve greater scalability, performance and evolveability.

For example if you are using a blog reader to read this post, then it is very likely that you have subscribed to an Atom feed. AtomPub is one popular incarnation of RESTful principles that is primarily used for data feeds such as a blog, a video queue, etc. If you’ve heard our recent announcements about OData, it builds on top of AtomPub to provide a protocol for querying and updating data. Another popular usage of REST services is for building AJAX style applications which communicate with the server using JSON. REST however is not at all limited to these scenarios, as a matter of fact you can apply REST to solve many of the problems that today you are doing through SOAP based services albeit in a different (and many argue simpler) fashion.

It’s not WS-* and that is a good thing

REST doesn’t bring all the bells and whistles of the WS-* protocols, however its power is in its simplicity. That means no SOAP client stack required. For many systems the “power” WS-* brings is unnecessary, and that power is not free, that means it can turn into a tax. That doesn’t mean WS-* in itself is badit definitely provides value.

There’s a growing momentum in the community and the enterprise for building RESTful systems and for frameworks which enable that. Take a look at programmableweb.com and you’ll see 1500 APIs listed under the REST category. These APIs run the gambit in terms of their application of RESTful principles, but regardless it is clear that companies are looking more and more to expose their systems over HTTP.

Why do we need something new?

One word, Freedom. Freedom to work directly with the protocol and freedom to harness all of it’s richness.

The work we did in WCF 3.5 and 4.0 was a great first step. It allows you to use the traditional WCF service model and tweak it to behave well over HTTP. However, it has it’s limits. WCF was designed to shield the service author from any of the underlying transport details. It was also designed around an RPC style of communication, i.e. a Service operation corresponds to a method. Folks that are exposing services (Resources) over HTTP don’t want those details hidden, in fact they embrace them. HTTP is also not based on classes, types or methods, its based on resources and verbs.

We want WCF to provide a natural experience which allows you to fully embrace HTTP within your development. We want to allow you to develop in a resource-oriented style. To that end we’re looking to extend WCF and introduce a set of client and server APIs completed based on HTTP. Those apis will enable building RESTful systems, or RESTful frameworks to build RESTful systems 🙂

What about WCF Data Services?

WCF Data Services is designed to allows developers to expose entity data models using the OData protocol such that they can be queried and updated by OData clients. The work that we are doing with WCF WEB HTTP is to enable both clients to interact with arbitrary resources exposed over HTTP, as well as to enable exposing resources over HTTP in an arbitrary manner. It’s basically the “have it your own way” of HTTP.

We’re not the first to the party

Look across the .NET OSS community alone and you will see there’s a healthy ecosystem budding of frameworks like OpenRasta, RestSharp, Hammock. Glance into the Java, Ruby and Python worlds and you will see the same with frameworks like Restful Rails, Sinatra, RESTlet, RESTfulie (also in C#), and Jersey to name a few. Oh and don’t forget JQuery and ExtJS 🙂 All this existing innovation is a great thing! It means we have a lot of existing mindshare we can pull from to ensure that whatever we deliver plays by the rules.

Two key goals: Simplicity and Testability.

  • Less is more. We want to do less but make sure whatever we do is really easy to use (and really useful).
  • Simple to test. Not technically feasible to test after you do a lot of work 🙂

We want your help

We’re not going about this alone:

  • We want you to help us get there.
  • We want you to validate that what we’re building meets the needs and that we’re playing by the industry rules.
  • We want you to tell us that what we’re building is right, rather than us telling you it will make your life better.

We’re still in the early phases of determining exactly what that means, but if you followed the way MEF was developed you can imagine 😉

You don’t have to be using .NET or Microsoft technologies to help

If you are passionate in this space we’d welcome your involvement. I look forward to making this new journey with you.

Search and Navigation Tips/Tricks with Visual Studio

Search and Navigation Tips/Tricks with Visual Studio

This is the twenty-seventh in a series of blog posts I’m doing on the VS 2010 and .NET 4 release.

Today’s blog post continues on from the Debugging Tips post I did last week, and covers some useful searching and navigation tips/tricks you can take advantage of within Visual Studio.  These tips were ones that my friend Scott Cate (who has blogged dozens of great VS tips and tricks here) recently recommended to me as good tips that most developers using Visual Studio don’t seem to know about (even though most have been in the product for awhile). 

Hopefully this post will help you discover them if you aren’t already taking advantage of them.  They are all easy to learn, and can help save you a bunch of time.

Ctrl + i – Incremental Search

Most developers using Visual Studio are familiar with the “Find dialog” that you can launch by pressing the “Ctrl + F” key within the IDE.  A surprisingly large number of developers, though, aren’t familiar with the “Incremental Search” capability within Visual Studio. This enables you to search within your current document, and enables you to do so without having to bring up a dialog. 

Using Incremental Search

To enable incremental search, just type “Ctrl + i” within the editor.  This will subtly change your cursor, and cause your status bar at the bottom left of the IDE to change to “Incremental search: (search term)” – you can then type the search term you are searching for and the editor will search for it from the current source location you are on (no dialog required).

Below we did an incremental search for the term “action” and VS highlighted the first usage it found within the file:

image

We can then press “Ctrl + i” again to find the next usage of the same term (and continue this repeatedly):

image

Pressing “Ctrl + Shift + i” will reverse direction on the search, and allow us to skip backwards.

You can press the “Esc” key at any point to escape out of incremental search.  More details on incremental search can be found here.

F3 and Shift+F3 – Find Using Previous Search Term

One neat tip to know about incremental search is that after you press the ESC key to escape out of it, it will add the term you searched for to the find stack within the IDE.  The search term you used will show up within the “find” drop-down within the VS "standard toolbar:

image

You can always press the F3 key within Visual Studio to repeat the last performed search at a later point.  This is particularly useful for scenarios where you search for something, make a code change, and then want to continue from that point in the code.  Just press F3 and you’ll repeat the last search (in this case “action”) from that new point in the document – no need to re-type it.

Pressing “Shift + F3” will do a reverse search (from the current cursor location in the editor) of the last search term used.  You can easily toggle using F3/Shift+F3 to search forward and backwards within your document.

Ctrl + F3  – Find Using Current Selection

Another neat searching trick that you can use to avoid having to type your search term is to simply highlight a word (or part of a word) within the code editor, and then press “Ctrl + F3” to search for the next usage of it within the current file:

image

Pressing “Ctrl + F3” will search for the next instance of the text you have highlighted – allowing you to avoid having to type it:

image

Like before, you can use “Ctrl + Shift + F3” to perform a reverse search if you so choose, to search backwards within the document.

Ctrl + Shift + F – Find in Solution

Sometimes you want to search across your entire solution. 

“Ctrl + F” will bring up the find dialog and default it to search within the current document. “Shift + Ctrl + F” will bring up the find dialog and default it to instead search across the entire solution:

image

Doing a search like this will bring up the “Find Results” window within the IDE and allow you to navigate to each found instance of the term:

image

You can double-click each item in the “Find Results” window to navigate to that instance of the search term you searched for.

One tip a lot of people don’t know about is the ability to press “F8” or “Shift + F8” to navigate to the next/previous instance of that search term in the list.  This can make navigating through them much faster/easier, and avoid you having to use the mouse.

Shift + F12 – Find Usages

Most developers using Visual Studio know how to highlight a type and press F12 to “go to definition”.  This will bring up the definition of a class/type, and is a useful way to navigate to where it is defined.

Many developers don’t know about “Shift + F12” – which brings up all usages of a particular type.  This enables you to quickly see how a particular type is used.  To take advantage of it, simply select or move the cursor onto a type and press “Shift + F12”:

image

This will then bring up a “Find Symbol Results” window that list all usages of this type within the current solution:

image

Like with the previous tip, you can use “F8” and “Shift F8” to navigate forward/backward within each item within the list.

Ctrl + Minus and Shift + Ctrl + Minus – Navigate Backward/Forward

Have you ever navigated to a different code file, looked at something, and then wanted to navigate back to where you came from?  For example, you use F12 to “go to definition” and then want to return back to the code that used it?

A feature that a lot of people don’t know about in VS is the “Navigate Backwards” keystroke – “Ctrl + (minus key)”.  This will navigate to the previous document/location on the navigation stack.

To see this in action, try selecting a type in Visual Studio.  Below I’ve selected the “IController” interface:

image

Press F12 to navigate to the definition of it.  This opens up a new editor window with the source of the selected type:

image

Now to jump back to where we came from, press “Ctrl + (minus key)” and VS will take us back to where we were:

image

If you want to move forward in the navigation stack (which in this case would take us back to the IController.cs file), then press the “Shift + Ctrl + (minus key)”. 

Sara Ford has a good blog post that talks more about this feature, and explains the conditions when a new location is pushed onto the navigation stack. 

Ctrl + Alt + (down arrow) – Navigate to an Open File

Ever have a ton of files open within the IDE, and want an easy way to navigate between them? 

One useful key sequence you can use is “Ctrl + Alt + (down arrow)” – this will cause a drop-down to appear within VS that lists all open files within it:

image

You can use the arrow keys to select the file you want to navigate to – or better yet just start typing the file-name and Visual Studio will highlight it for you within the list.  For example, above I typed “Mo” and Visual Studio highlighted “ModelBinder.cs”.  Pressing the “enter” key will navigate me to that file:

image

This provides a nice, convenient, way to navigate between files without having to use the mouse or take your hands off the keyboard.  And remember that “Ctrl + (minus)” can be used to navigate you back to where you came from.

Navigate To, View Call Hierarchy, and Highlight References Features

Visual Studio 2010 brings with it a bunch of new code navigation and searching features – including the new “Navigate To” dialog, “View Call Hierarchy” feature and Highlighted References Feature.

image

I previously blogged about these three new VS 2010 features here.  If you haven’t already read this post and explored these capabilities, I highly recommend doing so – they are some great additions.

Other Editor Improvements

There are a ton of other code editor improvements in VS 2010 – many of them ones I’ve blogged about before.  Here are links to a few of my previous VS 2010 editor blog posts:

Also check out the other blog posts I’ve done in this VS 2010 and .NET 4 Improvements series.

Summary

Most of the above features have actually been in Visual Studio for several releases – but are ones that a surprising number of developers don’t know about.  Hopefully this blog post helps provide a convenient way to get started with them if you didn’t already know they existed.  If you need help remembering the keystrokes – print out a copy of the VS 2010 Keybindings Poster and keep it near your monitor.

To learn even more cool Visual Studio tips/tricks, subscribe to Scott Cate’s excellent Visual Studio Tips blog series (which is already up to 83 awesome tips and tricks).  Also subscribe to Sara Ford’s blog – she has an awesome set of tips/tricks that go back years. 

Hope this helps,

Scott

P.S. In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu

AppFabric WCF DataService (C#)

Today I’m happy to announce the availability of a new Feature Builder based template for Windows Server AppFabric and WCF Data Services.  This template is an evolution of the previous AppFabric-enabled WCF Data Service (C#) template.

WCF Data Services enables the creation and consumption of OData services for the web (formerly known as ADO.NET Data Services). Windows Server AppFabric provides tools for managing and monitoring your web services and workflows.

The AppFabric WCF DataService template brings these two products together providing the following features:

  • Monitor the queries to your service across multiple servers with AppFabric Monitoring
  • Properly report errors to Windows Server AppFabric (WCF Data Service errors are not recognized by AppFabric otherwise)
  • Eliminate the .svc extension from the URI by using routing
  • Provide a simple HTML page for invoking the service with or without the .svc extension

Get It

·         Download it from Visual Studio Gallery

·         Watch it on endpoint.tv

Why?

Some people have asked me “Why are you so high on building these new templates with Feature Builder?”  Sure I can create a blog post to tell you how to configure your WCF DataService to work with AppFabric but what happens 6 months from now when you can’t remember and can’t find that blog post?

If you have the guidance and the template along together in one package you simply add a new AppFabric WCF Data Service to your project and everything you need to know shows up right in Visual Studio – how cool is that?

So go download this template today and give it a go

Ron Jacobs
blog http://blogs.msdn.com/rjacobs
twitter @ronljacobs

endpoint.tv – Troubleshooting WCF – Bad Address on Client

Don’t you hate it when things go wrong? Most of the time on endpoint.tv, I show you when everything is working properly. On this episode, however, I’m going to show you some tools and techniques for troubleshooting what happens when you invoke a proxy with the wrong service address.

Ron Jacobs
blog        http://blogs.msdn.com/rjacobs
twitter    @ronljacobs