JavaScript Patterns for 2017 - Scott Allen

  Рет қаралды 179,121

NDC Conferences

NDC Conferences

Күн бұрын

Пікірлер: 76
@djpunisha29
@djpunisha29 7 жыл бұрын
this was a really good talk, this guy is clear and concise on the point, unlike all the other JS ninjas who are just talking too fast and rambling on and on ....
@sgwatyt
@sgwatyt 7 жыл бұрын
Scott has long been a developer advocate in the c#/.net community and within the past few years has really started blogging/speaking to the js community. His talks where he combines the two are also great.
@warrenbuckley3267
@warrenbuckley3267 7 жыл бұрын
He has some good courses on PluralSight for both C# and Javascript
@jahilkhalfe
@jahilkhalfe 7 жыл бұрын
100%!!
@billott2028
@billott2028 7 жыл бұрын
Thank you for presenting the well understood OOA/OOD concepts in rudimentary JavaScript ecosystem. Computer Science educators should take note.
@sne4ky647
@sne4ky647 4 жыл бұрын
Seeing this in the recommendation is so sad😢 , God bless your soul Scott
@MyronNetterlund
@MyronNetterlund 7 жыл бұрын
Love the comments at 53:50 regarding Jasmine & integration-testing. Thank you for sharing your experience. "...a lot of the components that we write, they are orchestra-tors..." 54:33
@piq-dg3vz
@piq-dg3vz 7 жыл бұрын
About the ../../eternity of dot dot slash, instead of doing that you can leverage native node modules like process, path, and __dirname
@CarneAsadaFries_
@CarneAsadaFries_ 7 жыл бұрын
Feels like I'm learning AS3 all over again. Classes, private functions and variables. Modules are essentially Sprites or Movieclips.
@danialkalbasi
@danialkalbasi 7 жыл бұрын
A very true point for mocking other services in unit testing. We should do more integration tests!
@serenity_zero
@serenity_zero 7 жыл бұрын
webpack 2 is out, btw. (the video features webpack 1, which has some incompatibilities, like 'loaders' instead of 'rules')
@jerrysaravia
@jerrysaravia 7 жыл бұрын
He mentioned that in his video. I found the pattern of multiple webpack configs interesting. Gonna try that.
@serenity_zero
@serenity_zero 7 жыл бұрын
indeed, he mentioned webpack 2 at 13:40. I missed that.
@sobanya_228
@sobanya_228 7 жыл бұрын
He uses webpack 2 already.And mentions incoming 2.2
@LarsRyeJeppesen
@LarsRyeJeppesen 7 жыл бұрын
Webpack 3 is out :)
@RashidOmar
@RashidOmar 6 жыл бұрын
Webpack 4 is out. Just saying.
@user-ge2vc3rl1n
@user-ge2vc3rl1n 2 жыл бұрын
@29:00 One of my interview questions for a frontend job actually asked me about how to make frozen js objects with properties/functions inside. Took me off guard for sure
@modolief
@modolief 7 жыл бұрын
3:51 -- exports and imports -- excellent overview.
@PanagiotisKouretas
@PanagiotisKouretas 7 жыл бұрын
Pure magic. Typical Alan Rickman...
@formerastronaut
@formerastronaut 4 жыл бұрын
Sometimes I wonder if this paradigm of breaking everything up into modules and then smooshing them all back together with a bunch of extra steps and bundlers is actually worth it.
@Scorp1u5
@Scorp1u5 7 жыл бұрын
Focusing on gzip size is not a good idea. The files are transferred over the network with a MTU of 1500 bytes. All of your files except the smallest and largest are +/- 1 MTU from the average, meaning that excluding the outliers the transfer time is the +/- 1 packet. people forget that TCP packets are more like block devices than character devices at the low level. I'd focus purely on the execution time because that will have the largest impact on the user.
@datpip
@datpip 7 жыл бұрын
I had no idea the class keyword doesn't hoist. Good to know.
@gggvvvnnn
@gggvvvnnn 7 жыл бұрын
Given how you're basically using Gulp as a proxy to CLI, you might try just using npm scripts instead.
@maxtream9388
@maxtream9388 7 жыл бұрын
While I agree.. You sometimes need to do some weird things with files. And it's better to do so with language that you know, which is javascript. Because with scripts and using CLI you need to adjust to Windows/Linux sometimes. With gulp it's only javascript. But if you don't need some weird custom manipulations, I agree, go full npm/yarn scripts.
@gggvvvnnn
@gggvvvnnn 7 жыл бұрын
That makes sense. I personally start with UNIX one-liners for my npm scripts, and if I need something more complex I just invoke an external Node script and use ShellJS if needed.
@politicalvegan
@politicalvegan 7 жыл бұрын
I was always told to write my programs so that variable names and function declarations where as descriptive as possible to what the underlying behavior is doing so that it was as easy as possible for the human to understand what was going on... since these abstractions aren't adding anything that wasn't already there, I would argue they are trying to do the exact opposite... obviously not everything in this talk fits into what I'm referring to, like async/await is something that adds what wasn't already there but stuff like => or ...!!data ? data : {default:true} aren't adding anything new, its just an abstraction of what could've been written in the same Javascript you learned in the first two weeks. If you prefer condensed reading, perhaps chunk up your code into a function or get a better editor that helps with condensing code instead of trying to evolve Javascript into a different language. To be completely honest, I think the philosophy should be that, if you're using abstractions that don't add anything new, you're considered a less ideal programmer.
@politicalvegan
@politicalvegan 7 жыл бұрын
you can see ...!!data ? data : {default:true} at 39:20 this and that has always worked perfectly fine for me, just because something behaves differently than the default behavior doesn't mean that something is actually contributing that wasn't already there (aka behavior could have been altered by the programmer)... opinions on aesthetics isn't a good justification (especially in the context of Javascript) for making things needlessly inundated with details that aren't adding anything substantial... what that does do is make the entire thing *appear* to be less accessible
@WateryIce54321
@WateryIce54321 7 жыл бұрын
"using abstractions that don't add anything new"? I hope you're aware of how subjective that is. What does C add to assembly? Well for one, it's simpler to reason about. Likewise, what does a short-hand lambda notation (=>) add to Javascript? It encourages a declarative programming style and reduces the amount of irrelevant code that we must read. There's a difference between being verbose and being descriptive. And the reason that ...!!data seems bad is because it is bad. One of the quickest ways to tell is when you can't look at the code and read it out as a simple, English statement. `user_age > 90 ? "old" : "young"`, does the ternary operator still seem that unreasonable? It throws people the first time around, but is easily understood afterwards and pays off by reducing control flow clutter.
@eggwaffle
@eggwaffle 6 жыл бұрын
My god people really just don't like learning do they? Your example doesn't even work as arrow functions have lexical scope as opposed to the function keyword.
@oliver1833
@oliver1833 6 жыл бұрын
Was thinking the same thing re: arrow functions. Plus there's the point that => should be read as a function, and so isn't necessarily less descriptive to a JavaScript programmer. If there was ==>, =/> and =?> as alternative iterations, the point would be more valid. Jacob Edwards does have a valid point in the wider scheme of things - there is a lot of condensed function in JavaScript that is not informative. A good talk on it here: kzbin.info/www/bejne/oqDNZHaCfdSpqpI
@atbureau
@atbureau 7 жыл бұрын
The IIFE at 2:15 is written incorrectly, no? I thought the first pair of parentheses encloses the function and the second pair of parentheses is outside the first - calling the expression.
@omg_look_behind_you
@omg_look_behind_you 7 жыл бұрын
i believe either works, but your method is the preferred one.
@crdhdxyz
@crdhdxyz 7 жыл бұрын
it is written properly. if there is a bracket opens before the function, js treats it as an expression
@abdullahalmehedi6046
@abdullahalmehedi6046 7 жыл бұрын
any link for slides?
@idmontie
@idmontie 7 жыл бұрын
Won't modules exports be mutable by the current standard?
@MrShibaMX
@MrShibaMX 7 жыл бұрын
2017 managing JS dependencies... still kind of a mess surprise surprise, am I right?
@seccat
@seccat 7 жыл бұрын
Great video. I'm watching for the fourth time. @3:10 What's a IFFE? I think you meant "Immediately-Invoked Function Expression" (IIFE)
@xdev1090
@xdev1090 7 жыл бұрын
You should still wrap strict code in iifes to guard against bundling with non-strict code.
@corlaez
@corlaez 6 жыл бұрын
I would love to see parcel bundler in "toolchain can impact performance"
@aziaev
@aziaev 6 жыл бұрын
well structured presentation
@dean6046
@dean6046 6 жыл бұрын
Thank you! Awesome talk
@PamirTea
@PamirTea 7 жыл бұрын
Very informative talk, thank you.
@fuu812
@fuu812 7 жыл бұрын
Very good presentation
@MZDisaster
@MZDisaster 4 жыл бұрын
RIP Scott Allen :(
@pentalite5
@pentalite5 7 жыл бұрын
Hey NDC, I love what you do and the videos you guys produce. I have transitioned over to a web developer role over the past year and have found your video's incredibly helpful. My company is going through a big promotional phase. I would love to thank you and bring you some value with a free license to our software screen casting software (Screencastify). lmk.
@parthi2929
@parthi2929 7 жыл бұрын
Are these already into nodejs?
@NZRBeats
@NZRBeats 6 жыл бұрын
You can use them with transpilers(aka Babel)
@PhillipKerman
@PhillipKerman 7 жыл бұрын
Great! Filled in many loose ends for me.
@olegsirbu2
@olegsirbu2 7 жыл бұрын
thanks, very cool talk!
@ahmedelwa2000
@ahmedelwa2000 4 жыл бұрын
Your are missed, Scott :))
@ljklj719
@ljklj719 7 жыл бұрын
The first snippet of code is wrong. Wtf
@erbse1178
@erbse1178 7 жыл бұрын
JS in general is on a good way. But even with this newest TS and stuff, seems to me, that the code still is ugly and full of pitfalls to be aware of. Hope this gets much better in the future....
@MrYerak5
@MrYerak5 4 жыл бұрын
its like watching the history channel
@user-iu1xg6jv6e
@user-iu1xg6jv6e 7 жыл бұрын
OMG, Professor Snape!
@alexjumba
@alexjumba 7 жыл бұрын
brilliant!!
@gyrogojo
@gyrogojo 7 жыл бұрын
Great Talk! BTW does not this guy look/talk like American pablo escobar from Narcos :D
@eloceano3829
@eloceano3829 7 жыл бұрын
Let me add one more pattern: Global state management. I would recommend MobX over Redux. MobX is much more simple due its OOP structure and small API, instead of adding lots of indirection and bolierplate needed by the functional paradigm used in Redux. Note: I have nothing to do with MobX. Just a personal preference.
@LQRCerberus
@LQRCerberus 6 жыл бұрын
why is my name on this?
@youngd8445
@youngd8445 7 жыл бұрын
thks
@calebprenger3928
@calebprenger3928 7 жыл бұрын
I started watching this video, and every year there has to be some genius that states "everything you know is different now". Yet Javascript is still Javascript. Next Video.
@eggwaffle
@eggwaffle 6 жыл бұрын
I hope you're not as stupid as you sound
@foobarbecue
@foobarbecue 7 жыл бұрын
"javascript. heheheh."
@kenichimori8533
@kenichimori8533 7 жыл бұрын
The voice 0 JavaScript c = p Control Point.
@neutraltakes2134
@neutraltakes2134 7 жыл бұрын
Thumbs up if you knew all of these in 2016!
@Ken-S
@Ken-S 6 жыл бұрын
This talk is "too old" now
@floverdevel
@floverdevel 7 жыл бұрын
Arrow functions are so bad :(
@betottogonzalez7791
@betottogonzalez7791 7 жыл бұрын
kzbin.info/www/bejne/fqewlqB3nLSqbKs .
@eggwaffle
@eggwaffle 6 жыл бұрын
How, exactly?
@rizwanmahmud93
@rizwanmahmud93 4 жыл бұрын
Rip
6 жыл бұрын
Every second sentence has a word ‘problem’. Javascript mess keeps growing.
@cupajoesir
@cupajoesir 6 жыл бұрын
Javascript ... ya ...
@CTimmerman
@CTimmerman 7 жыл бұрын
Imho, Npm > Brunch > Webpack > Gulp > Grunt, Stylus > Sass > Less, Pug (aka Jade) > HTML, and Python > CoffeeScript > JavaScript.
6 жыл бұрын
Stopped watching at ...!!data ? data ...
@realwizardry834
@realwizardry834 7 жыл бұрын
This guy's breathing is very distracting
@webosm6494
@webosm6494 7 жыл бұрын
So this is more a how to use the new features using tools talk. Not so much about using javascript directly, which seems is slowly becoming a dying art.
@seccat
@seccat 7 жыл бұрын
Great video. I'm watching for the fourth time. @3:10 What's a IFFE? I think you meant "Immediately-Invoked Function Expression" (IIFE)
The Post JavaScript Apocalypse  - Douglas Crockford
54:13
NDC Conferences
Рет қаралды 116 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 26 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 13 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 9 МЛН
[BEFORE vs AFTER] Incredibox Sprunki - Freaky Song
00:15
Horror Skunx 2
Рет қаралды 20 МЛН
What is the Observer Pattern? (Software Design Patterns)
21:49
Be A Better Dev
Рет қаралды 23 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 491 М.
Choosing a JavaScript Framework - Rob Eisenberg
1:01:33
NDC Conferences
Рет қаралды 88 М.
Web Apps can’t really do *that*, can they? - Steve Sanderson
58:24
NDC Conferences
Рет қаралды 167 М.
Intro to Design Patterns   Strategy Pattern
2:02:59
Professeur Mohamed YOUSSFI
Рет қаралды 3,1 М.
Observer Pattern in JavaScript
14:29
Code with Ahsan
Рет қаралды 6 М.
All Rust features explained
21:30
Let's Get Rusty
Рет қаралды 326 М.
Netflix JavaScript Talks - RxJS + Redux + React = Amazing!
37:14
Netflix Engineering
Рет қаралды 395 М.
Is Functional Programming DEAD Already?
21:07
Continuous Delivery
Рет қаралды 72 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 26 МЛН