iPhone vs. Android Development

Posted:
in iPhone edited January 2014
«1

Comments

  • Reply 1 of 38
    addaboxaddabox Posts: 12,665member
    Hmmmm..........



    Guy who calls himself "JavaCowboy" links to article at "JavaLobby" by a guy who announces he has 12 years Java dev experience tempered by "a few years" of C and C++ work, turns out Java wins.



    Go figure.
  • Reply 2 of 38
    shrikeshrike Posts: 494member
    Not really interesting at all.



    The developer geeks can commiserate all that want on quality of tools. It's really a second order driver to the success of the platform. The only important thing is the capability of the platform to take money out of people's pockets and put them into a publisher's/developer's pocket.



    The quality of the SDK is at best only a second order driver. So, set up the business first. The quality of the SDK can come later, if it really matters that much. It just has to be good enough. On the bright side for the iPhone OS X SDK, it's got over 20 years of heritage with advances still be leverage. Perhaps its one big advantage is its capability to build user interfaces, and they won't be overtaken. So, it's on a good path.
  • Reply 3 of 38
    shrikeshrike Posts: 494member
    Quote:
    Originally Posted by addabox View Post


    Hmmmm..........



    Guy who calls himself "JavaCowboy" links to article at "JavaLobby" by a guy who announces he has 12 years Java dev experience tempered by "a few years" of C and C++ work, turns out Java wins.



    Go figure.



    Not only that, I lay 50/50 odds that the majority of Android app development will be done in the native development kit (C/C++) within the next 2 years. Dalvik may be dead in 3.
  • Reply 4 of 38
    carniphagecarniphage Posts: 1,984member
    Quote:
    Originally Posted by JavaCowboy View Post


    Interesting article:



    http://java.dzone.com/articles/andro...ne-development



    It's a bit biased.



    Clearly the writer prefers the Java language to Objective-C.



    But he seems to be missing something. Phones and other mobile devices are the most feeble computers we have to use. Applications that run through pseudo-code and require unpredictable garbage collection make these weak little computers even slower.



    Developer comfort and convenience is important. But the most important issue is delivering a great experience for users.



    Looking across Symbian, WindowsMobile, WebOS, Android and iPhone - I'd argue that iPhone seems to be the most successful at delivering applications that consumers want to buy.



    C.
  • Reply 5 of 38
    irelandireland Posts: 17,798member
    You'll make more money on the iPhone platform.
  • Reply 6 of 38
    javacowboyjavacowboy Posts: 864member
    How is Java's garbage collection, which uses sophisticated memory-monitoring algorithms that have been developed and re-engineered over the 14-year life of the platform "unpredictable"?



    As for the success of the iPhone platform: It has everything to do with the popularity and size of the consumer ecosystem, and little to do with the quality of the development tools. The author of the article alluded to the fact that he believes that the iPhone has a better business model.



    Quote:
    Originally Posted by Carniphage View Post


    It's a bit biased.



    Clearly the writer prefers the Java language to Objective-C.



    But he seems to be missing something. Phones and other mobile devices are the most feeble computers we have to use. Applications that run through pseudo-code and require unpredictable garbage collection make these weak little computers even slower.



    Developer comfort and convenience is important. But the most important issue is delivering a great experience for users.



    Looking across Symbian, WindowsMobile, WebOS, Android and iPhone - I'd argue that iPhone seems to be the most successful at delivering applications that consumers want to buy.



    C.



  • Reply 7 of 38
    javacowboyjavacowboy Posts: 864member
    Quote:
    Originally Posted by Shrike View Post


    Not only that, I lay 50/50 odds that the majority of Android app development will be done in the native development kit (C/C++) within the next 2 years. Dalvik may be dead in 3.



    More likely the Google will re-engineer their Harmony-based Java implementation along the lines of Sun's work on introducing modularity and selective loading of sub-sections of the runtime/API's at runtime. Hell, there's nothing stopping them from offering a language like Scala to Android developers.



    Why do you think J2ME was the mobile application development platform of choice for several years (and arguably still is) ? Probably because Sun's engineers know what they're doing.
  • Reply 8 of 38
    tenobelltenobell Posts: 7,014member
    Because HTML/CSS/JavaScript weren't ready yet.



    Quote:
    Originally Posted by JavaCowboy View Post


    Why do you think J2ME was the mobile application development platform of choice for several years



  • Reply 9 of 38
    carniphagecarniphage Posts: 1,984member
    Quote:
    Originally Posted by JavaCowboy View Post


    How is Java's garbage collection, which uses sophisticated memory-monitoring algorithms that have been developed and re-engineered over the 14-year life of the platform "unpredictable"?



    As for the success of the iPhone platform: It has everything to do with the popularity and size of the consumer ecosystem, and little to do with the quality of the development tools. The author of the article alluded to the fact that he believes that the iPhone has a better business model.



    You do know how garbage collection works?



    The engine tracks heap memory usage, and periodically has to "defrag" memory.

    Moving used-data together, and unused data blocks into a single contiguous block.

    When it moves used data it also has to amend all the pointers.



    This is not free



    The collection may happen in the middle of a performance sensitive event. On a slow mobile device the whole process might cause a noticeable stall.



    Objective C 2.0 does support garbage collection, but not on the iPhone, I am guessing for this exact reason.



    Automatic garbage collection is about making life easier for programmers. But that easiness comes at a price - and that price is performance.



    C.
  • Reply 10 of 38
    javacowboyjavacowboy Posts: 864member
    You're missing the whole point of managed runtimes. The point isn't to "make life easier from programmers", as though we were all lazy and should pull up our bootstraps and do "proper" programming by manually assigning our pointers.



    The point of managed runtimes like Java is to shorten the development cycle and to allow medium-level programmers to exist, the kinds of people who aren't superstars but who need to concentrate on business logic and overall performance.



    Using low-level languages like C and Assembly has lots of costs:



    1) Expense of l337 programmer who can handle memory management while concentrating on business logic and performance.

    2) Additional testing.

    3) Maintainability of code.



    There are situations where performance is the overriding consideration. An example is kernel programming. However, you have to acknowledge that the costs I outlined above.



    Quote:
    Originally Posted by Carniphage View Post


    You do know how garbage collection works?



    The engine tracks heap memory usage, and periodically has to "defrag" memory.

    Moving used-data together, and unused data blocks into a single contiguous block.

    When it moves used data it also has to amend all the pointers.



    This is not free



    The collection may happen in the middle of a performance sensitive event. On a slow mobile device the whole process might cause a noticeable stall.



    Objective C 2.0 does support garbage collection, but not on the iPhone, I am guessing for this exact reason.



    Automatic garbage collection is about making life easier for programmers. But that easiness comes at a price - and that price is performance.



    C.



  • Reply 11 of 38
    carniphagecarniphage Posts: 1,984member
    Quote:
    Originally Posted by JavaCowboy View Post


    You're missing the whole point of managed runtimes. The point isn't to "make life easier from programmers", as though we were all lazy and should pull up our bootstraps and do "proper" programming by manually assigning our pointers.



    I'm not saying there is anything wrong with development environments which reduce the cost of software production. My reason for hating the PS3 is exactly that. It's more expensive to a game on a PS3 than an identically performing game on a 360.



    But back to phones...



    If you look closely at Cocoa (formerly NextStep) that was the whole purpose of it. Cocoa provides a slew of robust prefabricated components that do all the tedious stuff that applications are made of.



    So when making a new application, all the programmer has to do is create the unique objects for the App - and design an interface. This makes writing some applications very fast indeed - even if the programmer has to watch his memory Ps and Qs.



    In X-Code - after you press build, you end with a native-code application which not only was pretty easy to create, but is fast, compact and takes advantage of the GPU for all the UI animation. For free.



    For a mobile device this is a sweet spot. Because mobile devices are short on power. Anything that can save cycles or offload work to the GPU is a good thing.



    Java, on the other hand, gets you an interpreted app. Which in a lot of contexts is perfectly fine, but on a mobile device is a less than ideal solution. Many commercial mobile apps are games - and games are particularly demanding on performance.



    Put another way, serious game programmers avoid anything that compromises performance.



    C.
  • Reply 12 of 38
    javacowboyjavacowboy Posts: 864member
    Quote:
    Originally Posted by TenoBell View Post


    Because HTML/CSS/JavaScript weren't ready yet.



    Still isn't ready. HTML/CSS/JavaScript do not constitute a common runtime. They're text, to be interpreted by whichever browser happens to be running them. Even if you wipe out every installation of IE from the planet, each browser still has its quirks. One example is table element widths in Safari, which can only be specified in pixels (and not percentage).



    Another thing is that, aside from Palm's WebOS, no mobile platform uses HTML/CSS/JavaScript.



    So, no, you'll have to give me another explanation for why J2ME took off.
  • Reply 13 of 38
    shrikeshrike Posts: 494member
    Quote:
    Originally Posted by Carniphage View Post


    Put another way, serious game programmers avoid anything that compromises performance.



    Not just games, but basically any application of significance requires every iota of performance that can be squeezed out of the platform.
  • Reply 14 of 38
    taurontauron Posts: 911member
    Android is crap and will enter the realm of oblivion pretty soon or be relegated to use by a geeky minority, the same people who enjoy wasting time building their own PCs.
  • Reply 15 of 38
    vineavinea Posts: 5,585member
    Quote:
    Originally Posted by Carniphage View Post


    Java, on the other hand, gets you an interpreted app.



    It's not interpreted. It's compiled...with a JIT compiler which takes the bytecode and compiles it to native and runs that. Or in the case of Hotspot, after a little bit and only the bits that are run a lot.



    The biggest cost penalty is startup delay, not execution speed.



    For managed code (.NET) you can ngen it. All that does is precompiles from CIL to native but the optimizations might not be as good as the JIT can manage over time.



    The biggest problem for Dalvik is no JIT and no Jazelle (hardware acceleration). But it does some optimizations with it's own bytcode and has a different architecture from most JVMs.
  • Reply 16 of 38
    tenobelltenobell Posts: 7,014member
    Quote:
    Originally Posted by JavaCowboy View Post


    Still isn't ready. HTML/CSS/JavaScript do not constitute a common runtime. They're text, to be interpreted by whichever browser happens to be running them. Even if you wipe out every installation of IE from the planet, each browser still has its quirks. One example is table element widths in Safari, which can only be specified in pixels (and not percentage).



    I thought we were talking about mobile platforms where IE has next to no influence. HTML/CSS/Javascript are coming together and is the major web development platform of the future.



    Quote:

    Another thing is that, aside from Palm's WebOS, no mobile platform uses HTML/CSS/JavaScript.



    What are you talking about. Both the iPhone and Android fully support apps built in HTML/CSS/Javascript.



    On Apple's website they highlight over 4000 apps built in javascript, all of Google's in-house apps are built in javascript.



    Quote:

    So, no, you'll have to give me another explanation for why J2ME took off.



    How do you define "took off"? I don't see the best most innovative developers running to J2ME, and don't see the best most innovative apps being created in J2ME.
  • Reply 17 of 38
    shrikeshrike Posts: 494member
    Quote:
    Originally Posted by JavaCowboy View Post


    More likely the Google will re-engineer their Harmony-based Java implementation along the lines of Sun's work on introducing modularity and selective loading of sub-sections of the runtime/API's at runtime. Hell, there's nothing stopping them from offering a language like Scala to Android developers.



    They put in the work to release a native C/C++ development kit for "performance sensitive" applications. If they keep this SDK to only exclusive parties, then we'll know if they are religious about Java. If not, we will see what Android consumers prefer. 50/50.



    Quote:

    Why do you think J2ME was the mobile application development platform of choice for several years (and arguably still is) ? Probably because Sun's engineers know what they're doing.



    I see this as more a damning with faint praise comment. Perhaps J2ME was part of the problem in the poor mobile applications business as the mobile apps business was regressing until Apple came out with the App Store model.



    And speaking of damning with faint praise, perhaps JAVA (ie, Sun) should have thought what a profitable business model should have been instead of attempting to take on Microsoft on their turf and trying to prop up the java platform. They (a hardware company at heart) seemed to not know how to make money with the hardware agnostic platform strategy they went with.
  • Reply 18 of 38
    vineavinea Posts: 5,585member
    Yah...Sun...the new Xerox PARC. Nice tech, horrible business models.



    Somehow I don't think Oracle will do any better.
  • Reply 19 of 38
    javacowboyjavacowboy Posts: 864member
    Quote:
    Originally Posted by Shrike View Post


    They put in the work to release a native C/C++ development kit for "performance sensitive" applications. If they keep this SDK to only exclusive parties, then we'll know if they are religious about Java. If not, we will see what Android consumers prefer. 50/50.



    Riiight...Google chose Java because of religion. Maybe they chose it because it's a large ecosystem and has an army of developers ready to code in it. Besides, there's nothing stopping them from coming up with a new and improved JNI to allow low-level programming.



    Quote:

    I see this as more a damning with faint praise comment. Perhaps J2ME was part of the problem in the poor mobile applications business as the mobile apps business was regressing until Apple came out with the App Store model.



    J2ME had business support from the service providers. It still does. For instance, most Blackberry apps are written in J2ME. That's hardly a failed business model to me. There's a larger mobile ecosystem than just the iPhone.



    Quote:

    And speaking of damning with faint praise, perhaps JAVA (ie, Sun) should have thought what a profitable business model should have been instead of attempting to take on Microsoft on their turf and trying to prop up the java platform. They (a hardware company at heart) seemed to not know how to make money with the hardware agnostic platform strategy they went with.



    First of all, Java is the world's most popular programming language and the preferred platform for enterprise development. Sun makes a tidy profit from its Java division, so your comment about Java being unprofitable is just nonsense.



    As for Sun trying to take on Microsoft in its own turf, despite Scott McNealy's rhetoric, this really isn't accurate since Sun originally licensed Java to Microsoft and Microsoft broke the deal. Sun has for the majority of Java's life focused on the server side of the market.



    Sun lost for different reasons.
  • Reply 20 of 38
    javacowboyjavacowboy Posts: 864member
    Quote:
    Originally Posted by vinea View Post


    Yah...Sun...the new Xerox PARC. Nice tech, horrible business models.



    Somehow I don't think Oracle will do any better.



    So....Oracle goes from being a database vendor to a database + middleware + ERP vendor and is now offering the full stack of client + middleware + server + database + + operating system + hardware, and you think they're going to fail?



    Don't get me wrong, they're absolutely brutal. What they did to WebLogic customers wasn't pretty. However, these guys know how to make a buck.
Sign In or Register to comment.