If You Want It Done Right Do It Yourself? Microsoft Surface

Today after much speculation and drama around a mystery launch event in Los Angeles,
Microsoft unveiled a Microsoft Tablet. It’s not the first time that Redmond has sold
hardware. I currently make use of a Microsoft mouse end webcam, and have a keyboard
or two around here somewhere. There’s also the Xbox 360 and Kinect. Then there is
also the Zune, ZuneHD, and I think at one point in time way back even a Microsoft
cordless phone along the way somewhere. So yes, they have seem some mixed results
in their efforts.

Microsoft relies heavily on partners to make their products a success. From building
the software to run on them to building the hardware to run on, partners have played
a key role along the way. HP, Dell, any many other computer manufacturers would be
very different companies today, or maybe not even exist if they had not been able
to build and sell product running Windows.


With partnerships playing such a key role, there is something to be said for not stepping
on the toes of those partners and turning them against you. Some have said that Microsoft
getting into the hardware game could have that effect, and turn manufacturers away
from building for Windows. I truly hope the opposite is true however, and hardware
manufacturers take this as an opportunity to raise the bar and deliver products above
and beyond what Microsoft has put forward here. I’ve long been a fan of Tablet PC’s,
going way back to my Toshiba m200 and Samsung Q1, but those devices have never truly
had the ideal combination of hardware and software to provide the best experience

I’ve felt as if many manufacturers gave into Microsoft and agreed to ship a couple
of higher priced models with “that tablet stuff” on them, but never really embraced
the platform. With iPad sales increasing and PC sales decreasing you wouldn’t think
that those manufacturers would need additional reasons to innovate to keep their marker
share in the “post PC era”, but apparently they do.

It’s a bold move, but I’m glad that Microsoft has put enough skin in the game to showcase
what can be done, and not just in a prototype but a shipping product. If Samsung,
HP, Acer, Dell, Toshiba, Lenovo, and others show up to the game with better products
that innovate in features and design the entire ecosystem will benefit. If they don’t
show up, and least there’s a serious product out there for running Win8 on a tablet.

For more, visit the Microsoft
Surface Website

Who Moved My SPA? (Single Page Application Template)

If you’ve downloaded and installed the latest ASP.NET MVC 4 RC bits, you might have
noticed one of the recently added MVC4 project templates is not longer there. The
Single Page Application (SPA) project template that shipped with the ASP.NET MVC 4
Beta as an early preview, will not ship with the final MVC 4 release. It will however
continue to evolve outside of the MVC 4 release.


More information is available on the ASP.NET
SPA Home Page

“An official release of ASP.NET SPA won’t be ready in time to ship with the final
ASP.NET MVC 4 release.
You can find the source code for ASP.NET SPA and follow
the development effort on the ASP.NET CodePlex site.”

If you look closely you will also notice another change. While it appears that a new
“Basic” template has been added, the previous “Empty” template has been renamed to
“Basic” and a new, much more empty “Empty” template has been added to give a bare
bones empty starting point for an MVC4 project.


After spending some time scouring the web researching some aspects of the ASP.Net
Web API I gathered the following collection of useful links and decided to share them

for the MVC Guy

and consuming REST services with ASP.NET Web API using MediaTypeFormatter and OData

errors and error detail policy in ASP.NET Web API Jimmy

Web API- How content negotiation works

Web API- Extending content negotiation with new formats

& Atom MediaTypeFormatter for ASP.NET WebAPI

With the ASP.NET Web API

download of file from ASP.NET WebAPI

Authorise WebApi with HttpClient

[RequireHttps] with ASP.NET Web API

throttling in ASP.NET Web API

ASP.NET MVC 4 Beta Released–ASP.NET Web API Basic Intro

In case you missed the news, the beta of ASP.NET MVC has been released. You can download
these latest bits MVC 4 Beta bits here
using the Web Platform Installer or you
can download
the complete stand alone setup package instead
. This installs side-by-side with
ASP.NET MVC 3 so you can started working with the latest in 4 without impacted your
existing MVC3 projects. Also important to note, this release includes a “Go-Live”
license so you truly can start using this release. (Note, that all standard caveats
apply, test your stuff, things may change before RTW)

The top features listed in this new release are:


  • Refreshed and modernized default project templates

  • New mobile project template

  • Many new features to support mobile apps

  • Recipes to customize code generation

  • Enhanced support for asynchronous methods

And much, much more!

One of the new and exciting additions mentioned in the list above is the ASP.NET Web
API. Originally know as the WCF Web API (Codeplex
) it has now be integrated tighter with ASP.NET. And why do you care? In this
day and age, almost anything worth connecting to on the web has some sort of API,
facilitating communication from a wide range of clients from browsers, to phones and
tablets. The ASP.NET Web API provides a “modern HTTP programming model.”

It’s easy to get started by selecting the “Web API” template after selecting an MVC
4 Project type.


The new project will contain a sample ValuesController class that shows how to get
things rolling.

public class ValuesController
: ApiController { // GET /api/values public IEnumerable<string>
Get() { return new string[]
{ "value1", "value2" }; } //
GET /api/values/5 public string Get(int id)
{ return "value"; } //
POST /api/values public void Post(string value)
{ } // PUT /api/values/5 public void Put(int id, string value)
{ } // DELETE /api/values/5 public void Delete(int id)
{ } }

Now if you’re familiar with both MVC and common Web API’s, the next step should come
as no surprise. Making a call to http://localhost:33214/api/values will
call the ValuesController, and execute the Get method. In a browser the result may
at first appear like this:


Here’s where you may be confused if you’re not familiar with web API’s. To understand
what’s going on I would encourage you to take a look at the browser’s request and
associated response returned using a tool such as the F12 Developer tools in IE9,
Fiddler, or Firebug or other developer tools in other browsers.

