Microsoft Research Street Slide

Microsoft Street Slide

I came across this excellent video of a new type of view that Microsoft Research has put together which makes it easier to look at a street and side-step (or slide) to the right or left using panoramic stitching.  I can see myself using this to find a particular building and familiarize myself with what’s either side of it so that when I am walking I remember where the building is.  The store logos are also super useful because it’s hard to see from the photos where a company is at.

It’s always great to see Microsoft Research projects, it’s even better when they show up in actual products that you and I can use – hopefully we’ll see this in Bing Maps soon!

Tags:

Announcing the Web Camps Training Kit: July 2010 Edition

webCamps150x240

Today, we are releasing the Web Camps Training Kit: July 2010 Edition – Download it here.

The kit includes all the content we presented around the world at the recent Web Camps events; presentations, demos, labs and more.  Inside the new kit you’ll find content that covers the following technologies:

  • ASP.NET MVC 2
  • ASP.NET 4 Web Forms
  • jQuery
  • Entity Framework
  • Visual Studio 2010
  • Deployment

We’ve also included the agenda so if you want to run your own Web Camp with some of our content, you can do that. Let the team know if you are planning to run your own – we’ll help get the word out (webcamps [at] microsoft.com).

As a bonus we’ve also included scenario based content which comes in the form of complimentary slides, demos, demo scripts and hands-on-labs.  These scenarios show you how to take your own web application from an idea and prototype all the way to getting more visitors and optimizing for performance using the Microsoft Web Platform and other technologies from Microsoft.

  • Prototyping Your Web App
  • Building Your Web App
  • Enhancing Your Web App
  • Getting More Visitors to your Web App
  • Optimizing Your Web App for High Performance

We are going to be adding new scenarios as well as fresh content covering the latest on WebMatrix, ASP.NET MVC, Entity Framework, jQuery and more as well as brand new Web Camps!  Stay tuned!  Again, we’re open to hearing your feedback and requests – if there is anything you would like to see in the next version of the training kit, let us know (webcamps [at] microsoft.com).

Download the Web Camps Training Kit!

Tags:

New Social API Web Application Toolkit for .NET web developers

image

What’s New?

I’ve just published an update to our Web Application Toolkits!  If you’re not familiar with Web Application Toolkits (WATs) then here’s a summary:

FREE Web App Toolkits help ASP.NET web developers complete common web development tasks and quickly add new features to your apps. Whether it’s Bing Maps integration or adding social capabilities to your site, there’s a toolkit for you. For the full list of Web Application Toolkits check out this website.

Here is a summary of the work we’ve done in this release:

  1. Added a new Social API Web Application Toolkit
  2. Updated all the WATs to be compatible with Visual Studio 2010
Introducing the Social API Web Application Toolkit
Summary

As social networking Web sites are becoming more and more popular, users often want to access simultaneously the different networks they belong to from one only entry point. For example, one user might want to post the same message they are posting on your site also on Facebook, Twitter, MySpace and so on.

Although many of these social networks provide APIs for accessing their information, you might want to integrate your Web application with several social sites at the same time and be able to do this in a consistent manner, without having to go into numerous modifications in your code with each new social network that you want to incorporate.

This Web Application Toolkit provides a generic “Social Networks” API that allows connecting your Web application with different social networks and managing them through one entry point with a consistent set of methods. In the Toolkit you’ll find examples of how to use the Social Networks API provided to connect a Web application with Facebook and Twitter, allowing you to manage the data provided by these networks in a generic way.

Please notice that this Toolkit includes examples only for reduced set of operations (mainly posting status updates) within the two social networks named before. Through this documentation you’ll find instructions on how to extend this set into more operations and more social networks.

Details

This toolkit comes with Facebook and Twitter Providers that allow you to perform tasks against different Social Network APIs in a common way.  For example, Facebook and Twitter do authentication in different ways which is a pain because you have to write different code for each network.  The Providers mean that you can call common methods and pass in which social networks you want to perform the action against – behind the scenes the providers call the appropriate methods against Facebook or Twitter to get the job done.  The provider model also makes it easy to extend the API to other Social Networks in the future – we’ve provided detailed instructions on how to do this in the documentation that comes with the toolkit download – it’s in the “next steps” section.

  1. public ActionResult NetworkLogin(string providerName)
  2.         {
  3.             var social = new SocialProxy();
  4.             return this.Redirect(social.GetProvider(providerName).LoginUrl);
  5.         }

The code above shows how you use the SocialProxy class, included in the toolkit to get the login URL for the given social network.  In this example we then redirect the user to that URL instead of an MVC view in our application.

The Social Networks API checks if the user is already authenticated in the application and if not it authenticates him by using the FormsAuthentication.SetAuthCookie method. The API maintains a user repository with the account information for each user’s social networks.

  1. public bool Login(string providerName, HttpContextBase httpContext)
  2.         {                        
  3.             var provider = this.GetProvider(providerName);
  4.             var identity = provider.GetLoginIdentity(httpContext);
  5.             
  6.             if (identity == null)
  7.             {
  8.                 return false;
  9.             }
  10.  
  11.             if (!httpContext.User.Identity.IsAuthenticated)
  12.             {
  13.                  var userId = this.usersRepository.FindIdentity(identity) ?? this.usersRepository.CreateUser(identity);
  14.                  FormsAuthentication.SetAuthCookie(userId, false);
  15.             }
  16.             else
  17.             {
  18.                  var userId = this.usersRepository.FindIdentity(identity);
  19.                  if (userId != httpContext.User.Identity.Name)
  20.                  {
  21.                      this.usersRepository.AssociateIdentity(httpContext.User.Identity.Name, identity);
  22.                  }
  23.             }
  24.  
  25.             return true;
  26.         }

