|
|
|
|
|
by latch
5076 days ago
|
|
With Dart you need to send the Dart framework over the wire. That's my point, you've replaced the flexibility of sending the framework(s) you want/need and haven't gained anything. Sure, the Dart framework is smaller, but it also does less. If you don't need everything that comes with jQuery, you can swap it out for something smaller, like zepto or TinyDOM - which make Dart look massive. jQuery, zepto, xyz, abc, ... all give you a consistent way to manipulate DOM objects. |
|
Take the button creation example.
With jQuery you have to use an odd syntax, IMO, and it requires the whole jQuery library to be downloaded:
With Dart creating a button follows the same syntax as creating other objects is compiled away: which compiles to JS: This way you get a nice DOM and in some cases no overhead at all. Other cases might have runtime code that needs to be included like jQuery or Zepto, but without compilation they will always have to include their whole library.