jQuery resource for Win32 programmer [closed] - javascript

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.

Related

How bigger jQuery projects are structured and what the reasons for that [closed]

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'm developing Desktop-Software with different OO-based languages. I haven't got in touch with web development since recently. I just started playing around with jQuery and jQuery Mobile to build simple web applications.
I noticed that my projects usually end up with a HTML-file as a base and a *.js file which contains the methods, eventhandlers etc. This somewhat feels like programming spaghetti code and I can't think of how this could work with more complex projects. (Reusability, Performance, ...)
Usual jQuery-Tutorials are just showing trivial examples which work well with the "all methods into a single script-file"-approach. I also read somewhere, that it is better to provide just a big file because it is faster to load just one file instead of a lot small files.
Can someone tell me how bigger jQuery-projects are structured and what the reasons for that are?
I'll try to break up your question into smaller parts:
"I noticed that my projects usually end up with a HTML-file as a base and a *.js file which contains the methods, eventhandlers etc. This somewhat feels like programming spaghetti code and I can't think of how this could work with more complex projects."
Sounds like your OO background has you spoiled. Javascript won't force you to use it's prototypal inheritance, and neither will jQuery. Nevertheless, it is there. Douglas Crockford wrote a piece about moving from a classical OO-centric inheritance to the prototypal equivalent: Prototypal Inheritance in Javascript
"Usual jQuery-Tutorials are just showing trivial examples which work well with the "all methods into a single script-file"-approach."
Yes, putting all your code in one file will work fine for a small website or web-app, but it doesn't scale.
However this is no difference from putting all your C method declarations in one header and all the code in one source file. My point being that you don't have too.
I'd recommend you look at a script loader like RequireJS as a solution to this problem. In worst case there's still nothing wrong with putting your script tags inline in your HTML code but this also doesn't scale well.
"I also read somewhere, that it is better to provide just a big file because it is faster to load just one file instead of a lot small files."
Well ... yes, but this is negligible in most cases. Even if you do see a drop in performance, why treat your development code as your production? Use a compression tool such as YUI Compressor to compress and merge your JavaScript. Smaller load times without the pollution.
Final piece of advice: jQuery is not going to help you solve your JavaScript architecture problems any more than a dictionary will help you structure a sentence. (In other words, don't rely on jQuery examples to teach you good JavaScript practices).

How to progress in the quest of learning Javascript [closed]

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.

Is order relevant when learning JavaScript, Ajax, jQuery and JSON? [closed]

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.
The number of jobs I could apply for would greatly increase if I knew JavaScript, AJAX, jQuery and JSON. I've begun teaching myself and figured out, in some sense or another, they have all evolved from JavaScript. My question is how well (if at all) do you need to know one before learning the other and in what order?
Javascript. As this is the language that surrounds the other things you want to learn, it's logical to start here. Find out what Javascript is, the syntax, what it can do (and CAN'T do).
jQuery (mind the single r) is a Javascript-library, it means that it is just another way to write plain js-functions. You can do everything jQuery can in pure Javascript. The difference is that jQuery makes many things easier and corrects some flaws browsers have developed (hello IE).
Ajax (transferring information without pageload) is a feature in Javascript. You could either learn the pure js-way, or the simplified jQuery-way. I love how simple jQuery have made ajax-calls. My ajax-calls before I began learning jQuery was a mess! This is just an aspect of the entire jQuery-library, so some basic knowledge of their syntax, event-handling and such is smart before beginning to learn this.
JSON is just a way to encode a set of strings when you are using Ajax. With some basic knowledge of Javascript, this should not take you a long time to figure out.
That is the order I would suggest. With my comments you can see why I suggest them in this order.
Good luck :)
Javascript is the core of all the ones you listed as everything you've listed is written in javascript or uses its syntax. You will need to know core javascript in order to learn/use any of the other items you've listed.
jQuery is a popular and useful library built on top of javascript that adds lot of useful functionality and implements a lot of cross browser compatibility for you.
Ajax. You will probably want to learn the ajax stuff in jQuery as it makes ajax a lot easier than doing plain javascript ajax.
JSON is the data format often used with Ajax so you will probably encounter it while learning ajax.
I would suggest the order above.
Javascript is the language itself so you should learn it first. JSON is the javascript object notation so while you're learning Javascript you will be learning it too. Ajax is the API for async calls to the server so it has its own object which is consumed using JS. jQuery is a library which is built on top of JS.

Is jquery a dynamic redefinition of javascript? [closed]

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.
Learn JavaScript before learning JQuery?
I have read that thread and I still don't find any points convincing me that Javascript is a must-learn-before-jquery thing.
I think jquery is far more than just a javascript library, I would like to call it a redefinition of the dynamic language, the new javascript instead. The library writers clearly made the greatest hit here to change old JavaScript's face almost completely.
Javascript and Jquery are co-existing because Jquery is the javascript library and the fact that people support learning JS first before jquery is likely because they've been client side coders long before the jquery was out, WHICH CURRENTLY EASES THEIR INVESTIGATIONS INTO THE LANGUAGE FAR BETTER, psychologically, they certainly then say "Oh yes, procedural methodologies work greater".
For points concerning writing a function call via mouse/keyboard events, I still agree that javascript structures are preserved and need learning. But does this really make a big difference whether or not learning jquery first should be more beneficial at all ?
Ex:
function something()
{
//jquery code
}
////
<input type="..." onclick="something();"/>
Advice and corrections are required. Thank you so very much.
There are many reasons why its important to learn the native JavaScript, in addition to the jQuery Library:
jQuery is written in JavaScript, so if you ever run into a jQuery bug, or need to patch it, you will need to know the JavaScript
if you ever want to use jQuery efficiently, in many cases it's helpful to read the underlying JavaScript
it isn't guaranteed that jQuery will always be the best Library (something like Scriptaculous may one day surpass it), thus you shouldn't be library-dependent
in many cases you still need to run JavaScript inside of a jQuery function
jQuery may make many things simpler (accessing DOM elements), but in many cases it isn't required

Recommendations for an experienced programmer new to JavaScript? [closed]

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

Categories