I love these type of showcases. It‘s been a wonderful time when simply upload files via SFTP and had a running application. No need of webpack bundles, vendor libraries to achieve a simple functionality that could be solved in a few lines of code ... I really do hope this kind of developer attitude (writing pure VanillaJS) is coming back.
Until we rediscover that manually keeping the DOM up-to-date is tedious and error prone for almost any project and switch to a good middle ground such as Preact or React without a build step
Mini projects built with VanillaJS. No frameworks or libraries
101–110 of 171 posts
Re: Mini projects built with VanillaJS. No frameworks or libraries
#102I'm so glad to see this and projects like this getting attention. I'm responsible for several tools at my current job using nothing but straight JS, including a couple which have had a significant (positive) impact on the special projects team here. I love JS. I love it's ubiquity (F12 in any browser and you've got a REPL). I love the freedom I have when I write in it to do whatever the fuck I want and shoot myself i…
Allowed me to implement TodoMVC in less than 150 LOC. Usage examples start here: https://github.com/stefanhaustein/notemplate/blob/2ee22e392d...
Re: Mini projects built with VanillaJS. No frameworks or libraries
#103I'm so glad to see this and projects like this getting attention. I'm responsible for several tools at my current job using nothing but straight JS, including a couple which have had a significant (positive) impact on the special projects team here. I love JS. I love it's ubiquity (F12 in any browser and you've got a REPL). I love the freedom I have when I write in it to do whatever the fuck I want and shoot myself i…
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-engineRe: Mini projects built with VanillaJS. No frameworks or libraries
#104Earlier quoted context omitted.
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.
Adding complexity for performance will be a pure negative unless you can factor that out so the next person can use it on their component.
I would read this code and think I was dealing with a very talented programmer that needs seasoning. Such a programmer can be very dangerous to the wrong company, as the seasoning will have to be added on the company’s dime.
Re: Mini projects built with VanillaJS. No frameworks or libraries
#105It's interesting that vanilla JS feels like a breath of fresh air nowadays. I guess the JS cycle is now complete (?)
Re: Mini projects built with VanillaJS. No frameworks or libraries
#106It was super fun, and here's the result: http://jypepin.com/lolz
A few of those were harder than others and forced me to re-learn some basic maths. I really recommend doing such a thing sometimes!
Re: Mini projects built with VanillaJS. No frameworks or libraries
#107Here'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…
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…
Re: Mini projects built with VanillaJS. No frameworks or libraries
#108Earlier quoted context omitted.
Don’t worry. People with a lot of front-end experience, in this case me, also condemn the current tools.
Can I ask what sort of front-end frameworks/tools you use that you also condemn?
There are only 2 APIs in the browser: DOM and the web APIs. As far as writing cohesive logic that does wonderful things that’s on you. Most JS developers would rather it not be on them and instead adopt an Invented Here Syndrome mentality. The fear of writing any original code is very real.
Re: Mini projects built with VanillaJS. No frameworks or libraries
#109Lately 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); }