Messing around with raw javascript wanting to get good with it. I plan on making a JS game in the future and am practicing with using new design patterns and best practices. Yes. I will still probably use Jquery for the game, this is just for bettering myself so I am not limited to only jquery. (I want to go into node.js)
Anyway here's a little bull-shit todo list in jquery: Edit this Fiddle - jsFiddle
And it redone in raw JS: Edit this Fiddle - jsFiddle
I'd like any suggestion you'd have to make my code more efficient or elegant. Thanks.
good book
http://eloquentjavascript.net/
Results 1 to 3 of 3
Thread: Jquery to Javascript
- 16 Oct. 2012 10:20pm #1
Jquery to Javascript
Last edited by HTML; 16 Oct. 2012 at 10:23pm.
- 17 Oct. 2012 03:23pm #2
So you want to stop using jQuery in favor of nodeJS? They're distinct things for distinct purposes.
jQuery is an auxiliary library for widgets, animations, etc. Wherein nodeJS is simply server-side JS for those who want to use JavaScript for web development and other server related things.
In other words they are not mutually exclusive things. I personally wouldn't stop using one for the other. This is all assuming that's what you're suggesting though. If you aren't implying that then feel free to disregard this.
But any particular reason you want to go into server side JS instead of using PHP or something like Python on the backend? It's probably more effective but something less practical indeed.
Anyway as for suggestions I'd say just continue to read Eloquent JavaScript - after all, that's what it's there for. And I hear it's a pretty good book for JavaScript. Plus I'm not much of a web dev person personally.
Furthermore, if you also mean you want use pure JavaScript instead of jQuery that's also not necessary unless you want to do everything from scratch or have another library. jQuery is built from JavaScript so opting not to use it would be more counterproductive than not. But this is all for betterment purposes I assume.
P.S. I'm sure you already know most of what I'm talking about so if you feel I'm repeating things or something of that nature note that I tend to ramble at times and this happens to be one of those times.Last edited by The Unintelligible; 17 Oct. 2012 at 03:37pm.
- 17 Oct. 2012 04:09pm #3
So you want to stop using jQuery in favor of nodeJS? They're distinct things for distinct purposes.
Not quite. My goal is to convert jquery into javascript for other purposes. I went into jquery with very minimal knowledge of raw javascript. I have a plan on developing a game with HTML5 canvas javascript(jquery or YUI) and PHP but feel I was limited due to my knowledge of the DOM and javascript. (Not so much anymore). In the future I want to mess around with a lot of Javascript applications and maybe develop a few of my own. I'm not saying I want to replace jquery it's much too valuable, but i don't want to handicap myself to only jquery.
For example, if i were to change libraries or frameworks, I may feel a bit overwhelmed if the syntax is too close to raw javascript (assuming I'm not up to date in the design patterns etc.)
As for Node, I don't plan on replacing my PHP with node. I do however, want to play with it as a buddy of mine suggested it and well..it looks hella interesting.