Tuesday, August 27, 2013

Migrating websites between Windows Azure subscriptions


Ages ago I set up an Azure 3-month trial subscription. More recently (although still over a year ago - I can't remember exactly when) I set up my MSDN subscription. I've added various services to both.
With the recent restructuring of the MSDN Azure benefits I reviewed how much I was spending on the different subscriptions and discovered I would be better off by moving the services that were still on the trial subscription to the MSDN one.

Unfortunately it wasn't straight forward.

I moved most services over but there is no way to migrate websites or mobile services yourself.

It is necessary to make a support request to ask for the services to be moved between subscriptions.

After much back and forth I was informed that they couldn't move the websites.

That's right.
You can't move websites between subscriptions yourself.
Microsoft can't move websites between subscriptions, if the destination subscription already contains websites, without introducing problems: (emphasis and grammar theirs)
"Please note that, currently we have issues while migration services, if the source and destination subscriptions have websites and the migration leads the websites to an inconsistent state."

So what's the lesson here?
If you're wanting to get off a trial subscription (maybe because you're just starting to use an MSDN subscription) be aware of this limitation. Move (or have Microsoft move) any websites before you add any more to the new subscription yourself.

Because of the above I was forced to delete the websites from the old subscription and then recreate them again on the new one.

Hope this information helps someone avoid having to delete and recreate their websites.






Monday, August 26, 2013

What are the essentials I need to know for Windows 8.1?

Windows 8.1 is coming.
Masses of information was released after BUILD but there's too much of it.
Where's the quick guide for developers who have already built for Windows8 and now need to look to update those apps for the changes in 8.1?

In the situation of having 8.0 apps in the store, how do I quickly get them ready for 8.1 with minimal fuss?

At the moment I know I need to do the following, but is there anything else to do too?
  • How to support the new/different tile formats/layouts?
  • How to manage the changes around having a separate snapped view? 

  • How to do this and still support 8.0? Do I need two version of the app or one that can do both?

  • What else?

I haven't got time to go through all the masses of information that's been released how do I do this quickly?



Wednesday, August 21, 2013

App studio and so called "crapps"

You've probably heard, Microsoft recently released Windows Phone App Studio as a way to create Windows Phone apps from a template via a wizard. It's very similar to ZipApp which was created by Microsoft and Nokia (in the UK) earlier this year but that generates both a Windows 8 and a Windows Phone 8 app.

App Studio has been promoted as having two benefits or target uses.
1. It allows anyone to make a simple app for sharing with a few friends or family.
2. It allows developers a jump start in creating an app.

Anyway, there is always a discussion about the value of simple apps based on a template. Particularly if they are based on a single RSS feed.

As this is the sort of app that can easily be created with App Studio I thought I'd have a look at what it does when asked to create an app based on a single RSS feed.
I've also built a few apps based on a single RSS feed and wanted to see how what can be done with App Studio compares with what I can do.
Obviously I wouldn't classify the apps I've made as "crapp", rather they're examples of how to make a valid, useful app that supports a website by providing notification of new content and offline support.

I set out to get as close as I could to what I had created with App Studio as a way to see how good it is and if it was capable of creating something useful for people who'd rather use a tool than pay a professional developer.

Yes, I know that App Studio is still in beta and is likely to be further improved so it may be unfair to review it just yet. Maybe I'll review again it at a future point.


I only used the online wizard and didn't modify the generated code in any way. By doing so I was able to create a simple feed reader with a few advanced WP8 features. 
However, it was far from being ready for the store, let alone being a quality app.

