The Android advanced Daniel Quiz

Source: Internet
Author: User

Q: Recently saw a lot of articles are saying that the MVP how good, there are MVVM what

Recently saw a lot of articles are saying how good MVP, there are MVVM, what do you think is more suitable for Android, and you are now using which mode?

"Guo Lin" A: Guo Lin

I still have some ideas about this problem. The architecture model, like the MVP, certainly has its meaning, and it provides a design specification that allows us to extract the business logic from the activity and make the code look neat, giving a certain first. But as for the use of it is purely to see a person, such as I do not use. There's no need to be superstitious about architecture patterns. As if everyone says this is good, then I also have to use this, because the code will never write the best, if you feel that you can manage the business logic in the activity without confusion, it can not be in the MVP mode, There is still a need for an excellent code architecture before the MVP, which is created by the engineer's own ideas, not by a pattern. In my opinion, the MVP introduced a lot of presenter this is not elegant enough, and last year, the Android Global Developers Conference on the project architecture, Google engineers did not recommend the use of MVP, but mentioned that there is this thing, but changed: not ready to talk about it today. If you ask me what mode I use to design the architecture, then my answer is, I don't have any patterns. But I asked to follow one principle, dry (Don t Repeat yourself), when you write the same piece of code two times, is that you need to think about refactoring, I think the code structure is also very elegant, we can try.

Q: What are the recommended books after the first line of code?

"Guo Lin" A: You can see the book "Exploring the Art of Android", which is very well written. But I give you a suggestion, the best way to learn is to do the project, the project-driven way to learn. When you need to implement a function, you need to learn a variety of related technologies to complete it, in fact, in the process you are already slowly growing. If only reading does not practice, the first is to understand the level may be relatively shallow, and the second is not long after learning you will forget.

Q: How to improve your level of programming

There should be a lot of old rookie like me, doing Android for 3 years or more, but the level is always the same as before, looking for code-sticking code everywhere. Do not know how to improve the quality of the hope that the great God gives valuable advice

"Guo Lin" A: I've seen a lot of your classmates, they have been programming for a while, but the deeper things are not. or the ability to search, but can not learn the east

Xi. The advice I gave them was to find some small wheels to make one (it can be a repetitive wheel, it's important to own code code, not light to see). Small wheels are finished

, and they made big. Of course, at the beginning of the time you may feel that you can not start, feel the small wheel can not build, that is, according to other people's excellent open source project fragment function or

module to copy a copy. Practice makes perfect, the time grows oneself to raise a lot of, also can write something by oneself. Warm hint: Must own personally many code.

Q: How do you quickly learn to improve the skill level?

[Roddy] A: A good saying: Read the f**k source code. In a solid language foundation, to learn the specific platform development, the best way is to read the excellent source code. No matter what the code does, the good code will inadvertently let you have a feeling. Now, all kinds of articles on the Web introduce a variety of design patterns. Although you may understand its organization, it is not necessarily able to digest it. Read the source of the process, you can truly appreciate the beauty of a design pattern. Google Open-source the precious treasure of Android, reading its source code has become my way to improve the level of technology. Android provides detailed documentation for developers, but if you just stop at the SDK layer, there's a lot of questions about how you know how to handle it, but you don't know why. I admire the creator of thought, for with thought the wheel can be rebuilt, but without thought, the wheel cannot be made.

Read more books than sit down and write two lines of code that work. Programming is the practice of science. Practice is the first and second is reading.

Reading project source code is a very good way to learn.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.