HTML is done
tbray.org
tbray.org
With the browser everyone is stuck with one universe. The only thing that changes are front end frameworks which offer some flexibility. Still, if html sucks we're stuck with it. If you hate html or javascript then you hate the entire front end. You exist outside of that universe because Nothing can change it. End of story.
I don't know how it could be done while keeping things secure, but it would be awesome if the browser universe was as flexible as the backend. If I could swap between html and any other kind of media based declarative language as easily as I can swap between python and ruby on the backend, it would change the face of frontend development and make it more accessible. In fact what if I wanted to develop my own language that interfaces with the rendering engine? The browser should permit that, because the Web is too broad to be dominated by a single language(HTML).
I think this should be the next step.
Even on the backend, in the end you have to run native machine instructions. HTML/JS/CSS substitute for that on the front end. Of course, x86_64 may be a better compile target, but the advantage of the existing languages over any new system is that there has been a lot of work that has already gone into making them fast, backwards compatibility, all browsers already implement them, and there are a lot of things that can target them now.
See also: https://www.destroyallsoftware.com/talks/the-birth-and-death...
Compiling to js is ok as that language is as close to the metal as you can get on a vm anyway. So long as performance isn't affected then it's really no different to the developer. Still the platform would be more elegant if it didn't compile to some intermediary high level language.
JavaScript is as low as the metal you can get in a Virtual Machine? hmm...
"Apart from syntax wins, you can't get much lower-level semantically and keep both safety and linear-time verifiability. Java bytecode with unrestricted goto and type confusion at join points makes for O(n^4) verification complexity. asm.js type checking is linear.
New and more concise syntax may come, but it's not a priority (gzip helps a lot), and doing it early makes two problem-kids to feed (JS as source language; new syntax for asm.js), which not only costs more but can make for divergence and can overconstrain either child. (This bit Java, pretty badly.)"
Either way, WebGL/canvas operate as child elements in an html page, you still need to use javascript, and SVG isn't GPU accelerated. It's still, overall, an ugly mess. But definitely, with improvements, canvas, svg and webgl are all candidates for my aforementioned "next steps."
Imagine your operating system can only compile one single language: Perl. And with perl the only way you can render anything on the screen is with a QT api and QT UI primitives.
Programmers can still do anything within this ecosystem. Technically you can have perl as compile targets for any other language. Lets also pretend that QT has this little UI element called canvas that has a api allowing you pixel level control.
While technically you could do anything in a platform like the one I described above, I'm sure you can easily see why it's still bad.
That only works if your abstractions don't leak and your libraries are stable enough so that you can avoid having to debug on the lower level anyway.
It might be bad example, but if the Java SE runtime libraries was just a dependency like any other mvn artifact (module), Sun / Oracle would for example have been in a position to introduce immutability to the Collections framework and fix crazy other stuff[1] without breaking backward compatibility. But now we are stuck with those legacies forever[2], since they standardized on a too high level abstraction and choose fewer layers. For Java's, luckily they had layer underneath - JVM byte code, which is why I predict Java is still relevant for many years going forward.
The next generation of WWW needs to a very low common abstraction, e.g. bytecode. Something similar to X Windows.
[1] See Effective Java Puzzlers. [2] Project Jigsaw might change that.
Or would your byte code blaster have similar properties?
Java Applets, Flash, SilverLight always was at a disadvantage, not being native to the browser runtime. Startup time and the need for a "plugin" hurt them. And they all kinda sucked in their own way. I hoped for a long time that Dart / native DartVM to Chrome could make a stride, but sadly they were fighting uphill battle against the sheer volume of JS developers resisting change. I'm convinced that it's never about the language[1], but the VM and it's abstraction layer. We need a layer that we can compile JavaScript(/HTML/CSS), Scala, Haskell, C#, F# etc. down to, not more languages.
I wonder how many man-years has been wasted on vertically aligning div's inside a div. :)
[1] Guy Steele, amazing talk on "Growing a Language", https://www.youtube.com/watch?v=_ahvzDzKdB0
I'm building this. I've been working on a side project that was my idea of the ideal internet platform, and for a long time I believed that the front end was a lost cause. I've recently figured out the solution. Had quite a eureka moment, in fact. This will be open source but it may be a startup and I'm not going to talk about it until I have a proof of concept... but let me give you an overview:
-- Works on all browsers made since 2013ish
-- You can do absolutely anything you want, in any language you want (though a bit of glue will be necessary to a lower level framework)
-- Initially there will be a basic implementation on a well known and well supported development platform that will bring this close to WYSIWYG and let you write code in more than one language
-- There is a spec for UI elements and you can throw out that initial implementation and write your own complete implementation. This is a non-trivial project, but much easier than creating a browser.
-- The UI can be easily implemented in native forms for native applications. So the "page production code" can be the same for all platforms, web and native, and the "client" code merely translates into the local platforms UI elements (or re-creates the spec's UI elements when there isn't a mapping.)
-- It might suck. This is highly experimental right now.
-- It's no longer a side project, it's my full time obsession.
If you're interested in this, follow: https://github.com/nirvana/nirvana or @NirvanaCore on twitter. Or if email is your thing, check out http://nirvana.io
(ignore what's in that repo right now, the work is happening elsewhere until it's usable for people to start building stuff with. At that point it will be easy enough to wrap your head around that outside contributions will be appreciated. I have a group of hackers I'm working with now, and it's clear things aren't far enough along... yet.)
A more ideal VM would be one which doesn't force a particular paradigm on you, but just abstracts over the CPU, using capabilities to restrict which instructions can be invoked. The CLR lacks such capabilities. Perhaps something like SafeHaskell would be in the right direction, where side-effects are limited, and the user can optionally allow websites to invoke trusted modules.
You can make all kinds of magic happen in a simple text file. In an intuitive way. Want to tell something? Just write it:
This is some text. How easy was that?
Want to show an image? Just a few keystrokes: <img id=animal src="my_kitten.jpg">
Want to style it? Here we go: <style>.animal { border: 5px solid green }</style>
Want to change it programmatically? Easy: <script>document.getElementById("animal").src="my_dog.jpg"</script>
Deployment? Instantly. Developer tools needed? A text editor. Compatibility? Runs everywhere. Speed? Im often shocked, how fast stuff runs these days.I think we created a paradise. And I enjoy "living" in it every day.
For example, in ClojureScript:
<img id=animal src="my_kitten.jpg">
becomes (html [:image {:id "animal" :src "my_kitten.jpg"}])
All in one nice, consistent programming language. Code is data and data is code. (html [:ol
(for [x (range 1 4)]
[:li x])])
XML/HTML is just a watered down Lisp with less parenthesis and more superfluous syntax and text.Personally, I prefer the HTML version over the ClojureScipt version. It is shorter and to me it is much more readable.
I think this is more of a side-effect of familiarity rather than any inherent differences in readability between the two forms.
Lisps do tend to look foreign to most people because their first languages usually have C-like syntax, and Lisp vs C is a much more dramatic difference than say Python vs C.
Being able to write code that also happens to be valid data structures has some very tangible benefits though.
For instance, in the HTML example, you can replace the strings or keywords in it with variables and it will be evaluated and output into the final HTML. You can also take that HTML element, pass it into any number of map, filter, reduce functions and programmatically transform it in literally any way you want.
This means when you write HTML this way, you can use ClojureScript as your template language, and I think it's safe to say that ClojureScript is a much more powerful and well-designed language than any template language out there designed for HTML.
[:image {:id "animal" :src "my_kitten.jpg"}] :: 44 chars
To me they look practically identical.
That is only because this is Lisp that generates HTML. Also, in the example you had given, there are no closing tags. Closing tags are just superfluous visual clutter and are not actually needed. To take an example from http://c2.com/cgi/wiki?LispVsXml
This XML
<dictionary>
<email>electronic mail</email>
<html>hypertext transport language</html>
<xml>extensible markup language</xml>
</dictionary>
can become (dictionary
(e-mail "electronic mail")
(html "hypertext transport language")
(xml "extensible markup language"))
As you can see, all the superfluousness of the XML syntax is lost and reduced to its bare minimum. That is only because this is Lisp that generates HTML.
Ok, so it is not the way you initially stated '<img id=animal src="my_kitten.jpg"> becomes (html [:image {:id "animal" :src "my_kitten.jpg"}])'. You rather showed an example of how to create html elements programmatically. Then you should compare it to JS:Your ClojureScript:
(html [:image {:id "animal" :src "my_kitten.jpg"}])
My JS: html("image",{id:"animal",src:"my_kitten.jpg"})
If we use a function html(elementType,properties) that creates an element. Looks pretty nice to me.With a Lisp, you don't need HTML as there is no distinction between code and data. Your Lisp is rendered and displayed on screen. It doesn't emit an intermediary language. How do you programmatically manipulate this "data"? Within Lisp itself. Lisp acts as both HTML and JavaScript. Lisp programmers regularly do this with the power of Lisp macros. I suggest you read the "Lisp vs XML" page I linked to in order to understand this better. Lisp directly exposes its syntax tree to the programmer and allows them to manipulate it to their liking.
Lisp acts as both HTML and JavaScript
So do you propose to make the separation of content and behaviour go away? Because that is one of the key features of the HTML+CSS+JS structure.I like the content/presentation/behavior separation from a developers point of view and from a users point of view.
As a developer, I love to know what I am currently working on. In HTML, I define the structure of the content. In CSS, I define how it looks. In JS I define the behaviour. Lovely.
As a user, much of the time I browse the web without JavaScript. Because I am only interested in the content. Not in popups that beg me to join newsletters, animated things that make the page more "fun" or ads that try to grab my attention. Also I often disable the pages stylesheet so I get a nicely readable big font with good contrast to the background.
No, only thing that goes away the cognitive burden of keeping in mind the original HTML, CSS and the JS representation/modifications of HTML and the interaction of all three.
As many websites are currently designed, content if often loaded and inserted into the HTML by JS. The separation of concerns enforced by this system is extremely blurry.
You could also tell the interpreter to not evaluate macros and just display the content as is.
> As a developer, I love to know what I am currently working on. In HTML, I define the structure of the content. In CSS, I define how it looks. In JS I define the behaviour. Lovely.
You can do all three in the same language and still maintain separation of concerns, like is done in most other languages and with native apps.
> As a user, much of the time I browse the web without JavaScript. Because I am only interested in the content. Not in popups that beg me to join newsletters, animated things that make the page more "fun" or ads that try to grab my attention. Also I often disable the pages stylesheet so I get a nicely readable big font with good contrast to the background.
Again, you could tell the interpreter to ignore style elements, or write a reader macro to do it yourself. That is the beauty of lisp :)
The lisp is not "rendered", it is executed. Any language that can implement a recursive-descent parser/generator could be the basis for this -- it does not require lisp or lisp macros. Think about what a render would have to do, and you realize that the model of using embedded rewrite rules (macros) might be slightly more convenient, but not a really a distinct advantage over executing code which renders or outputs instructions to render later.
The problem is most definitely not that you have to output an intermediate language, the problem is that HTML/CSS sucks. It is originally designed around presenting static text documents, and the committees involved were not smart enough to figure out a way to depart from that over a decade ago when pixels became important to the web.
I've been trying to build a coherent mental model of how layout in HTML+CSS works since 2008 and still haven't really been able to. If you gave me an html file and CSS file, I'm not at all confident I could draw they would interact. Conversely, if you showed me an HTML page, I don't think I could write HTML and CSS to reproduce it without continually refreshing my browser to check it. I have been trying to determine why I can't seem to learn this.
With all the CSS transforms, animations, canvas, 3d libraries, etc., I'm now utterly lost. I've gone from being an intermediate frontend guy to a 6/10 on the core necessities (all that earlier knowledge is still the foundation), but like a 1/10 or 2/10 with all the new stuff. I could probably get to 4/10 if I put in the effort, but I have a very strong gut feeling that I simply do not have the... faculties... required to be an intermediate frontend guy in 2015.
All that to say... codepens like these I've seen blow me away. I don't even bother trying to dig into the CSS. It's just beyond me. ;)
CSS is one of the reason I hate web developement (javascript being so tolerant to error is another one).
But a lot of people wanting to do web-things don't want to just show documents. If you want to build programs, it's not as convenient any more.
The open question remains of should we be trying to improve the web ecosystem to compete with desktop applications, or should we accept that maybe web browsers are best at document reading, and we should leave both to their respective areas.
If you want to build programs, it's not as convenient any more.
Strange, my experience is the other way round. The browser is the most convenient platform I ever targeted.Can you express this in a code example? Actual code that shows what is hard to do in HTML+CSS+JS and easier on another platform?
How would you implement Netflix without using external plugins such as Silverlight?
What particular feature does Netflix have that e.g. YouTube doesn't, that wouldn't be possible without a plugin?
How would you implement Netflix without using
external plugins such as Silverlight?
Upon first inspection this does not look like a code example to me, but rather like a question in english language?I have no knowledge about Netflix, so I don't know what the technical aspect of the question is. A code example would make it clear.
Try and write something complicated in js and you'll hit performance problems far quicker than other languages even today in 2015.
HTML is a complete disaster.for any thing other than documents and woefully inadequate for applications. You can't even do something as basic as encapsulate a snippet as a control to reuse.
And CSS is plain stupid, the very foundation of it is quite obviously broken. The precedence of operators is a constant annoyance. And let's not even get started on how it lacks basic inheritance, making it a nightmare to maintain.
I can't understand how any programmer who had actually used the alternatives could claim such things. I suspect you have little experience in programming so aren't even aware of the alternatives.
Please don't.
Or how about dynamically drawing a diagonal line or swirl across the page?
I apologize for the lack of an example, but I'm sure you can imagine how much harder that would be in html and css then it is with a renderer that has bezier curves and lines as primitives.
What if I want to use html+css+js to
dynamically draw a 1024x1024 picture of a cat
Here is your cat:http://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscri...
a renderer that has bezier curves and lines
SVG is part of the HTML standard and has those. And much more:Either way, well played, sir.
The OP said html+css+javascript, which I assume means html primitives like div and span with css and javascript sprinkled all over it. Canvas and svg exist a little bit outside of that ecosystem and I assumed the OP wasn't referring to that, because sure... with WebGL you can literally program anything into the browser. If someone used webGL as an example it would sort of render his question pointless.
The browser-as-a-platform is based on a lousy programming
language addressing a lousy object model and using a lousy
stylesheet language for visuals.
I think JavaScript is a suboptimal programming language because it has too many features, and on top of that they tacked on yet more features recently. I wouldn't call CSS lousy either, and the API of the DOM even got better over the years.We almost never phase anything out, and that's a problem, but I think the core issue causing suckage within the 3 pillars (4 if you count the DOM separately) is that they have been explicitly designed to not work together very well. While you can - and often are forced to - extend CSS and HTML with JavaScript, they didn't make the interplay between them especially synergistic.
As for
HTML? Not perfect, but plenty good enough.
no, I don't think so, especially if we're discarding JS and CSS as garbage, HTML does not deserve to get a free pass. Even if we wanted to improve it, there are no obvious candidates to do the work.
I don't get why we're all of a sudden in an arbitrarily constructed situation where the whole web platform can never be iterated on again. Ever. But if the point is that whatever comes next probably won't come out of a committee that sounds about right.I agree that some of the frameworks mentioned exist to work around the issues we created in the browser platform. Especially the functionality of React should be considered for an adoption scenario, maybe not the exact React API, but something along those lines that makes working on (or at least applying) diffs easier. The same goes for handlebars-like templating. I would rather see some of these adopted than the effort that goes into giving classes to JavaScript.
No, that's not what makes a programming language "suboptimal".
(In fact following this logic to the inverse would make something like Brainfuck the optimal language).
It's not the number of features that makes a language problematic (of which Javascript, even ES7, doesn't have more than Python or Ruby do, and those are considered quite OK languages).
It's suitability to the task (e.g. you wouldn't want to use Fortran for text processing), how well the features play together (you don't want conflicting behaviors and edge cases a la C++), expressibility, aesthetics, coherence (and of course, tooling, speed, ubiquitness, etc).
>I wouldn't call CSS lousy either
But CSS is lousy. It was overdesigned in parts nobody cares about, underdesigned where it would matter, an ad-hoc model for styling, and even mis-named, as it not only styles, it also layouts. And in that area it has been horrible, failing for decades to provide the most basic blocks to build layouts, and having people use hacks like "floats" to do so.
Co-sign every word of this. When I first started developing I hated JavaScript, but in the end it's fine if you have jQuery and some other libraries handy. CSS, however, is a cryptic alien language--translating layout ideas into it requires multiple PhD's.
You can reduce any argument to an absurd extreme. It's fair and fine to disagree with every single opinion I express, but I don't recognize your impression of that particular point as something I wrote.
My point was, and I'm sorry if I failed to get this across, that in my opinion there are bad parts in JS which could have been stripped away, making it better for an admittedly arbitrary as-defined-by-Udo's-mood-today value of "better".
Every single thing about this discussion, including the original article, is a matter of opinion. I agree with much of what you said about CSS and the need for a language to fit a purpose, and I don't want you to get the impression that I'm trying to say everything about HTML/CSS/JS is awesome.
You're right on this.
On my end though, I accept the other extreme of what I said: a language can have the most features any other language has times two, and still be great.
That is, number of features is not really relevant as to whether a language is good or not.
People seem to think for example "oh, adding this and that would make Java too complicated and too hard to learn etc". At the same time nobody complaints against C# who has twice the number of features or even more. In fact most people find programming in C# is a joy compared to Java.
I'm conflicted about this. On the one hand I can certainly agree that CSS tends to cause as many problems as it solves, at least where it affects my everyday work building web applications. But I can't say with confidence that this is an inherent flaw in the language, and not just the consequence of having to rely on the one CSS expert in the department, or my own limited knowledge of CSS and web UX/UI when he is not available.
I will say (with confidence) that using Bootstrap has been a great experience, and I can't imagine going back to plain CSS layouts without it.
Well, after 15 years of working with CSS, I can tell you that no, it's not a result of your limited knowledge. CSS does suck as a layout language. Flexboxes at least solves this somewhat (at least when they become widely available).
Out of curiosity, why? I always thought the model of static documents was a conceptual fit for the web, thinking of it as a file server. The move towards SPAs and real-time apps is really showing the browser's inner-platform effect, and the rough edges of the APIs thereof.
Since we are using techniques to create a full parallel OS runtime inside the browser, I wouldn't be surprised if a surge of interest from web developers emerged into simply using the host OS again.
By and large I believe the ideal of the browser as being the universal WORA platform to be largely bunk, in that cross-browser compatibility has always been grueling, with the reliance on polyfills and all sorts of ECMAScript and browser API incompatibilities persisting to the point where entire tables and guides are being drawn about them.
In hindsight this should have been unsurprising. Just like the Unixes diverge, so do the browsers.
Now the web isn't perfect but it's the closest thing to a commercially successful vendor neutral software platform in existence.
Windows itself is a proprietary platform, but it has no central software repository, so developers distribute their software through all sorts of means. Market share means influence on OEMs is exherted, but is it not also the case that if, e.g. Chrome, becomes a dominant browser that they do not exhibit de facto diktat over many aspects of the web?
Android's central platform is Google Play, but you are under no obligation to use it. You may opt for F-Droid or fetching lone APKs.
It seems to me the only platform where central curation is so ingrained that alternatives become impractical, is iOS.
Not to mention the web, despite being ostensibly vendor neutral, comes with a big problem of its own. Now every single page you interact with, no matter how primitive, is behind the scenes potentially a distributed, unobservable, multi-tier networked application with who knows how many layers of caching proxies, CDNs, ad trackers, analytics, data processing pipelines, etc. etc. with no way of knowing what's changing.
Your naive if you believe Microsoft and Google don't hold all the cards with thier platforms. More and more of Android is being swallowed up by Google Play Services. Windows does have a central software repository called "Windows Store". Let's not forget about how users have to put up with thier shenanigans because they are the gatekeepers to apps.
And look how well that turned out!
Let's recap what was there in the previous series…
1. Some folks made a network out of several computers and saw that they can now exchange information without sending mail and picking up a phone. Cool.
2. Some guys invented a simple protocol to assign address to every piece of information we would like to exchange. They invented HTML, to be able to put these addresses in the body of the document. Also, why don't we make several keywords to make that information a bit more structured? We'll use SGML as a base, because it's trendy.
3. More programs to use these protocol and markup language appear, markup transforms further to be able to add images to the body of the document and so on.
4. Somebody comes up with the idea that markup should give a structure to the information, and there should be another document — stylesheet — to describe what that stuff should look like. It also has to be cascade, because he's smart.
5. At this point things are pretty bad already, because there are many programs to interpret this protocol, and they are fighting with each other over the audience. But if back then people would make HTML and CSS "good enough" the idea of separating content and representation would have worked out and we'd have what we are talking about now…
6. …But something more interesting happens, and instead of plain simple document-exchange system we now have plugins, then applets, then javascript, then web2.0, ajax, interactive applications right in the browser. It isn't possible anymore for markup to be content and for everything else to be representation, because both are changing in real time, as user pushes buttons. And there're even more browsers to interpret this madness, and they are fighting with each other as never before.
7. Also, now we have some major evil corporations, that have lots of money to shape the technology world as they want, and they want to own all our data, which means making as many useful apps as possible server-side: which means moving all major client-side apps to the browser.
8. Now every site is fancy app, drawn by designers in Photoshop, then painfully re-created in html, css and js. Thousands of libraries and "frameworks" are made to make this "creating app in the browser" process comfortable, but they don't succeed. Although it's now somewhat easier than making native apps, because hardly anyone cares about them anymore.
We achieve a point when HTML — no longer actually relevant thing in this world of interactive madness — seems to be "good enough" to stop evolving. We look back at #5 — browser as an app to show simple documents — and sigh. It would be good, but the whole world uses our in-browser-apps now. It is what customer is used to. We can't make our "simple" stuff, because nobody cares about simple.
Can you imagine what the designed-by-committee-for-that-purpose version of a universal runtime would've looked like?
(hint: the answer is it looks like the Win32 or Java platforms/APIs and has just as many warts if not more)
Is it though? HTML etc started as a way to publish and link documents. Phasing shit out makes old documents less accessible. Nobody is going to install a creaky old insecure copy of Netscape Navigator to go visit perfectly good HTML documents authored in 1996
Huh? What were the overwhelming number of language JS had pre-es6? It was actually a sparse language that led to the need for a lot of libraries for you to have a chance at being productive.
The alternative seems to be some kind of unilateral action, and I have yet to see that working for the web. The reality of the matter is that Microsoft, Mozilla, Google and Apple all need to agree on whatever happens next. That's a committee.
But also: Canvas, CSS 3D, etc.
innerHTML isn't awesome either, but that's from today's point of view. It's good that we moved on, even though at the time it was important they existed.
so in fact browsers kind of assume nobody is crazy enough to do document.write
and then when it gets called they redo all the work rendering the page
We now have dynamic documents were scripts are MEANT to mess with the page constantly, and even create it's contents from scratch in some cases.
A script can insert something like </div><div class="something"> into the page in a random spot, completely wrecking the layout you just made. Adding a new div at runtime on top of the other parts of the page is easy. Something that can actually make all the positioning on the page completely change is much more evil.
So in fact, browsers usually get the HTML, parse it, get the CSS, position/style things while getting the JS (hopefully you have optimized it so the CSS loads before your scripts). Now if the JS file has document.write you have to reparse the HTML because the current tags could be a lie! The document.write could have closed a tag and opened a new tag.
Compared to that, just setting the innerHTML of a tag is much less expensive. You just need to potentially reflow its size and its parents. The rest of the page may not be affected. document.write may force you to tear everything down and start all over again
I've now stopped using jQuery for DOM manipulations, and use plain JavaScript in most cases involving simple manipulations (I do use React for complex applications).
CSS has some problems that grid and Flexbox should help alleviate.
But all in all, I'd say the Web is in a pretty good state.
As a side note: do try to not convert JavaScript into a static language -- there are certain types of boilerplate/generated code that I could never eliminate with C++ due to static typing. With JS, it was a breeze.
Agreed.
Not sure why people are always trying to fix something which isn't broke.
Ok, yeah, we could fix some things, when you start to micro manage all the tools and technologies people use to build things these days for the interwebs. But seriously, is it really that bad?
We need a technology that is suitable as a compilation target: a virtual machine. It can be optimised to hell (better than JS which necessarily is always compromised by having to be JavaScript and not byte code) and we need a suite of basic machine systems - sound, graphics, storage. We're not really all that far off from these things with what is supplied with HTML 5 it just sucks that the core of the affair - HTML/CSS/JS - is rotten through and through.
This is a big insight that JS and other webby-tools have given to the UI world, and I strongly believe something entirely async needs to exist for the desktop/mobile world as well - fortunately there is in the form of node.js/electron/nw.js.
Now in terms of how that's handled behind the scenes, I don't really care (use a nice VM, use a whatever mixture of whatever you want). Just give me a fully-async toolset to build my app in a single thread and I'm happy.
The browser exists in open opposition to iOS and Android, technically, culturally, and stewardship-wise. No-one in their right mind is going to pick a web host that charges you 30% of revenue. And yet, that's what Apple has managed to get (and they just control the BLOB distribution channel, they don't even provide runtime servers!).
The whole shebang is sorting itself out and I for one think it's going to be very, very cool.
That's not true in general, but since in this case Tim Bray seems to be implicitly proposing an alternative of sorts (never mind whether it's in fact any better) that isn't really relevant. For what it's worth, this https://news.ycombinator.com/item?id=2119057 is the correct solution.
I think that if Motif and Motif Tools had not had such restrictive licenses, then we never would have ended up with this pile. We would have started from a much better place, and been further along by now.
I do agree with your other points.
Nope, try another metaphor: you have the right to flinch away when something stinks, even if you don't know where the nearest rose garden is.
(That said, I think he's wrong. JavaScript has a hell of a lot going for it right now, and CSS and the DOM are starting to take advantage of the effects of that.)
Eh? What stops you from publishing a free app with ads?
Of course, there are use cases where you don't care about those platforms or you don't care about iterative deployment. For, say, PuTTY, which releases roughly once every two years and primarily targets a single platform, these concerns don't apply and PuTTY in fact is a native app. But that's far from all use cases.
(Famously it was original done as a web-widget and Zuckenburg admitted this was a mistake and turned it to fully native UI).
qt >>> html/css
But javascript made event handling easier in web than in qt (which event handling is a little bit tricky).
There's no magic with Angular or Bootstrap, they're codifying an approach using 100% native JS or CSS. Even SASS and LESS are just alternative ways to produce CSS. This is not novel in computing.
You're not forced to use Rails for your server application, many other software exists as well as Rails: Django, PHP, etc. However you /are/ forced to use Javascript, CSS and the DOM; Unless you're a Big Browser Vendor and can try and coerce support (and even so, the amount of websites made in something like Dash is pitiful afaik). People made frameworks and libraries that make it bearable (SCSS, JQuery, etc), but that doesn't mean everything is solved...
Yet if I were to call coffeescript an overly complex javascript framework, people would probably strenuously disagree. But that is what it amounts to.
Purescript compiles down to javascript but helps save programmers from themselves by introducing a better type system as well as great data structures, and functional paradigms
Typescript adds static typing and OOP
CoffeeScript...is syntactic sugar? (okay maybe I agree with the coffeescript sentiment)
Although I don't entirely agree that compiling a statically typed language into javascript really helps much, since the end result is still... javascript in a browser.
But the last time I tried to defend that I got almost universally disagreed with, so I'll concede that the process might have value I just don't see.
Instead of iterating further on HTML I think a new open platform should be built that specifically targets interactivity and building applications. Keep HTML for documents, what it was meant for, and begin focusing on something that can address the current needs of developers.
Do you spend more of your time on the web using applications than you do reading documents?
I kind of doubt it. Maybe. But probably not.
It may be that you spend more time making web applications than documents. That's understandable.
But is the web primarily for you as a developer, or as a user?
There may be a small minority or users who spend a lot of time reading documents (and I applaud them!), but most users are interacting with web applications.
I'd submit that an awful lot of web sites that people spend time on have been made very JS-heavy and "application-y" despite being fundamentally document-driven. In part I'm sure this is due to the rise of native mobile applications -- have your server just use a JSON API and make your "web page" a JavaScript application that talks to it the same way your iOS and Android apps do. That development model has become the hammer web developers are using to hit an awful lot of things that maybe really aren't that nail-like.
We've managed to emulate the functionality of a 1990s (or 80s!) dial up BBS and scale it up 100x (now instead of a thread having 200 replies it may have 20k replies), at and we are only needing a few thousand times the bandwidth and CPU power to do it!
Joy!
Have you ever opened the html content of any common webpage ? It's insane, in size and indenting, it's impossible to make sense of it, it would make much more sense to have an open binary format and let developers deal with it. HTML has way too many attribute that stacked on each others. People will defend its openness, but I pity the guys who write html parser for internet browsers.
HTML thrived because its openness allowed to bypass microsoft and its closed solutions, but other than that...
(Currently this is accomplished by munging the tags for cite, article, author, and jumping through some small hoops for microformats.)
I read that after this http://html6spec.com/ and thought they were the same (except for the "distribution" side).
I think overall it's a good thing to have certain tags that are associated with default behavior. We could weed out some unneeded ones aggressively, but overall I think it's okay to be able to write a basic CSS-less HTML page that is not a formless mass by default. This mechanism also has traditionally benefited accessibility agents.
So, it basically comes down to the question of whether it's time to remove the default rendering properties of tags. What we're left with then is decisions about the special attributes, as you mentioned. Some of these we could get rid of, too, and some could be made more general. We have painted ourselves a bit into a corner with the href attribute specifically. If we didn't sometimes have to use it for completely different things, it would be totally fine to declare every tag having an href attribute to have link-like behavior.
It can matter in ways for SEO. Having an <h1> helps the robots figure out what your page is called; using <link>s can help explain the organization of your pages; having a <nav> can help influence what your sitelinks[1] will be (if you're enough of a baller to be getting them).
[1] https://support.google.com/webmasters/answer/47334?hl=en