Opening Overview
The successful application of Ajax technology in Gmail and the launch of the high-performance V8 engine have made writing web applications popular. Applications with complex interactions can also be written using front-end technology. Compared with native applications, web applications have the following advantages:
Cross-platform, low development and maintenance costs;
Easy to upgrade and publish, there is no concept of versions, and can be published anytime, anywhere, without user awareness, and no installation is required;
Responsive Responsive Design enables web applications to be cross-platform, and the same code can adapt to various screen sizes
Even if the web application solution is not adopted in the end, it is still very suitable for developing prototypes
Of course, web applications are not without their shortcomings. Since the browsers of different platforms and manufacturers are not exactly the same, there are also some cross-platform compatibility costs. In addition, the performance of web applications is not as good as that of native applications, and the interaction is sometimes not very smooth. Coupled with the limitations of the HTML5 API, it is not suitable to use web applications for some functions. For these reasons, hybrid solutions that combine the advantages of both have become popular (for example, WeChat, mobile QQ, and mobile QQ browsers will embed some Web pages).
Based on the author’s development experience, here is a summary of some problems that must be faced during the development of web applications.
Modular programming
Modular programming is an essential feature for writing large-scale applications. Compared with other mainstream programming languages, Javascript does not provide direct support for modules, let alone maintaining dependencies between modules. This makes maintaining Javascript code extremely difficult, and the order in which the code is included in the