Live data from Hacker News

Mini projects built with VanillaJS. No frameworks or libraries

github.com

71–80 of 171 posts

Re: Mini projects built with VanillaJS. No frameworks or libraries

#73
post #18

Earlier quoted context omitted.

I always find it interesting that the people who unabashedly admit they have minimal front-end experience usually have the strongest condemnation of the current tools.

Don’t worry. People with a lot of front-end experience, in this case me, also condemn the current tools.

20+ years of web experience, and the current tools are mostly trash.

Re: Mini projects built with VanillaJS. No frameworks or libraries

#74
post #34

Here's one I did as an assignment for a job interview: https://github.com/ivancuric/hn-scroll You can see it in action here: https://hn-scroll.netlify.com/ The task was to build an offline capable site which displayed the latest Hacker News posts, and loaded more lazily when scrolling. I had to use the official HN API, and I couldn't have any middleware or caching. Everything had to be done client-side. The app ended…

[deleted]

Re: Mini projects built with VanillaJS. No frameworks or libraries

#75
post #25
post #24

Lately I've really enjoyed writing small apps in vanilla TypeScript. Since the TS compiler generates JavaScript that works in modern browsers and those also support the module syntax natively, you can get away without using NPM and a bundler like Webpack at all. Of course this starts to fall down when you get over a certain size but it works well and is quick to get going with for simple things like this lunch menu I…

Too bad we can’t have php style autoloading in JS. Actually what I really want is to lazy-load modules on demand! So if something is concatenated into a giant file then I don’t need to load modules anymore. Like maybe this: function load(module) { if (load.loaded[module]) return; import(module) .then(() => load.loaded[module] = true); }

http://neanderthal.go-here.nl

Re: Mini projects built with VanillaJS. No frameworks or libraries

#76
Some Javascript frameworks I like; some I tolerate. Some (angular) I learned to despise.

I reserve my love only for VanillaJS.

My library for playing with the canvas element[1] is entirely VanillaJS. 0% dependencies. 1000% a learning experience for me, having to seek into the darkest corners of the language to find solutions to problems I didn't even know existed!

[1] Scrawl-canvas - https://github.com/KaliedaRik/Scrawl-canvas/tree/v8-alpha

Re: Mini projects built with VanillaJS. No frameworks or libraries

#77

so happy to see brad and traversy media get some attention on hacker news. been watching his youtube channel for a long time and learned so much from him. https://traversymedia.com/

I agree, I'm glad to see him on HN. Brad is great for beginners, and I still use him for my "how to I get some boilerplate up and running" type things for languages and frameworks I'm not familiar with.

Re: Mini projects built with VanillaJS. No frameworks or libraries

#78
post #25
post #24

Lately I've really enjoyed writing small apps in vanilla TypeScript. Since the TS compiler generates JavaScript that works in modern browsers and those also support the module syntax natively, you can get away without using NPM and a bundler like Webpack at all. Of course this starts to fall down when you get over a certain size but it works well and is quick to get going with for simple things like this lunch menu I…

Too bad we can’t have php style autoloading in JS. Actually what I really want is to lazy-load modules on demand! So if something is concatenated into a giant file then I don’t need to load modules anymore. Like maybe this: function load(module) { if (load.loaded[module]) return; import(module) .then(() => load.loaded[module] = true); }

I actually don't see why someone couldn't write a PHP style autoloader for JS, there is already a lot of cool hacks around require. I think a simple autoloader would just do something like (almost pseudocode):

    find src/**/*.{js,ts} -exec cat {} | typescript >> build.js

Re: Mini projects built with VanillaJS. No frameworks or libraries

#79
post #2

It's interesting that vanilla JS feels like a breath of fresh air nowadays. I guess the JS cycle is now complete (?)

It depends on the scale of your project. Not using a cement mixer is a breath of fresh air if you just need the mortar to fix a single brick.

I feel the analogy is more like: You need to fix a single brick so you buy 72 pallets of bricks, buy a fork lift, 5 cement trucks, buy a garage to park them, try to acquire at least 2 cement factories, hire 4 people to do logistics, someone to do HR, 12 truck drivers and 4 fork lift chauffeurs. Placing the brick is outsourced.

Re: Mini projects built with VanillaJS. No frameworks or libraries

#80
post #70
post #64

Earlier quoted context omitted.

Nope

Can you estimate how much time you put into the assignment? Did you get paid?

Probably a bit more than 12h, and I have to give it to the company, the project was compensated.

This was the only time I've experienced that.

Post reply on HN