the pros and cons of using JavaScript (JScript) to write ASP programs (build ASP with Server-side JavaScript) and the experience summary.
"Scheming" for a long time, finishing learning a lot of code. I just want to know where to write, keep on updating, and welcome colleagues who have had this kind of programming experience treatise, grateful.
Advantages Summary:
1, C-style grammar {}, cordial, intoxicated.
2, ";" Can be used to compress code at the end of the release.
3, three-mesh operator? :, of course, the VBS can also be modeled as a VB in the IIF (expression, Truepart, Falsepart)-style functions
4, based on prototype inheritance, so that it can construct a JavaScript-style class
5, one-dimensional array operation than the VBS strong, provides a large number of methods, but there is no concept of two-dimensional arrays, you can simulate
6, the default (optional) parameters, this is very cool.
7. The try {} catch (e) {}finally{} error capture is much better than on-error Resume Next.
8, learn to use JavaScript and ASP code to help future learning JSP.
9,
Summary of shortcomings (i.e., the benefits of VBS):
1, JavaScript has no binary processing methods, such as the generation of verification code, no component upload and other operating functions, of course, can be used COM components or mixed with the script to achieve.
2, you can use VB to do VBS editor, very good, JavaScript editor I have seen the most powerful is the Eclipse + jseclipse plug-ins.
3. VBS provides rich dates and formatting functions
4, and COM + binding without a VBS good
5,
Experience Summary
1, ASP is not a language, write ASP server-side language There are many kinds, the default is VBScript, and JavaScript, and even Perl Script,phython, etc.
2, the JavaScript described here refers to standard ECMAScript, in fact, regardless of whether the scripting language is JavaScript or JScript, the system invokes the JScript engine to interpret the script, that is, the <%@ Language= "JAVASCRIPT" codepage= "65001"%> and <% @LANGUAGE = "JSCRIPT" codepage= "65001"%> effect is the same.
3. In addition to providing standardized objects for the consortium, JScript also provides enumerator objects, VBArray objects to complete the traversal in JS (in the VBS with a For each) collection and the VBArray that are returned from the COM component.
4, the current domestic JS (ASP) program is very few, I have read the code has
Www.ccopus.com's Cocoon series of works
SIC's LBS2 (Blog) program
Jswiki (http://www.nirvanastudio.org/or Http://sourceforge.net/projects/jswiki)
Cond......