Live data from Hacker News

Mini projects built with VanillaJS. No frameworks or libraries

github.com

161–170 of 171 posts

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

#161
post #46

Soundslice ( https://www.soundslice.com/ ) — a website built around interactive/responsive sheet music, rendering the music entirely in client-side JS — doesn't use JavaScript frameworks or libraries. I'm the developer of Soundslice and continue to be happy with the vanilla JS decision, 8+ years into the company. It means better performance, clearer code, smaller JS filesizes. I gave a talk about it here: https://www…

I checked out the rendering of those scales, beautifully done!

<3

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

#162
post #107
post #87

Earlier quoted context omitted.

That's nice. I myself did try out one too, as a hobby project to serve as an alternative frontend for a local gym https://varjosport.net/ There's a small flicker as the app generates the HTML which still annoys me but I couldn't bother to write a Lambda to server-side render the HTML every time the data is refreshed. One thing I noticed though was that creating HTML fragments is a major pain in the ass, which I see y…

With styles in components, can you support skinnable components? If so, do you have to accept parameters in the component and modify the component every time you want to change some style to make it fit with your page look and feel?

If you mean theming components, then yes. Skinnable components is not a term I've encountered before but theming is something SC enables and is part of its core functionality. You can either use something like a global theme variable to set styles, which each component can depend on or just the regular props for different styles eg

I myself have mostly just remained with a one default theme, although adding a dark-theme has crossed my mind several times. It's just that UI features like this are rarely on top of the to-do list.

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

#163
post #79

Earlier quoted context omitted.

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.

I like that this comment is from “6510”. I loved the old 6502 and did a teeny bit of assembly programming on that back in the day.

I ran into a 13 year old master glue coder on irc one time. Since he was 9 he touched/used 3 js/php frameworks/modules/libraries per day. He said he didn't know any programming. (not entirely true ofc) He knew how to ask for something. There was always someone willing to write the data transformation after he broke down the problem properly. He showed a bunch of hilarious things he made. I praised him for keeping all of his projects. He said it was to embarrassing and deleted pretty much everything. I ask him things like, what do you do when things don't work, they stop working or stuff gets really slow. His solution was to delete everything and start from scratch using different modules where possible or just delete the project. I learn from him that the glue-ables are for the most part not high level enough. I wish I had learned to just delete everything and start over, regularly, just like that. ha-ha

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

#164
post #51
post #46

Soundslice ( https://www.soundslice.com/ ) — a website built around interactive/responsive sheet music, rendering the music entirely in client-side JS — doesn't use JavaScript frameworks or libraries. I'm the developer of Soundslice and continue to be happy with the vanilla JS decision, 8+ years into the company. It means better performance, clearer code, smaller JS filesizes. I gave a talk about it here: https://www…

Amazing site. I noticed one thing that could easily improve the feel of the site — the sheet music playhead which is outside of the canvas. You are using fractional units to position it, but you're also using left/top/height properties which can't be fractional. If you convert these to GPU translated layers via translate, you'll get a smoother playhead since these can be positioned fractionally, plus you'll cut down…

Just wanted to say thanks for this tip. It's now implemented live on Soundslice! :-)

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

#165
post #103

Earlier quoted context omitted.

I've been doing something very similar for templating static HTML sites amongst other things - you can interpret any string as a JS template string: function jstsEngine(string = '', environment = {}) { return new Function( ...Object.keys(environment), 'output={}', 'return [`' + string + '`, output]' )(...Object.values(environment)) } Link with examples: https://github.com/tomhodgins/jsts-engine

That's what I'm using it for as well! I believe our functions here are isomorphic, though I'm a couple lines shorter ;) You've got an excellent username btw. <3

<3 you have a nice username too :D

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

#166
I love seeing vanilla JS projects getting some love. I started one last year (https://github.com/CarlMungazi/aprender-js) and I feel it has made me a better programmer.

If anyone wants to learn more vanilla JS stuff, you should check out https://gomakethings.com by Chris Ferdinandi.

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

#167
post #157
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.

I've built UI's with Qt, Gtk, swing, VBA, Access, winforms, WPF, TK, html/css and more I can't remember and I stay away from front end webdev these days because the tools are such a tyre fire and way less productive than what we were using > 20 years ago. I find the people that like most of the current tooling grew up with it, don't know any better and don't want to learn.

> Qt, Gtk, swing, VBA, Access, winforms, WPF, TK

These aren't web-native so I don't think the comparison is particularly salient. Building on the web is a business requirement, all the tools are to make that requirement manageable.

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

#168
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); }

It qas a few montgs since I used it, bit it wprks basically exactly like you want, only ghat the "is loaded" check isn't needed, the module is global and may even be a singleton.

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

#170

There’s no need for these projects to be “mini”. Javascript and html is a good choice for big things too. It’s still my go to “frontend stack” for lots of stuff today. Here’s a pretty big “VanillaJS” project I built back in 2006, back when we called these things web apps: https://www.twiddla.com/

Here is my VanillaJS project from 2010. http://np.ironhelmet.com (OK, there is a bit of jquery in there.)

Hi! Off topic but I love love love Neptune's Pride. :)
Post reply on HN