So let's show off what you can do without JavaScript...but also include SCSS as a dependency when the opening paragraph complains about a JavaScript dependency? Madness...but I digress. Some of these are cool examples. Others, like the modal, won't scale very well because now you can trigger modals by tabbing (breaks keyboard navigation) or most of the form examples as you'll likely hit many endpoints that require JS…
You might not need JavaScript
81–90 of 254 posts
Re: You might not need JavaScript
#82You might nod near internet, heck, you many not need staying alive, but here we are. Seriously, after some minimum complexity the ability to create functions and loops its extremely important. As in you don't need a spoon and a knife to feed yourself, but it sure fucking helps.
That giant ball JS that is included in most sites is absolute nonsense and is not needed in 99% of the cases. We include complete libraries where is should only be a portion.
I'm aware that this is changing, by "compiled" JS - putting together only the required elements - but usually those still have massive overheads.
In my opinion, you should use the tools for what they are the best for. Provide a static, readable HTML first from a backend code - that will run on anything, anywhere; it's accessible, and you've served the main purpose: serving content^1. If you need, add the styling and the animation with CSS. Only after that add the JS layer, which, in my opinion, should mostly be used for data exchange and change triggering.
^1 There are exceptions, there always are; application within the browser, where the main purpose differs from the content delivery. In certain numbers, such as domains, these are the minority; in actual use, it's a different story.
( Imagine a world where the data exchange is not tied together with JS and that we could but other UIs in front of the backends of webapps.. )
Re: You might not need JavaScript
#83You might not, but you probably do. The validation examples and input types are a case in point. Even on browsers where they work, the alerts can't be styled and the behaviors can't be controlled.
> the alerts can't be styled and the behaviors can't be controlled It's not clear to me whether that's a problem. Isn't consistent UI a good thing? Isn't it faster to fill the forms correctly if alerts always appear in the same way?
Re: You might not need JavaScript
#84Earlier quoted context omitted.
> the alerts can't be styled and the behaviors can't be controlled It's not clear to me whether that's a problem. Isn't consistent UI a good thing? Isn't it faster to fill the forms correctly if alerts always appear in the same way?
How is it consistent UI when it doesn't match your design and looks and works very different in every browser?
Re: You might not need JavaScript
#85So let's show off what you can do without JavaScript...but also include SCSS as a dependency when the opening paragraph complains about a JavaScript dependency? Madness...but I digress. Some of these are cool examples. Others, like the modal, won't scale very well because now you can trigger modals by tabbing (breaks keyboard navigation) or most of the form examples as you'll likely hit many endpoints that require JS…
Re: You might not need JavaScript
#86Earlier quoted context omitted.
I have no idea why people use Chrome. Chrome/Google has terrible/no support of many browser layout & interaction features, such as CSS Regions & scroll snap points. Also, Safari is just a much better browser than Chrome. We need to make sure people stop using Chrome and move to the default browser in their environment - Safari & Edge. If you support the default browser, then you're going to be fine.
> default browser Hi, I'm Linux.
( By the way lynx is perfect to pierce through a lot of paywalls. )
Re: You might not need JavaScript
#87Does anyone else feel that a site called "You Might Not Need Javascript", probably shouldn't use Javascript?
Do any of the examples use Javascript? Or are you saying the site shouldn't use JS for syntax highlighting or whatever, even though that's not the sort of thing it claims JS isn't needed for?
I don't see any features of this site which should require javascript, so they should probably "practise what they preach".
Re: You might not need JavaScript
#88There is some useful stuff to learn from here, undeniably, but many of these are a bit useless when you compare them with what you would actually typically need on a real site. Yes, the "image slider" is vaguely functional, but really most of the time you will want a lot more control than just the CSS animations allow; similarly, yes, the form validation is a starting point, but normally you would want to customise t…
Re: You might not need JavaScript
#89So let's show off what you can do without JavaScript...but also include SCSS as a dependency when the opening paragraph complains about a JavaScript dependency? Madness...but I digress. Some of these are cool examples. Others, like the modal, won't scale very well because now you can trigger modals by tabbing (breaks keyboard navigation) or most of the form examples as you'll likely hit many endpoints that require JS…
You should surely realize that requiring SCSS and requiring JS are two very different concerns.
Regardless my other points still stand.
Re: You might not need JavaScript
#90You might not, but you probably do. The validation examples and input types are a case in point. Even on browsers where they work, the alerts can't be styled and the behaviors can't be controlled.
> the alerts can't be styled and the behaviors can't be controlled It's not clear to me whether that's a problem. Isn't consistent UI a good thing? Isn't it faster to fill the forms correctly if alerts always appear in the same way?