As we all know, ASP has been eliminated by Microsoft, and subsequently abandoned by many developers. However, I still think that ASP is worthy of our continued use, both as an entry-level technology and as a development platform. Searching on Google, you can find a lot of bad comments about ASP, such as slow running speed, poor exception handling mechanism, lack of object-oriented mechanism, low development efficiency, many loopholes, etc. In order to give everyone a correct understanding of ASP, I will first clarify its name.
A few years ago, I used Dongwang Forum program to build a BBS. This program was the classic ASP+Access architecture at that time. I also encountered the problem that some people said that the forum was slow and sometimes stuck. However, the problem has been solved since I switched to SQL Server database. So the culprit is Access. The time required for program execution is at the millisecond level. Within this level, whether it is 10 milliseconds or 100 milliseconds, it is really not noticeable. However, Access has poor concurrency , blocking part of the program execution, causing the page to freeze.
In the past, many people, including me, used VBScript to write ASP programs. The exception handling mechanism of VBScript was indeed terrible. However, JScript is very good because it supports the try...catch statement included in C# and Java, which is enough to handle all exceptions.
Since the rise of Javascript because of Ajax, its object-oriented mechanism has been simulated . Although it is not truly object-oriented, as a small and medium-sized Web program, this is enough. JScript, which also uses ECMAScript as its core, also has the same mechanism. In addition, ECMAScript's language flexibility is undoubtedly the strongest, and front-end developers know this best.
I often hear people say that the SQL injection vulnerability of ASP is very serious. In fact, such loopholes exist in any language. The question is whether programmers can block it. This problem can be solved simply and efficiently in ASP through parameterized queries . No string replacement or even data validation is required.
Let me talk about the benefits of learning ASP (JScript):
Both front-end Javascript and back-end Javascript are based on the ECMAScript core. Therefore, if the back-end Javascript is written well, the level of front-end Javascript can also be improved .
Technologies such as ASP.NET and PHP block many of the underlying layers of the Web, which is very detrimental to beginners' ability to understand the principles of Web programs. ASP, on the other hand, is definitely written from the very basics. For example, a program that uploads files must analyze the data packet to obtain file data.
Many people say that ASP.NET has high development efficiency, but I am opposed to it. If the functional requirements of the application are not complex, it is definitely faster to develop with ASP. Because ASP is parsed and executed, no compilation is required. It is much easier to modify and debug. Windows also provides a good running environment (IIS) for ASP without any additional configuration. In addition, when the front and backend all use the same language, a lot of code can be reused , which is unmatched by other technology platforms.
In recent years, other Server-Side Javascript (SSJS) have appeared, such as Jaxer and JScript.NET . Mozilla also has an SSJS project. Looking forward to greater development of ECMAScript in backend development.
Ali Xixi’s supplement (technical expert)
People who say ASP is low-energy are either rookies or people who can't even learn ASP. Technology is not for showing off, but for creating actual value. In fact, many applications can already be implemented in ASP, and there are a large number of common source codes for reference. , it is easy to transform into productivity. It can be said that among dynamic web page technologies, ASP is one of the most extensive and mature technologies. Of course, ASP has many shortcomings, and other technologies are needed to solve them.
Many people mistakenly believe that ASP is synonymous with simplicity and inefficiency. They think that ASP is low-energy, outdated, and unimportant. It is also very simple and can be mastered as soon as you learn it.
Some people say that ASP is unsafe. When writing ASP programs, if you strictly follow the specifications for writing safe code, there will be no reason why the programs you write will be unsafe. Those people say that ASP is not safe, as if SQL Injection does not occur in PHP and JSP programs.
Some people say that ASP is not efficient. If you really want to be efficient, you can combine it with COM. Under the Win32 platform, the efficiency of COM can never be matched by Java. What’s the point of simply talking about speed? The speed of Java is definitely not high. In terms of speed, many technical solutions are faster than Java. People who learn Java know this best, but who cares about this? Java definitely doesn't win because of its speed. It is irrational to simply talk about speed regardless of the specific application environment.
Some people say that ASP cannot do this or that, and its functions are very limited. In fact, as long as you understand the principles of the Web, you will understand that writing an ASP program is like playing a scripting language on the surface, but what you are commanding is the Web Server. There are many complex functions that ASP can still complete very well. Some functions If ASP cannot do it due to the inherent limitations of Web applications, don't think that JSP and PHP can do it.