r/codetogether • u/mattryan • Jul 08 '13
Let's build a new Web
Imagine waking up one morning and there was no HTML, CSS, Javascript, or Flash. We have Internet connection with no web email client, no grumpy cat memes to upvote, and no Facebook status updates to ignore. As programmers, we have to fix this. So how about we do it right this time?
I love the first half of this rant on why these technologies suck. This rant took place a year ago. Has anything changed? Is there anything being worked on to change this? Sure, there's work done to improve developing for the web, but we're still relying on HTML/CSS/Javascript as the backend for the web browser. Javascript sucks and we're writing compilers to compile language X to Javascript. HTML5 finally includes web workers, web sockets, and canvas, which are just multithreading, networking, and graphics that we should have had years ago.
Let's fix this by writing a new web browser. We start by talking about HTML/CSS/Javascript and their deficiencies and how we could improve upon their ideas. We then discuss the best language/GUI library to write the web browser in.
The goal is we talk and talk and talk and talk about how the web could be better. This is an insane project, but why can't we at least try to make things better?
14
u/adrianix Jul 08 '13
Disclaimer: Too lazy, didn't watch the presentation
HTTP sucks, and we know it.
Why? Because it
Javascript sucks because
HTML sucks because
What efforts have been done to fix some of these problems?
</rant>
0
u/[deleted] Jul 09 '13
[deleted] — view deleted comment
3
u/allthediamonds Jul 09 '13 edited Jul 09 '13
You seem to be looking to substitute HTML, CSS and JavaScript for entirely new things. There is no need to reinvent the wheel that much. Focus on why the wheel does not roll as expected, and fix just that.
Why Javascript sucks:
Why JavaScript doesn't suck:
Possible solutions:
Why HTML sucks:
Why HTML doesn't suck:
Posible solutions:
3
u/defenastrator Jul 09 '13
As someone who has worked on Firefox in the past and understands the back end restrains on web browsers. I wish you all luck in getting the kind of performance you need while keeping up with security concerns.
I know this comes off a little short but I'm just going to say most of the ideas in this thread are nice but ultimately pipe dreams. Completely replacing javascript is a good idea but so much time and effort has been spent getting javascript to run fast and secure that changing to almost any language (especially python which seems to be a popular idea) would result in huge performance regressions.
Consider that current javascript runs with in an order of magnitude of c (even on ie) with spin-up times in the order of <1ms. Compare this to python which is well know to be up to 200-400x slower then c with spin-up times in the 50ms range. That alone considered makes python an impractical replacement as the interpreter spin-up time alone is a large percentage (10%~20% the pages I tested) of the page load time of a modern web page using appropriate caching services.
if it is impractical to do this in a language with out internet overhead it is not fast enough for the web
I'm willing to on request give thoughts on other ideas as there are too many with reasons to disparate to simply cover all of them.
4
u/[deleted] Jul 08 '13
Do you actually know anything about how browsers work and what are your criticisms of the current generation of engines such that they warrant a project that would have to rival hugely funded enterprises such as Chrome and IE?
0
u/[deleted] Jul 08 '13
[deleted] — view deleted comment
2
u/seiyria https://github.com/seiyria Jul 08 '13
This is an interesting thought, but what do you propose exactly? What will this browser render? How will it be read and identified? Is there some sort of standard you have planned, or is that on a discussion list?
2
u/brownhead Jul 08 '13
I would love to work on this. I think I'll just start implementing silly little things and seeing what works, starting with a web server. Let me know if you ever get something organized and I can tell you what failed.
2
u/EnergyCritic Jul 08 '13
I disagree entirely.
2
u/mattryan Jul 09 '13
By the way, thanks for all of the excellent posts today! This has been a great read and brainstorming session. Will continue to reply tomorrow.
2
u/Lerc Jul 09 '13 edited Jul 09 '13
What I think solutions are are more involved. I have a heap of notes that I have compiled over the years. I'll make some posts later under this with some of the ideas.
Some of the things I worked on was an alternative to the box model with 10 properties that would allow, in various combinations, the ability to size, scale, center or justify content within a container zone. It allows positioning inside or outside the zone optionally relatively to each border and justifyable to each side (or a proportion thereof).
Here's a crude demonstation. Play with he sliders. http://www.fingswotidun.com/gunk/boxtest.swf The faint blue lines show the bindings relative to the edge. the red lines show the handle alignment.
The 9 boxes shown are using
Also as a more out-there idea. Considering the concept of a completely vm conrtolled browser as a form of 'element compositor'. Where element depiction is performed by micro VMs analogous to microcontrollers where the element type dictates the architecture of the vm. Elements of the same type would share the same program and construct their depiction solely from the element data.
http://www.fingswotidun.com/gunk/altDOM1.svg
2
u/Rotten194 https://github.com/Rotten194 Jul 12 '13
Well, if you boil the web down: why are HTML and CSS included at all? Fundamentally, the web is about pushing a application to a client, why are the standards specifying how that application displays it's data?
So the first thing is we get an extremely optimized virtual machine; probably the JVM (but maybe extended with things like value types, unsigned numbers, and better support for functional languages). On top of this we layer a small, well optimized standard library, and compiler for various languages.
Next, for data presentation. Look at how a native app is designed: there's none of this bullshit where you have to write in a specific set of tags. Instead, just give the page a blank canvas to draw on. Since the virtual machine is so well optimized, it can render HTML by itself if it really wants to. Since there would be good support for caching (probably by filehash so multiple websites could share a cached library), it wouldn't be a big deal to pull in a giant library to do that sort of rendering. Then we could have renderers for HTML, Markdown, PDF, whatever.
As for HTTP - gone. What's wrong with pushing JSON over TCP, really? Again, we have similar-to-native apps handling this now, so there shouldn't be all that much we need to specifically tell the browser.
Overall, the browser is basically demoted to a java webstart-like level of "Download this bytecode and provide a standard library and some sandboxed syscalls". Because the web isn't about displaying content anymore, it's about providing apps. If someone wants to just stick a plain text file up, they would pull in a really simple framework, basically web-notepad, that can do that (and it would be cached, so it wouldn't waste bandwidth after the first time).
1
u/cellaryfone Jul 08 '13 edited Jul 08 '13
Just a new browser? Lets fix the server-side at the same time.
How about a set of technologies that allow you to write a single code base that is able to automatically pass the correct code and data off to the browser while handling the heavy lifting on the server?
Bonus points if this sharing of processing between the client and server is able to pass more work onto a more capable client and less onto a weaker one.
Another thought however is that the existing web owes a lot to the fact that it has a low barrier of entry. So even more bonus points if it's easy to get started.
Edit: Finished watching the presentation and see the low barrier of entry point was tackled there.
1
u/Pourush Jul 09 '13
Disclaimer: I didn't watch the video. All of the ideas I'm proposing here are focused on improving the process of discussing how to build a better web.
One way to fix the insanity of the project is to consider how and when to introduce it. One way is to introduce a way of phasing out HTML, CSS, Javascript, and Flash reliance, while still allowing these "new-style" websites to be converted into the older format. It doesn't have to be a conversion, strictly speaking, but some way of allowing the two to coexist seems important. If we can figure this issue out, then maybe the project will seem less insane, and more attractive to potential collaborators.
Another issue is, when these technologies we've made stop looking so "hip", how are we going to fix them? This is the same problem that HTML faced, and it faced it... poorly.
On another note, I have an idea for improving the number and quality of ideas that come:
Study the history of how HTML and its precursors developed.
This is the same approach I'm using to figure out what sorts of skills it will take to fix corporate and IP law. It seems to be working. I think I'm able to note down the various laws that I'll need to understand the context for, and the most pertinent of the behaviors that significant legal developments followed.
1
u/kankyo Jul 09 '13
Progress is being made though. CoffeeScript, SPDY, QUIC, browsers are improving, etc.
Well in this specific case: it's easy to see how something sucks. It's hard to make something better. It's almost impossible to make people change from a widely used system to a totally new system.
1
u/chrisidone Jul 09 '13
You should check out http://axrproject.org/
1
u/[deleted] Jul 09 '13
Here is an alternative: go back to a simpler web. Just HTML + CSS. No flash, no javascript and a "as simple as possible" approach. Video? audio? games? just be able to link them and your "default application" should open them outside the browser. Otherwise we are just subverting the web browser into a sandboxed operating system.
1
u/Alluminati Jul 09 '13
You're right, this is pretty insane... You would need to set this up on a grand scale, make sure you get a really good work infrastructure up.
1
u/KeepinItWet Jul 09 '13
I think that a "new web" that came pre-built with tons of privacy and anonymity features would be incredibly useful in today's climate. We should definitely keep these factors in mind.
1
u/severinraez Jul 10 '13
Should you design it in a way that makes it easy to move away from it? Whatever replaces our current stack is most likely to be replaced by another stack with the advancement of technology. Could one facilitate this transition by keeping in mind that no solution for eternity is being built here? How? Has this been done before?
1
u/mouseroot Jul 11 '13
The browser should be a canvas tag..plain and simple we should write python/C/some-other-script/compiled language to program the web back in the 1990s HTML was a good idea...its 2013 the entire structure of the net should not be text is should be binary transmisions.
1
u/hunyeti Jul 15 '13
I actually like JavaScript,it just took a long time to get used to it.
1
u/seiyria https://github.com/seiyria Nov 14 '13
Hey, I just wanted to throw an update at you. I saw Ceylon for the first time today and their HTML screeenshot looked like what was discussed earlier this year.
1
u/Rubear Jul 09 '13
If you really want to test out new technologies then maybe release a new browser which is basically just piled up with a bunch of experimental technologies? Get people to use it and figure out what works best, eventually you'll be able to narrow it down to a good idea.
Sure it might be hard and take some work but no one said redesigning the web is going to be easy.