Wednesday, March 16, 2011

Lessons Learned in the Windows Phone 7 Marketplace

The following are a few of the things I learned during the development process and submitting a first application to the Windows Phone Market Place. Hopefully they can be of some help to others.

Application Name

If your application name is more than about 15 characters, the whole application name may be truncated on the various WP7 screens. This is also true in the thumbnail view in the Market Place. Note how the text fades to white toward the right side of the name in the screenshot below.

Iconography

Zune MarketplaceGraphic design in the consumer market space is a necessity. Your icons are displayed immediately adjacent to other professional designs - regardless of app quality.

Application Icons

Initially I created a 31px application icon. I think that was the size used during the RC or beta version of Visual Studio Express for Windows Phone 7. The following are the default icon sizes for Windows Phone 7 application certification:

  • ApplicationIcon.png 62px (transparency allowed)
  • Background.png* 173px (transparent allowed)

* Tip: don’t put the application name in this image (or any important cosmetic detail at the bottom) as the Application title text from the Visual Studio property page will be rendered on top of the 173px icon near the bottom of the image (see the “Start Screen” in the screen shot below).

The following is a composite image containing multiple screen shots:

  • Phone Windows menu screen (left)
  • Visual Studio project properties, application tab (center)
  • Phone Start screen (right)

Note in the image where the text is displayed and which images are used on the various app screens. Click the image for full size.

WP7 Iconography map in Visual Studio

Market Place Icons

The following square icons (without transparency) are required for display in the Market Place:

  • 99px
  • 173px
  • 200px

WP7 application screen shots can be uploaded to showcase key functionality.

  • 480 x 800px screenshots
  • vertical orientation for upload
  • set zoom level on emulator to 100% for correct screenshot resolution (need a high enough resolution monitor to capture the screenshots. 1024X768 is not good enough)

Marketplace Detailed description

