7 ms·
Why not just make it a JS Framework? Does the world really need to learn another separate language just for making web pages?
by mastrsushi 5y ago
Why not just make it a JS Framework? Does the world really need to learn another separate language just for making web pages?
- deleted 5y ago[deleted]
- blacktriangle 5y agoIn this case the idea that 100% of the app lives in the HTML document seems like the reason just another JS framework wouldn't accomplish their goals.
- mastrsushi 5y agoJust another framework vs just another programming language. If the project lives in HTML, it doesn't matter what language it's written in. So it would be reasonable to choose one that developers are already familiar with.
- slver 5y agoTechnically all JS also lives in the HTML document. All JS is either in HTML attributes, in HTML script blocks, or referred to from HTML script blocks. The HTML page was always the boss. There's simply no reason for what's done here. Also, reminder, one reason why we like external assets is because they don't change (as often) while the HTML document is often dynamic (and hence not cacheable).
- j4yav 5y agoI would personally love to use something other than JS for making web pages, so there is at least me.
- easton 5y ago"Why not just make it a Java Framework? Does the world really need to learn another separate language just for making web pages?" -- someone in 199x when hearing about how we were going to have JavaScript for the front-end. If you aren't writing your backend in JavaScript (and most projects aren't), then you have to learn another language anyway (until WebAssembly can sweep me off my feet, anyway), so it might as well not be JavaScript. Although hyperscript isn't production ready yet, for making things move around on a template-generated web page, JS seems to add a ton of complexity compared to something like this.
- tannhaeuser 5y agoI guess it's the other way around as in "does the world really need to learn a programming language for making plain old web pages"? Tbh I don't know if hyperscript is the answer though, adding yet another language construct (with hard-coded, opinionated semantics) into the mix when we have already HTML/SGML, CSS, and lots of microsyntax. I guess the ship has sailed when JavaScript entered the scene at which point HTML has basically stalled, but the basic vision - that regular users or at least prosumers should be able to make generic content documents without resorting to a Turing-complete language - is as old as markup languages and SGML itself. SGML with HyTime in particular is able to deliver generic or project-specific behaviors of the kind demo'd on the hyperscript page (plus much more) through extension vocabularies and HTML templating without introducing new ad-hoc syntax at all.