My issues with what was created
  • The app must support a wide tile (even if there is no value in doing so)
  • The main tile must have a title (even if the image on the tile includes the app name/text)
  • The main tile must have static content on the back.
  • Some of the colors can be changed but not all of them. This means that it's not possible to make a theme agnostic app.
  • Some of the header text can be set to an empty string but the space on the page is still reserved for that text which means that if I don't want the header shown there will be a big space on screen.
  • Titles are never wrapped so if the RSS feed includes an article with a long title that title will never be fully visible. Headlines and titles are normally important. They encourage the user to read the full text so this is a big issue.
  • The main page of the generated app is a panorama with only one item in it. This is a bad practice as it is a poor use of the control and ends up in much wasted space and a header which can't be fully appreciated.
  • The margins and spacing within the app are wrong. They are inconsistent within the app and do not match the defacto, and recommended, standards of the platform.
  • If the RSS feed is from a Wordpress blog (and there are more than a few of them around) then it doesn't pick up the author of an item.
  • The full text of an item isn't retrieved/displayed in the app. This means that the user must click through to view the full text in the browser.
  • Images from within the text are not displayed.
  • The app supports speech to text to read an article. Unfortunately there's no way to stop reading once it has been started and if the speak button is tapped twice then the reading of the article is done twice.
  • While it is possible to share an article via the sharing task but no way to share via SMS or email. Both of which are highly recommended as a sharing options to have in an app.
  • There is no caching of information or offline support! - Yes really! In this day and age, the most basic and essential of requirements for a mobile application, one that is used in an inconsistently connected manner, isn't supported by the app. :(
  • The "live" tile is never updated. So it's not really live.
  • It's possible to pin an item. But if you tap on that pin when there is no network connection then the app crashes. Yes, in a "it won't pass certification" kind of way.
  • The app includes the ability to set a preconfigured image as the lock screen image. But that image is never updated and can't be modified or updated when new content is loaded.
  • The app can show lock screen notifications but this is only the hardcoded text set on the backof the tile when the app is created and is never changed.
  • The app include the ability to show lock screen status but has no icon configured and is completely pointless without an iconic tile. I had a flip tile. The main tile is never updated so the point of it being used to provide a notification on the lockscreen is worthless.
  • The app includes a splash screen. But it should be able to load fast enough to not need one. That one is there, and not even optional, shows a poorly optimised app that takes longer to start than it need.
  • The generated XAP is 2.56MB. For a simple RSS reader! A large part of this is due to the inclusion of a lot of third party libraries which aren't used by this app. A bit of selective compilation wouldn't go amiss.
  • And probably more...


Of course some of these issues may be considered as minor and are easy to fix by modifying the generated code.
My concern is that people see the app/code that is generated and, as it comes from Microsoft, assume that it is good and an example of the quality of apps that people should be producing.
Let's hope that anyone using the generator at the moment takes the time to modify the generated code accordingly.
Let's also hope that the App Studio is improved to address some of the above issues too.



Tuesday, August 20, 2013

Faster JSON serialization with ServiceStack.Text

I've been using JSON.Net to serialize objects to and from JSON for years.

However, ever since I heard that ServiceStack had a faster JSON serializer I've wanted to try it.
After all, speed is important, especially on a mobile devices, and if I can make my code run faster by just swapping out one third party library for another then that's a simple decision.


Today I finally got around to trying it and to do so I built a console app so I could put the two methods side by side.


Look both methods are very similar. And as I rarely do anything more complicated with JSON than just serialize or deserialize this is great.

Obviously the above isn't enough for me to prove that it's faster. I'm just trusting the benchmark testing done by others.

It's also a smaller DLL so it will reduce the overall XAP size and download time. Plus app load time too. :)



My only slight reservation is that ServiceStack doesn't give me the debugging assistance I get with Json.Net. Maybe I'll look to just use Json.Net in the debug build if this becomes an issue.

Wednesday, August 14, 2013

If you're going to truncate text...

I have mobile notifications set up on Twitter for when someone mentions me. (I'm @mrlacey by the way.)

The other day, I noticed this:


Notice the highlighted text. It seems to suggest an account name that starts with an "r". That's odd I thought. None of my twitter accounts start with an "r".
"I wonder what account it's from? I know, I'll look at the full message and see"




Hmmmm!?

If you're going to truncate text in your app, I'd recommend doing a better job of it than this.