Famo.us: Do We Really Need Another JavaScript Framework? 104
An anonymous reader writes Front-end developer Jaroen Janssen has a post about Famo.us, "a custom built JavaScript 3D rendering and physics engine meant as a replacement for the standard layout engine of the browser." The engine effectively replaces a big chunk of HTML5 in order to render more efficiently by using technology based on WebGL. Janssen questions whether the world really needs another JavaScript framework: "Is it a bad thing that Famo.us replaces major parts of HTML5? To be honest, I'm not sure. As a Front-end developer I have to admit it makes me slightly uneasy to have to use a custom API instead of 'standard' HTML5. On the other hand, like almost everyone that makes web apps for a living, I have been terribly frustrated by some of HTML5 limitations, like slowness and browser incompatibilities. Either way, it might be a good thing to try a fundamentally different approach so I'm keeping an open mind for now.
Famo.us chases another holy grail, namely the 'write once, run anywhere' dream. Instead of having to write different code for different platforms, like iOS and Android, developers can write one application that works and looks as good on all platforms, in theory anyway. This of course saves a huge amount of time and resources. Unfortunately, this idea is not without its problems and has never really worked very well with earlier attempts like Java-applets, Flash and Silverlight. In the end native applications have so far always been faster and slicker and I'm pretty skeptical Famo.us will be able to change this."
Famo.us chases another holy grail, namely the 'write once, run anywhere' dream. Instead of having to write different code for different platforms, like iOS and Android, developers can write one application that works and looks as good on all platforms, in theory anyway. This of course saves a huge amount of time and resources. Unfortunately, this idea is not without its problems and has never really worked very well with earlier attempts like Java-applets, Flash and Silverlight. In the end native applications have so far always been faster and slicker and I'm pretty skeptical Famo.us will be able to change this."
VRML (Score:5, Funny)
The world is now ready for VRML.
Re:VRML (Score:4, Insightful)
Ducks, but it's true.
Re: (Score:2)
Who cares? As long as it's written in coffeescript I'm in.
Re: (Score:2)
Javascript faster than HTML? Really? I'd like to see that against my HTML-only page.
Not Ready Yet... (Score:4, Interesting)
Re: (Score:2)
Re: (Score:2)
Why should the usage of 3D units be significantly more inefficient?
I don't think it's a matter of what should be, it's a matter of what is. And right now, the way phone CPUs are designed, they can shut down sections of themselves in order to save power. However, they don't have the fine granularity to be able to 'turn on' and 'turn off' only certain APIs, you either get the GPU on or you don't.
In the future, of course, anything is possible.
Re: (Score:2)
However, they don't have the fine granularity to be able to 'turn on' and 'turn off' only certain APIs, you either get the GPU on or you don't.
That's quite lousy, especially in the light of the fact that for simpler processing units, we can design them in a way to let them consume as much power as they need without any (or very little) need for SW support. But I wouldn't lose my hope just yet.
Re: (Score:2)
Re: (Score:1)
Re: (Score:2)
Really fucking wrong, almost all of the 2D is accelerated by the same apis (and use 3d apis underneath).
Re: (Score:2)
Re: (Score:2)
3d is more accelerated than 2d - its faster simply becuase the graphics cards practically only do 3d stuff now. 2d, there for desktop windows as almost an afterthought.
Some systems (eg Direct2d) are built on top of 3d graphics stacks, you just have a flat projection and no depth co-ordinates to give the impression of a 2d graphics surface.
So you see WebGL is significantly faster than HTML drawing, which is why it might be a good thing overall... the problem comes with replacing a well known standard with go
Re: (Score:2)
Some systems (eg Direct2d) are built on top of 3d graphics stacks, you just have a flat projection and no depth co-ordinates to give the impression of a 2d graphics surface.
Do keep in mind that you're talking about one specific technology stack here.
So you see WebGL is significantly faster than HTML drawing, which is why it might be a good thing overall...
Really? I might be misunderstanding things, but the general browser engine is going to be C/C++ code, whereas all the famo.us stuff will be javascript. Sure thing, JS engines have become a lot more performant lately, but they still don't beat native code.
But sure, if you offer more limited layouting, you might be able to outperform the native browser engines with JS+WebGL. HTML+CSS is a pretty horribly bloated beast.
Re: (Score:2)
Java2D has long been 3D-rendered using OpenGL or Direct3D. X.org's Glamor aims to unify 2D with OpenGL.
Re: (Score:2)
true, but all those HTML elements tend to get laid out in increasingly complex divs, with a whole heap of CSS added.
I was really referring to the javascript "controls" that are html elements with a huge heap of javascript behind them providing functionality.
I'd like to see webgl + native code running in the browser as a standard, probably based on a superset of C so anything else can be implemented in it.
Re: (Score:2)
the problem comes with replacing a well known standard
which standard? html5 isn't a standard at all, let alone well known. it's a wannabee. besides, famo.us doesn't seem to seek to *replace* anything, it's just another option for an area currently lacking good enough support or standard.
with god-knows-what graphics drawing.
if it works crossbrowser i can't possibly see a problem with it, just as with any other lib you are free to use or not.
Let the free market decide (Score:4, Insightful)
The web developers and users will quickly decide if people want this technology. The more options the better I say; the inferior ones will fade on their own.
Do we need HTML+Javascript at all? (Score:3, Interesting)
- inferior paradigm; ...
- Inferior performance;
- Inferior UI experience;
- Inferior security;
- Inferior privacy;
- Inferior development environment;
Honestly, it's just the mainframe game of the '60s, plus all the guys who realise they can make a lot of money by pretending that dumb terminals are an advance on autonomous desktops belonging to and being controlled by the user.
Re: (Score:1, Insightful)
Do we really need more than 5 computers?
Re: (Score:3)
Do we really need more than HTML5 computers?
FTFY.
Re: (Score:2)
Re: (Score:2)
How would one go about running a video game on a dumb terminal? Cellular networks don't have enough throughput to support a lot of OnLive/Gaikai style streaming, and plenty of games are too twitch-sensitive for cellular Internet latency to keep the game enjoyable.
"Nobody wants to play those games". Like, nobody would want to play anything with an inferior non-DRM experience. Catch my drift?
Re: (Score:2)
Most games can be played over streaming networks
Only for the first few days of your monthly data plan. After that, you either get cut off, get cut back to dial-up-like EDGE speeds, or pay prohibitive overages.
and those that can't are an extreme niche
So you're saying every platformer requiring precise timing of jumping and attacking, like Mega Man or Contra, is "an extreme niche". Do I understand you correctly?
How about 5 computers and a billion smart terminal (Score:2)
There's a class of application that will never make sense to be stand-alone, and for those apps, the cloud is probably the best paradigm. But the current state of HTM5/Javascript calls for a cloud with a ton of application logic running in the browser. I'd much rather see a single app running in the browser that isolates all the front-end specifics and makes it really easy to write fully server based apps that use the browser as a universal delivery system - and nothing else. Sure, you're not going to wr
Re: (Score:1)
Yes because the mobile experience where every single website is replaced by a crapp is sooo much better.
Re:Do we need HTML+Javascript at all? (Score:4, Insightful)
It's not what we need. We've always had what we need.
It's about getting everyone to use the same thing.
Basically we have debates on screen layout, networking... other APIs. We've been building such APIs for decades.
It is just hard to get everyone to use the same API.
We need HTML+javascript, because for whatever reason that worked to get the world moving. Maybe it would have better if the web just ran off perl scripts or python scripts or QT application or TCL or whatever, but it didn't.
It began as a markup language (more to display documents like Word). Then it moved to become dynamic pages. Again like adding VBScripting to Word. Now we keep hacking and putting stuff on top of it to make it a full fledged programming environment.
We can hope for niceness, but this seems to be repeated over and over and our field. Yet, somehow, things get made.
Re: (Score:2)
The alternative is Flash, so Javascript+HTML isn't really that bad, considering what could be.
Re: (Score:2)
This, a thousand time this.
Why don't browser makers get together and throw out the entire existing paradigm of horrific compromises and agree on completely fresh start with both language and UI framework.
Throw out HTML, throw out CSS, throw out JavaScript. Take the best *ideas* from them all, use C# (nothing to do with Microsoft though) and create a common framework on all platforms embracing those *ideas* and use OpenGL as the composition engine.
Re: (Score:2)
Don't use C#. Write a bytecode platform that anything can port to- Javascript, C, C++, C#, Java, Python, etc. Then developers can use what they want. Using C# is almost as big a failure of an idea as using Javascript.
Re: (Score:2)
Using C# is almost as big a failure of an idea as using Javascript
Would you care to explain any of your reasons why? It seems to be vastly superior for client side work in comparison to everything else right now. I wouldn't use it on the backend (that's still C++ territory in my opinion), but it and/or Java work well on the web services side of the backend.
Writing a bytecode platform is exactly what using C# would do in any case (I guess I should have been clearer.) I don't care if the actual language on top is exactly C#, or something else, just let it compile to a by
Re: (Score:3)
You like C#, I like Scala and the next guy over likes Haskell. Trying to force everyone to use one language that fits all is one of the big fails of JavaScript.
Language development is an ongoing research area. You can not just freeze time and say we will use this one for the rest of time.
This is why we now have a host of languages that compiles to JavaScript. I use Scala-JS that will convert my Scala to JavaScript. But this is horrible inefficient and limiting.
The correct solution is PNaCl: http://en.wikipe [wikipedia.org]
Re: (Score:3)
Throw out HTML, throw out CSS, throw out JavaScript. Take the best *ideas* from them all, use C# (nothing to do with Microsoft though) and create a common framework on all platforms embracing those *ideas* and use OpenGL as the composition engine.
I'd try to explain the problems with this line of thinking, but I think xkcd [xkcd.com] does a better job.
"belonging to and being controlled by the user"? (Score:3)
Sure, having desktops "controlled by the user" has worked out just swell for the last 30 years or so. If you want to make sure a system stays at peak performance, doesn't get infected, and keeps up with bug fixes, put it "under the complete control" of someone who thinks a "buffer overflow attack" means someone pouring too much cleaning solution into a floor polisher.
Re: (Score:3)
HTML is accessible and portable. Any device can read it. The most common use-case by far is graphically rendering it in a Web browser, which can be done on a desktop or mobile device; also rendering to printed pages, or multi-channel audio. And of course, spiders/robots.
In short, Web browsers are only one kind of user-agent. HTML is accessible and satisfies the needs of all user-agents.
If you don't use the features of HTML that allow you to do this (such as link relations), you may as well just publish from
Re: (Score:1)
Apps running in a pretty secure sandbox, which a runtime on everyone's machines.
Which is cross platform?
Where the source is almost always understandable / editable at the client.
That also has a vibrant open source community building libraries for it.
That simple enough that a new person can at least build a page in the first day of learning it.
Sounds like a success to me.
Do we need html + javascript? no, but we don't have anything better that people agree on.
Silverlight? Flash? Applets? downloaded exe's? Act
Re: (Score:2)
- Superior Advertisement
- Superior punishing of unnecessary updates
- Superior tracking of users
- Superior copy protection
And those are the only points a company is interested in.
Superiority complexes. (Score:5, Funny)
This is basically a waste of time. What they should be doing is working with the browser vendors and standards committees to improve HTML5, not making their own inferior and heavyweight solution to add to the slow-down of the Internet.
A lot of devs don't even realize how efficient and quick modern browsers are, because they're too busy complaining and trying to solve perceived problems using these kinds of crappy replacement stacks. What's the point in having a standard framework if everyone tries to write a "Flash" to replace it? It's inane.
Especially since a lot of effort has gone into making specs that are as efficient as possible and avoid a lot of problems you don't see immediately; several of these frameworks have serious performance issues that can't be rectified without the browsers themselves re-writing a lot of code. I utterly fail to see the need for this. Stop trying to replace standard technology with inferior solutions already.
Re: (Score:1)
A lot of devs don't even realize how efficient and quick modern browsers are,
+5 funny. Would laugh again.
Re: (Score:2)
"Heavyweight"...that's perhaps partly disingenous. Whatever code an app writer would use for an application probably would never reach the complexity level of an HTML5 browser. Furthermore, stuff like CSS3 allows for a number of desirable layout options, and browsers tend to be *generally* fast, but where's the guarantee that everything complicated you might want to create with CSS3 is going to be fast on browser X? It isn't there, of course, you have to be aware of what changes to the style or the DOM tree
Re: (Score:3)
This is basically a waste of time. What they should be doing is working with the browser vendors and standards committees to improve HTML5, not making their own inferior and heavyweight solution to add to the slow-down of the Internet.
Irony: suggesting a waste of time as the antidote for a supposed waste of time. Historically, the way things get into the spec now and not next decade is that someone just does them and the community decides what's good.
Re: (Score:2)
And worse, it can't simply be shoehorned into the existing platform because it's attempting to be a replacement.
The wonderful thing about standards is that there are so many of them.
it's like how Google is asking for others to implement Dart or use their VM, and if nobody's biting on Google's stuff then they certainly won't accept some patchwork Javascript framework that's horribly inefficient.
It is in fact nothing whatsoever like that. This is a technology that you can use right now. And if it becomes highly successful, then it's likely that web browsers will come to look more like it, if not adopt it wholesale.
Re: (Score:2)
The fact that someone like Google can't entice others to adopt a Javascript replacement (ie, something everyone says they actually want)
Who is this 'everyone'? Seems like mostly people incapable of contributing to such an effort. And you can't use dart right now without compiling to javascript anyway, so you can only half-use it. This is just based on what's there already, and if it's used, then presumably people will spend effort accelerating it.
HTML5 & JS should just crawl away and die (Score:1, Insightful)
If you want fast 2D or 3D graphics you DON'T code them in an interpreted script language welded onto a markup language pushed well beyond its sell by date running in a bloated client which in turns runs on the OS. If web devs want to climb out of the web playpen and do grown up programming then learn a grown up language such as Java or C++.
Re: (Score:2, Troll)
LOL!
Too funny. It's like you're a time-traveler from 2005.
Re: (Score:1)
Yeah, there are loads of really good examples on the web of HTML5 and JS providing fast, standards-based 3D.
Loads of them.
Re: (Score:2)
My sarcasm detector is going off, so forgive this reply if I'm off:
There really are tons of "good examples of on the web of HTML5 and JS providing fast, standards-based 3D." Do a quick search.
Re: (Score:2)
but if your browser+js+html5 is so good at providing fast, standards-based 3D... why can't it run Crysis?
Re:HTML5 & JS should just crawl away and die (Score:5, Insightful)
But more to the question, what kind of web is this leading to
I used Adblock and Flashblock right now just to have a half-way decent experience on the internet to avoid a ghastly internet flash ads from downloading untold GBs of data/video/audio to annoy me without a way to mute it.
The internet is a train to nowhere and no one is driving it, big corporations will turn it into a minefield of advertising (which is FINE, by the way) but rip apart everything good (involuntary flash ads, bandwidth, speed, shitty cross-domain javascript, DRM, turn web standards into circuses) to get there.
Steve Jobs back 3 years did a rant again Flash, which at the time and still now embodies the villanous nature of plug-ins.
And with WebGL and video streaming and DRM in HTML5 --- your internet may get turned into a turdball --- just to waste everyone's bandwidth to show ads you will never click.
Re:HTML5 & JS should just crawl away and die (Score:4, Informative)
but what is really scary is what a mess Javascript is in 2014 --- makes Perl look like BASIC. No need to obfuscate Javascript in 2014.
I've been working in software development for about 15 years now, and I've worked professionally with all the majors (C++ a bit, Java, PHP, Perl, VBScript which was awful, C# extensively which I like a lot). For the last few years I've been tasked with writing a very large client-facing web application, where my team was mostly responsible for the front-end (JavaScript/HTML/CSS) that communicates with a large RESTful service provided by another team. This included writing an API in JavaScript with documentation.
The first thing I did was set ground rules on how my team should program in JavaScript, the structure we would use, how we would use the functional language to maximize its abilities and have some class-like things (properties, inheritance, etc.) too. Now we have a full blown web-app with a JS front end with over 900 JavaScript files (when in debug) that are very nicely sorted and categorized, full class/inheritance structures, and many other things. We use Visual Studio 2012/2013 with a few custom JavaScript extensions, and along with Chrome's debugger, it is more than manageable. But we also don't need to target any old browsers. Nothing pre-HTML5.
I'm not saying JavaScript is the best language in the world or anything like that, it definitely has its problems, and it certainly doesn't fit as a choice in many situation. But programming for it these days is not the nightmare it once was (assuming you don't need legacy browser support), and in many cases, it's actually rather refreshing after 13 years of strictly typed non-functional languages, because you can do some interesting things.
Re: (Score:3)
The first thing I did was set ground rules on how my team should program in JavaScript, the structure we would use, how we would use the functional language to maximize its abilities and have some class-like things (properties, inheritance, etc.) too. Now we have a full blown web-app with a JS front end with over 900 JavaScript files (when in debug) that are very nicely sorted and categorized, full class/inheritance structures, and many other things.
This sort of thing demonstrates that the quality of the programmers matters much more than the language.
Re: (Score:2)
Yes I agree 100%. Languages and platforms are a tool, what matters is the person choosing and using them.
Re: (Score:2)
, full class/inheritance structures, and many other things.
Total fail. Javascript is not Java, C#, etc. Google "prototype-based programming" or put your ACM DL subscription to good use.
You made an awful lot of extra work for yourself.
Re: (Score:2)
Using prototype is part of the approach of our inheritance pattern, which is based off a methodology from John Resig.
The only person who failed here was you, for trying to be a smart ass. There are many people who are good at coding aside from you, and probably many who are better, or at the least, not a dumbass.
Re: (Score:2)
There are many people who are good at coding aside from you, and probably many who are better, or at the least, not a dumbass.
I'm sure there are.
which is based off a methodology from John Resig.
But, it's obvious that you can't identify them.
Resig falls squarely in to the "incompetent" category, by any measure.
Re: (Score:2)
But, it's obvious that you can't identify them.
You mean because I'm not specifically linking you to what I started with, then going into depth about the modifications and ethos I developed from there? Of course I'm not going to, that's between me and my company. Figure it out yourself.
Resig falls squarely in to the "incompetent" category, by any measure.
Well, what can I say. jQuery is used by 80% of the top 10,000 most visited sites (jQuery [wikipedia.org]). How about you make something that is used by a small percentage of that, and then you can bitch about his ability. But then I am sure you have done nothing, and you are nobody, so I
Re: (Score:2)
Well, what can I say. jQuery is used by 80% of the top 10,000 most visited sites
McDonald's sells billions of hamburgers. I guess they must be of exceptional quality, right?
But then I am sure you have done nothing, and you are nobody
I'm sure you do. Belief without evidence is very common among the hopelessly irrational.
On Resig and his incompetence, I'll direct you to any of his books or to the jquery and jstat source. If that's not enough to convince you he's laughably incompetent, I'll direct you to comp.lang.javascript. There's a reason he banned his followers from reading that newsgroup.
Re:HTML5 & JS should just crawl away and die (Score:5, Funny)
It means that there is yet another web site that I arrive at at see an empty page or maybe a few items scattered apparently at random. I surf with javascript switched off by default. Most sites should work without javascript, OK some fancy features might be missing but I should generally see the page. Those that do not: I might look to see what javascript to enable, but all too often they are trying to pull in javascript from 1/2 dozen sites - so I guess a couple and then give up and go elsewhere.
Javascript should be used to make a page look nicer, not to make it work at all. Insisting on javascript is like insisting on flash.
I accept that a few special pages really do need special effects that need javascript, but not many of them.
Re: (Score:2)
But then you go on about C++... Like having arbitrary machine code be run by your browser is a good idea. You're well on your way towards designing the most security-averse system thinkable, and that's quite the achievement considering how bad the current system is. In web development, yo
Re: (Score:2)
I didn't mean run java or C++ in the fucking browser you knobend. I meant to code standalone apps!
WARNING: Slashdot Beta on the rise again (Score:1)
Over the last week, reading as an AC, I have been forced to the Beta site well over 50% of the time.
It looks like Dice are building up to having another go at forcing Beta on us.
One interesting piece of information: I have _never_ been forced to Beta while browsing from an Android tablet using the Android supplied browser.
In case you are reading this Dice, been forced to Beta at the rate I am is _really_ pissing me off. :-( :-(
Bullwinkle (Score:2)
Angular (Score:2)
And it already kicks ass. Pretty sweet...
We need something... (Score:5, Interesting)
I come from a background of systems-level software... server-side and thick client, predominantly. I've recently been looking at in-browser Javascript again - and recognise that it has come a long way in recent years. JQuery is nifty; Backbone useful; Angular is neat... but they lack a certain je-ne-sais-quoi.
In one sense, I love the flexibility of dynamic programming with Javascript - but, on larger projects, this benefit becomes a burden. What I'd really like is a Javascript-like language - that compiles to efficient Javascript - where I get to structure my application; enforce type constraints at compile-time; provide test-time assertions... etc... and allow me to implement my Javascript application as a collection of independently tested components. Client-side libraries are going in the right direction - but remain an evolutionary step away from where, I think, web-technology deserves to be.
Javascript has come a long way - but the journey isn't over yet... IMHO.
Re: (Score:1)
What I'd really like is a Javascript-like language - that compiles to efficient Javascript - where I get to structure my application; enforce type constraints at compile-time; provide test-time assertions... etc... and allow me to implement my Javascript application as a collection of independently tested components.
So you want Ceylon then?
Re: (Score:2)
hipster bro framework (Score:1)
From what I've seem Famo.us is more Famo.us for it's ability to market to hipster cool developers than to normal web developers. When they tire of using Famo.us and something else more hip, cool, "bro" comes along they'll go with that. I mean really, who calls their framework "famous", except for wannabe hipster, cool, "bro" programmers? It only came out this year - I give it another 6 months to hit the peak hype cycle, then it's all downhill from there "bro".