Navigating the jungle of crazy JS Everything
by Ben Junya
About Me
2 ULTIMATE RULES TO LEARNING™
Have fun
Enjoy the process
GOTTA GO FAST
npm (10/23/17) by the numbers:
577,389 packages
460,069,942 daily downloads
3,189,943,716 weekly downloads
13 billion+ monthly downloads
It's an incredible and exciting time to be a Javascript developer
#JavascriptFatigue
<html>
<head>
<link type="text/css" rel="stylesheet" href="style.css" />
<script src="myscript.js"></script>
</head>
<body>
<h1 class="headline">Hello HTML page!</h1>
</body>
</html>
HTML, CSS, Javascript
<html>
<head>
<link type="text/css" rel="stylesheet" href="style.css" />
</head>
<body>
<h1 class="headline">Hello HTML page!</h1>
</body>
<script src="myscript.js"></script>
</html>
HTML, CSS, Javascript
Writing code
$(document).ready(function() {
var username = 'John Doe';
});
Why are you using jQuery?
Writing code
document.addEventListener('DOMContentLoaded', function(){
var username = 'John Doe';
});
Why are you using ES5? Use ES6 instead!
Writing code
document.addEventListener('DOMContentLoaded', () => {
const username = 'John Doe';
});
Oh, you need to transpile with Babel!
Installing Stuff...
$ npm install babel-cli
Wait, why are you doing that? Bundle with webpack and use a loader!
Installing Stuff...
$ npm install webpack
$ npm install babel-loader
You have to configure Webpack!
Wait, why are you doing XYZ? Use ABC instead!
Stop using that library. That library sucks
The worst conversation
Hey, what programming language are you learning right now?
PHP
Ohhhh, don't use PHP. Use Python instead because...
The worst Javascript conversation
What framework are you learning/using?
React
React is stupid! Because...
Before we begin...
What's hot?
Automated the tedious parts of development
Increased developer satisfaction
$ grunt
$ gulp
$ bower install
<html>
<head>
<link type="text/css" rel="stylesheet" href="style.css" />
<script src="lib/jquery3-0-1.js"></script>
<script src="lib/bootstrap.min.js"></script>
<script src="lib/buzz.js"></script>
<script src="lib/video.js"></script>
<script src="lib/slick.js"></script>
<script src="lib/lodash.js"></script>
<script src="script.js"></script>
</head>
<body>
<h1 class="headline">Hello HTML page!</h1>
</body>
</html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="style.css" />
<script src="out/bundle.js"></script>
<script src="script.js"></script>
</head>
<body>
<h1 class="headline">Hello HTML page!</h1>
</body>
</html>
(again)
What were the problems to solve?
Javascript goes modular!
Node.js
$ npm install expect
var expect = require('expect');
expect();
Why?
#JavascriptFatigue often stems from framework fatigue
<html>
<head>
<link type="text/css" rel="stylesheet" href="style.css" />
</head>
<body>
<div id="app"></div>
</body>
<script src="bundle.js"></script>
</html>
HTML, CSS, Javascript
Task Runner + Dependency bundler
Developer Satisfaction
Bootstrapping and Boilerplating
How to keep up
Other tools to include in JS app architecture
Other tools to include in JS app architecture
Thank you GDG-LA!!
Github: @MrBenJ
Email: bjunya@gmail.com