Why am I finding Javascript/jQuery so difficult to get right? -


My background is in C and I've picked PHP, mySQL, HTML, CSS without a lot of problems.

But I'm having a Javascript / jQuery address that is difficult to obtain properly. very frustrating. Why does it feel like this?

  1. It seems that there is a violation of many traditional programming principles (like the scope of the variable)

  2. undefined variables begin to appear There are nowhere and already values ​​associated with them. For example (from jQuery Docs):

      $ ("a"). Click (function (event) {event.preventDefault (); $ ('& lt; div / & gt;') .append ('default' + event.type + 'paused') .appendTo ('# log' );});  

    What is actually "events"? Do I have to use this variable name? Should I just believe that this object has magically started with the right stuff and can I use any method list?

  3. A bunch of random rules (eg false reflection to stop default work, but sometimes it does not work?)

  4. Non-deterministic behavior during debugging (like refreshing the browser, I am trying to do something and getting results of X for JS variables I am looking at the firebug. I get refreshed and get wired?)

  5. Code compliance Rana is difficult when what happens? I'm using the Firebug and Chrome Developer Tools, but I'm not getting enough visibility.

It seems that every day there is some JS "rule" which comes up in the first place I have never seen before in any of my JS books or tutorials.

What do I need to do to make javascript / jQuery more deterministic, controlled and logical?

Is there any resource that interprets javascript quarks?

Thank you!

"" An invaluable resource was much like Python compared to Java Lisa, Lisp, or C It just looks like C, it just looks like C

The link provided to Amazon; I set up my pillow with O'Reilly.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -