Pages

App dev Q&A: The journey to making Famo.us real

Wednesday 28 May 2014

CEO Steve Newcomb discusses JavaScript, Matrix3d, Famo.us University, and the expected formal 1.0 release in 2015

App dev Q&A: The journey to making Famo.us real
Famo.us CEO Steve Newcomb
An open source JavaScript framework, Famo.us tries to simplify the building of complex UIs via Web development so that developers don't have to rely on native development. Aimed at mobile and Web applications, it features a 3D layout engine with a 3D, physics-based animation engine.
To explore what this new technology means for developers, InfoWorld Editor at Large Paul Krill recently talked with Famo.us CEO Steve Newcomb, who founded Famo.us with Mark Lu, about the project.
CrazyWorld: What's all the fuss about Famo.us?
Newcomb: We really cut our teeth in the HTML5 space, just like everybody else, trying to build apps and interfaces that were super-beautiful, super-performing, doing things that native can do. We went into it just like everybody else with all these hopes. We learned by experience that it's rough.
It always felt like that beautiful interface that you're going for was just out of reach. Like you'd get a demo working and then it would work on an iPhone but it wouldn't work on an Android, or you'd get it to work on a phone but it wouldn't work on a tablet. Somewhere along the line it would always fall apart. HTML5 wasn't quite reaching [its] promise.
We tried to use CSS3 and regular HTML5 for a year and a half to reach that goal, and we finally came to the conclusion that it wasn't possible. We decided to take a scientific approach to it and see if there's a root problem we might solve. One of the things that we knew was that JavaScript over the past three years has gotten a lot faster. We knew one thing going into our study is that JavaScript could do matrix math about 80 percent as efficient as compiled C. And matrix math is the bits that you use to render a screen. We know that JavaScript comes with no install, no plug-in. It's on every browser. [We wondered] if we could use JavaScript as a tool to fix the original sin within the browser, whatever that original sin was.
We took a deep dive, and the first thing we figured out is the layout rendering engine inside the browser was a big problem. It was designed to render a text document with links. Imagine that's the foundation of the building, then we built everything on top of that. Asking it to render an app or a game -- no wonder it's having trouble. You have a "wrong tool for the job" problem.
The second problem we found out is CSS3 is the animation engine you get in a browser. We realized that CSS3 is a pretty rudimentary animation engine. We looked and said, "Why can't there be a 3D physics engine in there like modern console games have?" [We asked] if we can use JavaScript and write our own layout engine and our own 3D physics engine and attach it in the chain in a very elegant way so that we circumvent the browser, but do it in a way that isn't some hack. Then we noticed the W3C approved a key attribute called Matrix3d. With Matrix3d, if you are capable of creating your own matrices and multiplying them and arriving in a composite matrix on your own (such as doing your own layout), you can pass it right through that one attribute. It's an API to the GPU. So now we have a W3C-approved, really good interface surface area onto the GPU.
So we're like, "Cool, we have a way to plug it in, there's no install, no plug-in, and we get to skip the layout rendering engine and the animation engine of the browser." In our first shot we were 14 times faster than the most accelerated version of Chrome. That's when we were like, "Oh wow. We just created a little bit of a paradigm shift.'"
Right now, we have an engine, a gas pedal, and a steering wheel, but we don't have brakes and we don't have doors, there's no radio, and there's one seat -- the driver's seat -- and everybody else has to hang on for dear life.
CrazyWorld: What do you still have to do to get those capabilities?
Newcomb: Everybody uses Angular, Ember, Backbone. These are part of the JavaScript community that we need to integrate. We just finished our Angular integration. We're now doing Backbone and Ember. We're also doing React and Meteor. We're doing Firebase. We've just opened our doors to jQuery and Three.js as well. The other thing we're doing is teaching people in a radically new way. We launched Famo.us University; it's basically live coding teaching Famo.us. In three days, we've had more than 700,000 page views.
CrazyWorld: This is from one of our writers, Martin Heller. He wrote, "Unless you're a serious JavaScript developer or you have a background in game development, learning Famo.us may not come easily. But if you're fed up with the time it takes to develop native apps, and you can't live with the speed and UI limits of mobile Web apps, then yes -- Famo.us is for you." How would you respond to that?
Newcomb: One of the things that we do is over half of our office space is dedicated to the community that we invite to come in and beat on the platform. So we invited Martin. When he came in [about a month ago], what he wrote was 100 percent accurate, and I actually sat down for two hours with Martin to try to learn how we could make Famo.us easier. We are doing some really sophisticated things. My goal is that anybody who's used to programming in jQuery, or even somebody who's never coded at all, can learn Famo.us.
After Martin came, we added seven new classes to Famo.us University, modded all the capstone projects, and changed some of our syntax to make it easier.
CrazyWorld: What about Martin's second statement: "If you're fed up with the time it takes to develop native apps and you can't live with the speed and UI limits of mobile Web apps, then yes -- Famo.us is for you." You would agree with that, right?
Newcomb: Native development is good engineering, and I'm a fan of it. I think it and Famo.us are the two viable ways to build beautiful apps. I think that at the end of the day Famo.us is going to be more approachable and will go to more devices because native can only go to the native device it's on.
The cost of building native is going up and up. To try to get the same exact app across multiple devices is getting more expensive. As an engineer, I love native. I think it's proper engineering. As a business person, you have to start thinking, well, how much is it going to cost me to get my same brand working across all devices? I think that's where JavaScript and Famo.us shine.
CrazyWorld: When will there be a formal 1.0 release?
Newcomb: We're actually planning the 1.0 release to be almost exactly a year from now.

No comments:

Post a Comment