Showing posts with label Windows Phone 7 Series. Show all posts
Showing posts with label Windows Phone 7 Series. Show all posts

Saturday, November 06, 2010

Smartphone Essentials WP7 Article - not completely true...

I was in a local newsagent the other day waiting for my train and noticed a magazine "Smartphone Essentials" (UK magazine) as it had a spread on the newly released Windows Phone 7 device. I only had a couple of minutes, so I skipped to the Windows Phone 7 bits.

I have to say the authors for this magazine need to do more research before they publish this stuff. Windows Phone 7 Series is not "Brand new from the ground up". The magazine was suggesting that WP7 is a completely new OS built from scratch. This is simply not true. When people read this, they generally assume 1 thing, it's brand new so it will be full of bugs and issues so I'm going to wait for v.NEXT.

Windows Phone 7 series has a new shell and application framework that is fully managed code that sits on Windows CE 7 OS. Windows CE is the same OS used in Windows Mobile except in Windows Mobile the latest version used is Windows CE 5.2.

The other thing that is not true was that fact they mentioned Windows Mobile is dead. Windows Mobile is still being sold and is still supported by Microsoft today. It will be renamed soon to Windows Embedded Handheld which is essentially still the same Windows Mobile shell OS.

There is still a fairly large enterprise market with investments in Windows Mobile that are being used for mission critical applications today and will continue to do so. Windows Embeded Handheld will be geard towards business users. Some Windows Mobile devices such as the MC65 and ES400 will port over to the new OS.

Smartphone Essentials: just because Windows Mobile is not competing too well against platforms such as Android and the iPhone in the consumer markets, doesn't make it a dead platform. There is another world out there.

Thursday, September 02, 2010

No need for server side clientaccesspolicy.xml when using Silverlight for Windows phone 7 Series

If you're a seasoned Silverlight developer you'll be well aware of having to incorporate the clientaccesspolicy.xml file in the root of your service domain with a method that returns the file as a Stream object. MSDN documentation that describes that and the documentation can be found here: http://msdn.microsoft.com/en-us/library/cc197955(VS.95).aspx

Then you would typically define a method that looks like the following that is accessible via a RESful call (if using WCF) - note: the UriTemplate here is what is important:
[OperationContract, WebGet(UriTemplate = "/clientaccesspolicy.xml")]
Stream GetClientAccessPolicy();
Executing any method from within a desktop Silverlight app whether in-browser or out-of-browser (SL 3 feature) will call that method above implicitly by the SL HTTP stack.

When calling any web method from a Windows phone Silverlight application, the 'GetClientAccessPolicy' is not called so there is (currently no need for it if your clients are from WP7 apps).

I'm not sure if this will change when the WP7 tools RTM on the 16th September - I will be the first to try!

My colleague Anthony Cooper found this out, so thanks to him.

Windows Phone 7 Series released to RTM

Just in case you haven't heard the news yet, yesterday Windows Phone 7 Series was released to RTM: http://windowsteamblog.com/windows_phone/b/windowsphone/archive/2010/09/01/windows-phone-7-released-to-manufacturing.aspx

Excellent work to the Windows Phone team!

So now we wait for OEMs to produce some hardware...not long I'm sure.

The tools RTM on 16th September: http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/08/23/a-developer-s-roadmap-to-windows-phone-7-launch-timing.aspx

Wednesday, July 28, 2010

Building your Windows Phone 7 Series apps using Team Foundation Server 2010

UPDATE: There is a workaround to what I have said here. See this post - a really cool way to build WP7 targeting different WP7 builds: http://justinangel.net/WindowsPhone7EmulatorAutomation#BlogPost=TFS2010WP7ContinuousIntegration

So the ultimate question is, how do I build my Windows Phone 7 Series apps on TFS and perhaps run unit tests against a Windows phone 7 series emulator. The short answer is you can't, well that's not entirely true. You can build your Windows phone 7 series apps on TFS so long as you install the developer tools on your build server.

