Live data from Hacker News

Vanilla-todo: A case study on viable techniques for vanilla web development

github.com

81–90 of 154 posts

Re: Vanilla-todo: A case study on viable techniques for vanilla web development

#81
post #55

Earlier quoted context omitted.

Most of the code people have written in Vue 2 is compatible with Vue 3. Vue 3 has just added some additional features. Sure, there are breaking changes, but not to an alarming degree.

Most of the code people have written in Vue 2 is compatible with Vue 3. All of the code written with React 15 is compatible with React 16. And React 17. And React 18. And so on probably.

But not all of your packages!

Re: Vanilla-todo: A case study on viable techniques for vanilla web development

#82
post #14

Earlier quoted context omitted.

Original author here. During the study, I explicitly forbid myself from writing general-purpose helpers which would make up a framework. Would you mind elaborating what in your view makes up the "custom framework"? Thanks!

Not OP, but in my reading of your case study, you still made a framework. Instead of having a code-based framework, where the methods and classes enforce how you implement your system - you created a convention-based framework (use a specific CSS naming technique, model your JS on this template, etc.).

Isn't a “convention-based framework” just... a convention? With such a generous definition of “framework”, is it even realistic to solve this problem without accidentally creating one? Would you need to purposefully avoid any type of consistency between the different modules, and solve the same problem in different ways if it comes up more than once?

Re: Vanilla-todo: A case study on viable techniques for vanilla web development

#83
post #55

Earlier quoted context omitted.

Most of the code people have written in Vue 2 is compatible with Vue 3. Vue 3 has just added some additional features. Sure, there are breaking changes, but not to an alarming degree.

Most of the code people have written in Vue 2 is compatible with Vue 3. All of the code written with React 15 is compatible with React 16. And React 17. And React 18. And so on probably.

This is simply not true. React 15 is not compatible with React 16 and it can even take substantial effort to upgrade if you used componentWillReceiveProps (though which in hindsight could be avoided in the first place)

Re: Vanilla-todo: A case study on viable techniques for vanilla web development

#84

Earlier quoted context omitted.

I can't speak to React. But, both Vue and Angular have seen dramatic changes over the last few years.

Most of the code people have written in Vue 2 is compatible with Vue 3. Vue 3 has just added some additional features. Sure, there are breaking changes, but not to an alarming degree.

I tried to upgrade a substantial codebase from vue 2 to 3 and hit a brick wall with Vuex early on.

Re: Vanilla-todo: A case study on viable techniques for vanilla web development

#85
post #21
post #2

This is nice, patterns over libraries. I would question the choice to use ES5, as it makes it significantly more complicated to handle dependencies between modules in a scalable way. I understand the point of avoiding a build step, but if the code can run in modern clients without it I don’t think it breaks the spirit of the project to use a bundler to support certain older browsers. It’s a lot like using polyfills w…

Original author here - thanks! Yes, ES5 is a huge pain. However, I believe 5% of users (see other comment) are not a joke for many apps. There's always the question of minimum critical APIs required: If you build a 3D or webcam app you can forget ES5 altogether, of course. > It’s a lot like using polyfills when needed. Never thought of it this way, thanks for that! As is state in the conclusion, the study would likel…

Those 5% of users will need 95% of your support capacity. Best to kick them to the curb until they upgrade.

Re: Vanilla-todo: A case study on viable techniques for vanilla web development

#86
post #33
post #5

I don't know who originally said it but "If you're not using a framework, you're building a framework". This repo even has the following caveat: (2) These usually end up becoming a custom micro-framework, thereby questioning why you didn't use one of the established and tested libraries/frameworks in the first place. That said, I don't hate it. For quite some time, I've taken the stance that a web development team ne…

Using frameworks is far more about hiring and human resources than technology I feel. However, if your "micro framework" follows language idioms and is thin enough you get the best of both worlds, whilst releasing yourself from some of the downsides that come with using a general purpose framework.

Frameworks make hiring a bit easier it's true.

I'm amazed at the number of developers who can't seem to cope with working with custom in house frameworks. I'm talking about fully working systems, with full source code and being walked through the code by the author / maintainer.

They fall apart, constantly complaining that the approach is non standard, deprecated, dangerous, unprofessional, untestable.

So we are trying more and more to use frameworks, just to be able to hire more easily.

Re: Vanilla-todo: A case study on viable techniques for vanilla web development

#87

I appreciate this project a lot! As someone exploring webdev as a hobby, everything is new to me and there are a variety of frameworks. I'm hesitant to start from somewhere that isn't "vanilla". As someone only a little familiar with JavaScript, the script seems surprisingly comprehensible.

Glad you liked it and could follow through!

Re: Vanilla-todo: A case study on viable techniques for vanilla web development

#88
post #63

Earlier quoted context omitted.

Sorry :D nothing wrong with server-rendered HTML and forms for many use cases. Unfortunately, by the limits of connectivity, if you want to build something that is interactive, data-driven, and responsive at the same time you will always be forced to render on the client-side at some point.

> if you want to build something that is interactive, data-driven, and responsive at the same time you will always be forced to render on the client-side I'm not sure I personally agree with this blanket statement. Connection times can be, for a vast majority of users, measured in tens of milliseconds, giving us a pretty good budget for processing and rendering while still appearing to be "instantaneous" (100ms) or "…

This is so true. If you want to feel again what's possible, make a vanilla website (without JS and with very few images) and do all form processing server side. You will be astonished how fast and actually reactive this side can feel. Part of this feeling could be that animations (thinking of the popular material design by Google) itself take 10ms to 100ms. Within this duration, the browser can easily load a new page.

Re: Vanilla-todo: A case study on viable techniques for vanilla web development

#89

I love it! It's definitely an exercise worth taking. Nice transfer size, and I'm happy to see that the code is quite maintainable. I do my wordsandbuttons.online in similar spirit: no dependencies, and all the pages are kept below 64KB. However, as the code base grows, I'm starting to employ scripts to do the grunt work for me. So while I don't have dependencies per se, code patterns become dependency it its own righ…

Many thanks :) like the concept of your site, I will take a look some time

Re: Vanilla-todo: A case study on viable techniques for vanilla web development

#90

This is odd (public/scripts/TodoList.js): el.innerHTML = [ ' ', ' ', ].join('\n'); I wonder why aren't they using `DOM.createElement` instead of innerHTML since they will query for those nodes later anyway.

I've tried but I (surprisingly) found the string array to be the most readable way to do it without helpers. It's also easily replaced by ES6 templates when upgrading.
Post reply on HN