Java-Comments on prototype. js

Source: Internet
Author: User

The famous Prototype. as we all know, js may have been used. I recently used version 1.3.1 in the project and recommended it to my colleagues. I downloaded 1.4.0 and looked at it. I feel a little disappointed.

An Object-Oriented javascript framework

Prototype: The javascript framework aims to develop dynamic web applications more easily. it is important to provide a class-style OO framework; scalable AJAX support, higher-order programming constructs, and easy DOM model operations.

This is the description of its official website. open prototype. js source code, more like a large Utils tool class. 1.4 is even more exaggerated. A function is added to all small functions, and prototype is unknown in the future. how js develops? If there is no special development, there are some concerns. (after all, I learned a lot from its code, which is a bit emotional)

I can summarize several questions at will:

1. Class. create provides the Class creation mechanism, but unfortunately there is no package mechanism similar to java, which is too imperfect. The implementation of Class. create is also somewhat simple. I am not as good as function.

2. The simple AJAX function has a simple data binding. With the advent of AJAX technology, people are not interested in such a simple implementation. Looking at the ambitious dojo, dwr.

3. higher-order programming constructs has never understood what it means ???

4. Easy DOM model operation. Implemented some code that can be cross-browser. Such as event processing and mouse position.

5. Although cross-browser code is implemented, browser requirements are high.

Microsoft Internet Explorer for Windows, version 6.0 and higher

Mozilla Firefox 1.0/Mozilla 1.7 and higher

Apple Safari 1.2 and higher

6. There is not much support for the server, such as webwork2.0 support for dojo and server processing for dwr. Prototype is gone, but it has a good relationship with RoR. It also has advantages and disadvantages.

7. there is basically no UI implementation. Although there are expansion projects such as Rico, the effect is not very good.

8. I feel that the goal of this project is not very clear. If it is just a large tool class, I don't expect it to have a new version. The existing functions are fine enough. I'm not saying you should stop using it. But as an open-source project, I hope to be better off.

Advantages of Prototype. js

1. Good reading materials for beginners.

2. Traditional Bs applications are a good helper. If complex AJAX functions are not required and complex user experience is required, javascript code is estimated to be reduced by 30%.

3. Many tool functions, such as Element, Form, and Event, have many good methods.

4. Implement a drop-down menu and tree Control Based on prototype. js to reduce a lot of code. I have time to sort it out.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.