Bear in mind when you install the developer tools you will not only get all the required build targets and Silverlight framework for Windows phone 7 series but also a VS2010 IDE as well. This will either be VS2010 Express edition if you don't already have VS2010 RTM installed on your server, or the tools will integrate into VS2010 RTM (if installed). Either way, you are going to get an IDE on your build server.

This might sound rather ugly and I have asked Microsoft for separation of the tools/framework etc from the IDE so ISVs/consultancies can be more flexible how they build their apps. But this is really not high on Microsofts priority list right now. The reason is simple. These tools are targeted toward consumers, so the majority or at least what Microsoft would like is the majority of people building apps/games for Windows phone 7 series are individual programmers whether professional or ameteur and not big companies. Long term this will change.

Instead, the priority is to deliver a really quick and easy way to get up and running building Silverlight or XNA apps for Windows phone. And Microsoft has done this. Simply go to http://developer.windowsphone.com/ and you can download a single package, run it and this will set your machine up ready to build and ship apps on the Windows phone platform. No other downloads are required.

The cool thing about this is, unlike Windows Mobile development, the tools are free. A great step forward.

So to recap, in order for more professional programmers to build Windows phone apps using a sophisticated continuous integration yada yada solution, you need to install the tools on your build server, but you will get the IDE as well.

I also mentioned unit testing. Currently the latest beta tools do not support unit testing on the emulator. Of course you can still write unit tests that execute on the desktop against your Silverlight for Windows phone apps. I have a sample of this over at http://wp7.codeplex.com/

Happy coding!

Sunday, July 18, 2010

Windows Phone 7 Extension Tools

I started porting some code from the Compact Framework over to Silverlight for Windows Phone.

I have created a project on codeplex: http://wp7.codeplex.com/. The solution so far contains an IoC with support for implicit dependency injection - in fact this is a port from the Compact Container on the CF. It also contains a port of the Common Service Locator for the desktop by the p&p team at Microsoft.

The project is designed to be a work in progress and I'll add stuff to it if I think it might be useful to others.

I do plan over the next couple of days to add an event aggregator to the solution that will integrate with the container nicely to promote nice loosely coupled multicast event model in your Silverlight applications.

I am also working on an API that allows communication with the Microsoft Azure Service Bus - much like you get on the desktop. I will checkin as soon as it is available.

The current solution that is checked in is designed to be used with the latest release of Windows Phone developer tools beta.

Friday, July 16, 2010

Windows phone virtual live class - July 20th and July 22nd

Jump start your development of Windows Phone 7 applications by attending Windows Phone 7 JumpStart. This free virtual live class, comprised of four instructor-led 3 hour sessions, will guide you in developing applications for the Windows Phone 7 platform using Silverlight and XNA. Register today by visiting: https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032455932&EventCategory=2&culture=en-US&CountryCode=US.


Course sessions:

July 20 – 8am: Session One: Getting Started with Microsoft Windows Phone and Silverlight
July 20 – 1pm: Session Two: Programming Game Applications with XNA
July 22 – 8am: Session Three: Programming Applications with Silverlight
July 22 – 1pm: Session Four: Review and Wrap Up

Wednesday, July 14, 2010

Pivot and Panorama support in Windows phone 7 beta






The title of this blog post is a little confusing (it was meant to be!) in that there is no support for the Pivot and Panorama controls in the latest bits of Windows phone dev tools. The controls pictured above are courtesy of Stephane Crozatier.

Those controls are freely available on codeplex to download but were designed for the CTP bits of Windows phone. So as there were some breaking changes between the CTP and the recently released beta they won't work out of the box. But it very easy to fix.

Firstly you need to do delete the Microsoft.Phone.* references and add the Microsoft.Phone.dll to the project. All those additional dlls have been merged into Windows.Phone.dll.


Then you'll need to clean up the XAML namespaces. Luckily for me I have ReSharper 5.0 installed and all I have to do is press Alt+Enter and it fixes all my problems! nice



Now if you want the sample WeatherForecast app to run you need to do 1 last thing. That is the ApplicationBarIconButton class now has a mandatory Text property so you need to set this property for each of the buttons in the MainPage.xaml file.

Now once I clean up all that XAML, I rebuild and run and I get...



Sweeet....