I copied my description from a website where the application is described. I’m not sure I would do that in the future as it did not display properly on the app hub submission page (note the incorrect text wrapping at the end of the lines. There doesn’t appear to be an option to edit the description without re-submitting the application.

WP7 app submit description

I was pleasantly surprised the text looked correct when my application was certified as approved, but I don’t know if the person testing the app corrected the description text formatting during prior to approval/publishing.

WP7 marketplace description using Zune software

Another developer had the misfortune of an unfortunate example using a bullet list format.

Submission and Certification

I submitted my application to the App Hub on a Sunday evening and it was certified by the following Wednesday morning. It was accepted on the first submission, but the feature set (and graphic design) was kept intentionally simple in the first version.

Thursday, March 10, 2011

Windows Phone 7 Testing a Date Change in the Emulator

imageI wrote a WP7 application that stores a bit of data based on today’s date. Tomorrow when the date changes, yesterday’s data gets cleared out to start fresh. Before submitting the app to the App Hub I needed to test whether it would work as expected when the date changes. At the time, I didn’t have an actual Windows Phone 7 for testing so I used the Emulator. The testing process didn’t work out quite as I expected.

Happy Path

  1. Load Emulator
  2. Deploy app to the emulator
  3. Run app
  4. Click some buttons that store today’s data
  5. Change the date on the development box (assuming that is where the emulator gets its current date)
  6. Click the windows key to unload the app
  7. Return to app (which should have a different date since I changed the date on the development box)
  8. The app data should be empty because it is a new day

Fail

There were a few misconception to the above.

  • It appears that the emulator loads today’s date when the emulator starts up, because it didn’t change when I changed the date in my development environment.
  • When you click the back button it unloads the application and you lose the data stored in Isolated Storage.

Fix

imageReplace steps 5 & 6 in the above “Happy Path” with the following steps to effectively test the date change:

  1. Click to the System Settings page in the Emulator
  2. Click “date & time”
  3. Toggle the “set automatically” slider to Off
  4. Click on the date in the date field
  5. Change the date to a different day
  6. Click the windows key and left arrow icon image to see the app in the menu.

Thursday, February 24, 2011

Iomega StorCenter ix2 Network Attached Storage for Hyper-V backup

imageRunning a virtualized environment like Hyper-V has some limitations that you don’t have with a physical server environment. Physical USB ports and DVD drives are shared by multiple virtual servers and they can’t all access them at the same time. Currently Hyper-V doesn’t support using external USB drives. If that is your typical backup and restore strategy, as is often the case for small businesses, you need another option like a Network Attached Storage (NAS) unit.

In my lab environment I selected the Iomega StorCenter ix2-200 1 TB Network Attached Storage. After a lot of research and pouring over user submitted reviews, I found that this cost effective unit had a proportionately smaller number of bad reviews compared to the other units I researched.

Noteable features that appealed to me were

  • RAID 1 with automatic RAID rebuild (two 500Gb SATA drives mirrored for redundancy)
  • User replaceable hard drives (I was going to easily outgrow the 500Gb available storage space)
  • One touch backup of the backup to a connected external USB drive
  • Ability to connect additional external USB drives for network accessible storage

The not so good

The web interface stopped working once with a “device not available” error or simply a HTTP server error web page after an extremely long browser hang. The drive itself continued to store and serve my backup images and shared files, but not being able to access the web interface got me wondering what else wasn’t functioning (like the RAID controller possibly?).

The web interface is the easiest way to check the amount of free space and perform firmware upgrades. The Iomega support website provided no useful help at all. With some research I found that other people were having similar issues with the ix4 model and a reboot of the NAS unit restored the web interface. Unfortunately for them, they were using the device to store their running virtual hard drives since the device is VMware certified. They had to first power down all the virtual servers (VM’s) before power cycling the NAS and power each of the VM’s back up - which is a serious inconvenience for the administrator and any users of the virtual servers.

A simple power cycle corrected my issue, but hopefully it will not be a regular occurrence as I don’t have physical access to my lab at all times.

Wednesday, February 23, 2011

Introduction to MSSQL Management Data Warehouse (MDW) presentation

Last night I presented an intro to SQL Server 2008’s MDW to the fwPASS Professional Association. The subject is primarily of interest to DBA’s rather than Developers since it is best leveraged by monitoring and managing an environment of multiple SQL Servers.

Tuesday, January 25, 2011

SQL Server Management Data Warehouse

Distribution Center warehouse

The Management Data Warehouse introduced in SQL Server 2008 is a comprehensive performance monitoring and reporting system. It is a handy way to consolidate performance monitoring and data for all your servers on a single system.

A couple of minor gotcha’s to consider when setting up the data collector. The setup is so easy it is tempting to do it on auto-pilot. Don’t.

  1. This is an obvious one, but I’m pretty sure it happens more than you would expect. Make sure to create a blank database on your monitoring server where you will store the aggregated data collection sets. Don’t accidentally pick one of your production databases or it will add all the tables, views, stored procedures, functions, types, schemas, and other logging objects into that database (there are a lot of them). It will also mark that database as a data collection warehouse which will show up in the database list when you configure data collection on your other servers.image
  2. Make sure to create the temp folder that will be used to cache the performance data until the periodic upload to the Management Data Warehouse. If the folder is not created, the upload jobs will fail.image

photo credit: Nick Saltmarsh / CC BY 2.0

Thursday, December 23, 2010

What is the DataField Name of a GridView bound to a String Array?

This is a special case that I don’t remember experiencing before but resolved with the help of a StackOverflow question Binding an ASP.NET GridView Control to a string array.

In a simple Asp.Net Membership management application I was simply binding a Role list to a GridView so I could click a link to see which users were members of a selected Role. I was using the following syntax in the CodeBehind where grvRoles is the GridView:

grvRoles.DataSource = Roles.GetAllRoles
grvRoles.DataBind()

Note: Roles.GetAllRoles() is in the System.Web.Security namespace which returns a string array of Roles from the aspnetdb Membership Database.


On the Designer:



<asp:GridView ID="grvRoles" runat="server" 
    EnableModelValidation="True">
    <Columns>
        <asp:CommandField ShowSelectButton="True" />
    </Columns>
</asp:GridView>

Which produced the following output with the GridView auto-generated columns. Notice the column name is “Item”, but imagethe datasource is a string array which doesn’t technically have a DataField name like if it was bound to a Generic List or Collection of class objects.


I want to use a LinkButton where the CommandArgument is the Role name which is represented as a String value of the array. So If I convert the “Select” Command button column to a Template field, what do I use as the DataField name? Generally I would use the syntax:



<asp:GridView ID="GridView1" runat="server" 
    EnableModelValidation="True">
    <Columns>
    <asp:TemplateField ShowHeader="False">
        <ItemTemplate>
            <asp:LinkButton ID="lnkMembers" 
                runat="server" CausesValidation="False"
                CommandArgument='<%#Eval("Item") %>' 
                CommandName="Select" Text="Members"></asp:LinkButton>
        </ItemTemplate>
    </asp:TemplateField>
</Columns>
</asp:GridView>

 

Note the CommandArgument=’<%#Eval(“Item”) %>’, but that won’t work, because the String Array doesn’t actually have an Item property. Instead you can use the longhand syntax: CommandArgument='<%# container.dataitem %>'.

 

If I don’t want to have the GridView auto-generate the columns, what do I use for the asp:BoundField name? Apparently there is a secret syntax by using an exclamation point <asp:BoundField DataField="!" HeaderText="Role" />.

The breakpoint will not currently be hit. No symbols have been loaded for this document.

Five foot bug art in Las Vegas Bellagio's conservatoryDoug Butscher’s blog post about the subject was able to get me debugging again in one of the Visual Studio 2010 projects in my solution. As he noted in Step 3, the Modules window indicated that the Symbols were loaded.

I stopped the debugger, deleted only the obj folder, and restarted the IDE. That was enough to fix it for me.