BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage Interviews Enda McGrath on Cross-Platform JavaScript Application Development with Enyo

Enda McGrath on Cross-Platform JavaScript Application Development with Enyo

Bookmarks
   

1. We are here in QCon San Francisco 2012, to talk with Enda McGrath about cross-platform JavaScript application development and Enyo. Hi Enda, would you like to introduce yourself?

Hi, so my name is Enda McGrath, I am Director of Developer Relations for our open-source products which are Enyo which is our JavaScript framework and then also our Open WebOS, which is our operating system. So I am in a team of support engineers and developer relations people that help support developers create applications, ports, the operating system to different platforms and basically evangelize the JavaScript framework, help people as much as we can.

   

2. You mentioned Enyo and WebOS, would you like to give us an overview of what Enyo is and how it is connected to WebOS?

Sure. So originally when WebOs came out, it was targeted at phones, so when the pre-devices originally came out, we were using a different framework called Mojo, for the phone that was our JavaScript framework. When we decided to do tablets, moved up to the larger screen size, we found that Mojo didn’t scale really well and also had some issue with the scaling and also on the performance side, so we started looking into a new framework which we called Enyo. Enyo is very lightweight, is fast and also scales between the different screen sizes, so we found that we can do it on the phones and also scale up to larger screen sizes, so that was on a TouchPad which was last year. That was Enyo 1.0 that powered all the applications both on the device and all the developer applications as well, that were built for it. Then, this year we decided we would become device agnostic with the framework and we decided to create a framework that will work across platform, support all the major frameworks and give developers a solution where they could develop their applications once and then deploy it across multiple platforms.

   

3. So you mentioned that Enyo is, and it’s also mentioned on the project homepage that is optimized for mobile and you mentioned screen size constraints. What other additional concerns should the framework create or deal with when dealing with the mobile space?

Sure, well performance is the biggest issue and then going across platform as we are doing making sure the performance on each of the devices, is pretty similar and you are not going to hit a different performance on one device or another. So we worked really hard on optimizing the framework, to make sure that our scrolling lists work really well, so those were the main issues we’re dealing with and also on the size. We wanted to keep it small and lightweight so we didn’t become bulky and taking a lot of size on the mobile applications, because they are smaller devices.

   

4. Are any of these concerns also there for the individual developers that will use them to build mobile applications?

Yes. So we want to make sure that developers have a simple easy platform. We want to take the headache out of building applications cross-platform, not just on mobile but also on the desktop, so you have one framework, you develop for one framework, and then it applies across mobile and desktop and the take away the browser worry, so that you don’t have to worry about the differences between Chrome, iOS, Safari, they all are different.

   

5. How has your experience been working with the HTML5 platform? Which do you think are its strongest points and what things would make your life easier, both as a framework developer and even as an application developer?

So I originally started off my career as a web developer, long ago, and to see HTML5 develop into a very usable cross-platform has been fantastic. Even when we started back on the Pre and HTML5 was kind in its infancy and new stuff was starting to come into to it, it was great to see, instead of having to go to low level, to do access to location services and APIs like that, that you could do it trough the browser, makes life a lot easier for developers. So looking forward as more APIs become available like the W3C one that was just put in for Push, I mean that a lot of developers asked for that particularly API, so when that’s implemented and part of the framework that we can use as app developers it will make life a lot easier. So I am really embracing it, I think as a cross-platform developer it will make your life a lot easier and then you don’t have to hit the lower level stuff for the services you really need.

   

6. You mentioned performance considerations a while ago. What have been the performance challenges your team faced while developing Enyo?

So our biggest goal was to have Native performance in the JavaScript framework. So having that performance that you can compare Native to JavaScript framework, and getting it comparable was our biggest challenge. So we had to work around some solutions particularly on the list scrolling we wanted to have real world solutions. So we talked to enterprise people, the solutions that they’re trying to do, so they might have thousands of contacts in their lists so the scrolling on the contacts is comparable to Native. That was our biggest challenge, just to make sure that, particularly on the lists, so when you scroll, the scroll is the same, so what we decided to do on that one was that we only display a certain number of contacts in the DOM and then when the scrolling starts we start dynamically loading in the next number of contacts and what have you.

   