Another nice cool thing with this emulator over the older Windows Mobile emulators is that you can do a ALT+Prnt Scrn to get a copy of the current focused window. You can't do this on Windows Mobile emulators.


Windows phone UK User group






I just learn't there has recently been a Windows phone 7 UK user group setup. The first meeting is 28th July at Conchangos offices in London. http://wpug.net/.

Microsofts Paul Foster and Rob Fonseca-Ensor will be speaking. There is now a wait list on the event but worth a try right!

Monday, July 12, 2010

First impressions Windows Phone Developer Tools beta

I just installed the beta bits released this evening and as per the CTP the install experience is brilliant. Except with the beta the greatest thing is support for Visual Studio RTM. So unlike the CTP, even if you had VS RTM installed, then you installed the WP7 dev tools, the installer would install the CTP of VS express and not integrate with VS RTM. Actually I found a whole bunch of errors when attempting this with the CTP.
New project in VS 2010 RTM (no support for VB.NET though):


However this build is good. I'm running VS 2010 Ultimate and VS 2008 Team Suite and this build integrated with VS 2010 RTM nicely.

It is also worth noting in this release of WP7 dev tools, you get Expression Blend 4 for Windows Phone beta. In the CTP you had to download this separately.
So experience so far is great, well done Windows Phone 7 team.

Emulator running bing:



I'll post my experiences of actually writing WP7 code using these bits in later posts. In the mean time you can download and try for yourself.

Windows Phone Developer Tools Beta is here

Announced today at WPC. Get it from: http://www.microsoft.com/downloads/details.aspx?FamilyID=c8496c2a-54d9-4b11-9491-a1bfaf32f2e3&displaylang=en

Check out this post on breaking changes from CTP to Beta: http://blogs.msdn.com/b/jaimer/archive/2010/06/28/migrating-apps-from-windows-phone-ctps-to-the-beta-build.aspx?wa=wsignin1.0

I'll post my feedback once I've installed it and tried it out.

Notice this under "System Requirements:"

This Beta of the Windows Phone Developer Tools is compatible with the final version of Visual Studio 2010


This has made my day :)

Wednesday, March 24, 2010

MVVM - Windows phone 7 series pattern of choice

This post is really for my benefit (although it might help others). Here is a good article on the MVVM (Model-View-ViewModel) pattern that is showing a lot of interest in the WPF communities.

It is very much a different way of thinking when designing UI architecture although very similar to Fowlers relatively new Presentation Model pattern.

http://msdn.microsoft.com/en-us/magazine/dd419663.aspx

Implementing an IoC container in Silverlight on Windows phone 7 series

I wrote a while ago about implementing a Service Locator for the CompactContainer on the Compact Framework here: http://www.simonrhart.com/2010/02/implementing-commonservicelocator-on.html

I mentioned in that post that I was using the CompactContainer for the CF freely available here: http://code.google.com/p/compactcontainer/ But now as I'm getting into Silverlight as it's the technology of choice when building applications for the Windows phone 7 series platform (as well as XNA), I needed an IoC container to solve the same problems on Silverlight as they do on the Compact Framework.

So I tried to port the container along with the ServiceLocator as blogged about before. I recieved errors in the ComponentCollection class after I tried to compile under Silverlight. Mainly because the following predicate methods such as:
  1. List.FindAll
  2. List.Find

Are not supported in Silverlight 3 as the documentation suggests. However, they are in XNA. As the generic List class belongs to mscorlib.dll (System.Collections.Generic) I noticed that mscorlib is shared for both XNA and Silverlight applications on WP7. I'm trying to find out why this is, or if there is a way of making those methods work in Silverlight.

Anyway it's not the end of the world that those methods are not in Silverlight, all I had to do was replace the following methods in the ComponentCollection class:


public List<ComponentInfo> GetComponentInfoListFor(Type serviceType)
{
return _list.FindAll(ci => ci.ServiceType == serviceType);
}

public ComponentInfo FindForService(Type serviceType)
{
return _list.Find(ci => ci.ServiceType.Equals(serviceType));
}

