The essence and usage of flash in flask

Ladies and Gentlemen, when I was learning flask, I came across the concept of flash flash. Is this flash similar to the asynchronous meaning of ajax? When you heroes are designing the website, do you think this flash is easy to use or ajax is easy to use?

Mar.29,2021

Hello, both of their functions are to bring good feedback to users. The official example of Flask is a good example pythondoc.com/flask/patterns/flashing.html-sharpmessage-flashing-pattern" rel=" nofollow noreferrer "> flash message

.

the technology is not good or bad, only whether it is suitable for the current product.

Ajax:
1. Ordinary text pages will be more beneficial to SEO. Text content is easy for search engines to retrieve, but tedious swf bytecodes are unwilling to be touched by search engines. Although some large search engines such as Google can retrieve the internal content of SWF, there are still a lot of problems.
2. Flash has been watched by Macromedia for years. Auxiliary technologies such as Flex and FMS always require expensive installation and maintenance costs. JS has no such trouble. No one is willing to take the risk of law and copyright.
3, Flash development is very expensive, because environments such as FlashIDE are charged. Ajax is different. Although there are some cheap tools to generate swf, but their ability to meet complex needs.
4. Ajax programs are easier to use. Because there is a Flashplayer proxy layer in the middle, many assistive functions cannot be flexibly utilized by Flash. And Flash has a bad reputation in some ways. Such as pop-up ads, such as malicious code.
5. When people develop complex Ajax and Flash applications, they rely on some advanced development tools. Generally speaking, Ajax's development package is simpler and easier than Flash
of course Ajax may break the browser's fallback function and using dynamic page updates makes it difficult for users to save a particular state to their favorites, but there are ways to solve these problems.

Flash:
1, Flash can more easily call external resources outside the browser. Such as cameras, microphones and so on. However, this is the ordinary HTML can not complete
2, Flash in audio, video and other multimedia fields have absolute advantages over HTML. Now almost all websites contain Flash content
3, good compatibility: due to the only FlashPlayer "proxy". People do not have to debug programs
4 and vector graphics in different browsers like debugging JS. SVG, Canvas element and Direct, which are also in this field, cannot compare
Flash with Flash at all: flash files are often very large, and users need to endure long waiting time and performance problems when using them for the first time

.

flask's flash flash and pure ajax are both designed to achieve a good user experience.

1. Flash flashes of flask are mostly used to give feedback to users. You can refer to https://www.os373.cn/admin/login to see what happens after you type the wrong user name and password. However, knock on the blackboard, when, anyway, here does not use ajax's local refresh mechanism, or full page submission of content, the server returns relevant information, and then after a full refresh, displays your designed content prompt , for multi-form pages, it is recommended to use less or disable if you do not fully grasp the function.

2. For ajax, that is the local refresh mechanism of js. On web, you can use it as long as you can.

3. In addition, I selflessly promote my blog source code. You can test it yourself-- https://github.com/eastossifrage/pyblog

.
Menu