Through thorns to the market

    image

    I want to share the experience of developing an application on Windows Phone 7.5, migrating it to Windows Phone 8, and what I think about the prospects in general. The information will be interesting first of all to beginning developers, since I myself just recently switched from web development to mobile and I still do not have much experience.


    Whatever you think, after reading the article that development for Windows Phone (WP) is hell, I’ll say right away:
    Microsoft guys are great: great SDK, affordable pricing, lots of documentation, great community and C # - all this makes the development process enjoyable and fun. I just want to tell you exactly about the difficulties that I encountered.

    A little about what I did. The task was extremely simple:
    There is a successful application on Iphone, Android, Ipad, Mac os, Windows ( who are interested ) and it was necessary to transfer it to WP. I started development at a time when Windows Phone 7.5 was at the forefront in the Microsoft phone market and Windows Phone 8 was about to appear. After clarifying the problem, the next thing to do was decide what to write on and how to write. If there were no questions on what to write on, then I had to think about how to write. The fact is that I already wrote an application for the WP7 platform, but it was simple and did not require any complex design patterns. Having read about the coolness of the MVVM pattern, I decided to try it and started looking for frameworks for its implementation. Most of all I liked the Mvvm Light toolkitfor its simplicity and easy entry threshold. Thanks to the use of MVVM, the process of migration to WP8, and then to Windows 8, has become much easier.

    Design

    With design we took a very long time. For us, this was the first experience and there were a lot of subtleties. In addition, not everything that looks beautiful will work quickly on the phone (for example, the choice between Pivot and Panorama). Since we immediately decided to support light and dark topics, we fussed around for a long time with selecting backrounds for pages, but did not come up with an option that would suit us (a separate hello to ApplicationBar, which is like an eyesore). I advise you to immediately think through all the menus in the application and what you will have in the ApplicationBar (it contains only the most necessary things: save, delete, cancel, add.). Think about how you will useaccent colors and how it will look in different topics. We tried the grid and we did not succeed. Then I first learned what a half-pixel is 8) (in the application, it still pops up 8 to this day)). Minimalism is good, but to make something stand out is really difficult.

    What about the components and controls?

    There are all necessary components and controls, but not all of them work as they should. I started by using the Windows Phone Toolkit . Everything worked well, but when it came to the subtleties, you had to tackle the file, especially when it came to performance and usability. Most of all, the slowed-down LongListSelector drove me crazy. At one of the conferences I heard about RadControlsHaving tried, I could no longer work with others. They are not expensive, but they will save a lot of time, and even standard elements, for example TextBox, PasswordBox, are much more pleasant to use (basic animation, clear button, opening asterisks in PasswordBox). The incident happened with the Multiselect ListPicker, which completely refused to work with Two-way databinding and had to be a little shaman.

    In addition, several things were crazy:

    - The virtual keyboard, when it appears, covers the bottom of the form. With this feature, I fought on every page and so did not completely win. I had to wrap each form in ScrollViewer and add a margin from the bottom when the keyboard appears. I really don’t understand why it doesn’t work like in Iphone.
    image

    - The transition by pressing the ↲ button on the virtual keyboard does not shift focus to another element, you need to process it yourself. For such a simple operation, I used a tricky helper

    - Changing the focus of an element, with the virtual keyboard open, causes the sleep element to be moved focus to be under the keyboard. (I changed the focus from Title to Original Title by pressing ↲)
    image

    - Until the focus leaves the two-way DataBinding field, it does not happen. For example, if in the situation shown in the picture above, click on the save button on the AppBar, then everything that will be in the Original Title field in the ViewModel will not come. This had to be circumvented with code

    private void UpdateSource()

    {

    object focusObj = FocusManager.GetFocusedElement();

    if (focusObj != null && focusObj is TextBox)

    {

    var binding = (focusObj as TextBox).GetBindingExpression(TextBox.TextProperty);

    binding.UpdateSource();

    }

    if (focusObj != null && focusObj is Telerik.Windows.Controls.RadTextBox)

    {

    var binding = (focusObj as Telerik.Windows.Controls.RadTextBox).GetBindingExpression(Telerik.Windows.Controls.RadTextBox.TextProperty);

    binding.UpdateSource();

    }

    }


    - ApplicationBar does not work with commands and it can only be localized programmatically. In addition, making a dynamic ApplicationBar (for example, each Pivot Item has its own ApplicationBar) is still a crutch. I had to use the BindableApplicationBar , which is very bad friends with Expression Blend.

    - If you want to display a large amount of text on the page, you will be disappointed in the form of a restriction, and everything that does not fit 2048x2048 pixels will be absorbed by the Microsoft black hole, and only this article will help you .

    - how easy it is to work with pictures so that they look equally good on different screens, I did not understand and used multi resolution image

    Database

    The database turned out to be the biggest hitch, I would even say real fuck up. Version WP7.5 (as well as subsequent ones) has its own built-in DBMS - SQL CE. The first version of the program was implemented on this DBMS. I must say that the program for Iphone, Ipad, Android and other OSs was written using SQlite. But for WP7, at that time, there were no official drivers (as there are none even now, they appeared only with the version of Windows Phone 8), and I did not want to contact the unofficial one. This turned out to be a little shock for the client, but with a scratch we ported the ready-made sqlite database to SQL CE, created models, described relationships, indexes, etc.

    When working with small amounts of data, the database worked without problems, but when the number of records exceeded a couple of thousand, tangible brakes started here. For a long time I tried to optimize the work with the database, but nothing came of it. In addition, I have a free version of the studio and working with the database was a bit problematic, the viewer was not installed for it and I had to find a program for working with sdf files for a long and tedious time.

    Then it was decided to start development under Windows 8 \ RT and what was the general surprise when it turned out that Windows CE \ SQL is not supported by Windows 8 \ RT and they recommend using sqlite (by that time sqlite drivers for Windows 8 \ RT had already been released Phone 8).

    It was a shock. Having spat on everything, we decided to look for options for working with sqlite on Windows 7.5. Having spent a lot of time, I found an outdated library. Fortunately, it contained transaction support, without which we could not work. A small helper was written to work with the library (I can give the afflicted). And everything seemed to work, but I still dig out the jambs in it to this day. In addition, it works very poorly with UTF8.

    Personally, I concluded: if you need to work with the database, then only sqlite and only starting with Windows Phone 8.

    Working with the server

    Working with the server was not very difficult. The RestSharp library (Simple REST and HTTP API Client for .NET) http://restsharp.org/ helped me ease the work with the API. The only difficulty was performing synchronous queries. In WP7, this can be done using delegates. True, sometimes it seemed to me that I was completely confused in the intricacies of the callbacks and had to perform refactoring.

    In addition, it turned out to be impossible to work with SSL and it is very sad. But in general, everything is not as scary as working with a database.

    Localization

    There were no special problems with localization. In the first version of the program, it was decided to support 12 languages. Translations were made using the service http://www.icanlocalize.com. I can’t say anything bad about the work of the service, but there is one BUT: it works only with Iphone \ Android and I had to write a converter to convert XML to resx and vice versa (if I need to, I can give it). And again, there is a slight incompatibility of the localization files between Windows Phone and Windows 8 \ RT (Microsoft is so soft). Small difficulties arose with the localization of AppBar, but they are easily bypassed.

    “Hurray”: new Windows

    As development progressed, the news that there would be a new WP8 was always heard. After the presentation of Windows Phone 8 in June 2012, it became clear that phones based on Windows Phone 7.5 will not work with WP8, but will receive their flawed update. This turned out to be rather unpleasant news for us. The spoon of honey was that the programs written for WP7.5 will work on phones with WP8, but they will not be able to use all the features of the new OS. We thought: well, ok, we seem to have no use for them. But they ordered a telephone.

    When the phone arrived, I had to install a new studio 2012. Then, in addition to the studio, buy a new laptop ( since I need a processor above i3 with support for SLAT technology) And of course, Windows 8 (where without it ...). In general, the transition turned out to be very costly, both in time and money. We installed on WP8 what we did, cried and thought: what to do next. Of course, not everything was so terrible, but it became clear that one should not go out in this form. The main problem was in the pictures, splash screens, icons, but some components refused to work. The article http://developer.nokia.com helped to solve this problem,
    and here it is.

    Making separate projects for each version in one solution, I was always glad that at the very beginning I decided to use the MVVM pattern.

    At MARKETplace

    Since the application already had its own community (it was a revelation to me that so many people have phones on different platforms at the same time), we decided to do Betta Testing , and it’s great that the platform allows you to do this. By inviting people from the forum with WP phones began testing. It took about two months to fix the errors, along the way we changed the design and increased the functionality (all for the client). We approached the release already self-confident, many thanks to those people who participated in the testing.

    Downloading the application to the store was quick, certification took 8 days and passed the first time. The only hassle was with the preparation of screenshots, since you need to create your own set of screenshots for each language, and we have 12 languages. Sales began, and soon one bug surfaced that needed to be fixed urgently. I fixed it in 10 minutes and sent update for certification. We created a ticket at Microsoft with a description of what happened and a request to expedite certification. They did not receive a response, as well as acceleration - 7 working days 8 (and taking into account the weekend 9. 9 days of excitement and self-flagellation. I am sure that they need to do a separate certification mechanism for such cases, because check where and what has changed from the previous one version cannot take so much time, at least for critical errors, because it is their money too.

    We placed ads on social networks, on the site and did the newsletter. The start of sales was sluggish and the client immediately went down, as he already had experience in launching this application on other platforms. Naturally, after the peak of downloads and purchases at launch, a slow decline in sales began. To date, sales average 10 applications a day, which is a very low indicator compared to other platforms (50 purchases per day for Android and 150 for Iphone).
    image
    Download statistics look something like this:
    image
    Well, in comparison with Iphone and Android
    iphone
    android

    It’s very frustrating not that sales are so low, but that at such low sales we were in the Top Paid ratings of applications:

    - Italy, Sweden, Norway: 40th place

    - USA: 70th place

    - Sweden: 16th place.

    - Czech Republic: 6th place

    - France: 50th place

    And in the inside of its category in the first / second places! and this at such low purchases !!!
    We can assume that the applications in the tops are doing slightly better.

    Of course, competent promotion is necessary, but even if sales double, we will not catch up with Android and will not pay for further development of the application.

    Today, unfortunately, the customer solves the issue of the appropriateness of continuing to support the application for the WP platform, and I think whether it is worth contacting in the future with this platform.

    Also popular now: