📜 ⬆️ ⬇️

Launch iframe application in Vkontakte

image There is such an offline New Year game " Secret Santa ". I have been playing it with my friends for every new year.
To make it easier to determine who gives a gift to someone, he created a site where my friends could leave an Email, and the result of the generation would come to their mail.

And 4 years ago I thought about creating such an application for the social network. It would be much easier to invite friends in contact, than to throw a link to the site. I wanted to do it on a flash, but for 4 years, I did not begin to study it. Realizing that it was no longer possible to wait, I created an iframe application.

I was planning to start the first of December. People will start to think about where and with whom to celebrate the New Year, and how to have fun. Now I understand that it was necessary to run for 2-3 weeks earlier. Maybe for a month.

So, set to work


Based on the framework Yii. I know it more or less well, plus with ActiveRecord everything is very simply done. Since the complex logic with complex JOINs in the application was not planned, and I rendered all the functionality in JavaScript (including the API requests to the contact), there was no special load on the application. So it was possible to be a little lazy. Moreover, the application, in its essence, “will die” after the New Year, and with a possible, sharply increased load, for a couple of weeks I can afford a strong server.
')
I had a month in time, so I didn’t manage to realize much of what was planned. I will leave it for the next New Year.
Since I cut down unimportant functions for the sake of the deadline, I got a rather small application.
All queries to the database is to get a list of people participating in the event.
From the Vkontakte API, I also used only "Get the current user's friends list" and "Get user information by ID list"

Major Logic Oversight


Wrote a script that distributes people. And then it turned out that I did not take into account one little detail.
The logic was simple, there are two identical arrays with a list of users.
I’m going over the randomly mixed first array, and for each of its elements, I pull a random user from the second array, checking that the user doesn’t give himself a gift.

But at first I didn’t foresee such a thing that if the last user of the first array only himself remains in the second array, then either the person gives himself or an endless cycle.

I solved this problem by adding a check of the last 2 elements.
We look at the penultimate user, if they have the last user in the array for distribution, then the penultimate user gives the last one. Thus, the latter will never get himself. He will take the penultimate. And since the array was initially mixed, the distribution will be random.

Release


After working all weekends and evenings in November, on the 30th I finished work on the application. Deadline was almost met. Left the publication of the application on December 1st, and went to bed. In the morning, sending for moderation, I checked all the settings of the application and server. In the settings I noticed one item that I did not pay attention to before: “Website address” with http and https. And I don’t have a certificate. How to buy and install it, I had no idea.
My actions to solve the problem:

1) Google;
2) 1300 rubles for the purchase of a certificate;
3) 1.5 hours trying to install a certificate and configure Apache;
4) 300 rubles to a familiar admin and 5 minutes of settings for this business nginx;
Everything is working.

Those who do not know the simplest certificate can be quickly purchased and quickly configured.

Moderation
On the technical side, everything seems to be ready. Sent for moderation on Sunday evening.
They answer fairly quickly, but the answer is disappointing:
Inadequate functionality of the application for moderation, but you do not need to pass moderation, the application is available to all users without checking.

How not necessarily? And receiving payment? Indeed, without the possibility of monetization, the hand will not rise much to invest in the promotion of the application. And with monetization, at least there will be an excuse for himself (or more for his wife). Like, I don’t just spend money, we can earn more.

Of course, it's not about the money, this kind of application will not even pay off, but I want to bring the idea of ​​the application to the maximum number of people, and my own money for this is clearly not enough.

Sorry, distracted. So, the wording "Insufficient functionality of the application." What is it? Asked to clarify.
Explained:
Unfortunately, we do not give more detailed comments on changing or improving the functionality of the application.

Began to google. I realized that I was not the first such, but somehow, it did not comfort me much.

I looked at my application once again, and it’s really what the person who entered the application sees: the “Create a meeting” button, and a meeting already created by default, and of a nice background image.

The poor moderators, most likely, have neither the time nor the desire to delve into the essence of the game / application. And, probably, it is correct. This can be used as a criterion for assessing the usability of the application. If the moderator does not understand, then probably the user will not understand. Need to change something.
He brought a little functionality to the main page, added a section "help".

I send the application again, in the list of comments I listed all the main functionality that my application has. If you honestly did not wait for approval.
But it came:
The application is listed as approved.


Now I master advertising contact mechanisms. But about this in the next article, the article summarizing the work of the New Year's application.

Errors and conclusions:


Error: I wanted to make an application for 4 years, and I started doing it a month before launch.
Conclusion: Start doing as early as possible. In any case, there will be nuances that will affect the launch date of the project. Yes, they write a lot about it, and they say, but all the same, everything, everything is left for the last moment.

Error: Did not take into account the time of moderation.
Conclusion: I thought that the moderation will pass immediately. Not the right wait. If the launch of my application is delayed for 2 weeks, then there will be no point in launching it. So, it was necessary to anticipate the possible problems of passing moderation. At least, it was necessary to google on this.

Errors: I did not think about the mechanisms of advertising the application.
Conclusions: There probably is, I just have little experience. It turned out, made the application, approved, and then what?
And advertising platforms would have already been selected, there would have been some kind of agreement. Yes, at least advertising posts would have been prepared, it would be easier.

Of course, these are not all my mistakes, but these are the most basic ones.
Good luck to all.

Source: https://habr.com/ru/post/204876/


All Articles