what and why
a series of articles going over intrinsic js topics, not essentially beginner material but "core" fundamentals: building blocks of the language. enough js to be lethal, well kind of, depending on your personal definition of lethal. this series is a precursor to a body of "work" I am working on, titled "24 projects in JavaScript" more on that later. To expect in this series of articles is enough JavaScript to build and do pretty cool stuff, what we all want really, maybe the outline will do more justice than "pretty cool stuff":
00:introduction
currently reading.
01: prototypes
prototype is a design pattern/principle at the core of the language JS, as JS implements prototypes and prototypical inheritance. learning theory is all good and well, but I find implementing theory way better, which what this article is about, emulating prototypes and inheritance, we will emulate from stretch how the JS engine supposedly(from the spec of course) handles and interprets objects and prototypical inheritance during run time
02: OOJS
Object oriented JS from classes, getters and setters to object composition, fairly useful concepts doused with few useful design patterns to build robust or at least coherent object oriented programs. at the end a little module project to solidify everything
03: promises
Asynchronous JS is a no-brainer, and very powerful. from creating own promises from stretch to that powerful method chaining.
// method chaining example(d3 js like)
yAxisG
.append("text")
.attr('class', 'axis-label')
.attr('y', -80)
.attr('x', -innerHeight / 2)
.attr('transform', `rotate(-90)`)
.attr('fill', 'black')
.attr('text-anchor', 'middle')
.text(YaxisLabel)
04 : Concurrent and Parallel Computing
better done than said, and yes threads do exist in JS(web), and this article is all about them. we can actually have a :
while(true){
}
loop and be absolutely non blocking, no "this script is slowing down your page" at all, none, insane right?, I know!
05 iterators and generators
The magic world, well sort of. Now the fun "trickery" stuff begins. almost magical. from pausable functions to custom iterables. we get to explore the iterative algorithm and how the for...of
loop works underneath, pretty cool stuff, if I say so myself.
06 Metaprogramming
is intercepting fundamental language operations to define custom ones, I mean this is pretty nifty, no need to sell it really. better done than said too. spoiler alert: we will build a fixed array from stretch! and more.
07 Computational Media
just fiddling with the canvas and maybe build some weird checkers game with random algorithms, who knows?
08 Typescript
introducing types to JS.
Why the 8
precursor to the project I am working on:
24 projects in JavaScript
you know it's serious when there's a cut scene: the story behind 24 projects is simple really but fundamental to it's development. See I wasn't always a JS dev, until one faithful day a client asked if i could build a "simple" desktop software for her, as any self respecting dev I dare not turn down an opportunity even thou the only language I knew very well back then was python, spoiler alert very bad for building "simple" desktop apps, kivy didn't cut it, moved the project to c# hated the design and finally turned to the omniscient google who suggested electron: a framework that ships with the v8 engine to create a desktop app, think of node js but with a webpage as a view(using any js module/framework).
having faith in my skills, dove head first, with no JS or React experience started fiddling combining two and three, learning in the process. in short that's when it hit me, learning syntax is all good and those tricks of a language perfectly fine, but nothing, ABSOLUTELY nothing beats the evolution you go thru after building a "real" project. which is the aim of this eBook. To potentially spark that evolution by building the real stuff not tutorial projects but real projects
Real vs Tutorial projects
There's one fundamental difference really, the target audience of a tut is you alone, you are mastering or at least absorbing concepts(learning), while a "real" project the end user is at the forefront you start thinking about user experience, application/module size, maintenance, patterns to follow, robustness, optimization etc, while thinking about users you think of yourself too, what to gain: monetization, status, a community or whatever, in short you are building something for people whether free or to trade, which is a very valuable skill and exactly what this eBook is about: building "real/usable/beneficial" apps/modules/programs however you view them.
if the above sounds like something you will be interested in, the eBook is progressing very well, you can sign up here to receive an update once complete, you can also sign up to be notified when future articles are published.
need clarification or raise a concern you can comment below,