TAKEAWAY: William J. Francis lists some pros and cons about using Corona SDK for app developers who might consider using the cross-platform technology for a project.
Mobile developers are confronted by a duopoly. , but there is no clear winner in terms of market share. If you want to get your app in the hands of the masses, you really need to be on both platforms.
If you have the time and the resources, the simple solution is to write two apps. Start on whichever platform you feel most comfortable with, then port (or hire someone to port) your app to the other operating system. But the reality for most indie developers is that they don't have the required time or the resources. Even large corporations that have the ability to create two separate apps are hesitant to do so because of the amount of work required to support and maintain two applications over the life of a product.
Fortunately, writing one app for and another for is not the only option. The number of cross-platform technologies and tools for mobile devices is growing in terms of quantity and quality.
TERMINOLOGY
If you're new to the mobile space, you may be curious about the difference between a native and a cross-platform approach to mobile applications. In general, native development means using the platform-specific tools provided for the mobile operating system. In the case of Android, this normally means Java and the (software development kit).
Mobile cross-platform development approaches vary greatly. There are web apps that run inside of a browser (either standalone or embedded into a container to more closely mimic a native application). There are also approaches that include their own runtime, like the now defunct Adobe Air. And there are tools that allow you to write the code in an abstracted scripting language, and then generate native code at compile time.
Each of these development techniques has advantages and drawbacks. My suggestion is to try to approach each project with an open mind and do your best to select the tool that fits best for a particular scenario.BACKGROUNDI have written a number of Android applications. Most of these are commercial business applications in various vertical markets, and all but one were created as native Android/Java apps -- the exception being a web app.
Last year ; it, too, was a native Android/Java application. While I was pretty pleased with the end result, the thought of starting my development effort over kept me from releasing an iOS version. When I began working on my second game (due out later this year), I chose to move away from the native Android programming environment and use .
Corona SDK is a cross-platform technology that utilizes scripting to abstract the application development from a specific mobile operating system. The application can be tested on a simulator and then compiled into native code for Android or iOS. What follows are some pros and cons I hope will be of interest to developers considering Corona SDK for an upcoming project.
OBSERVATIONSPROS
* In general, it takes significantly less code to implement a given functionality with Corona than the Java equivalent. In particular, dealing with REST services and are greatly simplified by Corona.
* The Corona simulator runs circles around the Android emulator Google ships with its SDK. It is very easy to change the skin of the Corona simulator to represent a wide array of Android and iOS devices.
* Corona scales graphics brilliantly. The system used by Corona for choosing the best asset for a particular device, as well as its ability to auto-scale, seems more intuitive than the native Android approach, and it seems to work better as well.
* Setting up the development environment takes just minutes and is much less convoluted than installing Android's Eclipse/SDK/plugin environment.
* A CORONA APP'S BIGGEST ADVANTAGE: It compiles for both iOS and Android.
CONS
* Debugging Corona applications can be painful. I have not found a good IDE or debugger, and the result is troubleshooting even simple issues can be tedious.
* Lua's loose syntax is ugly. Even an experienced and disciplined programmer will have to work very hard not to end up with spaghetti code. Corona's storyboard API helps when it comes to organizing the code, but compared to a strictly typed and scoped Java application, it leaves a lot to be desired.With Corona, it is very easy to introduce memory leaks; plus, it can be a bear to find those leaks.
* Some seemingly simple user interface elements have zero or crude support. A good example is popping up and using the keyboard on a device with a standard input field. This is a pretty common occurrence for a large number of applications, yet the limited support for this in Corona can result in a clunky or non-standard user interface.
* CORONA'S BIGGEST DRAWBACK: Google's Android SDK and Apple's iOS development kits are free. There is free edition of the Corona SDK, but to get the full set of features. More than that, Corona works on a subscription model, so you have to take that $600 hit every year to keep your subscription current.
JUST HOW DIFFERENT IS CORONA DEVELOPMENT VS. NATIVE ANDROID DEVELOPMENT?
Below are "hello world" examples implemented using Google's SDK and Corona's, respectively. It is impressive how little code is required in the Corona version. At the same time, the resulting application doesn't look particularly like an Android or an iOS app; this means that everything you do with Corona will be more or less a custom implementation. If you want your app to have the look and feel of the other apps that ship with the user's device, you may find yourself struggling. Furthermore, Corona apps largely ignore systemwide settings like themes and locales.
Native Android Hello World
PACKAGE com.authorwjf.helloworld;
import android.app.Activity;
IMPORT android.os.Bundle;
IMPORT android.widget.TextView;
public CLASS HelloWorldActivity EXTENDS Activity {
/** Called when the activity is first created. */PUBLIC VOID onCreate(Bundle savedInstanceState) {
SUPER.onCreate(savedInstanceState);
TextView text = NEW TextView(THIS);
text.setText("Hello World!");
setContentView(text);Corona SDK Hello World
local myTextObject = display.newText( "Hello World!", 0, 0)
CONCLUSIONS
Corona SDK is one of many cross-platform tools. Corona is clearly targeted at game development and for that purpose I have been pleased with it. That said, after using it for several months, I do not recommend it for a traditional business app (despite what the Corona website claims). While it greatly simplifies graphics manipulation, it complicates widget-heavy user interfaces.
Full Post
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment