Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the knowledge points in the development of web automation platform

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what are the knowledge points of web automation platform development", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the knowledge points of web automation platform development?"

Enumerated values in Model Design

In the early preparation process, at the beginning of writing the page, the enumerated values are defined in the M layer of MTV. I did a lot of configuration in the models.py file, but found that in this way of expansion, post-processing is very embarrassing. Because the mapping at the ORM level does not reflect this difference in enumerated values. And data from the back-end to the front-end, but also have to convert one by one general, such as this way, in the actual front-end pages, but also need secondary filtering, seems to achieve the configuration, but the efficiency is really not high.

Class Cmdb_server (models.Model):

Db_types_choices = (

('mysql', utilising MySQL')

('redis', upright Redis')

('greenplum', upright Green Plum')

)

Db_role_choices = (

('master', upright Master')

('slave', upright Slave')

)

Server_status_choices = (

('1century century online')

('0century, last month, fault, etc.)

('2century offline line')

)

Server_os_hostname = models.CharField (max_length=50,verbose_name=' hostname')

So the more I expand and change the code, I find that this place is more and more a pit, so I decisively use the configuration way of data dictionary to unify the control.

Dynamic secondary menu

One of the more standardized functions I want to achieve is dynamic menus, that is, different menu items are seen by users with different permissions. Several editions have been changed before and after, and finally the whole process has been adjusted.

When designing to the details, it is easy to find ambiguity or ambiguity in use.

The design of the second-level menu is really bitter tears, at first I felt that this was very simple, a for cycle could be done, but when I implemented it at the code level and pondered a lot of ideas, I found that my initial entry point was not quite right. It is a skill to output the HTML tag in a loop and end the tag loop.

Many versions have been written, at least 6 versions, some menus are not stable enough, and some are in a mess. I read the code over and over again, but I still felt a little scratching my cheek, so I printed out the key code directly, thought about it there for a while, and finally got a satisfactory answer.

Transform a unified template

When developing this platform, in order to reduce the difficulty of development and improve the repeatable efficiency of resources, we can use a unified template and then modify it on this basis. But in fact, after looking at many prototypes, I found that there is a big difference between the current implementation and the current one. So such a thing that doesn't seem to bother me, I spent some energy on doing the co-ordinating work.

Follow the priority, otherwise it is easy to fall into a dead end

In the process of development, there are always some ideas that you can achieve some better functions, but in fact, this process is always counterproductive. A seemingly simple function, want to pursue perfection, but in fact, the efficiency is not high, but the effect will be worse. You still need to do it according to priority, and don't be interrupted all the time.

At this point, I believe you have a deeper understanding of "what are the knowledge points of web automation platform development?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report