Friday, June 18, 2010

101 in 55 – Sara Ford presenting 101 VS Tips in 55 Minutes

Nic Fillingham - Sara Ford's 101 Visual Studio Tips in 55 Minutes Challenge

“When Sara Ford gets excited she talks fast. Very fast. So fast in fact that she decided to race the clock at the Visual Studio Launch Event in Mountain View, CA and attempt to demo 101 Visual Studio tips in under 55 minutes.

image …”

This will fill your brain in 55 minutes flat!

 

Related Past Post XRef:
With the new year we get a loved series sequel, Visual Studio Tips and Tricks v2 - Visual Studio 2010 Tips and Tricks

Visual Studio Tips and Tricks Book Signed
251 ways to become a Visual Studio Ninja AND help improve the world (a little at a time) – Sara Ford’s Microsoft Visual Studio Tips available for preorder, proceeds being donated

The VB Professor is in, as in the MyVBProf that is… VB + MVVM/SilverLight Intro, VB+SliverLight & WCF RIA Services and more.

Beth Massi - Sharing the goodness that is VB - Visual Basic Silverlight Tutorials from MyVBProf

“In case you missed them, Visual Basic MVP Bill Burrows has been creating Visual Basic Silverlight tutorials on his site MyVBProf for a while now. Last week he released a new tutorial that is the third of a series on using WCF RIA Services.

The first tutorial introduced SL4 and WCF RIA Services using an example that keeps track of a golfer’s scores and computes the golf handicap. The second tutorial introduced the MVVM pattern in Silverlight 4 using the new command properties. This new tutorial takes the golf handicap example and creates a refactored solution built on the MVVM pattern. Check them out!

…”

MyVBProf

image

image

This is a SilverLight based site which provides a number of VB related videos/tutorials. Sometimes having someone walk and talk you through a topic is just what you need… Plus it’s free… ;)

Wednesday, June 16, 2010

Making your WPF app look like the Zune client? Yes, you can (and here’s a tip how)

@deepeshm - I want my app to look like the Zune client

“Earlier I had posted about the theme pack for the Silverlight Business Application and amongst them was the Cosmopolitan template. The cosmopolitan theme is inspired by the Metro theme which was first seen in the the Zune Client.

untitled

Since then, there have been many variations of the Metro theme, Windows Phone 7, Metrotwit, the Cosmopolitan theme  and many more. They are all inspired by the Metro theme. Recently, Nikoka  pointed out one of the key differences between the Zune client and the Cosmopolitan theme. One thing, I would like to call out is that they are just different variations. However, I do understand that there is a demand to create a app that looks and feels like the Zune client and in this post I will show you how that can be done using the Cosmo theme.Thanks Tsitsi for your help. She is also the designer that created these designs. I would definitely recommend subscribing to her blog. First download and install the theme pack, the instructions can be found here.

Making my app look and feel like the Zune client

Let’s start of by creating a Silverlight Business application Cosmopolitan template. Once that is created, follow these steps:-

The end result of these changes will be an application that looks like the Zune Client. Here is a screenshot:-

untitled2

image …”

Oh, that’s shiny! (nuff said ;)

One man’s introduction to MVVM with Visual Basic story OR zomg a MVVM article that’s not in C#!

Alessandro Del Sole's Blog - WPF: Introducing the Model-View-ViewModel pattern for Visual Basic 2010 developers - part 1

“This is the first post of a new introductory series about the famous Model-View-ViewModel pattern, from the perspective of a Visual Basic 2010 developer. The reasons of this series are mainly the following:

  1. yes, there are tons of articles, posts, discussions about M-V-VM but most of them are for advanced users
  2. most of the available materials refer to Visual C# and there is not much VB code

Before going on, I suggest you to read the very famous article by Josh Smith on MSDN Magazine, which is probably the most complete article on this topic. Next, M-V-VM can be applied to both WPF and Silverlight, with some differences between the 2 technologies, but in this blog post series I will refer to WPF 4. I will also do some personal considerations during the explanation.

What is M-V-VM?

