Hacker News new | ask | show | jobs
by gringomorcego 5230 days ago
Okay, I'm an idiot, would you use this as a replacement for JQuery? Can someone explain how it fits into the JS scene?
3 comments

If I understand correctly, you can develop locally-installable applications for iOS/Android/webOS/RIM using Enyo JS and these widgets, that will work on all of those platforms (local app, but not native) as well as working via a standard web browser. The aim is a write-once run-anywhere environment for mobile and web. There are already some proof-of-concept webOS apps that haved moved from the webOS app store into Android, iOS, RIM (Playbook), and even the Chrome app store. FlashCards for example started out as a Enyo-based webOS app:

https://chrome.google.com/webstore/detail/diejjofgldkjkhmfja...

Any webOS devs out there, please correct me if I'm wrong ;-)

'cuz jQuery is sooo 2006.

A more serious answer: jQuery normalizes JS quirks across browsers into a unified interface, plus it provides a lot of goodies.

What jQuery isn't good for is organizing code. That's why Backbone and the term MVC have become popular lately. Applications need to be organized into something better than a big sloppy helping of jQuery callbacks.

Enyo allows you to build modular, organized code in a somewhat familiar way. I'd say it's in-between a big mash of jQuery and a full-blown MVC framework. If you want to think of it in an MVC way, it's like combining views into controller code...and I don't know where "models" fit in. And unlike Backbone, it provides its own built-in DOM manipulation and, as of today, a UI framework too.

JQuery isn't designed for building applications, it's main purpose is making cross-browser interaction with the DOM easier. It has some other "utililty" type functions, like making cross-browser AJAX simpler and adding its own "each" looping construct, etc. etc. But the simple answer to your question is that this is not a replacement for jQuery.

I don't know much about Enyo, but it looks to be more of a framework for building applications, and provides things like layout management, controls, and an interesting "Component" model. I know that it was extracted from WebOS, so it may have some overlap with JQuery (i.e. by providing simpler methods of interacting with the DOM) but its goal is different.

I think he/she is referring to jQuery UI and/or jQuery Mobile. Like Enyo, those do contain user interface elements and widgets. See this for example: http://jquerymobile.com/test/docs/forms/forms-all.html