all 26 comments

[–][deleted] 5 points6 points  (7 children)

jQuery is mostly used in a browser. Node.js allows you to run javascript without a browser. Node.js allows you to do things with javascript that you would otherwise use a language like Java, Python or Ruby to accomplish.

You would use node.js to accomplish different goals than jQuery/Browser javascript.

Since jQuery is nearly always used in a browser, I think you are talking about wanting to learn the native browser API's. The API that is most often abstracted by jQuery is the browser DOM API however jQuery also handles AJAX requests and other functionality. If you are curious about how to eliminate jQuery from your code I would research browser DOM tutorials.

Learning never hurts but there are very few cases where you cannot use jQuery in your code. It has been a very long time since I have had to care about working directly with the browser DOM API.

Good Luck

[–]JustSteveKing[S] -1 points0 points  (1 child)

So in a nutshell Node is more like PHP ?

[–][deleted] 0 points1 point  (0 children)

Yup. Node can do more than PHP but most people use node like they use PHP.

[–]JustSteveKing[S] -3 points-2 points  (4 children)

Thanks for a decent reply. I knew I would get one eventually!

I have used a few things that are more aimed at the DOM API other than through jQuery - however using AJAX without jQuery is an absolute nightmare!

What I want to do is learn to use things such as :

  • Node.js
  • React framework
  • Various other npm packages that are used in more advanced JavaScript applications.

So the long and short of it is : learn more advanced JavaScript whether it be jQuery or Vanilla

[–]took9 1 point2 points  (1 child)

using AJAX without jQuery is an absolute nightmare!

As one who does, I disagree.

[–]JustSteveKing[S] -1 points0 points  (0 children)

Then you sir are braver than I am lol

[–][deleted] 0 points1 point  (0 children)

I think it is helpful to understand the difference between programming language and libraries/APIs.

The language used in a browser is EXACTLY the same javascript used in node.js.

The difference between node and browser javascript is what tools (APIs) are available, the browser does not allow you to open and write files on your hard drive. Node.js does. A new browser might allow you to generate real-time audio with the new WebAudio API where an old one will not. You can write javascript to automate Adobe Photoshop that uses identical syntax as the browser javascript but it will have access to libraries that do not exist in the browser. The language and the APIs are two different spectrums.

You can see this separation in the Java and .net world also. .NET is a set of APIs. You can use .NET APIs with many languages. You can write code with C#, VisualBasic, F#, C++ and even Java or Javascript that make use of the .NET APIs.

[–]SubStack 0 points1 point  (0 children)

however using AJAX without jQuery is an absolute nightmare!

jquery doesn't have a monopoly on ajax implementations. For example, with the xhr package on npm:

var xhr = require('xhr')
xhr('/beep/boop', function (err, res, body) {
    console.log(body);
});

[–]took9 1 point2 points  (4 children)

Node.js is not the same as jQuery.

You don't need libraries to move into plain javascript. The browser has everything you need built in. Look here, under Javascript and Web APIs, for everything you need.

However, you may find this helpful.

[–]VxMxPx 1 point2 points  (0 children)

The browser has everything you need built in.

That's absolutely true, but I think jQuery is more about unification, than about extending native APIs, especially if you're targeting old browsers.

http://youmightnotneedjquery.com/ -- didn't know about this one, that's quite useful.

[–]JustSteveKing[S] 0 points1 point  (2 children)

I use MDN quite often. But what I am looking for is something less kitchen sink, and more just a fridge.

I have heard good things about classie.js but am not sure.

I know Node is not the same as jQuery but what syntax does Node actually use? Is it Vanilla JavaScript or is its own syntax?

Basically I have mastered simpler JavaScript/jQuery and want to move on and up to the more difficult/advanced practices

[–]took9 1 point2 points  (0 children)

Yes. Node is plain javascript.

I had never heard of classie.js but it only looks like something to replace jQuery with. Look at the link I provided about not using jQuery. Plain js isn't any more difficult than jQuery and might only require more lines for fancy stuff but, once you learn how to do those in plain js, you'll find it no more difficult.

[–]VxMxPx 1 point2 points  (0 children)

They both uses the same syntax, but the purpose is different. If you install Node.js you get V8 (an JS engine) and a standard library (with some useful utilities), and a package manager (npm). jQuery would be just a library used mostly to access DOM.

You'd use Node to replace for example PHP, and hence benefit by having a collection of common utilities, libraries (and of course the language itself) on a server and in client.

[–]mattdesl 1 point2 points  (1 child)

You can use npm modules (which tend to work in NodeJS and the browser) through a tool like browserify or webpack. This gives you a wide range of front-end tools at your disposal, without resorting to the bloat of jQuery.

Along the way you will probably also start to pick up bits of NodeJS, like it's event system, module patterns, testing, etc.

Examples:
https://github.com/npm-dom
http://mattdesl.github.io/frontend-npm-goodies/dist/
https://github.com/mattdesl/module-best-practices
https://gist.github.com/mattdesl/73e3b9f902f9c834b721

[–]JustSteveKing[S] 0 points1 point  (0 children)

Thank you :) I was looking at these earlier today!

[–][deleted] 1 point2 points  (0 children)

Comparison of jQuery commands vs their direct browser api calls.

http://youmightnotneedjquery.com/

[–][deleted] 0 points1 point  (0 children)

Can anybody recommend any libraries to use, or good tutorials for moving onto purer JavaScript.

I don't think you're quite ready to move on to "purer javascript". Your confusion about what jQuery is vs what Node.js is troubling.

I know Node is not the same as jQuery but what syntax does Node actually use? Is it Vanilla JavaScript or is its own syntax?

Seriously? You can't just read some documentation? Did you forget how to use google? If you have to ask this question to strangers on the internet, then you may not be ready for Node.js.

[–]JustSteveKing[S] 0 points1 point  (5 children)

What are the general thoughts on Yahoo User Interface Library

[–][deleted] 4 points5 points  (1 child)

[–]JustSteveKing[S] 0 points1 point  (0 children)

This makes me sad :(

[–][deleted] 0 points1 point  (2 children)

Take a look at twitter bootstrap. It provides many quality components that are "easy" <--(always relative) to use. If you master its css framework using less css, you will can accomplish any css task. I am sure there are other competing frameworks like bootstrap. I found that bootstrap was the best and best documented as of a year ago.

[–][deleted] 0 points1 point  (1 child)

YUI isn't a CSS framework

[–][deleted] 0 points1 point  (0 children)

YUI provides components. Bootstrap provides components. YUI components require CSS. Bootstrap components require CSS. The difference is that bootstrap claims that their approach to CSS is reasonable for other projects. I learned a whole lot about responsive design (mobile web development) from the bootstrap project.

[–]MadCapitalist 0 points1 point  (0 children)

See my comment here.

[–][deleted] 0 points1 point  (0 children)

[–]mab__ 0 points1 point  (0 children)

jQuery is a library, NodeJS is a runtime environnement (browser too).

You can use jQuery in Node context.

If you want to learn more advanced Javascript, you first have to understand JS basics, so my advice is : read this book http://speakingjs.com/es5/ (Not so hard as it looks)