public ComponentInfo FindForClass(Type classType)
{
return _list.Find(ci => ci.ClassType.Equals(classType));
}

public ComponentInfo FindKey(string key)
{
return _list.Find(ci => ci.Key.Equals(key));
}
With the following code:
public List GetComponentInfoListFor(Type serviceType)
{
List<ComponentInfo> results = new List<ComponentInfo>();

foreach(ComponentInfo component in _list)
{
if (component.ServiceType == serviceType)
results.Add(component);
}
return results;
}

public ComponentInfo FindForService(Type serviceType)
{
ComponentInfo result = null;
foreach(ComponentInfo component in _list)
{
if (component.ServiceType == serviceType)
{
result = component;
break;
}
}
return result;
}

public ComponentInfo FindForClass(Type classType)
{
ComponentInfo result = null;
foreach (ComponentInfo component in _list)
{
if (component.ClassType.Equals(classType))
{
result = component;
break;
}
}
return result;
}

public ComponentInfo FindKey(string key)
{
ComponentInfo result = null;
foreach (ComponentInfo component in _list)
{
if (component.Key.Equals(key))
{
result = component;
break;
}
}
return result;
}
That was all I had to change everything else just compiled and worked. Full dependency injection worked as per on the Compact Framework. It seems moving to Silverlight is going to be less painful than I originally thought!

Tuesday, March 16, 2010

Windows Phone 7 Series emulator is running slow

When I first downloaded the new Windows Phone 7 Series developer tools CTP package, I found the new emulator to be very slow. This is the opposite of what I was expecting as the new emulator is built for x86, runs within a VM and supports hardware GPU host acceleration (so long as you have a gx capable of DirectX10 and at least support for DDI10) - which my laptop does.

To determin whether you have DirectX10 support and at least DDI10, run DxDiag.exe from the command-prompt and inspect the Display tab.

So what next, ok so I learned that in order for the emulator to make use of the GPU host from the VM I needed to enable HW virtualization. So how do I know if I have this enabled? this is enabled at BIOS level and normally disabled by OEMs by default. You can run the Microsoft Hardware-Assisted Virtualization Tool here: http://go.microsoft.com/fwlink/?LinkId=163321



So after running this tool I got the above. So this confirms that I didn't have hw virtualization enabled. After enabling it in the BIOS my Windows Phone 7 Series emulator is now running much faster!

More details about this process here (not WP7 specific): http://www.microsoft.com/windows/virtual-pc/support/configure-bios.aspx



New Windows phone series 7 forum

Ask your new Windows phone 7 series questions here:
http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/

Monday, March 15, 2010

Thursday, February 18, 2010

It's Windows phone 7 Series time at MIX this year

It's no secret that MIX will be covering a lot of the Windows phone 7 Series content this year in Las Vegas (March 15th - 17th).

I just wish I was going, perhaps if I can find a cheap flight.....

Note: Windows phone sessions to be confirmed...

http://live.visitmix.com/

Tuesday, February 16, 2010

Windows Phone 7 Series Announced at MWC



You've probably heard by now that Microsoft has announced Windows Phone 7 Series to the community on 15 Feb at the Mobile World Congress conference in Barcelona by Steve Ballmer. The Microsoft official press release can be found here.

I have to say the platform looks awesome. It looks very Zune HD like which is partly to do with the fact that Joe Belfiore is on the design team.

The best publicly available video to date that shows the platform UX is over on channel9 here:
http://channel9.msdn.com/posts/LauraFoy/First-Look-Windows-Phone-7-Series-Hands-on-Demo/

Dev Story:
If you're expecting to hear about the developer story or anything to do with the application platform then you'll be disappointed. Microsoft has not made any thing public regarding tools, frameworks etc for the new wave of Windows Phone 7 Series products. Microsoft is gearing up to tell the community about the developer story at MIX in Las Vegas on March 15-17. For sessions on Windows Phone 7 Series at this event see here.

For developer story announcements keep an eye on Charlie Kindels' blog as he is responsible for the Windows Phone 7 Series application platform.

The Windows team blog has a post on the announcement here.

The Windows Phone twitter hashtag is: #wm7