Code word is not easy, and line and cherish
Updated on July 02, 2018
At the beginning, I just want to go through the whole development process and realize the development process from 0 to 1, but now I have finished it and met another problem, the problem of raising the server!
When I bought the server at the beginning, I bought the minimum 1 core 1GB 1M, and the annual fee was 330, which was the first single discount. Later, it was not enough, so it took 814 to upgrade to 2GB 5M with 1 core. Later, it took 157,6 months to upgrade to 4GB 5M with 2 core, considering that single core was not enough.
The short video function is added later, which needs to store a large number of pictures and short videos, so I bought OSS storage, and bought 100G storage package for six months, which cost 65. It is not enough to buy storage package, but also need to buy downlink traffic package. At the beginning, I bought 100G downlink traffic package, because the month is coming to the end, 100G for half a year is 245 yuan, and 100G for every month. Later, I felt it was not enough, because I used more than 300G in the following month, so I upgraded to 300G for half a year, 452 yuan. Then the following month, I used 550G, which was not enough, so I upgraded to 500G for half a year, 385 yuan. Plus all the other stuff, I’ve given him thousands.
Yesterday, Sunday, I was busy moving house. Today, I opened it and was shocked. In only one and a half days, the downstream flow used 157G, not to mention the new users, at this rate, I am afraid there will be 3T downstream flow this month.
So I decided to find out how much the upgrade would cost, and I fell into deep contemplation. 2T is about 2780, 3T does not have this specification, can only buy 5T, 5T is more than 8300. I don’t think I can afford to keep this lion, so be careful with mass storage applications.
Subtotal of consumption in July 2018
As a programmer, unless you starve to death, also won’t abandon their applications, if which day when you run the jokes joy found suddenly can’t open video, may be I don’t have the ability to renew, the likelihood is I want to abandon him, so that I might have a proper meal, don’t forget to contact me, ask me to eat what you eat.
preface
I heard an old friend say that the real transformation of a developer starts from making an App of your own. Only by exploring and researching by yourself can you experience all the ups and downs of this road and grow up! So, after drinking the booze, I embarked on the road of “Developing an App of my own from 0 to 1”.
What kind of APP do you make?
In fact, this is a difficult thing to determine, because if you have a good idea, good enough to make a large number of users, good enough to attract thousands of fans without promotion, then, you still do not make a fart training App, directly to start a business! Also need not develop by oneself, recruit a person, oneself be boss ah! At this time, basically all fields have relatively mature, monopolizing the existence of the App, so we do not think that making an App can make themselves immortal, one shot famous.
For us, our purpose is to go through the process, so in the function, do not need to be too demanding, do what you like, as long as you think, anyway, it will not fire. ? For me, I prefer to see jokes before, so I’m just going to do a joke of the App, called “jokes”, after a period of efforts, has now launched in each big market, such as application of treasure, huawei application market, millet application market, baidu mobile assistant, cool, meizu, peas and other markets. If someone likes it, you can download it and try it, or scan the QR code to install it. I will keep maintaining this App until I die…
Where does the data come from?
As a mobile developer, this is actually a painful problem, because we are good at showing the data we get from the server side on the App, but not good at creating the data. Looking at the current market, it is not difficult to know that an App without background support is impossible to go on. Therefore, we must also make our application supported by background data. So the question is, how do we get the data that we need to display on our App?
- Use an off-the-shelf web cloud server directly
In fact, there are some platforms for us mobile developers to consider these issues, so they provide a set of solutions, let us tune the interface on the public network to easily save data to the database or from the database to local data. For example, there are [Bmob Back-end Cloud] and [LeanCloud] in the market now, they provide similar services. For Android developers, we only need to integrate their SDK, so it is easy to build tables and CRUD the data in the tables.
I use Bmob more, university began to contact him, here to introduce Bmob more points. For an application, the user system is often the most important, with users, you can develop deeper direction. Bmob also thought about this, from creating a project, it will create a default own user system, the SDK also provides a convenient interface of user management, including sending mobile phone verification code, check for authentication code, user registration, user login, user password reset, user mailbox validation, etc., for a mobile developer, It is simply a blessing, but also to a certain extent to solve the common problems of App user system.
- Use the free public interface directly
This is limited, but can be used in certain scenarios. Like I did before a lottery auto contrast assistant, the main function is to the content on the welfare lottery, which can identify and then get to the number of users to buy lottery, then automatically from the Internet for lottery number corresponding to the winning Numbers, compared with the number of users to buy, intuitive tell users to win it. Here we need to use the free public interface to get the winning numbers corresponding to the lottery period numbers. Or again, for the jokes joy I want to do, in fact, a certain sense also can use the free public interface, such as [ShowAPI, Internet API entry], aggregated data, 】 【 APIStore 】 etc above there is a lot about jokes and jokes interface, the interface on the beginning of the project can be used directly to obtain jokes data. However, there are certain limitations, such as the number of times the user can call certain interfaces. It’s certainly not friendly.
- The ultimate way to build their own backend server
This is of course the best way, regardless of data, service is controllable, secure. But it’s also one of the most expensive. First, you need to learn to develop server-side code, and you also need to learn a lot about databases. When you practice after a period of time to develop a set of backend interface, you need to set up an online server, so it means you need to buy a cloud server, after buying the server, you need to build an own code runs inside the server environment, then you need to put your code developed deployed to the server… On top of that, buying a server means you will have to pay money, possibly later on you will need to buy OSS storage service, CDN acceleration, etc., and you will need to pay more money. And, and, and all of this, you need to find your own way, and you have to solve the problem yourself, which is very painful. Fortunately, I bought the server from Aliyun (in fact, there are many other platforms, such as Tencent Cloud, Jingdong Cloud, etc.). The work order system service provided by Aliyun is really good, with quick response and excellent technical services, which helped me solve many problems to a certain extent. I would like to express my gratitude.
From zero to one, where do we start?
- Normal development process
For enterprise project development, the general rough process is: Product manager received requirements, developers to communicate with the background, define the function point, and then design a prototype based on the requirements, the prototype delivery to the UI designer, at the same time, the background developers to develop the corresponding API interface, UI designers complete give front-end developer, front-end developers to design the first page, then dock with the backend developer API interface, Show the data and complete the development of specific functions, and finally go online.
- Abnormal development processes
But we are developing alone.
So the above development process is not suitable for us. We first need to do is demand analysis, we need to make sure that the initial release need what features, secondly in mobile client and server two points to make a choice, what is the first mobile terminal or development server, this is different from person to person, some people like to use the false data to develop a template, wait for data to before filling, and for me, I don’t like this, anyway, is to do, do a template version, it will take more time, so I decided to write server first.
After the completion of the development of the server, I will write the client. During the development of the client, I will rely on my own ideas for page design on the one hand, and on the other hand, I will imitate other apps. When both the server and client are developed and tested, it is time to set up the online server environment. When the environment is set up and the code is deployed, it is time to go live.
Officially enter development
Function idea
The initial features were simple:
- The main function is to browse jokes, view pictures and text by category
- User system, user registration, login
- Social system, user comments, favorites, post jokes, follow, push, private messages, points lottery, content sharing
The following features are improved:
- Short video module, including video recording, cutting, uploading, playing, downloading and so on.
Build a Java Web application
Before I had the idea of “Starting an App of my own from 0 to 1”, I actually had no foundation of Java Web development. When I decided to do this, I started a self-learning journey of Java Web for more than a month after ensuring that I could complete the tasks of work with both quality and quantity. Of course, the way is to watch the video, I found a lot of Java development videos, at work, nothing to do to watch the video, while watching the video, one follow; Copy videos to your phone when you leave work, watch them on the subway, watch them while you eat, watch them before you go to bed. Have been watching the video for a long time, basically simple learning again: HTML, CSS, JSP/Servlet, Struts2, Hibernate, Spring, Mybatis, are just a simple understanding of the first time, as for now, may have forgotten most of it, haha. Finally, after more than a month of efforts, I decided to use Mybatis+Springmvc+Mysql to build my own project.
Based on the above functions, on the Web side, we need to deal with the following additional things: the instant communication integrating aurora push and Ali Bachuan, and the SMS service sending verification code for registration and password reset.
The specifics of feature development are beyond elaboration and are not the focus of this article.
Build an Android application
For app pages, we mainly design our own and imitate others’ apps, experience others’ apps, and reference others’ good interactions and good designs in our own apps. However, when referencing, it is important to note that not all interactions are suitable for your application, and borrowing from others should be done in moderation, otherwise it will be neither fish nor fish. In the icon above, one can find a friend to do UI design, two can be in the professional website to get. For example [iconfont], ICONS for almost all common functions can be found here.
ICONS can also be simple to handle, such as color, size, very convenient:
Based on the above functions, on the Android side, we need to deal with additional: integrated Aurora push, Alibachuan INSTANT messaging and picture storage. For pictures, if the pictures are uploaded to the cloud server, I buy the cloud server bandwidth, when the time comes when loading the images must card into a dog, so you need to purchase additional file storage, there are many choices, like what cloud, ali’s OSS, I started to choose were taken and cloud, because before used, have feelings, then in order to enrich the content, The video module has been added to the function, which requires a large amount of storage space, plus the choice of Ali OSS for learning purposes. As for who is awesome, here do not make too much evaluation.
One of the advantages of using file storage is that the server does not need to do too much processing. On the mobile end, we first upload the file to the file storage, obtain the storage path, and send the path to the server for storage. It is very convenient.
In addition, the mobile terminal also needs to handle the uploaded pictures, such as adding filters, labels, cropping, beautification and so on.
However, for me as an Android developer, none of this is a problem!!
Inside the app added a bonus module, so a new turntable lottery module, mainly consumption points for the lottery. To this end with the original way to write a turntable lottery page, the specific implementation can refer to another blog [Android lu a turntable lottery], the effect is as follows:
Specific other feature development details are not detailed and are not the focus of this article.
-
But there are some caveats
-
In-app updates:
This feature is a must in the first release, as it is the cornerstone of ensuring that users who have installed your app get updates as soon as possible.
One more thing, such as in baidu success before I upload my application, later, the updated version, I submit application again, platform actually told me that synthetic application is to use tools, don’t let the upload (routines we all know, not only to make me in their platform to soften the yao), at this time of the application update is very important, Users can only get the original version on Baidu Mobile Assistant. When you have an update, you just need to open the in-app update and users can experience your new version.
Also, if you have features that aren’t acceptable to the app market, you can add them, bypass the app market, and program directly to users. However, I do not recommend doing so, a bit deceiving the consumer means in inside.
Considering the customization of functions, I use an in-application update plug-in written by myself in the application, requests and APK downloads are implemented using native HttpUrlConnection, not forced to rely on any other third-party tools, absolutely green. 【Android App Internal update Library】
-
Sharing features:
This template is not required, but it is a good feature to have. Why do you say that? The so-called birds of a feather flock together a person with group of points, our good friend, the user’s friends are all have similar hobbies, when one of the users using your APP, feel very funny, he might also want to share with his good friend, experience as a result, you can effortlessly, by users can you regeneration, wouldn’t it be fun?
You can add your application in App Treasure, after the approval, the application includes QQ sharing ability, if necessary, you can also go to the wechat public platform to apply for an application, so that you have the ability to share wechat. Once you have these capabilities, you can let users share your APP. One way is to write a web page with simple information about the APP and provide an entrance to download the APP. Users can share the web page with other users and achieve user regeneration. The other is to share the link to the app’s microdownload directly. Or if you don’t want to, you can just share an APP download link.
In the worst case, if you don’t even want to create an application on QQ or wechat, you can directly call the system’s sharing function and share a paragraph of text + the download link of your application. This is the simplest and most brutal. If you don’t want to do this, THEN I won’t talk about it. Take me for the air!
-
Feedback:
This module is must have, because the individual developer, you don’t have much time to test, you don’t have much more special testing machine to test, so you have more need of the masses of users to help you to test, so when they are in the process of using, encounter problems, they need an entrance to feedback. In addition, when users have poor experience in the process of use, or they have better opinions to feedback, they need an entrance to feedback. After all, an application needs continuous running-in in the market to get better and better.
Feedback can be implemented in many ways:
-
feedback
This is the most common way. You only need to obtain the current phone model, Android version, login user, app version and other information and submit it to the background when submitting users’ opinions. This is convenient for background statistics and processing.
-
Use third-party customer service
This method is a bit more high-end, because after all, instant chat can be carried out and problems can be solved in a better way. For example, in our company’s project, [UDESK, China’s largest intelligent full-scene customer service system provider] is used. However, this service requires dedicated customer service to participate in online reply 24 hours a day, which is a little expensive.
-
Use QQ directly
This way is relatively simple, you directly apply for a customer service QQ, and then open that does not need to add friends can temporary conversation service. When users click on customer service, you directly determine the users have to install QQ, if installed, open QQ directly with your customer service QQ temporary session, if the user doesn’t install QQ less (this is), you can then apply for a customer service email, directly to pop up a dialog box, according to the customer service email to the user, Then you can check this mailbox regularly.
-
-
Crash information collection:
As mentioned earlier, some bugs only appear on certain models. If you don’t have the model, you won’t find the bug during development, so you need to use a plugin to collect crash information from users. For example, the preferred Bug management system in the mobile era is commonly used in daily development.
-
test
In fact, this is a very painful thing, because if I test by myself, my brain will force me to follow my logic, then there will be a bug, which is why the company hire the test. After all, to find a more close to the user’s people to operate will find the problem, so I can only ask my female ticket test.
The code has been written and the ECS cloud server has been set up
When your application runs locally, consider buying an ECS server and deploying your application so that others can access your application on the public network.
[Cloud server ECS], for us, it is good to buy an entry-level, only a few hundred dollars.
Then click Buy Now and select some configuration information on the new page. In the “Mirror” column, select “Mirror Market” and click “Select from Mirror Market (including operating system)”. Since we want to deploy Java applications, we have selected a ready-made image containing the Java environment, as shown in the following figure.
Then it’s all the way down, doing some configuration to confirm the order. Once purchased, you can deploy your Java application according to the documentation of the image. Of course there are many details, you need to read the instructions carefully, or create a new work order to consult a professional engineer.
Here is the server configuration I purchased:
-
Additional instructions
-
SMS service:
Because of the function requirement, we need to send verification code when registering or resetting password, so we need to use SMS service. There are many SMS services on the market, with similar functions and usage methods.
What I use here is the [SMS service] inside Ali Cloud, he has two ways of payment, one is to pay by volume, the other is to buy SMS package. Pay-per-quantity is how much you use, how much you deduct, as long as the account has money, you can successfully send, the advantage of this way is relatively saving, will not waste, because there will not be too many early registration, need to send a lot of SMS. Buy SMS package is to buy a lot of once, if you buy 5000, is each 0.045 yuan, with the amount of payment is the same, but the 5000 has a time limit, can only be used in half a year, more than half a year is useless, if you buy 10000 +, it will be cheaper, 10000 each is 0.043 yuan, It depends on how much you use and what you like.
Once the purchase is complete, you need to add a signature, just like any other SMS service, and then create some templates.
An SMS consists of a signature and a template. Users need to apply for an SMS signature and then apply for an SMS template. SMS example: [Aliyun] verification code{code}, you are authenticating alipay; The variable is: ${code}. When applying for signature and template, they will ask you to provide the official website address, but we don’t have the official website address, so you need to provide additional instructions. Generally, the signature or template will not be approved for the first time. You need to explain your special situation, and then you will be approved for the second time.
Once all of this is done, you can use the tool JAR provided by them to send a captcha message to the specified phone number in the server call interface.
-
OSS services:
As mentioned earlier, we need to provide in-app updates in the app, so where is the updated APK? Or based on the joke app I’m going to make, where are the pictures in it? Yes, that’s the object storage OSS.
This is very comfortable to use.
-
First of all, it provides SDK, mobile terminal integration of its SDK can easily realize file upload and download work, less development work;
-
Secondly, using this and CDN acceleration can easily solve the problem of concurrent access loading slow, we can worry a lot less;
-
Third, it supports powerful data processing functions. For example, [media processing], [quick use of OSS picture services], just in the development of “Duanzile” when the use of picture services, in recyclerView list can use the compression function of picture services, save traffic; You can also add watermark to the picture, add the user’s nickname as a watermark to the picture, become the user’s exclusive picture, deli. He also provides the functions of media resources set the timeout, this is rather easy to use, such as the back to add video function, when the user load, will get a video connection, set the video link of effective time of 10 minutes, then the link will fail in about 10 minutes, can effectively prevent our resources are malicious downloading and so on.
-
Note: Storage and access of OSS data are charged. By default, it is charged by volume. For example, if you have a total storage capacity of 10 GIGABytes and access volume of 10 gigabytes per day, he will charge for data storage and downstream traffic per day respectively. At the beginning, I did not study this carefully. I had charged several hundred yuan in my account before, but when I went to check it a few days later, the money was much less, and I found that the fee had been deducted after checking the bill. This case, we need to buy more cost-effective and downward flow package, storage storage treasure I bought 100 g, downward flow package I bought 300 g (downward flow package is 300 g, every month has relatively cost-effective), because the video function also produced less than a month, in the next month will know that this is sufficient configuration, it is good to make appropriate adjustments according to demand.
-
-
Domain name and Domain name Registration:
As a developer, I think a domain name is as important as our nickname, so I think we need to apply for a special, memorable domain name. For example, my domain name is composed of the name of me and my female ticket, and if it is not good in the future, we want to start a company? It also happens to come in handy. Besides, what if one day that rich guy likes my domain name and wants to spend tens of millions to buy my domain name? You never know about luck.
Applying for a domain name is easy, just fill in the information. Then pay a small annual maintenance fee.
When you successfully apply for a domain name, it is best to do the registration of the domain name. First, now the Internet has paid more and more attention to security, the system is more and more complete, we as developers, mentality also want to put a point, do an identity, enough authority of the developer, so our domain name also need to put on record. Second, in Ali cloud bound their own domain name, if the domain name has not been recorded, is not bound.
Ali cloud itself also provides a domain name record service, very intimate, many other platforms also have this service, you can go to understand. When when ali cloud for the record, you need to fill out some information, wait until after the first trial through, they will send you a ali cloud backdrop of logo, you need to stick the curtain on the wall, standing holding his id card in front of the curtain, then photographed it to submit in the background, to review again, and then through a tangled mass of seven or eight slot steps, After about half a month, you will be able to file successfully. Well, that’s right.
-
Has the project been completed and submitted to the application market?
Now the application has been developed, the background has been deployed, and it can be accessed smoothly on the public network. Is that all? Of course not. You went to all this trouble just for yourself? Is it so cold?
-
Online App Market
The main Android app markets are as follows (in no particular order) :
- [Tencent Open Platform] (support for individual developers)
- [Kuan] (support individual developers)
- 360 Mobile Open Platform (support for individual developers)
- [Baidu Mobile Open Platform] (support for individual developers)
- [Huawei App Market] (Support for individual developers)
- [Xiaomi Open Platform] (support for individual developers)
- [Ali-App Distribution Open Platform (Wandoujia)] (support for individual developers)
- [Meizu Open Platform] (support for individual developers)
- Smartisan App Store (support for individual developers)
- [Sogou Mobile Assistant] (support for individual developers)
- [VIVO Developer platform] (== individual developers are not supported ==)
- [OPPO Open Platform] (== no support for individual developers ==)
- [Samsung App Store] (Support for individual developers)
- [Lenovo Open Platform] (== does not support individual developers ==)
- [Gionee Open Platform] (== Individual developers are not supported ==)
- [App Collection] (Support for individual developers)
- [LQQ Developer Platform] (support individual developers)
- Firefox Mobile Alliance (support for individual developers)
-
Regarding the soft
In fact, as I said before, now more and more attention to copyright, so I think whether you are based on the process of training, or really want to develop an APP, realize their own value, it is necessary to apply for a soft application for your APP, just like your child registered account. And there are a lot of open platforms that will deliberately not let you pass when you are not soft.
Actually applying for a software application is not as complicated as you think, and it is not expensive. In many big open platforms provide soft application services, such as [Tencent entrepreneurship service platform], there are a lot of service providers here, you can like the emperor turned over the brand as casually pick one, you can also compare the score and then choose, all with you. After selecting a service platform, you need to provide some information about yourself and your software, pay a fee, and wait for more than a month. I am the cheapest the sort of service that buys, be 300 pieces of the sort of, anyway I am not urgent, more than a month more than a month cough up, add urgent a bit more expensive.
-
About a little incident
I still remember that when I launched my application, I chose 360, App Treasure, Baidu and Wandoujia. The other three platforms passed, but 360 failed. He said that my application is a tool composition, probably feel the page is similar, but is not a synthetic vest bag. My temper, I worked so hard to write the app you insult and slander? I was so angry, I kept submitting it, called back and didn’t change anything, and I kept emailing their customer service about the situation. Did so four times or so, well, my application was blocked, you did not hear wrong, was blocked, is 360 no longer included in the package name of the application, you how to say all useless.
So it’s better not to be too rigid.
Sometimes it takes patience, sometimes it takes skill, sometimes it takes flattery, sometimes it takes patience, sometimes it takes patience, sometimes it takes patience, sometimes it takes patience, sometimes it takes patience, sometimes it takes patience, sometimes it takes patience, sometimes it takes patience, sometimes it takes patience, sometimes it takes patience, sometimes it takes patience, sometimes it takes patience. You have to take time to figure out where you want to be.
Good luck!!
Everything is there, promotion?
Well, in that respect, I’m an idiot! But I tried!
You want to know how I do it?
- Post bar post advertisement
- Join duan Subgroup, duan subgroup, connotation duan subgroup and so on, send password red packets, password is similar to download duan Zile copywriting
- Blog and advertise
- Reply to posts and advertise
- Blow water for advertising
- .
There are a few other things I can think of:
- Find more fans of wechat public number advertising, but not too many fans, too many expensive, and user volume explosion on the server pressure, afraid to support.
- Find more fans zhihu big V advertising, but not too many fans, too many expensive, and user volume explosion pressure on the server, afraid to support.
- Find more fans of the microblog V advertising, but not too many fans, too many expensive, and user volume explosion on the server pressure, afraid to support.
- Find fans more live big V advertising, but not too many fans, too many expensive, and user volume explosion on the server pressure, afraid to support.
- Anyway, it is to find a variety of fans of the big V advertising, these big V will generally have access to this kind of advertising, this kind of promotion is relatively high success rate, but I did not try, because it is too expensive, a little uncomfortable. And when looking for a point to pay attention to, that is, the output content of the big V you find should be similar to the nature of your App, for example, people are cooking food, you let people promote your joke application, on the one hand, people may not pick up, delay time, and on the other hand, people pick up, your conversion rate must be particularly low.
- Find the first market of each application, this is also a good way to let the market to help you advertising conversion rate will be relatively better, but different platforms for the first conditions are not the same, this need you to try.
- At present I can think of so much, there are friends have good opinions can private chat me, I add to go.
Do you want to know how many people are using my app?
Well, I won’t tell you!! Ha, ha, ha
Finally, I wish everyone can bravely take this step! As long as you take this step, you will find that it is not as terrible as you think.
I also hope that you will pay attention to my books, nuggets, Github and CSDN. I will share with you all the interesting things I meet.
Jane books home page link is https://www.jianshu.com/u/123f97613b86
The nuggets home page, the link is https://juejin.cn/user/1099167356171918
Making the home page, the link is https://github.com/MZCretin
CSDN, home page link is http://blog.csdn.net/u010998327
I’m Cretin, a lovely little boy.