Notice that new users do not need to create a separate account when registering on the Web application. The API stores the user's Facebook and Twitter account information, and creates a unique identifier on the user repository for that user to keep them associated.

The API stores the user internal identifier together with the login information for each of its associated social networks, by using the UsersRepository.AssociateIdentity method.

image

Once connected I can do things against multiple social networks at once.  For example, I can call one method and have it update my Facebook and Twitter status automatically.  Here is one of the overload methods in the SocialProxy class that does just that:

  1. public void UpdateStatus(string status)
  2.         {
  3.             this.UpdateStatus(status, this.ConnectedIdentities.ToArray());
  4.         }

image

This is one of the social network actions we’ve provided in the toolkit but there are bunch that we’ve not covered, I’ve included some other operations from Facebook and Twitter that would be interesting to see – you can see them in the next steps section of the documentation that comes with the toolkit download.

Download the Social Network API Web Application Toolkit
  1. Download the Social Network API Web Application toolkit and let me know what you think – either leave comments on this post or give feedback on the MSDN Code gallery.
  2. Don’t forget to check out the other Web Application Toolkits and start using them in your ASP.NET web applications today!
  3. If you have ideas for future Web Application Toolkits then email me james [at] microsoft.com

Footnote: We’ve also stopped working on the “Web App Toolkit for Making Your Website Social” because the Windows Live team have a new API more information here.  We have also stopped working on the REST Web Application Toolkit because the functionality provided in the toolkit is now part of .NET 4.

Tags:

Web Camps Wrap Up and plans for the next 12 months

Over the past 3 months we’ve visited 12 cities across the world delivering free training and fun on the Microsoft Web Platform.  It’s been an awesome experience to see so many talented and passionate developers, from universities, startups, large businesses across the globe – all learning to build cool web apps on the Microsoft Web Platform. 

On Day 1, everyone got to hear about the latest developments in ASP.NET including a tour of ASP.NET 4 Web Forms, ASP.NET MVC 2, Entity Framework, Visual Studio 2010, Deployment and jQuery.  There was a lot to cover in one day and we’ll be looking at how we can slim the content down a little bit so we can drill into more details on the most popular sections.

On Day 2, the building day, people have been building some really cool applications in teams – it’s amazing to see what you can build in one day with a group of people that you have never met before!  Some of the applications that stood out for me were:

  • Shopaholic (Redmond Web Camp) – these guys knew how to leverage existing code! They used all the components of the Microsoft Web Platform including MVC 2 and EF nicely.  They also worked really efficiently in their team and got a hell of a lot accomplished
  • Ontario Fast Ball (Toronto Web Camp) – father and daughter put together a website for their local softball league using Web PI and DotNetNuke. Great to see how they put this together with no prior programming experience. 
  • Online Chat Room (Shanghai Web Camp) – created by a group of three this was entirely based in jQuery and used the new templating engine that Microsoft has been working on with the jQuery core team – impressive having chats across the network with other Web Campers!
  • Calendaring (Mountain View Web Camp) – the team put together a really nice web app based in MVC that integrated lots of social networking APIs, iCal and Bing Maps.
  • Noisy Neighbor (Sydney Web Camp) – a web app to register pesky neighbors. This app made great use of ASP.NET MVC 2, Bing Maps with drag and drop pins, WCF and a Script Manager for generating proxy classes (from Telerik)

In all there were around 80 applications built at the Web Camps and the list above is just a small sample of the cool stuff people were building!

Some things to look out for in the coming weeks:

  1. Web Camps Training Kit – we’ll be giving you all the content from the Web Camps in just a couple of weeks from now
  2. More Web Camps! We’ll be announcing new dates for Web Camps very soon – we’re just planning where we should go first!  Sneaky hint – we are going BIG! Smile
  3. Web Camps and content for Web Matrix
  4. New Web Camps website – time for a remodel, we’ll be launching in a couple of weeks

If you would like Web Camps to come to your city then leave me a comment on this post – we are listening!

Tags:

Top links for getting started with WebMatrix

Post Last Updated: 7/16/2010

image

WebMatrix is everything you need to build Web sites using Windows. It streamlines Web site development and makes it easy to start Web sites from popular open-source apps.

Getting Started
  1. Download WebMatrix
  2. Top 10 features for Web Matrix
  3. Twitter Archive of everything Web Matrix
  4. Scott Gu’s Blog Post on Web Matrix
  5. API Reference Guide
  6. ASP.NET Web Pages Forum
  7. How to Create an ASP.NET Application from Scratch Using WebMatrix Beta
  8. Web Matrix eBook
  9. FAQs for Open Source and Free web applications
  10. Get help in the forums
Find Web Hosting for your projects

Microsoft’s Web Hosting Gallery

Make Suggestions and Submit Bugs

Help us make WebMatrix better! Make a suggestion or submit bugs to the team.

Pragmatic Press and Blog Coverage of Web Matrix

Microsoft Web Matrix: What's In It for Dev Professionals? (Michael K Campbell)
WebMatrix - A Path To Enterprise Web Development? (David Hayden)

Tags:

World Cup Pivot

With the world cup in full swing it’s nice to slice and dice all the various statistics on the players and the teams.  Metia have put together this nice World Cup Pivot that makes doing that really easy.  Check out all the different stats by filtering on the left hand side and drilling into the player info.

image

For more information on Pivot check out the home page where they have developer information on how to create your own pivots.

Tags: