Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Iphone OS X Operating Systems Programming Apple

Cross With the Platform 307

Tim Bray tweeted, No platform has hit the big time till it's been flamed by JWZ. He was referring to this rant in which Zawinski systematically dismantles any claim the iPhone has to cross-platform compatibility. "I finally got the iPhone/iPad port [of Dali Clock] working. It was ridiculously difficult, because I refused to fork the MacOS X code base: the desktop and the phone are both supposedly within spitting distance of being the same operating system, so it should be a small matter of ifdefs to have the same app compile as a desktop application and an iPhone application, right? Oh ho ho ho. I think it's safe to say that MacOS is more source-code-compatible with NextStep than the iPhone is with MacOS. ... they got some intern who was completely unfamiliar with the old library to just write a new one from scratch without looking at what already existed. It's 2010, and we're still innovating on how you pass color components around. Seriously?"
This discussion has been archived. No new comments can be posted.

Cross With the Platform

Comments Filter:
  • UIKit != AppKit (Score:5, Interesting)

    by Anonymous Coward on Monday April 19, 2010 @05:01AM (#31893772)

    The OS is the same, but UIKit is NOT the AppKit. It's like bitching against linux when trying to build your Qt code against gtk.

    • Re:UIKit != AppKit (Score:5, Insightful)

      by phantomfive ( 622387 ) on Monday April 19, 2010 @05:35AM (#31893926) Journal
      He does have a point though, and I have also felt that while UIKit gets the important things right, it feels a little rushed around the edges. And it was rushed, so that's not surprising.

      His example there is pretty clear, instead of using the perfectly good class NSColor, they rewrote it differently as UIColor, leaving some important functionality out. You can deal with it, sure, but it's kind of annoying.

      Still, I don't know who was expecting any sort of compatibility on the GUI portion of the iPhone, since the paradigm is completely different. It doesn't even make sense to think that you wouldn't have to rewrite the front end. On the other hand, I haven't found any problem porting C code or C++ code to the iPhone; I don't claim to be an expert but it does use GCC. In other words, it is highly compatible with existing code, but you'll have to rewrite your user interface. Which is probably what you were planning on doing anyway.
      • Re: (Score:3, Insightful)

        by Sir_Lewk ( 967686 )

        it is highly compatible with existing code... ...but you'll have to rewrite...

        *head kersplode*

    • by Linker3000 ( 626634 ) on Monday April 19, 2010 @06:52AM (#31894200) Journal

      Meh - the fix to get the Dali clock working is trivial - rename all pointers to smell like the colour yellow, and change all LONGINTs to SURREALs.

    • Re:UIKit != AppKit (Score:5, Insightful)

      by Chris Mattern ( 191822 ) on Monday April 19, 2010 @07:40AM (#31894342)

      It's like bitching against linux when trying to build your Qt code against gtk.

      It's like bitching against something billing itself as "Linux desktop compatible" when your Qt code isn't supported on it, only gtk. Which would be a legitimate gripe; "Linux desktop compatible" should support Qt as well as gtk.

      • by guruevi ( 827432 )

        It should also support native X11, Blackbox, Enlightenment, perlwm, PLWM and WindowMaker.

        • Not necessarily directly, but it should not ban the users or developers from installing these if they wish so.

          OTOH, it could just claim it's Linux Gnome and GTK compatible.

  • by syousef ( 465911 ) on Monday April 19, 2010 @05:06AM (#31893796) Journal

    #ifdef APPLE_HARDWARE
          doItTheirWayOrHitTheRoad();
    #endif

    You complaining about a company that retains control of whether or not you can release the app to the device even if it conforms perfectly to their APIs. If that's not a deal breaker for you why do you think that complaining about shitty incompatible frameworks or passing colour components on slightly different programs is going to worry them? You're wasting your breath.

    • by 10101001 10101001 ( 732688 ) on Monday April 19, 2010 @07:07AM (#31894260) Journal

      You complaining about a company that retains control of whether or not you can release the app to the device even if it conforms perfectly to their APIs.

      Um, not quite. The company doesn't control whether you can release the app to a device. The company controls whether the app will run on a device (either by buying the app through an app store or paying a set fee to the company). This isn't too far off from the XBox 360, either. To some extent, it's not that far off from most any commercial library/OS (the main difference is whether you effectively pay the fee upfront or whether they try to nickel and dime you later).

      If that's not a deal breaker for you why do you think that complaining about shitty incompatible frameworks or passing colour components on slightly different programs is going to worry them?

      Apparently the Dali Clock is a rather old program (nearly 20 years) that's been ported to a variety of platforms. Presumably, the author chose to port the Dali Clock to the iPhone precisely because it was supposed to be relatively trivial to port from a Mac OS X version. The blog highlights how untrue that ended up being; comments on the blog suggest it's because Apple provided multiple graphical APIs and if the author had been lucky several years ago, he would have chosen the one that worked on the iPhone.

      In short, it doesn't sound like the author bought his iPhone to write apps for it. It was more a porting exercise to see just how trivial the task would be.

      You're wasting your breath.

      No doubt. But, then, most blogs are a "[waste of breathe]". These comments, both yours and mine, would likely qualify as well. I don't think that'll stop me from commenting or considering the blog for what it is, a recognition of Apple having the same sort of failings that Microsoft does: designing too many APIs/interfaces/file formats, dropping support for them whenever they can, and generally being about as bad as any other platform when it comes to having a unified, solid solution to the many problems that exist for the developers. I will give Microsoft some credit, though, for generally waiting longer than most public, commercial software companies in maintaining strict backwards compatibility.

      • by Anonymous Coward on Monday April 19, 2010 @07:25AM (#31894296)

        "I will give Microsoft some credit, though, for generally waiting longer than most public, commercial software companies in maintaining strict backwards compatibility."

        I no longer program, I moved on to a field where computers are ancillary to my line of work and happy about the reboot, but I remember this being the case even a few years back. Microsoft maintains strict backwards compatibility at all risks.

        And this is the big difference between Microsoft and Apple. Microsoft cares more for their developers and the companies that make money off of them than they do their users. Apple cares more about the users than they do about the developers.

        Microsoft has routinely left in holes in their OS that can't be easily fixed because a major software developer can't be bothered to fix their software.

        Apple, on the other hand, I've seen them send out pretty terse notes to their major developers letting them know that if they don't change their use of an unexposed API (one they found has a hole it in...generally why Apple doesn't doesn't publish APIs until it is ready because they want to make certain it is ready for public...and apparently it applies to the iPhone as well)...and Apple will specifically tell major software houses that if their software isn't fixed in 30 days, it will cease working for anyone that updates their computer.

        That said, I don't really care for Apple's walled garden approach to the iPhone and for those of us nerds, it is a major problem (I've had to jailbreak just for simple things like Googlevoice front ends...or tethering)...for the average user? not a problem. The point is, Apple cares far more for the user than the developer. Microsoft doesn't give a fuck about the user so long as the developers are happy.

        So give credit to Microsoft for maintaining backwards compatibility, but you are just thanking them for providing a buggy OS that allows viruses to run rampant.

  • the desktop and the phone are both supposedly within spitting distance of being the same operating system, so it should be a small matter of ifdefs to have the same app compile as a desktop application and an iPhone application, right?

    And at the core, they are - they share a large amount of code, with iPhone OS running a slightly modified version of the Darwin kernel. Where they diverge though, might have something to do with the whole UI being completely different. I assume he just didn't realise that the UI was different, since that seems to be the level of discourse available. So an app written for OS X, using a window manager with a point and click mouse and variable screen res, just dropped right onto a fixed resolution, touchscreen

    • by SharpFang ( 651121 ) on Monday April 19, 2010 @05:37AM (#31893932) Homepage Journal

      The problem is not that the UI is -completely- different.

      It's an UI that is massively the same, just ran through a bulk rename, shuffle parameters order around in function calls and explode/implode some methods / typical sequences.

      The UI -could- have been VERY similar, with only minimal differences easy to #ifdef through - the underlying philosophy is. Instead, there was some active effort put in making it totally incompatible, where making it compatible would be easier and more obvious.

      A typical case of "an extra week of writing code can save you a hour you'd spend on reading documentation instead."

      • Re: (Score:3, Insightful)

        by bar-agent ( 698856 )

        The problem is not that the UI is -completely- different.

        It's an UI that is massively the same, just ran through a bulk rename, shuffle parameters order around in function calls and explode/implode some methods / typical sequences.

        The UI -could- have been VERY similar, with only minimal differences easy to #ifdef through - the underlying philosophy is.

        No, the UI is completely different. Events are completely different, because of multi-touch-related stuff, and consequently, everything else needed to be rewr

    • by elrous0 ( 869638 ) *
      IF he thinks that's hard, he should try using the Java GUI on an Android app sometime.
  • by el_flynn ( 1279 ) on Monday April 19, 2010 @05:21AM (#31893872) Homepage

    In TFA, JWZ said "It was ridiculously difficult, because I refused to fork the MacOS X code base: the desktop and the phone are both supposedly within spitting distance of being the same operating system, so it should be a small matter of ifdefs to have the same app compile as a desktop application and an iPhone application, right?"

    FLAMESUIT ON
    At the risk of being shot down by every MacOS/iPhone hacker here... There are two main points that JWZ makes which are quite interesting:

    1) I refused to fork the MacOS X code base
    2) the desktop and the phone are both supposedly within spitting distance of being the same operating system

    So the beef he has, while totally valid is because of:

    a) refusal to fork the codebase
    b) assumed that both iPhone OS == MacOS X

    Hmm. I understand the refusal to fork the codebase, but if that's what's _required_ then that's what needs to be done to have the app on the iPhone. And what's the other bit about "assume" making an ass out of you and me? Ditto for the OpenGL/OpenGLES rant...
    FLAMESUIT OFF

    • by SharpFang ( 651121 ) on Monday April 19, 2010 @05:29AM (#31893902) Homepage Journal

      IF the code requires forking, THEN it should have no pretenses about being cross-platform compatible.

      Which was the original point.

      It's not a complaint that iPhone is devilishly difficult to program. It is not. The complaint is that it's devilishly difficult to write an iPhone/desktop cross-platform compatible app, which should have been easy if the device actually was cross-platform compatible.

      • by mwvdlee ( 775178 ) on Monday April 19, 2010 @06:43AM (#31894156) Homepage

        I don't really care about developing for any Apply product myself, so I haven't looked into it in-depth, but does Apple actually claim OS-X and iPhone development is cross-platform compatible?

      • So after the decades of the Slashdotters complaining about MacOS being MacOS, thier complaint about the iPhone OS is that it's NOT MacOS? What IS the OP smoking? Where where all of you when it was made abundantly clear that the iPhone and especially the iPad were not to be treated as shrunken down Macs? And throw away any of that objection about the iPhone not being "open" that argument leaves the building when you decide to develop for the device.
        • So after the decades of the Slashdotters complaining about MacOS being MacOS, thier complaint about the iPhone OS is that it's NOT MacOS?

          Reading comprehension fail. The complaint about the iPhone OS is that it IS MacOS, but that it's castrated in completely inexplicable ways, and the changes smack of incompetence.

          • Incompetence, yes that's what you call selling 85 million+ devices running the OS.

            • Incompetence, yes that's what you call selling 85 million+ devices running the OS.

              By the logical extrapolation of your argument, Windows NT is the finest operating system on the planet.

              • By the logical extrapolation of your argument, Windows NT is the finest operating system on the planet.

                No, that would be EMACS.

              • Windows NT is a damned good OS for the time it was made.

                I don't think the changes were out of incompetence either, the bunch at Apple seem to be fairly competent in what they are doing. To me it seems like something that was necessary to go from a Mouse/Keyboard based UI to a multitouch one.

                Having used both the old and new Palm dev tools and the Windows Mobile dev tools back when it was pocket pc, developing on the iPhone is much less painful.

            • The GP said "incompetence" because of the API changes. It has nothing to do with units sold.

              If you can't read comments please don't make your own.

            • Incompetence, yes that's what you call selling 85 million+ devices running the OS.

              Right... because popularity always equals competence. You must be a Britney Spears fan.

          • Re: (Score:3, Insightful)

            by jo_ham ( 604554 )

            So, in your world, the API for a variable resolution, mouse+keyboard driven GUI should be the same API as a fixed resolution touchscreen? And you think it's "incompetence" that the APIs are different for two interfaces that are different in size, input device and resolution, one of which can be rotated on the fly into different orientations?

            You are surprised that an app that has existed for nearly 20 years on multiple platforms wasn't trivially easy to port to the iPhone because the developer was just too s

      • by Bungie ( 192858 )

        I don't get it though...why would you want to write a cross platform app between a desktop OS and a smart phone with the same UI? That what made Windows Mobile a disaster, having to navigate apps designed for a desktop UI on a small screen with a stylus.

        • Okay, but what's so bad to have a good phone app ported to desktop, say, as a desktop widget, with support added for full keyboard and using the extra CPU power? A weather gadget, a RSS ticker, a clock, a post-it notes app, this kind of thing. It should be trivial, shouldn't it?

      • It's not a complaint that iPhone is devilishly difficult to program. It is not. The complaint is that it's devilishly difficult to write an iPhone/desktop cross-platform compatible app, which should have been easy if the device actually was cross-platform compatible.

        Anybody expecting it to be easy to take an app which was written for a desktop system and porting it to a mobile system is going to unpleasantly surprised. Porting is always a bitch and if the platform you want to port to is less capable than the one you originally wrote the app for you'll have allot of work ahead of you. Even in CP languages like Java you'll have problems since the Java implementations for mobile platforms aren't as capable as their desktop counterpart and there are always issues with impl

        • Porting J2ME phone midlet to J2SE runtime is not hard at all.

          Sure you must take device limitations into account. But that's not the case here!
          First, the app was not really being "ported for", but rewritten for both simultaneously. Then, they were supposedly the same OS. And last but not least, the app in question was dead simple: display a monochrome bitmap on screen, animate it.

          The problem was that Apple developers went to some lengths to make the two deeply incompatible - in parts that could be easily com

      • by DarkOx ( 621550 )

        Exactly the issue is not that tools are not cross platform or that the iphone is not compatibile with the Mac; that is not really surprising. The problem is Apple marketing said they were, when they are not. Its like Microsofts claim .Net is cross platform; sounds nice but lets be honest. .Net runs on what Windows or Windows x64. A small subset of what is considered "platform" on Windows is there for use on Windows Mobile; such that unless your app is trivial you are probably looking at a serious porting

      • The complaint is that it's devilishly difficult to write an iPhone/desktop cross-platform compatible app, which should have been easy if the device actually was cross-platform compatible.

        Which, at a guess, was apple's intentions in making a completely new UI framework for the iPhone. What they absolutely did not want under any circumstances was a bunch of poorly ported desktop apps, with the exact same user interface, in such a way that nothing worked right.

    • Re: (Score:3, Informative)

      by 3dr ( 169908 )

      JWZ's rants hinges on two points, based on assumptions that are false.

      The first being, that iphone OS is (or should be) identical to OS X desktop/cocoa. I've been developing on OS X desktop for about three years, and iphone about a year. Never have I heard the claim (by Apple or anyone else) that the code is portable. It simply is not. In fact, Apple's iphone introductory videos explicitly mention that developers must think differently about a portable device in terms of what kinds of apps are good for port

  • Who is JWZ? (Score:4, Insightful)

    by AmonTheMetalhead ( 1277044 ) on Monday April 19, 2010 @06:14AM (#31894070)
    And why should we care?
    • geek card, hand it over, now

      • It's funny how you demand my geek card whilst avoiding to demonstrate any knowledge on the subject at hand, you don't happen to work in the marketing department or on an executive level do you?
        • Who is this Bill Gates? Why should we care what he says?"

          Geek card, hand it over.

          It's funny how you demand my geek card whilst avoiding to demonstrate any knowledge on the subject at hand

          You realize how silly this sounds, right?

          Anyways, the guy is a hacker and nightclub owner, well liked by many slashdotters for both making a gazillion shitton X screensavers, his awesome occasional rants, and proving he can have a successful life outside of the usual geekery. He also did some netscape/mozilla shit a while

          • Yea, found that out on the wiki link posted before, wasn't aware of him and TFS was sketchy with details to say the least.
          • Re: (Score:3, Interesting)

            IOW, he's an archetypical cyberpunk character. Former hacker and coder who now runs a bar/nightclub, who sometimes dispenses wisdom from on high, and whom newbs deride and experienced people listen to.

            The only thing missing is moving stolen data or cyberware, and/or arranging squads of disparate professionals to perform quasi-legal or illegal actions against corporations, generally on the behalf of other corporations.

            • Re: (Score:3, Funny)

              by Sir_Lewk ( 967686 )

              Oh damn, I never even thought of it like that but you're incredibly right. Next we're going to find out he carries a katana and delivers pizza for the mob in his free-time... :O

    • He owns & runs a bar/night club in california.
    • by aussersterne ( 212916 ) on Monday April 19, 2010 @08:36AM (#31894620) Homepage

      web (specifically, web browser) development, with Major (capital M) contributions to the mozilla/netscape/firefox ecosystem since before mozilla/firefox existed as projects in their own right (going all the way back to Netscape 1.0), as well as fingers in things like Emacs and popular X applications.

      • Re: (Score:3, Interesting)

        by OzPeter ( 195038 )

        And why should we care?

        web (specifically, web browser) development, with Major (capital M) contributions to the mozilla/netscape/firefox ecosystem since before mozilla/firefox existed as projects in their own right (going all the way back to Netscape 1.0), as well as fingers in things like Emacs and popular X applications.

        Yes, we know he is a smart cookie, but that still doesn't answer the OPs question.

        After looking at the webpage of the app in question (as posted by someone else here - I had never heard of the app before) all I see is some nostalgic clock App that seems to be being forced into a cross-platform test case where it doesn't really fit, and then complaining about the process. And then gratuitously throwing in some rant about the $100 developer cost. Yet nowhere have I seen any claims that a) OS-X and iPhone

    • Re: (Score:3, Funny)

      by elrous0 ( 869638 ) *
      Duh, he's the guy that created Babylon 5.
  • by MichaelCrawford ( 610140 ) on Monday April 19, 2010 @06:48AM (#31894176) Homepage Journal
    While the 68k Classic Mac binding hasn't been maintained for a while, it wouldn't be hard to get it working again. That would enable you to use the same client code all the way from the Mac Classic running System 7 to Mac OS X, Windows 7, Haiku, BeOS, Linux (mostly), BlackBerry and the iPhone.

    All with one set of C++ client code, compiled to native executables for each platform.

    If you want iPhone support, you'll need the Subversion source base; the code works, but we haven't rolled a release for a while.

    Its Open Source under the MIT License, chosen specifically to be compatiable with both GNU GPL and proprietary development.

  • I haven't actually read TFA, but if he has a problem porting between Mac OS X and the iPhone, just wait until he tries to port his app to Windows CE, Android, BlackBerry and Symbian.

    There are some important architectural points to keep in mind if you ever hope to take your application cross-platform. One is the separate the "engine" or core code cleanly from any kind of user interface. That way you can keep what is most fundamental about your application constant, then write a new UI to exercise it for

    • by NNKK ( 218503 )

      I haven't actually read TFA

      You needn't point out that out, because it's painfully obvious that you know absolutely nothing about Dali Clock, its cross-platform history, or JWZ's own well-documented history and experience.

      Educate yourself first, then speak.

      http://www.jwz.org/xdaliclock/ [jwz.org]
      http://en.wikipedia.org/wiki/JWZ [wikipedia.org]

      • I think JWZ's crucial mistake was in expecting the Mac OS X source to just work out of the box on the iPhone. Apple never made that claim. It's the wrong approach to take.

        While there are many conceptual similarities between the two operating systems, they are different enough that they really should have been considered separate platforms from the very start.

        I've been doing cross-platform development for twenty years. Don't Even Get Me Started.

  • For the me, the defining moment in this rant (where I couldn't take it seriously any more) was when he complained about the $100 developer fee required to get his code running on a real iPhone. I know that other people have sad it before me - if you want to play with Apples ball, you have to play by their rules. So that knowing what the (in this case well known - App approval is different) rules are and then bitching about them comes across as childish.

    I'm also tempted to comment on his choice of developm

I have hardly ever known a mathematician who was capable of reasoning. -- Plato

Working...