If you are existing WPF or Silverlight developers, probably you heard about the Model-View-ViewModel pattern. Such a pattern has the purpose of offering a high degree of abstraction between layers (such as data and presentation), so that inside the presentation layer the developer can write only UI-related code but not code for managing data. This is possible because of the powerful data-binding engine in WPF which allows to an intermediate layer (known as ViewModel), which is between data (Model) and the user interface (View), to execute required operatins through binding and commanding techniques.

M-V-VM is a pattern, meaning that it's a set of guide lines that will help you reach an objective. This also means that it is not the rule and that you do not need it always. In fact, there are some scenarios where M-V-VM is not the best choice.

Benefits

M-V-VM is particularly useful for the following reasons:

  1. full separation between data and the UI
  2. full separation between the roles of developer and designer (which is also one of the primary reasons for XAML to be created)
  3. testing: as I will show you in the last part of the series, executing unit tests against a ViewModel makes sense instead of executing tests inside the UI context
  4. Model and ViewModel don't have the need of changing if the UI changes
  5. The ViewModel keeps the same logic independently from the kind of Model (e.g. custom business objects, Entity Data Models, etc.)
  6. better “Blendability”, which is the possibility of working on a project with Expression Blend

image …”

As you may know I’m a fan of MVVM. I believe it’s the real reason to move to WPF. Not WPF’s glitz, glamour and gee-wiz, but its data binding and commanding capability allowing for true decoupling our full/smart client presentation/views/UI from our code. Real and true no-code behind coding. True separation of design from code. That’s what draws me to WPF and models like MVVM.

MVVM has been gaining steam for a bit now, but for me the problem is is that most samples, chats, posts, etc are in C#.

As a VB, I’m okay at reading and doing mental runtime translation of C# in VB (as most VB’ers have had to learn to do in the past years), I still find it faster and easier grok something when its natively in VB. Which is what attracted me to this article… (gee, funny that… ;)

 

Related Past Post XRef:
MEF’ing in VB and SilverLight 4, with a little MVVM thrown in for flavor, from Glenn Block
SilverLight 4, RIA Services, MEF and MVVM, oh my… A four part series from the mind of Shawn Wildermuth (updated for VS2010/SL4 RTM)
MVVM Explained
The MVVM Framework Tour – This time, Silverlight styling!
A MVVM framework “…three hour tour…”
From code-behind to MVVM in 90 Minutes - Jason Dolinger on MVVM
The WPF Starter Kit – A simple, barebones, pick it up in an afternoon, MVVM/Navigation/Commanding Framework
M-V-VM for… um… busy developers (not dummies… not dummies… okay, so I’m a dummy! ;)

VSeWSS Import Tool – Think “VS2008/SharePoint 2007 to VS2010/SharePoint 2010 Upgrade/Migration” Tool

Paul Andrew - VSeWSS Import Tool Released

“We completed and published the SharePoint VSeWSS Import tool. This tool is an add-in to Visual Studio 2010 and it adds a new SharePoint project template for importing a VSeWSS project.

VSeWSS or the Visual Studio 2008 extensions for Windows SharePoint Services are the Microsoft tools for creating SharePoint 2007 projects on Visual Studio 2008. In Visual Studio 2010 we have built in tools for creating SharePoint 2010 projects. This import tool takes a VSeWSS project that is targeted at SharePoint 2007 and migrates it to Visual Studio 2010 where it is targeted at SharePoint 2010.

The import tool is distributed as source code so you will need to compile it before using it …”

MSDN Code Gallery - VSeWSS Import Tool for Visual Studio 2010

“Use this tool to import a VSeWSS project that you created in Visual Studio 2008 for SharePoint 2007 using the VSeWSS extensions. The tool imports projects into Visual Studio 2010 and the resulting projects target SharePoint 2010. The tool runs as a Visual Studio 2010 project template and it is available here as source code and contains a powershell script to build a VSIX file that can be directly installed into Visual Studio 2010.

…”

Help for those who are making the VS2010/SharePoint 2010 move (either today or in the future). Nice to see the source included (well actually its manditory since it’s a Source Only release and you need to compile it before you can use it, but you get the idea)

From the included readme.docx;

“…

