⬆️ ⬇️

How I learned to create my mobile apps

Hello! This is my second article here, and I again dedicate it to my experience gained from studying Android programming. While writing my first article , it occurred to me that in a good way I had to start writing with a slightly different topic.



Let's imagine a novice programmer for Android: this is a person who has read a couple of books on programming in Java and under Android. He is bursting with the knowledge gained and he can do anything and everything. He has a mega-idea, and he immediately launches Android Studio and creates a new project called MyRulezProject and ... Tosh as it were, it’s all in vain.







I started about the same way and stepped on a rake. One of the first programs I started writing (and which was supposed to bring me success) was a simple project manager. It would seem that everything is simple, there is a project, there are tasks in the projects, and there are comments in the tasks. But (!) All simplicity (I remind the novice programmer) crumbled into dust from just two rakes: The first rake is actually the appearance of the program and how it should look at different points of use. And the 2nd rake (rather closely related to the 1st rake) is the scenario of using the program by the user. How to get around this rake, in fact, this article is devoted.

')

To get started, turn off the computer, and turn on some kind of music (for some reason, I better work under hard rock). Take out a clean notebook, take a pencil in your hand and put an eraser within sight (preferably soft and preferably so that it would be out of reach of the cat, if you have one).



For a start, it is worth thinking about what you and your users will have to work with. Draw what kind of entities they will have to deal with, and how they will be interconnected at the most abstract level.







Fine. For now it just seems to be working It is at this stage that you will begin to realize the general contours of what you have to create. Now we take the next step. What screens will we have for the user and how will he interact with them? Here you will have to realize how many activities you will have to create and how many dialog boxes (if you decide to use them, I still do not have an unequivocal opinion whether they should be used and whether it would not be more correct to use activities). Rectangles are actually activities of mine, and ovals are dialog boxes.







Now let's turn to the appearance of the application. There are actually two tasks in one. The first task is the very concept of how you see your application.







The second task is you have to think about the details of the interface: transitions between screens work with data.







So far I have thought through all the screens of the program (where there were only less than 10 screens) - I have exhausted completely the 96-page notebook.



Well, as a spoiler, I hint at the following rake, this is an attempt to write the perfect code. You will drop your already finished program, so that you can start writing now precisely if not the ideal code, then close to the ideal one. Don't do that. Finish the program, make sure that it works as it should, and therefore already think what you would have done wrong. And depending on the success of your program, either rewrite the code or take up a new project. Good luck!



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



All Articles