By enabling the F12 Developer tools, selecting the “Network” tab and clicking on Start
Capturing, you will be able to see details for the http traffic.


The key think to note is the Type, or mime type associated with the response. You
will see that it is “application/json” instead of the normal “text/html” that an HTML
page would normally return. If I go ahead and tell IE to open the file and look at
it in notepad we will see the json representation returned by the controller.


This result corresponds directly to the controller code:

 // GET /api/values public IEnumerable<string>
Get() { return new string[]
{ "value1", "value2" }; }

Simple, and extremely powerful. I’ll be posting more on the new ASP.NET Web API and
other ASP.NET MVC4 features in the days ahead.

TRINUG December Event

In an ongoing tradition, the Triangle
.Net Users Group
will be hosting a special December main meeting featuring a number
of “Lightning Talks” by local presenters and a pot luck dinner. It’s a great way to
get a full dose of technical info while enjoying a fun and festive gathering with
your peers in the local .Net community.

up to give a talk …

up for a dinner item…

Please help spread the word! I look forward to seeing you there!

NOTE : Meeting is Wednesday December 14, 2011.

Getting Back to Blogging

I’ve been blogging for quite a while now, and I’ve been amazed how my posting here
have introduced me to many great people, helped others, and resulting in some really
interesting opportunities for me. Over the last year and a bit, with the rapid flow
of information through twitter and other online resources I’ve slipped out of the
habit of frequent blog posts that I’ve previously done and enjoyed.

Starting today I plan to change that.

Now don’t worry, I’m not going to try and make up for lost time with a landslide of
new posts today, but I do plan to return to a more consistent routine of posts. If
you’re still reading this, thanks for sticking around.

RDU Code Camp – Saturday November 5, 2011

One week from today, on Saturday November 5th a number of North Carolina software
developers will be spending the day at camp… Code Camp. If you’ve never attending
a Code Camp, you’re missing out on a great opportunity to learn, network, and be both
inspired and motivated to expand your skills. A number of speakers from near and far
will be presenting on a variety of topics. To top it off, this event is free thanks
to the support of a number of generous organizations.

For more information and to register visit http://codecamp.org.

Build Windows–Now We Know


After weeks of waiting, enduring silence and rumors, developers finally got their
first public look at Windows 8 at Microsoft’s BUILD conference. People here at the
conference were pretty excited about what they saw, and I can imagine many, many more
watching remotely were also excited, or even relieved to see the details. Having talked
to a number of people about their expectations a lot of people were very concerned
to learn about the future of the technologies they have invested in both personally
learning and financially building into projects. 

For people who were worried, maybe the biggest news for them is that if your application
runs under Windows 7 it will continue to run under Windows 8. That being said, we
can not expect innovation without change at some point along the way. Windows 8 introduces
“Metro style Apps”, a new multi-language, multi-view technology. By multi-language
it means that native languages such as C and C++, managed languages like C# and VB.Net,
but also JavaScript and have equal access to the Windows (WinRT) APIs to interact
with windows. In reference to the views, it allows the use of HTML/CSS with JavaScript
and XAML with both C# and C++ applications. The “Metro Style” applications are part
of an “immersive”, “touch first”, “no compromise” user experience that spans all aspects
of Windows 8.



[slide borrowed from \\Build\  keynote

As you can see in the above diagram, the new “Metro Style” apps run along side the
traditional “Desktop Apps”. Again, this means that the app you are working on today
will continue to work on Windows 8. In many ways, today marks the begging of a new
era in Windows application development. Well that may sound sound a bit outlandish,
it’s true. This no application model not only allows a new model for application interactions,
it promotes it with a variety of services to let apps communicate with each other
and with other devices through the cloud.

Bottom line, Windows 8 is going to be a game changer that creates many exciting opportunities.

Have You Been to the MSDN Site Lately?

Have you been to the MSDN site lately?
I ask because I know that personally when I need to lookup something information related
to my development efforts I’ll just search for it, often getting a mix of hits, instead
of heading right the “the source” for much of this info. Admittedly, in the past some
information had been hard to find on site, but if you haven’t checked it our recently,
the MSDN website has undergone some changes.


A quick glance at the site shows a much cleaner looking design, with what seems to
be much better organized information. For a fun comparison, here’s what the site looked
like a few years ago.


Below the main menu, the site is dividing into three “portals” separating content
by Platforms, Tasks, and News.


The Platforms page provides some overview information and easy access to dive further
into Desktop, Web, Cloud, and Phone development areas.


For other areas, a quick click on the “All
Developer Centers and Hubs
” link takes you to a nice site map for all of the major
areas. As you continue to drill into topic areas, the trend of better organized information
continues, pulling together a variety of documents, videos, links to articles, and
other great sources of information.

Microsoft Build Windows Conference and Windows 8

Recently at the D9 conference Microsoft demonstrated then next version of Windows.

“Windows 8 is a reimagining of Windows, from the chip to the interface. A Windows
8-based PC is really a new kind of device, one that scales from touch-only small screens
through to large screens, with or without a keyboard and mouse. ”

In the demos, Microsoft showed off a some of the new interface and features. This
video shows off some of it.

Microsoft also officialy announced a new conference this September called Build
where they will be sharing much more information with developers regarding
Windows 8. In fact, most requests for additional details about Win 8 generates a “learn
more a Build” response.

Since these announcements there has been a lot of speculation by individuals on what
this means for current technologies and future development.  While I’ve heard
some very interesting interpretations by people, I’ve also heard some things that
I feel are completely inaccurate.  However not knowing all of the details myself,
I’m not in a position to say what is accurate or not, but would encourage everybody
be cautious about what they hear and read based on this early information, and of
course…. “Learn more from Build”`