This tool is provided as sample source code for a Visual Studio 2010 extension. After it is compiled the extension can be added into Visual Studio 2010 and it adds a new project template to the SharePoint 2010 folder. When you create a project from this new template you are prompted to import a project that was created by Visual Studio 2008 extensions for SharePoint (VSeWSS). The project can then be edited, upgraded and compiled with Visual Studio 2010 and tested and deployed to SharePoint 2010.

image …”

Open Source Web Content Management Systems OR Friends don’t let friends create static sites or write their own CMS’s

Devcurry - Popular .NET Web Content Management Systems (CMS) - Open Source

“As wikipedia defines it - “A web content management (WCM) system is a CMS designed to simplify the publication of web content to web sites and mobile devices, in particular, allowing content creators to submit content without requiring technical knowledge of HTML or the uploading of files

Here are some good Open Source ASP.NET Web CMS that are popular in the community.

image …”

Because I feel somewhat strongly about how something was implemented someplace, and I have a tendency to vent strongly when the subject comes up, I can’t say much too more on this subject (obtuse enough? Just trying to keep out of trouble…sigh).

In short, static web sites where there’s a known expectation that the content will grow, will change over time, will be added to, where content will need to be added quickly, where the information is not static, where you’d like RSS/web feeds, etc, etc, static sites are not the right tool. They might be easy to churn out, but what happens in three years of monthly updates? Keyword is “content”.

Don’t roll your own. Do you really need to re-invent that wheel? If you can’t use SharePoint, then use one of the many great and very mature open source/free CMS’s available. If they don’t 100% fit, then you can always tweak them...  Static, “hard coded” content, sites are very cutting edge… for the mid 90’s…

Tuesday, June 15, 2010

Think “Street Map control” means Google or Bing? Looking for something more “open?” How about a WPF control for OpenStreetMap.org?

CodeProject - WPF Map Control using openstreetmap.org Data

Introduction

This article will create a simple WPF control that enables browsing of map data from OpenStreetMap, as well as enabling searching for places and displaying the results on the map.

The attached zip file has both the source code, with documentation, and a sample application.

Background

I needed to allow the user to select various locations in my project but didn't want the user to have to install any other applications (such as Google Earth or Bing Maps 3D). One option was to have a web browser in my application pointing to the online versions, but this didn't feel right. Finally I looked at OpenStreetMap and was impressed by the maps, but couldn't find any controls to put it in my application.

What is OpenStreetMap?

From their Main Wiki page:

OpenStreetMap creates and provides free geographic data such as street maps to anyone who wants them. The project was started because most maps you think of as free actually have legal or technical restrictions on their use, holding back people from using them in creative, productive, or unexpected ways.

Basically, OpenStreetMap is a map made by the community for everybody to use. Also, luckily for me, all the details for the file naming conventions are there for creating our own control. All we have to do is download the relevant 256 x 256 pixel square image tiles for the area we want to look at and stitch them together - simple!

image…”

Having options, one of which is open, is good… This is a cool control that just seems to work.

Here’s a snap of the provided sample app;

image

 

Related Past Post XRef:
Microsoft Virtual Earth WinForm Control – Because I’m just a WinForm kind of guy…
Need to Geolocate an address? Get a Map image? Route something to somewhere? Need that as a WebServce? Virtual Earth Web Services SDK v1.0, built with WCF, has what you need…
MSR MapCruncher for Virtual Earth

Mix 09 Quick Video Link List

Monday, June 14, 2010

The Managed Menu Extension (MME) makes adding right click menus to VS2010 simple and easy (via MEF)

Visual Studio Gallery - Managed Menu Extension (MME)

“Back in 2007 I created the project http://managedmenuextension.codeplex.com to make it easier to create custom menu items in the Solution Explorer of Visual Studio 2008. Back then I used the brand new System.AddIn namespace also known as MAF to accomplish this goal.

Now I have upgraded this project to Visual Studio 2010. It is re-developed from the ground up since I now use MEF instead of MAF. MEF has allowed me to make it even easier to create menu items for the solution explorer.

MAF has some advantages over MEF like better Isolation through use of different AppDomains, and an advanced versioning model. But MAF is more complex and I believe not needed for most scenarios involving right click menus. That's is why I went with MEF instead.

