4 ms·
>I can at least remember six template engines' syntax I've learned... TBH, in 2017, I'm not sure why we're still hand-generating HTML with any template languag
by unclebucknasty 9y ago
>I can at least remember six template engines' syntax I've learned...
TBH, in 2017, I'm not sure why we're still hand-generating HTML with any template language.
Instead, I'd really like to see a framework that gets away from the idea of HTML templating altogether and presents a true component/properties model on top of a canvas with flexible, property-driven layout options.
I think the intense UI-demands of progressiveness/SPAs expose the unsuitability of HTML for the task. But, simply because HTML is what we're stuck with browser-wise, there's no reason we have to think or work in HTML. Use tooling to abstract it away altogether and let a translator generate it.
- bphogan 9y agoSee Elm.
- msangi 9y agoI feel that the focus on graphics has faded a bit in the most recent versions. When I last gave it a try I had to manually generated the HTML document but without a (at least of of the box) syntax like jsx. If I recall correctly graphics is still there, but it's mainly used for games
- rtfeldman 9y agoCheck out the style-elements[0] package and the author's talk at Elm Europe introducing it[1]. It outputs HTML and CSS but doesn't base its semantics on either. It has a clean-slate design, and there's a ton of buzz in the Elm community about it. :) [0] http://package.elm-lang.org/packages/mdgriffith/style-elements/latest http://package.elm-lang.org/packages/mdgriffith/style-elemen... [1] https://www.youtube.com/watch?v=NYb2GDWMIm0 https://www.youtube.com/watch?v=NYb2GDWMIm0
- quickben 9y agoYou have tons of well established platform tools that will give you way more power at your fingertips if you wish so. Have you tried QT or Xamarin?
- unclebucknasty 9y ago>Have you tried QT or Xamarin? These are for desktop/mobile apps right? If so, yeah, there are other options as well. Was thinking more something like this, but for SPAs.
- jcoffland 9y agoSounds like you want Visual Basic.
- unclebucknasty 9y agoI've never worked in VB, but I've compared the concept to Swing for Web apps.
- meredydd 9y agoThis is exactly what we're aiming for with https://anvil.works https://anvil.works. We have a components+properties model, driven in Python, which gets translated to HTML+JS+CSS. We also have a visual editor, and abstractions over a bunch of the client-server stuff that's typically icky on the Web. The challenge of such a system is that the web platform is so huge and sprawling, and constantly growing - and all of it's written in JS/HTML. So we've made the pragmatic choice to prioritise usability by non-web developers, and open an "escape hatch" for doing layout etc in HTML if you really need to. But most of our users don't need it, and we're constantly working to extend the boundary of what you can do with simple properties and components.
- unclebucknasty 9y agoVery interesting. Yes, at a glance, that's exactly what I had in mind. >the web platform is so huge and sprawling, and constantly growing >we've made the pragmatic choice to prioritise usability by non-web developers, and open an "escape hatch Makes sense. And totally worth the tradeoff for the developer if it helps me flip the 80/20 rule around. And, if the component model is extensible such that, when I do have to open the escape hatch, I can plug a resulting component back into the framework (lay it out and set properties in the visual editor, etc.), that might be even more optimal. Either way, I'd rather a framework do the heavy lifting and let me deal with the edge cases than me do all of the heavy lifting and plumbing, so that's a win. >and all of it's written in JS/HTML And, this is the part where I do have to scratch my head a little. I'm going to guess you've heard this question 4,321,257 times, but why not support JS? It is the lingua franca of the Web (as your quote acknowledges) for better or worse, and virtually all devs already know it. There's also a rich JS library ecosystem. The idea that I have to pick up Python just to try it out introduces more friction. I'm guessing that might slow adoption with a huge percentage of your potential audience who might otherwise have the knowledge they need to jump right in.
- meredydd 9y ago> Yes, at a glance, that's exactly what I had in mind. Thrilled to hear it! If you do try it in more depth, please do drop me a line (email in my profile). > why not support JS? Two reasons: 1. Basically, the moment you use JS, any discipline or abstraction you were trying to introduce dissolves. People will reach in and use the DOM/combine it with other Web frameworks/what-have-you. And then you'll still need to know HTML and CSS and all these other pieces, as well as this new framework, and you've done the opposite of simplifying web development. This is the "Javascript Framework of the Week" failure mode. 2. Contrary to your assertion, "most devs" don't actually know JS. It's something people only learn because they're learning front-end web development, and it's difficult to learn it without the whole HTML/CSS/frameworks hairball. Python is much friendlier to, eg, data scientists or embedded programmers or back-end developers, who have every right to think they should be able to put together a web app without learning three new programming languages and two new frameworks. (This is another way of putting what I said earlier about "prioritising usability for non-web devs".)