App Interface design principles

Source: Internet
Author: User

In recent years has been doing mobile projects, every time the standard needs to be explained, think or write an article are written down.

1, remember the password is not really let you remember the password, here is only a means of automatic login. Passwords stored in plaintext are a security risk wherever they are, and must be avoided as much as possible. You can sign the user name, password, and time stamp (important) in some way, using the signed data to log in again.

2, the client to include a time-out mechanism, see more than once the server design is sent through the client userid to differentiate the user. I really have no ability to spit out the groove. The simplest way is to use the session to record the user state. Of course, given the characteristics of the client, the user may not be closed for several days, must cooperate with the automatic login mechanism to ensure that the client online.

3, the interface request succeeds or fails, needs to have the explicit identifier to represent. and describe the cause of the error. Also, because the client may be multi-lingual, the error should be designed as ErrorCode, which is displayed by the client in the corresponding language according to ErrorCode.

4, ErrorCode should be unique, such as login timeout to use 10001, request any interface timeout should return 10001. Convenient for clients to handle uniformly.

5, the interface design should be unified, can not appear in the login interface user name is username, get user details interface into the nickname situation. The client and the server use the same business model partition as possible. The attributes in the interface should be layered according to the attribution of the business model.
Let's take a look at the following two interfaces

Because the two interfaces contain a character object, the character's attribute name should be the same.
Then two designs on the same interface

The left side of this is in accordance with our principles, and the right does not meet. We do not mean that the right side of the design is not good, but the left is more consistent with the client MVC division. Because the author is also a business model of "people", when we click on the author's avatar, we should go to the author's profile. This profile interface is the same interface that I entered in my friends list. From the interface initialization parameters, we just need to pass the "people" model into it.

Write so much first, and then add it up.

App Interface design principles

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.