Features

  1. Hides Complexity. Installs a Visual Studio Add-In which works behind the scenes and uses MEF to load extensions.
  2. Ease of use. You just implement one interface, IMenuManager which contains 2 methods and place the resulting assembly in a directory.
  3. More powerful. The full DTE object is passed to the implemented IMenuManager if you need it. But you can also use the simpler model you (may) know from Managed Menu Extensions.
  4. One installer. Though I also provide a separate Project Template on the Visual Studio Gallery.
  5. Simple. My ambitions was to provide MenuItems for all kinds of things. Windows Explorer, SharpDevelop and others. But in this edition I focus on the prime target Visual Studio 2010.

Installing your own Menu Extension

When you have created an assembly containing one or more classes implementing IMenuManager, you have to place it in 1 of 3 locations:

  1. You can place it in the same folder as a Visual Studio Solution file (.sln). In this case the Menus will only appear when you open that solution. 
  2. You can place it one folder level above one or more solution files. Then the menus will appear in all the solutions of the subfolders. 
  3. You can place it in the MME subfolder of the CommonAppDataFolder (typically C:\ProgramData\MME). Then the menus appear in all solutions on the machine.

…” [GD: Description Leach Level: 99%]

Visual Studio Gallery - MME MenuManager Template

“This template requires that you have installed MME. MME can either be installed from Visual Studio Gallery via the Extension Manager or from the downloads page of http://mme.codeplex.com.

After installation of this template it is very easy to add a new project to implement Managed Menu Extensions.

Just Choose "Add New Project" and then Visual C# -> Extensibility -> Managed Menu Extension

A Managed Menu Extension is a right click menu for the Visual Studio explorer. You will not believe how easy it is to use. Just implement the 2 methods of the IMenuManager interface, and place the resulting dll in one of 3 locations. …”

CodePlex - Managed Menu Extensions (MME)

“New Edition of Managed Menu Extensions for Visual Studio 2010

The Main goal of "MME" is to provide easy access to adding Right Click menus in the Visual Studio Solution Explorer.

This is accomplished using MEF. All you have to do is implement a simple interface with 2 methods.

…”

A couple things I dig about this. The fact that you can add Solution specific menus I thought was very cool. This way the “menus” can be checked in along with the source making it very easy to keep your entire team in sync.

The second, that the source is available. Many/most of us stand on the shoulders of others and when you make your source code available you are giving back, paying it forward, being the shoulders for others to stand on…

Sunday, June 13, 2010

The Stack Family (StackOverflow, SuperUser, etc) gets OData’d via Stack Exchange Data Explorer

Stack Overflow - Introducing Stack Exchange Data Explorer

“Everything contributed to the Stack Exchange network of websites is licensed under Creative Commons Attribution – Share Alike. This means it belongs to everyone, and can be freely reused (even commercially!), so long as it is follows our simple rules of attribution. That’s our contract with the community — it’s your generously contributed content that makes these websites worth visiting in the first place!

Thus, we provide dumps of all the public data in the current Stack Exchange network (Stack Overflow, Server Fault, Super User, and Meta) every month, like clockwork.

But if you just want to play with the data, it’s kind of tedious: you have to download the entire 700 plus megabyte archive, import it into some kind of database system — and only then can you even begin thinking about how to query out the results you’re looking for.

Well, I’m pleased to announce that we now officially support a web tool for sharing, querying, and analyzing the Creative Commons data from every website in the Stack Exchange network — the Stack Exchange Data Explorer.

The Stack Exchange Data Explorer, or SEDE:

  1. provides easy web-based access to the latest and greatest monthly Stack Exchange website data dumps*
  2. gives us an Open Data Protocol (odata) endpoint

We’ve been working with Sam Saffron to build this out, and even though this is only a public beta, it’s already amazing! But don’t take my word for it — check out the Stack Exchange Data Explorer yourself at …

http://odata.stackexchange.com

image …”

That’s pretty cool… Go OData! :)

I love how the Jeff and team are so open with the Stack* data. It’s just great to see them “walk the walk.”

 

Related Past Post XRef:
Stacks and stacks of data - Your copy of the Stack Overflow’s (and family) public data is a download away

OData Primer – A collaborative effort to gather and share OData information and resources