7. What would be a typical workflow for someone using Enyo and things like Bootplate. What other tools make sense to use with it, for example testing frameworks and things like that?

Sure, what we tried to do is make it really simple, from a novice beginner to an experienced JavaScript developer. What we have done is that we used a tool called Bootplate. Basically a developer can download a zip file or a use Git, if they are comfortable with Git and basically what that gives you is a starting point for your project. It has all the code you need to have a Hello World sample working, so basically a developer can jump in, start away and start programming their app. They can start adding in codes, adding in modules, whatever they have used before, or if they wanted to pull some of the widgets that we have in the gallery down as well that the community is supplying, they can also use those as well. So what we have tried to do is to be very friendly to the HTML5 ecosystem, so what we do recommend is a developer user like Chrome or Safari, and then use their built-in debugging tools to debug your application and inspect your application. So we try to make sure that we are not getting developers to learn a new tool, that using the knowledge that they have, it’s very important to us, the time to learn is very low and they can have a product really quick that they can ship. So obviously we work closely with PhoneGap as well, once you have your application built we can wrap it in PhoneGap and then you can put it across on the different catalogs.

   

8. What would be your advice to teams that are considering developing applications that work both on the desktop and the mobile? For example, what are some of the most common pitfalls that they should avoid?

So I think the biggest pitfall is designing for a particular screen size, and that’s the biggest strength we have on Enyo - we dynamically change the screen size depending on what screen you are in, even if that’s just rotating the screen form portrait to landscape. So I would recommend in not concentrate on a particular screen size, especially nowadays with phones going from the small to ridiculously big, to the large screen sizes, so yes, I think the biggest pitfall is trying to get it to work across all the different screen sizes and then programming it to change dynamically in their code, I would suggest to go to a framework that does that for you, takes the heavy-lifting out of it.

   

9. You mentioned the new W3C API for Push and there are a bunch of device specific APIs and other APIs coming out from HTML, any other one that you think it’s important in particular?

For the ones that are coming out I think obviously around the Push but the messaging is becoming a big part in everyone’s life.

Dio: Do you think that some device APIs like vibrations and… ?

The audio-video ones that are improving, it’s good to see those improving and as they get better, will make life a lot easier for sure and make your applications look richer. Yes, so I think that the device APIs, so you would have access to the hardware, so as I said before you have the geolocation now, and the browser, so having access to what other device APIs the device has so as the vibrator, as you said or the camera, all that kind of stuff, so it’s built straight into your apps, it’s nothing different you have to do between the different platforms. I mentioned PhoneGap before and I think what’s interesting is their mission is to not exist. So you do not have to wrap your HTML5 app in PhoneGap, that your application will work across platform. So I think for developers it’s great, it will make development a lot easier and time to market will be a lot quicker and the biggest expense for developers is having to test on different devices, you have to buy a smaller device, a bigger device, so you don’t have to worry about that and just create your app and put it in the catalog and it should work, it’s huge.

   

10. How do you think the cross-platform JavaScript application development will evolve in the near future, both as a developer experience and a market share compared with native apps?

I think it’s going to get a lot easier, as these new tools come out that make it easier for developers, and not only developers but also designers, that you can drag-and-drop and create your default application really quickly, and then the designer can hand it off to a developer that would actually code it. I think that is going to be huge as more people see the power of what you can do with HTML5, create really rich, really native looking apps and then be able to put that in different stores is really important for developers. So I think it’s going to get easier as we get more tools, we standardize, it’s the web, so there are companies like your Firefox and your Chrome creating really good tools that developers can use, so I see it getting easier for developers and I am looking forward to see what can developers create using those tools in the future.

Dio: Thank you very much Enda!

Thank you!

Jan 23, 2013

BT