How a non-programmer created his mobile application

Hello, Habr!

I want to share the story of how, as a non-programmer, I was able to write my first mobile application thanks to (or against it) MS Visual Studio 2013 and even publish it in the Windows Phone store. I ask you to take into account the readers that I am the most inexperienced non-programmer who can do little in this area, so if I didn’t solve some problems as elegantly as I could solve them, then don’t particularly mock me - this is my first experience in such a thing.

It all started with the fact that, while studying at the Cyber ​​Security course at Tallinn University of Technology, I took the VB.NET course as part of working with Windows Forms. Then I accidentally read somewhere that MS Visual Studio 2013 allows you to create mobile applications not only on some mysterious C # or Java for me, but also on VB.NET.

“This is a chance - I'm a mega-specialist in VB.NET,” I thought then. Urgently using a student license, I downloaded MS Visual Studio 2013 and transgressed the mystery of creating my first application.

On the course we were told that the most important thing is not skill, but the idea. There are many skill programmers, but few successful applications. The same Rovio was bankrupt several times and released a hundred of useless games until he got to Angry Birds. Here, everything was fine with me - there were zero skills (as it turned out later), but I had an idea for a long time. The idea is simple - like Flappy Bird.

So, I opened MS Visual Studio 2013 - New Project - Visual Basic - Store Apps - Windows Phone - Blank App (Windows Phone).

Here I made my first mistake, later I will explain what it consisted of.

In front of me was a phone emulator with an incomprehensible code on the side, and a page with a code similar to VB.NET. Ok - then what? This is not like Forms, something is wrong here you need to read the manuals. As Microsoft turned out to have created the broadest knowledge base to support developers: the most detailed video tutorials and written manuals, from beginners to professionals.

In these courses, everything is detailed in details from how to install the button before contacting the cloud and storing databases there. Here Microsoft has a great respect from me, even I figured it out - they reacted very well to their developers, it is clear that this is important for them. I started to watch, read - an understanding began to come how it all works, as well as the understanding that these were not Windows Forms and that we had to start learning again. The lecturer in the video tutorials perfectly narrated and described in detail all the actions for ... C # (oops, pichalka). But this was enough for me to understand the concept and create a couple of pages with transitions in my application.

Then the nightmare began! A bunch of commands that I'm used to just didn't exist in VB.NET for Windows Phone, they were replaced with alternative ones! Microsoft, really?

I had to learn the whole syntax from scratch and split in my head one VB.NET and another VB.NET, but for Windows Phone. For example, in VB.NET there is a command for determining / setting the coordinates of an object in space. In Windows Forms, it is like this:

Image.Left=100 //задаём
i=Image.Left //определяем

On Windows Phone:

Canvas.SetLeft(Image, i) //задаём
Canvas.GetLeft(Image) //определяем


It is very difficult for an inexperienced non-programmer to immediately understand why his Image.Left = 100 does not work, because it is still correct. As a result, you spend time, sometimes a lot, on finding solutions.

I’ll give you a couple more examples, maybe someone will be useful if Google brings it here.

Forget everything you knew about Timer. There is no Timer object. But it can be created through code and is called DispatcherTimer (Microsoft, really?) First you need to create it in the code and set the interval:

DispatcherTimer = New Windows.UI.Xaml.DispatcherTimer()
            AddHandler DispatcherTimer.Tick, AddressOf dispatcherTimer_Tick
            DispatcherTimer.Interval = New TimeSpan(0, 0, 0, 0, 10)

Then create a dispatcherTimer_Tick event - it took me 2 days to find out. Since direct googling did not find anything. Only a cry for help at led me to the right solution.

After which I began to more thoughtfully read the Microsoft knowledge page and search for it. Here I already began to find the answers myself, the benefit was done very conveniently there - the required solution was provided in several programming languages ​​simultaneously. One feels concern for the developers, albeit with a bitter aftertaste.

Next, I needed to go to the web resource where the text file was lying to take one line from there. It's simple: go and find the right solution, but ... It does not work. No, no, I did something wrong. I’m doing the erasing all over again - again, a mistake. The StreamReader and GetResponse commands are not recognized. How so, here they are right on the Microsoft website! Well then, at they will definitely help me. But they say there that everything is correctly done and should work as it should. Panic and tears! I abandoned everything for a week.

