Hints of What’s to Come at Build 2014

It’s the night before Microsoft’s Build 2014 Developer conference gets underway and many are wondering what announcements the event will bring. While I’m sure there are many surprises tomorrow, there are certainly some interesting details in the titles of sessions released so far.

Some that caught my eye were:

Developing apps using the Common XAML UI framework (Windows 8.1. Windows Phone)

What’s new in WinJS (Windows 8.1, Windows Phone)

The New Windows Phone Application Model

Windows Phone Enterprise Management

Building a Converged Phone and PC App using HTML and Javascript

Better App Compaq with Enterprise Mode for IE11 (Tagged Windows 8.1 and Windows Phone)

Windows Desktop Development Panel Discussion (Look at all those XAML folks!)

We’ll have to see what tomorrow  brings, but lots of juicing bits to keep us guessing. You can check out the schedule here: http://channel9.msdn.com/Events/Build/2014?sort=status&direction=asc#theSessions

 

 

 

 

TRINUG Intro to XAML Layout Presentation

A big thanks to everybody that showed up to the TRINUG Intro to XAML presentation / hack night. It was a fun format to present some content while fully engaging and audience coding away. It was awesome to see everybody’s interest and enthusiasm.

There were definitely a few areas that I didn’t get to dig into as much as I would have liked to during the presentation with all the Q&A/Interactions, so I thought I would put together a quick video summary of the Xaml Layout portion of the discussion. I’ll hopefully record this a bit better as it’s a little rough but wanted to go ahead and share it out any. Enjoy!

 

 

Resolving Issues with IE10/11 HTML5 Video on Windows 7

Recently I encountered an issue on a project where html5 videos that had been working fine were having playback problems on Windows 7 systems in Internet Explorer 10. Further testing showed that IE11 had the same issue as well. Some time on the search engines found others with issues but no solutions.

In the end I was able to trace the issue back to the content types or mime-types that were being assigned to the files when they were being upload to Azure blob storage. I discovered that while videos with the mimetype of “video/mp4″ played fine, other that had been labeled as “Video/mp4″ would not play. The difference being the upper case V. Windows 8 running IE 10 and IE 11 seem to have no problem with this, but something in the Win7/IE10 combination has issues. (IE9 seemed to work fine). From what I could tell, according to RFC 2045 the standard that appears to document content types, case should not matter:

"The type, subtype, and parameter names are not case sensitive.  For
   example, TEXT, Text, and TeXt are all equivalent top-level media types."

Oddly, in the end it did matter. Hopefully if you’re searching for Internet Explorer 10 HTML5 video playback issues on Windows 7 you’ll find this solution sooner than I did.

 

 

It’s been a fun week of community events!

It’s been a fun week participating in local developer community events. This past Saturday was the (9th?) annual Raleigh Code Camp where I had a blast presenting on some of my recent work with Windows Azure Mobile Services. This yearly event put on by volunteers from TRINUG is always an amazing event, bringing together attendees and presenters from near and far for a geeky day of learning.

Later in the week I participating in a panel of “loud people” discussing “How do you stay current in our warp speed environment?“. The panel brought some interesting opinions and that audience participated in a fun conversation about our industry. A lot of the conversation focused around learning resources, including books, blogs, videos and twitter. It was a reminder of how much I enjoy reading quality content on a variety of blogs, but also how I’ve neglected posting to my own. I tried earlier in the year to get back in blogging groove again and failed, but I’m going to take another shot at here. Not sure if anybody is still here reading, but if you are you’ve been warned.

While I get back to speed, please check out some other local bloggers:

David Green – http://nodevleftbehind.com
Jamie Dixon – http://jamessdixon.wordpress.com
Steve Suing – http://www.stevensuing.com/

 

Test Post

Test post from Word on my Surface RT

 

The Post Function Key Era?

Almost every personal computer I’ve owned throughout the years has included “function
keys” on the keyboard. According to Wikipedia:

A function
key
is a key on a computer or terminal keyboard which
can be programmed so as to cause an operating system command interpreter or application
program to perform certain actions
.”

From my Commodore 64 and Amiga’s, every desktop and every laptop I’ve owned there
have been the familiar site of that row of keys. Even my MacBook has them, although
they try to hide but…. The function key has always been there through the history
of the PC.

Smartphones and their on screen keyboard have made us very familiar with a reduced
selection of keys. Windows 8 makes touch devices with no physical keyboard attached
are enabled for typing through an on screen keyboard which has a reduced number of
keys and modes that you can switch between to access additional characters, such as
numbers. Missing from the on screen keyboards are the function keys.

image

One of the most talked about elements of the recent Microsoft Surface unveiling has
been the keyboard cover, providing a physical keyboard for the tablets. If you look
closely at the top row of keys… you’ll see something different from the majority of
keyboards attached to PC’s today…

image

Those familiar F1-F12 function keys are gone, replaced by keys for volume, search,
and web.

image

Is this the end of the function key? As developer write Windows 8 applications, they
can no longer rely on the existence of the “F-Keys” for user interactions. Will other
keyboards follow along? Do we care? What will be the next key to go? Will the Post-PC
era also be the Post-F-Key era?

[Parting side note: Second to only the “Not enough memory to eject disk”error on early
Mac’s, by favorite BIOS boot error of all time is “No keyboard detected: Press F1
to continue”]

 

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.

image

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
possible.

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.

image

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.

 

ASP.NET Web API Links

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
here.

WebAPI
for the MVC Guy

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

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

ASP.NET
Web API- How content negotiation works

ASP.NET
Web API- Extending content negotiation with new formats

RSS
& Atom MediaTypeFormatter for ASP.NET WebAPI

Hyperlinking
With the ASP.NET Web API

Force
download of file from ASP.NET WebAPI

Authenticate,
Authorise WebApi with HttpClient

Implementing
[RequireHttps] with ASP.NET Web API

Request
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:

  • ASP.NET Web API

  • 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
Link
) 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.

image

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:

image

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.

image

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.

image

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.