I think it all depends on the situation and the project. If you haven't got time then using frameworks will obviously help. We had a project where we wanted to make the responses as lightweight as possible for a mobile web app as the bandwidth was really poor. So we did away with jquery and did ajax calls using vanilla js. I know jquery isn't massive but the page size was only a few kb which helped massively. So just depends on the project and situation I think.
If frameworks become (as I've seen a couple do) actually give you the option to choose the dependencies and capabilities you want, then no, websites won't go back to just vanilla js. That is the next stage of freedom for developers. That way frameworks become a little bit more bespoke and therefore less bloated. Some websites will always be vanilla - due to their lack of complexity, others require frameworks in order to keep up with customer demand and do complex things for you.
No, because nobody wants to rewrite the same things over and over again. We'll still going to have small libraries and frameworks.
These days I read (again) about mithril.js. Reading/Writing mithril is like reading/writing vanilla js, but faster, better, easier :)
I can say there has been a shift since ES6 (Now called ES2015), in which we now (in plain ol' ES6/ES7/etc) have the syntactically sugar and features in that was only available with something like CoffeeScript.
As with any Javascript language (like CoffeeScript) a transpilation step is required in order to transpile it to ES5 (or ES6). This may never go away though, because ES6, ES7, ES* will continue to implement features before all of the browser vendors natively support them. So, we will likely continue to need something like Babel.
So, I believe some are already coming back to writing plain JS, but there's always going to be other options, like TypeScript.
JS is currently like the assembler / machine code of the internet for browsers or if we see WebASM as the actual assembler language of the Web, JS would be the equivalent of C. When C was developed, certain people continued to use C while others moved on to higher-level languages as they became available. As of today, I know very few people still developing in pure C.
In Delphi for example, you could mix Assembler in your Delphi code if you weren't happy with the performance of the built-in function:
<sarcasm>Doesn't these assembly instructions look like very maintainable code? </sarcasm>
function CountDigits(anInt: Cardinal): Cardinal; inline;
var
cmp: Cardinal;
begin
cmp := 10;
Result := 1;
while (Result < 10) and (cmp <= anInt) do
begin
cmp := cmp*10;
Inc(Result);
end;
end;
function CountDigitsAsm(anInt: Cardinal): Cardinal;
asm
mov ecx,$a // cmp := 10;
mov edx,$1 // Result := 1;
jmp @loop2
cmp eax,edx // while cmp <= anInt do
jb @done
@loop1:
add ecx,ecx // cmp := cmp*10;
lea ecx,[ecx+ecx*4]
inc edx // Inc(Result);
@loop2:
cmp edx,$0a // (Result < 10)
jnb @done
cmp eax,ecx
jnb @loop1
@done:
mov eax,edx
end;
begin
WriteLn(CountDigitsAsm(10));
WriteLn(CountDigitsAsm(99));
WriteLn(CountDigitsAsm(999));
WriteLn(CountDigitsAsm(9999));
WriteLn(CountDigitsAsm(99999));
ReadLn;
end.
Where do we see similar scenarios in the browser? GWT / Dart / Kotlin's JS interop which allows you to mix JavaScript into your higher level language.
Once proper web assembly becomes available in all browsers, I believe JS interop will start to disappear slowly and you'll just be working in the high-level language compiling it straight to WebASM.
Just like C, JavaScript will still hang around by a thread unless it gets a major overhaul and much needed improvements like C did when C++ was released.
Just my opinion ...
I think no. Maybe will appear new language better than js, or other scripting languages will become compiled to javascript :D
Definitely. Keeping your Javascript skills sharp really compliments working with any library that was written in JS
Yes, as always after useless experiments and overengineering people will, of course, use something:
That why jQuery was so popular and lived for 10+ years while all your so called modern "frameworks" come and change every year.
And actually I already started solving this #1 modern front-end problem.
If you love vanilla JS and tired of learning useless frameworks, you just want to import X and everything works like it was with jQuery and jQuery UI then please star https://bunnyjs.com, share your feedback, contribute!
Add me on Twitter or Facebook /mevrael, I will answer all your questions and will teach you simple JS itself and absolutely for free.
I think it is a fair possibility. A few years ago, everyone was raving about jQuery, because it was solving "real" browser problems. But now the DOM APIs are better, and you might not really need jQuery .
I don't know the specifics, but just throwing out ideas in the air, probably browsers in the future will ship with a virtual DOM implementation. Then, probably, we will have some thing like youmightnotneedreact.com :D
Definitely. Frameworks come and go.
Well. I do use Vanilla-JS quite a lot. Also I do not think that it's a
full circle back
since people never really left Vanilla-JS. Well, at least people who know how to JS never really did. But as always, it ultimately depends on what you are doing. On the one hand, if you are working on your personal site with a portfolio, there is no need for any library. It's just Vanilla-JS. On the other hand, if you want to build a Facebook, you might want to use some lib to make your life easier.
You see, I am no fan of React, and I do not really like Angular. Both feel like tattooing an ant; with a low orbit ion cannon. I like Polymer, or rather web components. So all I need is a shim until we get stuff into our browsers. The rest is Vanilla with whatever pattern I think fits best.
I really hope so but I think it is unlikely. With the progression of programming it's likely that it will become a whole new language at one point or become obsolete and be replaced with something new and faster.
No, not really.
Time is too valuable these days and customers want things done fast.
Vanilla Js will be a rare find in tomorrow's sites. Microlibraries will keep gaining ground, and will be the way to go probably.
Maximilian Berkmann
Web and programming
No because: