Starting with Javascript framework?

I donโ€™t know much Javascript - just a little of the main language, but it can be learned - no problem. I want to start writing simple demos / canvas games.

What I'm not sure is the right ways to embed Javascript on pages to make a reasonable cross-browser (say, without IE). Should I start with vanilla JS or use some frameworks like jQuery that can help me shorten code and cross browser?

Or will it start with the framework so that I understand less details of JS itself?

+4
source share
10 answers

Use a framework like jQuery. You won't learn anything particularly insightful when fighting against the somewhat baroque, inconsistent, and incompatible APIs that are jQuery abstracts (or any other decent framework). You will continue to use the same language, instead you will use more convenient and portable APIs.

As you become more experienced, you will find situations that your infrastructure does not cover, or in which you need to expand your structure. At this point, you can start working with the actual APIs that browsers view, as well as the incompatibilities and inconsistencies that are associated with them.

For very simple noodling around with <canvas> you can often access raw JS without too much trouble, since browsers that support canvas also tend to be more compatible with each other (although the APIs will be much clunkier than what provides jQuery). Of course, you can use excanvas for IE <canvas> emulation, after which you will again have to deal with incompatibility.

+7
source

Hmm, I am always of the opinion that it is best to try something for the first time to understand what the wireframe does for you. It always helped. For example, I cannot imagine ASP.NET programming without knowledge of HTML or CSS.

No matter what the wireframe does for you, it does it with you. Start by scratching javascript yourself before throwing jQuery.

+5
source

Learn Javascript and learn it well . The core Javascript language is somewhat clean and very strong. Understanding the language will help you better understand and use libraries, since they tend to use the power of the language very much.

Use a beautiful library. Learn basic APIs first if you have a lot of time. If you are good at learning Javascript, you should be able to learn on-demand APIs when you really need them. As for the main crud that the main libraries hide (DOM support, spotty AJAX support, lack of some obvious tools), you might have to sneak into the libraries someday to fix something.

As with libraries, I did not use jQuery, but it has definitely become popular. Given the talk about this, I would say that this is a safe bet. I mainly use prototype.js . This usually involves using Scriptaculous and some Livepipe controls as well as Lightbox.

+1
source

jQuery is like an automatic movement against changing sticks. You still need to know how to move, but you will get less effort using current tools.

0
source

If you do canvas work, Raphael.js is a great choice, I highly recommend it. For a shared library for accessing and managing DOM elements, I recommend jQuery.

I do NOT recommend skipping learning all of JavaScript. I really like the key comments that Doug Crockford gave on the Yahoo Developer video network on JavaScript, you should review them.

0
source

I think jQuery is a good place to start.

jQuery is a fast and concise JavaScript library that simplifies HTML document flow, event processing, animation and Ajax interaction for fast web development. jQuery is designed to change the way you write JavaScript.

  • Light footprint

  • CSS3 compatible

  • Cross browser

It is well documented and has many tutorials .

0
source

Should I start with vanilla JS, or use some structures, such as jQuery, from the beginning, which can help me cut code and cross browser?

Yes, the likek jquery library does most of the cross-browser processing itself, which you need to do manually using regular javascript.

Or starts with a framework will make me understand less details of JS itself?

If you understand the core of javascript, the framework / library will be easier to understand. Starting from the framework / library, yes, they have their own special syntax, but still the standards and core of the language remain the same.

0
source

If you are looking for a JS library, there are a lot of them,
1. Prototype and Scriptaculous
2. JQuery and jQuery user interface

3. YUI
4. DOJO
5. ExtJS

What i like
1. JQuery because its a unique way of writing code and a selector function that is really cool.
2. YUI has very good documents available with examples.

Also for the above two, we have a good community available to answer queries. I suggest you first learn the basics of JS, as there is no alternative to the basics, that if the JS framework is there, it will help you understand the framework. Then try these two, and choosing one of the two will be wonderful.

0
source

If you just jumped into JS-biz, try DomAssistant . This is a lightweight structure (no animation or widget), with excellent documentation. Later you can continue to use it or switch to another framework, but it is ideal as the first.

http://www.domassistant.com/

If you have a small hobby project, you should try simple JavaScript first, so that later you will feel the difference when you start using the framework.

0
source

If you already know that Java comes with GWT. You cannot compile the rich set of tools available in java with Eclispe, and so on with the javascript medievil editors that are currently available.

-1
source

Source: https://habr.com/ru/post/1300951/


All Articles