As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I apologize in advance as this question isn't directly related to a coding problem or question. Many web developers start out using jQuery as an essential library due to the massive amount of plugins available. It is fairly easy and requires little knowledge to implement a plugin into your code, and use it successfully. The downside is that it can be easy for a beginning developer to ignore learning JavaScript from the ground up, and depend on jQuery plugins to get them through most situations.
After years of doing this, a "developer" learns jQuery piece by piece, but does not have the fundamental understanding of how Javascript works or the mastery required to build custom functions or plugins. This is a common turning point where developers have a yearning to learn more, and really understand how this all works. jQuery aside, developers should probably learn JavaScript first, but this is commonly disregarded amongst beginners, as jQuery is easier to understand and simpler to write.
Although this is a loaded question, I am looking for a good direction to advance my understanding of jQuery AND Javascript. Having a solid understanding of jQuery, I really want to have the knowledge and flexibility to write any code in both jQuery and traditional JavaScript. I am looking for a good direction to advance myself, and for others in similar situations to move forward on the quest of js knowledge.
What are the best books, methods, or success stories you (the community) has from your struggles with learning JavaScript? What recommendations do you have, that myself, and many others can benefit from? Keep in mind, this question is on behalf of people who write jQuery on a regular basis, but struggle to really grasp all of the necessary concepts to master the language. And also, it is for people who started learning jQuery BEFORE javascript, and wish to have a fundamental understanding of both. Thanks in advance!
This is probably the number one reason I disapprove of jQuery. That said, I suffer from a similar issue: After using Game Maker to write my games for me, I can't travel down layers of abstraction and into the realms of C++ or similar without significant effort.
Going up layers of abstraction is easy, that's why abstractions exist in the first place - if they didn't, we'd all still be writing raw machine code. Going down is significantly harder.
Ultimately, all I can really suggest is that, depending on how much "plain" JavaScript you actually know, pick up a beginner-level JS book and start from the top. Just try not to deviate into "this'd be so much easier if I just used jQuery" - if you find yourself doing this, it's bad.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am thinking to use Javascript Framework for my project. But I am confused, should I use a Framework or use simple Javascript. Moreover, one more point I want to make I am not much experienced in Javascript. What would be your suggestions for one who is still at beginner level in Javascript?
Regarding beginner doubts:
I was at beginner level JavaScript when I started working with AngularJS last year. To learn the basics of it is really easy. What's even better is that it helps you do fairly complicated things with very few lines of code. Most of the code you write will be what AngularJS calls directives, which also turn out to be the most reusable pieces.
Some of the advanced concepts can be difficult to understand and will take some time though, but overall, I would say that progressing through AngularJS has given me a better understanding of JavaScript.
This was my experience at least, and this post does not aim to sell AngularJS. In my opinion, learning a programming language is, most of the time at least, better done by digging into the raw features of it on your own. But with JavaScript -- and all its quirks -- I found it very helpful to have something to guide me -- in this case, AngularJS.
Regarding frameworks for projects:
When you want to have a large application, with a lot of code and interactions, I've found that frameworks help you a lot. There's a boom of JavaScript frameworks right now, all of which are pretty good. If you want to extend HTML and do declarative programming, there's AngularJS. If you want to work at different levels of abstraction, there's Ember.js. If you want to write most of the implementation yourself, then use Backbone.js. If you're doing a lot of GUI stuff, ExtJS. Most of these frameworks will help you write cleaner, modular and more testable code which greatly improves maintainability in the long run.
The downsides could possibly be:
learning curve - but if you are at beginner level, then you shouldn't worry about this.
overkill - for some projects you really don't need to include 500KB of frameworks and libraries
mismatch - and this, I think, might be the most important factor. For example some frameworks are more suited visual stuff, like charts and animations, while others are good for something else.
Conclusion:
determine what you want to achieve,
find the right tool for the job,
the framework/library (or neither if not required) will be of great help then
and, lastly, more like a general rule:
don't be afraid of doing things right just because it seems too unknown to you
Libraries can be very good. They can help you segment your code, they can help you do a lot of things more easily. I have begun to find backbone particularly helpful for AJAXy web aps. With JQuery, $('#element').hide(); is far easier than document.getElementById('element').style.display = "none";, and JQuery .toggle(); is even better than that. In most cases, they deal with cross browser issues for you very easily as well.
From a design/architecture standpoint, the big disadvantage is the overhead. Once you start using libraries and plug-ins for said libraries, who knows how the code quality is.
From a personal development standpoint, the biggest risk is that you will begin to use libraries as a crutch, and never bother to learn why or how these libraries do what they do. I hate when I see a web page with 15,000 (exageration) <script> blocks in the header, and they leverage perhaps 1/10th of the power of all the plugins and frameworks that they are using. It would be far better to write 5-10 lines of code, than to have an extra HTTP request, and load an entire JS module just to use one function that it contains.
My personal recommendation is to use libraries, but always endeavor to understand what they are doing, and to challenge yourself to write at least part of the JavaScript yourself, until you're at a point where you know what's going on inside JS, and why it's going on. Once you get to that point, you will be much better able to evaluate if a library or plug-in is really what you need, or if you should just write something yourself.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I know programming in general but always been doing either Delphi, VB 6 or C#.net! Now I must do web-dev and must do it fast! I haven't written a hello world in JavaScript yet and must learn jQuery because there are some charts that I must show in my web-app and looks like I must know JavaScript and jQuery to do that.
So I am looking for a jQuery resource that during its course or maybe at the first chapter gives us also a jump start on minimum JavaScript knowledge too. Some book or resource that I can hopefully sit and read through it in one day like 12 hours and after then learn enough to be able to use it and embed those darn charts and graphs into my web-app.
What do you suggest ?
The basics of Javascript as a language are actually fairly straightforward, particularly if you've got a background in several other languages as you have. You'll find it immediately familiar with curly braces and other syntax that you'll recognise from elsewhere.
If you've worked with C#, you will hopefully have been exposed to lambda functions or closures. These are very important in Javascript, where they are key for the event-driven code that drives most websites, and in particular if you're using a library like jQuery, where they are used for virtually everything. You need to get a strong handle on how these functions work if you're going to make head or tail of jQuery.
The other thing to be aware of is that Javascript's object handling works a bit differently to the other languages you's used to. There are similarities, but if you try to write your classes and objects in the way you're used to, you will get some unexpected results. See What type of language is JavaScript for more info on this.
Beyond that, I don't think you'll have a problem with the syntax.
The other thing to worry about is the DOM -- ie the browser's API which is accessed via Javascript. The DOM is not technically part of the Javascript language, but it is inextricably linked to it, and is as much part of the learning challenge as the language itself. jQuery abstracts a fair amount of the DOM away from you, but it still helps to know it.
Hope that helps get you started.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
For a school development project I need to create a bomberman-like game in javascript which will feature a person vs person online gaming.
I can use any open-source library/framework I want.
The thing is that javascript is a pretty hard language to learn from scratch and I probably won't be able to do it in time.
For know I only know ruby on rails witch I'll be using for the backend, save, rooting, etc...
So I went looking for a really easy and fast to use game engine in javascript.
I already found some pretty popular ones like Gamejs, box2dweb or tapjs even a full list at https://gist.github.com/768272 but I'm unable to choose any of them.
Which one provide the best tutorials, documentation, etc...
Any help would be welcome... As you can see, I'm total newbie in game development.
You can use Crafty, it's a nice and easy to use Javascript game library.
I learned a lot from these two videos from Google I/O
GRITS: PVP Gaming with HTML5
Gaming in the Cloud
They give you a pretty descriptive walkthrough of how they made an entire game using HTML5 and Javascript. it's pretty in-depth but I highly recommend watching it. They also open source the game which you can fork on Github if you want to see the source etc. This isn't a javascript framework though but it does teach you a lot of how to make an HTML5 game from SCRATCH.
In terms of libraries, yes Box2d is a very good one and is pretty widely known. Idk if you're trying to make a 3D game but if you are, three.js was something that caught my eye (it was used to make this HTML5 racing game called HexGL). Finally I would also recommend taking a look at Ludei because they have some really great demos which you can kinda just copy and paste. They also help you if you want to move your game onto the mobile space.
Based on what you said though, I would stick with Box2d. I'll try to find some good tutorials and I might update my answer later with more libraries/tutorials if I find any. Hope for the best!
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I come from a C/Unix background, with a lot of experience in shell scripting, and some on Perl, elisp, etc. too. But now I'm getting into some work where I'll need to be developing interactive web-based interfaces, and I need to learn JavaScript. My problem is that all the resources I've found online for learning JavaScript seem to be targeted at an audience who's never programmed, and their authors don't seem much better. As soon as I see "validating user input to take the load off your server" as one of the great uses for JS, I want to scream and I feel like I can't trust anything else the author says. ;-)
Can anyone recommend good resources for an experienced programmer wanting to learn JS as a new language? Ideally I'd like to get started online, but dead tree recommendations would be welcome too, especially if I can preview them online.
A great JavaScript book for experienced programmers is Doug Crockford's JavaScript: The Good Parts. It's short, assumes you know what you're doing, is opinionated, and is not a tutorial.
My advice: Forget what you know about object oriented programming. Attempts to apply the inheritance paradigms from an OO language have repeatedly overcomplicated many, many chunks of JS code.
Prototyping is not Class construction. Object instantiation is not Class instantiation. "Classes" are not real.
There are ways to get what you want. You can even have something akin to privates - but they are not methods or members. They are merely locally scoped. Inheritance is often faked, but with mixed results, and universally at the expense of data hiding.
Javascript is prototyped. It is not object oriented. Keep that in mind every time you think something like, "Man, an interface here would be awesome..."
https://stackoverflow.com/questions/3655530/best-javascript-book-for-an-experienced-coder/3655693#3655693
https://stackoverflow.com/questions/1594159/best-book-to-learn-web-development-for-a-professional-developer
https://stackoverflow.com/questions/74884/good-javascript-books
but I will recommend these two fantastic books, which teach me a lot.
Take a look at Eloquent JavaScript. It doesn't cover everything, but it will move you towards idiomatic JavaScript programming -- things like functional programming, closures and prototypes. (The online version comes complete with a sandbox tutorial environment.) The rest, after all, is just knowing how to use references.
Javascript Guide from Mozilla Developer Network, a simple and yet informative guide, gives beginners a big picture of JS in a short time.
https://developer.mozilla.org/en/JavaScript/Guide
JavaScript: the definitive guide is one of my favorite programming books:
http://oreilly.com/catalog/9780596101992
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
There's a few mentions of Javascript newbies getting starting by checking out some of Douglas Crockford's work (https://stackoverflow.com/questions/11246/best-resources-to-learn-javascript), but none of his resources seem to be for those looking to learn from the ground up.
Are there any suggestions for complete beginners regarding how best to learn JavaScript?
Personally I have plenty of HTML and CSS experience, and some PHP (which would help learning JS), but for those that don't know any programming language what would you recommend?
I would recommend:
Eloquent JavaScript (interactive tutorial)
A re-introduction to JavaScript
Mozilla JavaScript Guide
Javascript Tutorial for beginners
I have been using the tutorials in Learnable.com from the Sitepoint folks, Lynda.com, and Tutsplus. These are all paid services, but I learn lots from them. The Codecademy Javascript Fundamentals tutorial/class definitely gets a thumbs up. Codecademy is real time, challenging and free.
Code Year also has a great program for ground up learning!
I have been working my way through Codecademy's offerings, specifically, "JavaScript Fundamentals", the "non-track courses" in JavaScript, and, as mentioned above, their current "Code Year."
I am coming at it from the perspective of someone who used to write *nix shell scripts and C and Fortran (yes, yes) code for a living a while back, and who lately has been doing some basic HTML/CSS, so some parts were obvious. Most of it, though, was new to me, since I had pretty much no experience with object-oriented or event-driven programming.
On the whole, I have found it very useful. It can be a bit frustrating getting your answer to a particular exercise to "pass," because the validation process appears to be sensitively dependent on the individual "teacher's" ability to write good checks, but this is only a minor complaint. Mostly, this is not an issue, and the already-posted answers on the forums on the site are quite helpful if you're stuck. Generally, though, doing what you're asked will get you a happy success message, and I really like the interactivity of it all. It's not perfect, of course, but I feel like I'm getting a good introduction to the key points and concepts of JavaScript; enough, at minimum, that I can speak enough of the language to know how to Google/Stackoverflow things more precisely. And really, I feel like I'm getting a lot more than that -- the dumb ideas I've had for little utility scripts are becoming a pleasure to implement.
http://www.w3schools.com/js/default.asp
As ground up as it gets.
"Javascript, the good parts" is very good, but you need to have some theoretical background or some serious programming experience to put it to use. It is a bit high-brow. However if you have had programming courses during your education it will be fine.
I have been learning from: http://www.informit.com/library/library.aspx?b=STY_JavaScript_24_hours
I'd say W3Schools is a pretty good tutorial for someone with no programming experience. But as soon as you finish that, start working through Crockford's material, and unlearn all the bad stuff you learnt.
I don't know of any introduction to JavaScript that follow's Crockford's good parts, but he says in the introduction to his book that he'd like to write an introduction to JavaScript at some point, so fingers crossed!
Head First Javascript is an excellent book for beginners. The Head First series does a great job of breaking things down to the basics, but still covering a lot of ground throughout the book.
There are NOW some good interactive tutorials for learning Javascript right from the beginning. If you are fairly new to Computer Programming, try Code Avengers (a site I helped create) or CodeCademy. Both are free and get you to write code right from the beginning.
If you have a some programming experience, try Code School. It has courses for html, css, Javascript and JQuery. However, they do cost about $50 a course. Learners watch fairly entertaining video tutorials then complete programming tasks.
My experience in learning and teaching others to program is that these type of sites can be both and effective and enjoyable way to learn programming. Probably in conjunction with other resources.