7 ms·
Is it possible to write good mobile apps in JS and HTML, compared to Android or iOS? I don't know much about mobile programming, but it seems much harder for JS
by vijayr 12y ago
Is it possible to write good mobile apps in JS and HTML, compared to Android or iOS? I don't know much about mobile programming, but it seems much harder for JS to compete with native apps, no?
- je_bailey 12y agoIt all depends on the hooks that Mozilla provides to the JavaScript developers. These hooks are the way that the web page can interact with the phones built in hardware. If these API's are sufficient then there is no reason that these apps can't execute as well as an app on any other phone.
- on_and_off 12y agoThe startup I work for was approached some time ago by Firefox in order to ship our app on FFOS (our app has ~1 million daily users, so we regularly have this kind of proposals). I did not participate in this firsthand, but from what I gathered from my colleagues, the FFOS SDK is so atrocious that sadly the idea of porting our app to this OS is laughable. On the other hand, we are fully committed to our iOS and Android app (in objc & java) and are mostly satisfied by these two SDKs. It might be an unfair comparison though, Google and Apple have had way more time than Mozilla to improve their respective SDKs.
- SwellJoe 12y agoI tinkered with Android development when the original Google Developer Phone came out (aka G1). And, after years of not paying it any attention, because my focus was on server development, I've started learning my way around it again. It's not even the same world. So much of the tedium of developing in Java has gone away, due to better libraries, much better tooling, and just all around a bigger/better ecosystem. Making apps for Android, even without starting with a third party framework or tool, is vastly less time-consuming than it used to be. I believe it's fair to say Firefox OS SDK will get better. I suspect we'll see interesting things happen just because it is primarily JavaScript+HTML5. There are a half dozen (or more) projects to make it possible to make Android and iOS apps in JavaScript, and they're popular, despite having dramatically less support and tooling available (as much as I hate Java, and I really do hate Java, Android Studio almost makes it tolerable). I haven't seen the Firefox OS SDK yet, though I plan to check it out, and pick up some kind of dev phone soonish, but I would bet that it's at least on par with some of the early JavaScript+native frameworks cropping up lately. Stuff like Ionic, React Native, etc. All of those are new and sloppy and don't have settled toolchains, etc. But, the desire to work in JavaScript instead of ObjC or Java is pretty strong for many people, as evidenced by the huge quantity of people doing it despite it probably being more effort than coding in the standard language of the platform. I think it's kinda like desire paths: https://en.wikipedia.org/wiki/Desire_path https://en.wikipedia.org/wiki/Desire_path JavaScript is the path a lot of people want to walk for making mobile apps. Firefox OS is the first to make it the primary way to develop apps for the platform. I suspect the application developer uptake will be very rapid; probably more rapid than previous platforms, and more rapid than the actual user uptake. This is a platform that allows you to use your existing web development skills right out of the box...and there are a lot more web developers than Java or ObjC developers in the world.
- jbigelow76 12y agoJavaScript is the path a lot of people want to walk for making mobile apps. Firefox OS is the first to make it the primary way to develop apps for the platform. It has been possible to write fully native (not webview wrappers) Windows Phone apps in HTML and JavaScript for the last four or so years, but web developers didn't really adopt the platform (and those that did primarily used C# and XAML). You can scoff that it was something to do with Windows Phone OS's abysmal market share but then I don't see how you would be able to draw a different conclusion that FFOS will fare any better.
- SwellJoe 12y agoTwo things: 1. I had no idea you could make native Windows Phone apps in HTML. This may be a failing on my part for having less than zero interest in Windows Phone (though I find my dislike of Microsoft has faded quite a bit, as they've embraced more openness and more fair dealings with the rest of the world). 2. I don't think we mean the same thing when I say "the primary way to develop apps for the platform". I googled "how to develop windows phone apps" and followed the trail to the most obvious seeming instructions, and found this in the Microsoft Dev Center: "When you create a new project, you also make the following selections: Your preferred programming language - Visual C#, Visual Basic, or Visual C++." So, if JavaScript+HTML5 is a good, and "official", way to make apps for Windows Phone, somebody needs to tell Microsoft, because they don't seem to realize it.
- pjmlp 12y agoWell, maybe you should improve your Google-fu "Get started with Windows Runtime apps. You can write a Windows Runtime app in a variety of languages, such as C# or C++ with XAML, C++ with DirectX, and JavaScript with HTML/CSS. Now you can easily create apps for Windows devices and Windows Phone from a single project." Taken from https://dev.windows.com/en-us/getstarted https://dev.windows.com/en-us/getstarted Free trainings and ebooks: http://www.microsoftvirtualacademy.com/training-courses/developing-windows-store-apps-with-html5-jump-start http://www.microsoftvirtualacademy.com/training-courses/deve... http://blogs.msdn.com/b/microsoft_press/archive/2012/10/29/free-ebook-programming-windows-8-apps-with-html-css-and-javascript.aspx http://blogs.msdn.com/b/microsoft_press/archive/2012/10/29/f...
- fabrice_d 12y agoI'm interested in knowing more what makes developing for Firefox OS "atrocious". There's no sdk per se, and maybe this is what bothers you. If you have no web version of your app and not seasoned web developers then for sure the porting effort can be almost a full rewrite, but so it is with any new "native" platform.
- z3t4 12y agoIsn't the point of JS that you do not need an SDK!? If I need to use something else then notepad to write a program for FFOS - that would be a big turn-off.
- quanticle 12y agoI think you're mistaking a SDK (software development kit) with an IDE (integrated development environment). A SDK is nothing more than a set of libraries that allow you to write code for the target hardware. In this case, the SDK consists of a Firefox extension that you can install, which gives you an emulator that will simulate the phone hardware. You can totally write FirefoxOS apps in Notepad if you want to. It is just HTML, CSS and Javascript (and a JSON manifest that tells the OS where the entry point for your app is).
- z3t4 12y agoI thought the whole point of Firefox OS was that the hardware layer would be accessed through JS API's like window.ondevicemotion, Canvas, navigator.geolocation, window.DeviceOrientationEvent, navigator.getUserMedia, navigator.vibrate, 'devicelight', navigator.battery.level, SMS, contactList, etc. And that the Firefox team would add even more features that can be accessed from the VM layer. And making the Firefox OS the most secure OS by adding app permissions. And that the VM could not be bypassed unless the computer gets re-flashed. This might sound funny, but considering Moore's law and where we currently are on that exponential curve, making a fully virtual OS will be the next step in the PC evolution. You shouldn't have to write low level interrupts or accept that apps need full root access anymore.
- quanticle 12y ago>This might sound funny, but considering Moore's law and where we currently are on that exponential curve, In case you haven't noticed, the exponential curve has already started to level off. Moore's Law is done. Every incremental improvement from Intel offers smaller and smaller improvements, as transistor sizes run into fundamental physical limitations imposed by quantum mechanics and thermal and battery-life constraints impose limitations on the amount of power a chip can use. Combine that with fact that RAM speed stopped scaling about a decade ago, and the conclusion is clear. Moore's Law isn't ending. It's already gone. As far as desktop application developers are concerned, Moore's Law ended about a decade ago when single-thread performance plateaued. Yes, we have more and more cores, and more and more cache. But the cache is only there to make up (poorly) for the fact that RAM speeds haven't scaled. And more cores don't help, because most desktop applications don't parallelize easily beyond ~2 threads. Yes, the user is able to run more applications at the same time, but each individual application is still running at about the same speed.
- leppr 12y agoCorrect me if I'm wrong but I don't think you can write native apps for Android or iOS either. Also recently there's been way more effort on improving JavaScript VMs than Java's.
- Grazester 12y agoOn the latter, why is that? Is it that Java's VM is already very mature and the community doesn't feel that urgency on "improving" it? Another question. What does Java VM have to do with Android?
- leppr 12y agoI'm not a mobile developer so you shouldn't ask me but basically because of web browsers there's a JS VM in every PC and smartphone nowadays which isn't necessarily the case with Java. And Android runs its applications on a Java VM called Dalvik: http://en.wikipedia.org/wiki/Dalvik_(software) http://en.wikipedia.org/wiki/Dalvik_(software)
- Grazester 12y agoDalvik is not a Java VM though it is a VM. As of Lollipop Android left the whole VM thing behind and moved to ART so there is no stagnation on that front You linked to the page that states it all but its like you didn't bother to read it yourself.
- Gurkenmaster 12y agoDalvik is a joke, even v8 is faster than it and it's not a JVM. That's why Oracle was trying to sue Google.
- archagon 12y agoI'm pretty sure that's wrong on both counts. Android has the NDK and iOS apps can be written in straight C/C++.
- leppr 12y ago
- jrochkind1 12y agoI think it might depend on the OS. In iPhone or Android, I think it is possible to write a 'good' mobile app, but not as good as the native apps. In Firefox OS, an OS designed from the start with the idea of JS/HTML apps? I don't know, we'll see, I guess!
- leonhandreke 12y agoI briefly looked at Firefox OS a few months ago and my conclusion was that the primary issue was neither JS nor HTML but rather that there is no canonical UI framework for the OS (please correct me if I'm wrong here). This means that there is no consistent look and feel across apps.