Comparison between prototype and jquery

Jiedao jdon 2021-05-04 14:53:34
comparison prototype jquery


In terms of time ,Prototype.js Than Jquery Good morning! , The mainstream in China is Jquery, I think it may be related to domestic AJAX A little behind foreign countries , Of course, choose to come out after comparison 、 Relatively new Jquery.

I personally started with prototype.js Starting with , Include JiveJdon3.6 Versions are based on it ,Jquery I've been paying attention to it , It is found that the two grammars are quite similar ,prototype.js Closer to the Javascript style , and Jquery Be concise in design .

Abroad 2007 There was an article about jQuery and Prototype Made a comparison :

Why I moved from Prototype to jQuery:

http://www.quarkruby.com/2007/11/6/why-i-moved-from-prototype-to-jquery

In my submission JQuery The main advantages are :Jquery yes Behavior driven development (BDD) Behavior driven development . Use JQuery Can be html The behavior of elements starts from html Separate from , To achieve the so-called MVC J The pattern of ,View yes html, and J yes Jquery.

As for the others mentioned in the article Jquery advantage ,prototype.js Also have , such as Chain:

Jquery:

$("div.message").show()

.append("<p>Action has been executed successfully")

.addClass("flash");

prototype:

$$('input.date')

.invoke('observe', 'focus', onFocus)

.invoke('observe', 'blur', onBlur)

chain The usage is simple , But it's not easy to understand .

In the following article , The author points out how to use it more simply Prototype:

http://thinkweb2.com/projects/prototype-checklist/

For example, the common AJAX grammar :

With no arguments :new Ajax.Request('blah.php')

With parameters :new Ajax.Request('ninja.php', {

parameters: {

weapon1: 'foo',

weapon2: 'bar'

}

})

Get the value of a field :var woot = $F('bar')

Modify the value of a field :$('coolestWidgetEver').update('some nifty content')

Set up CSS:

$('footer').setStyle({

height: '100px',

background: '#ffc'

})

The most famous argument is 2007 Year of Prototype and jQuery: A code comparison

http://ajaxian.com/archives/prototype-and-jquery-a-code-comparison

Use PPT Compare the two , There are so many people talking about it .

however ,Prototype There is a famous windows The effect is abbreviated as PWC(Prototype Window Class):

http://prototype-window.xilinus.com/

Not yet Jquery Similar substitutions have been found in , Especially the effect of this page :http://prototype-window.xilinus.com/PWC-OS/index.html

Claim to be able to replace PWC Of JqModel:

http://dev.iceburg.net/jquery/jqModal/#examples

The window effect is better than PWC It's much worse ,PWC It's almost as good as Windows Desktop effects , This forum is for PWC effect .

Some people say : be based on Prototype More suitable to do some application framework library ; and Jquery It's application-oriented , I agree with .

[ The quilt banq On 2009-08-12 14:44 A modified ]

版权声明
本文为[Jiedao jdon]所创,转载请带上原文链接,感谢
https://javamana.com/2021/05/20210504144410312N.html

  1. Help, Java how to get all the current processes of the system
  2. Has anyone ever used JMeter or written tests in httpUnit????
  3. Living in a mountain village in late spring
  4. Partridge day, spring of HKUST
  5. JavaScript异步编程4——Promise错误处理
  6. 海康摄像SDK开发笔记(一):海康威视网络摄像头SDK介绍与模块功能
  7. JavaScript asynchronous programming 4 -- promise error handling
  8. Haikang video SDK development notes (1): introduction and module functions of Hikvision webcam SDK
  9. JOP:用于FPGA的嵌入式实时系统中的Java优化处理器内核
  10. Spring Boot源码:使用MongoDB MongoTemplate公开REST在几分钟内实现CRUD功能
  11. Spring Boot应用程序事件教程 - reflectoring
  12. 带有Resilience4j断路器的Spring云网关 - rome
  13. 经验分享:Apache Kafka的缺点与陷阱 - Emil Koutanov
  14. 通过Spring Boot Webflux实现Reactor Kafka
  15. 从Java 8升级到Java 11应该注意的问题
  16. Jop: Java optimized processor core for FPGA embedded real time system
  17. Spring boot source code: use mongodb mongotemplate to open rest to realize crud function in a few minutes
  18. Spring boot application event tutorial - reflecting
  19. Spring cloud gateway with resilience4j circuit breaker - ROM
  20. Experience sharing: shortcomings and pitfalls of Apache Kafka - Emil koutanov
  21. Realization of reactor Kafka through spring boot Webflux
  22. RPC框架设计----Socket与I/0模型
  23. Problems in upgrading from Java 8 to Java 11
  24. RPC framework design -- socket and I / 0 model
  25. RPC框架设计----I/0模型
  26. RPC framework design: I / 0 model
  27. RPC框架设计----NIO编程缓冲区Buffer
  28. RPC框架设计----NIO编程缓冲区Buffer
  29. RPC framework design -- NiO programming buffer
  30. RPC framework design -- NiO programming buffer
  31. Java多线程基础
  32. Java multithreading Foundation
  33. 码农飞升记-00-Java发展历程
  34. Development history of coder-00-java
  35. 码农飞升记-00-Java发展历程
  36. Development history of coder-00-java
  37. Spring and Autumn Moon
  38. Node.js与Spring Boot比较? - Ryan Gleason
  39. Spring WebFlux的明显陷阱 - ŁukaszKyć
  40. Spring创始人Rod大叔对YAML的真实想法
  41. Compare node.js with spring boot- Ryan Gleason
  42. Obvious pitfalls of spring Webflux- Ł ukaszKy ć
  43. Spring founder uncle rod's real thoughts on yaml
  44. 码农飞升记-02-OracleJDK是什么?OracleJDK的版本怎么选择?
  45. What is manong feisheng-02-oracle JDK? How to choose the version of Oracle JDK?
  46. Spring tide surging Xinanjiang
  47. Linux内核软中断
  48. Linux kernel soft interrupt
  49. Linux内核软中断
  50. Linux kernel soft interrupt
  51. Java multithreading Foundation
  52. The construction of Maven private library nexus
  53. I / O stream in Java
  54. JDK 16:Java 16的新功能 - InfoWorld
  55. 在Java中本地进行线程间数据传输的三种方式和源码展示
  56. jdon导致cpu 99%最后tomcat死掉---banq给予回复
  57. 用领域事件模拟AOP注入
  58. JDK 16: new function of Java 16 - InfoWorld
  59. Cartoon: from JVM lock to redis distributed lock
  60. Spring 3.1 终于加入了Cache支持