I came back and see - one of the users of Stackoverflow asked, but am I writing on VB.NET, which is not Silverlight? My first reaction was:


What is it all about, what is it, why does it scare me?
It turned out that there is not only VB.Net, VB.Net for Windows Phone, but also VB.Net for Windows Phone (Silverlight), all of them differ in different degrees in syntax.
Microsoft, WTF?

Having carefully looked at, I saw that almost everything that is described there is everything for Silverlight and I was just lucky up to this point that the syntax was more or less the same. Here is the mistake I made when creating my project, as I wrote above - I chose the Balnk App (Windows Phone), and not the Balnk App (Windows Phone Silverlight).

Quit and start over? No, too many sleepless nights were killed to create what is and I decided not to give up.

By long googling and walking around the forums of different spills, I found solutions for reading text from a file that lies on the Web, maybe someone will come in handy:

Dim httpClient As HttpClient = New HttpClient()
Dim form As New MultipartFormDataContent()
Dim getUrl As String = "http://website/test.txt"
            Dim response As HttpResponseMessage = Await httpClient.PostAsync(getUrl, form)
            responseText = Await response.Content.ReadAsStringAsync()

Next, there was a problem with showing the message to the user - an elementary MessageBox. In VB.Net (Windows Forms), it is done in one way in VB.Net (Windows Phone) - in another, in VB.Net (Windows Phone Silverlight) - in the third. But then we are adults, accustomed to and it does not scare us. Two nights and a solution is found:

Async Function ShowMyDialog() As Task(Of Boolean)
        Dim result As Boolean = False
        Dim dialog As New Windows.UI.Popups.MessageDialog(rl.GetString("Try_again"), rl.GetString("Game_Over"))
        dialog.Commands.Add(New Windows.UI.Popups.UICommand(rl.GetString("Yes"),
            //some action
        End Sub))
        dialog.Commands.Add(New Windows.UI.Popups.UICommand(rl.GetString("No"),
           //some action
        End Sub))
        dialog.DefaultCommandIndex = 0
        dialog.CancelCommandIndex = 1
        Await dialog.ShowAsync()
        Return result
    End Function

Not as easy as you can see. And now, having gone through all these wilds of coding, I came out for release. Everything was ready, everything worked. I decided to add a banner with advertising, it turned out to be very simple - there is an AdControl tool that is simply customizable. You just need to get a personal code on the site and that's it. And then it turned out that Estonia, where I live, and Russia are not included in the list of countries that can participate in this program. That is, if you do not have a bank account in the list of 35 countries, then, sorry, you're in transit.

Ok, I heard there is the same program from Google. Yes, there is oneand Estonia on the list. Excellent! Download the add-on for MS Visual Studio 2013, try to add a banner to the project and ... it is not among the available tools. How? Why? And because it only works on Silverlight!

Microsoft Google, really?

Again the error made at the beginning came out sideways. But there is no longer any redoing. To realize my plans and become a billionaire in 2 hours, I decided to create 2 applications: Free and Pro versions. It took 1 hour.
Well, everything is done!

We begin the publication. Everything is simple here: MS Visual Studio 2013 runs a couple of tests for suitability and errors, generates an .appxupload file. Which is poured on the page

Then you need to wait for confirmation of certification of the application. I sent the application at 3 a.m., at 5 a.m. I received a registration confirmation. Pretty fast! However, he immediately discovered a bug in the application and decided to fix it. After that, I decided to download the application update and fell into a stupor, as there was no button on the application page for uploading a new .appxupload – file. But how to update? It turned out just - you need to click here:


Go guess.

UPD: While writing an article - have already been repaired. Promptly!


However, it is still impossible to read some data in the dashboard:



In general, Microsoft has created an excellent platform for creating mobile applications for Windows Phone, Android and iOS. If even a krivorukovy inexperienced non-programmer was able to create his own application with the help of it, then there are sea knee-deep skills for skill specialists. Through swearing and tears, thanks to my obstinacy and obstinacy and desire to make my dream come true, I managed to get to the finish line. If you have skills in at least one of the languages ​​supported by MS Visual Studio 2013, then drop everything and sit down to write your mobile application. I am sure you will achieve the goal, although you have to go through pain and despair.

Also popular now: