1. Performance and data management separately:
Some data has a special presentation format, such as color, size, and so on. In order to manage the performance of these formats separately
A. Using CSS to define the representation of this type of data: Define the category of the data, and define the data format uniformly by that category
{}
B. For some data, for example, money needs to be preceded by a $ sign, use JS to unify all of the data in this category special settings. This way, when the data is displayed, you only need to set it as a category to display the special form.
C. If you make changes based on someone else's definition, you need to pay attention to the prefix that defines the category, so that it doesn't change to unrelated people. It is not possible for everyone to modify the basic categories arbitrarily, the lower the modification permission, the more the previously qualified category should be, or cause confusion.
. Category name . Category Name 1{}
D. The definition of data presentation metadata should be unified in the database single source query, if you arbitrarily define the rules of performance in the code, then the maintenance will be very cumbersome later. The so-called metadata: The data stored in the database <-> the performance data on the Web page; they do not necessarily agree that the rules of the transformation must be defined by a unified source. For example, the adoption of language internationalization standards, you can use Django internationalization, or JS internationalization. For example, some data metadata, such as type, country, etc. Using these metadata requires a uniform interface for use, rather than defining a set in their respective modules.
2. The so-called meta-data
A. Presentation format categories for data: For example, CSS styles
B. Specific tabular data in the database, corresponding to the data meaning.
The rest of the data we get may not have a good interface, and if it needs to be transformed from the non-interface to the interface-friendly, there should be a unified translation layer. Why unify and prevent each submodule from customizing the data so that it is difficult to maintain later on. The conversion layer can be used on the server, or the client can use JS
C.
The comprehension of the overall maintainability of web interface design