Archive

Posts Tagged ‘Cross Platform’

Lessons Learned The Hard Way #1

April 29th, 2011 Comments off

This seems like a no brainer, but we’ve been bitten by it and we’ve picked up the pieces of multiple projects from others who haven’t lived by this rule:  If you’re creating a cross platform application, test early and test often on the platform you’re NOT developing on.

Real Studio is a cross-platform development tool.  It runs on Mac OS X, Windows and Linux.  In the Professional/Enterprise versions you can build for other platforms and debug on the other platforms as well while staying your native environment (using remote debugging).  It’s really an awesome experience running Real Studio on the Mac and running the executable via VMare (or even on another machine in the office) running Linux or Windows.

We see it time and time again (and we’ve been guilty of it ourselves a time or two) where someone does all their development on Mac OS X and tests on Mac OS X but their app looks awful once they get it into Windows.  Text backgrounds looks like crap and the flickering is atrocious whenever they resize the window or move controls around at runtime.

The reason?  Mac OS X and Linux have double buffered windows while Microsoft Windows does not.  Mac OS X and Linux always draw to a buffer first and then draw to the screen.  Windows does not which is the cause of much flickering.  Real Studio has some easy workarounds for a bulk of the flickering and some simple rules of thumb to reduce, if not eliminate, Windows flickering issues.  Among them:

  • Canvas objects should have Double Buffering turned on
  • Do not erase the background of Canvas and Container Controls
  • Be wary of using Refresh – perhaps Invalidate is a better choice
  • Layering of controls will almost always get you into trouble.  Putting anything over a Canvas control (that draws anything) is almost a sure way of getting into trouble

So the lesson is that you really should be testing your app in all of the environments you plan on supporting early in your development process.  If you wait until you’re about ready to ship it’s too late.  You might have some fundamental assumptions in the project that’s hard to fix now that you’re almost done.

Cross platform development is easy using Real Studio, but that doesn’t mean there aren’t differences.  You need to test for those differences early and on a regular basis.

Since I spend most of my time on the Mac side I’m assuming Windows and Linux RB developers have the same issues going to the other platforms.  What are some of the issues you see?  Did I miss any reasons for Windows flickering?

Visual Studio For the Mac?

May 26th, 2010 5 comments

Interesting little blurb at http://blogs.barrons.com/techtraderdaily/2010/05/26/apple-will-steve-ballmer-show-up-at-the-wwdc-keynote/ about Microsoft presenting at Apple’s World Wide Developer Conference (otherwise known as WWDC) to show off Visual Studio for iPad/iPhone and general Mac OS X development.

Geeze.  How many levels of wrong is this rumor?  You think Apple is going to trust Microsoft with the keys to their iPhone/iPad kingdom?  I don’t think so.  Apple has worked too hard building xCode and Cocoa Touch to let a 3rd party develop for iPhone/iPad.  If this does happen, then Apple might as well give Adobe a call and let them know they can restart their iPhone/iPad programs too.  And we all know where that feud isn’t over yet.

Where this might make sense is desktop applications.  Microsoft, while doing all that work to write Microsoft Office for the Mac in Cocoa, wrote their own Cocoa libraries and other Mac GUI editors and put it into Visual Studio.  Seems like an awful lot of work with minimal gain for Microsoft unless they’ve decided to make a push in REAL Software’s corner.  They certainly have the knowledge and resources to do such a product.

While I don’t think this rumor has legs it does make you think.  No doubt Microsoft is feeling the pinch of developers learning Cocoa which does nothing for Microsoft.  If they developed a cross-platform Visual Studio it stems the bleeding because now developers don’t have an either/or decision to make.  Learning a new development tool and frameworks suck and letting all those Windows developers develop for Mac and Windows using their tool keeps Microsoft in the game.  It doesn’t help them with iPhone/iPad development (now) but in five years who knows.  If it does happen it will generate some serious buzz which is something Microsoft wants (needs?).

What does this do, if true, to our favorite development tools company located in Austin?  I don’t think it would be good news.

Cocotron

October 28th, 2008 Comments off

More info on Cocotron can be found at http://www.cocotron.org/.  Their stated goal is:

The purpose of the project is to provide an easy to use cross-platform solution for Objective-C development.


There’s a blog post at Mac Daddy World at http://macdaddyworld.com/2008/10/27/adventures-in-cocotron/

Now I can say with some certainty that xCode and Objective C isn’t as easy to learn and use as REALbasic but a programming language is a programming language and we can all learn “one more” language and IDE.  Certainly one of the truths about REALbasic is that all of it’s controls are a compromise and not as feature rich as their .NET and Cocoa brethren.  Cocoatron has the potential of changing some minds of people who might be looking at REALbasic and go with Cocoa if controls on both platforms are nearly identical.


It seems that Cocotron isn’t an officially supported Apple product but that might not matter in the long run if enough developers start using it.  Stranger things have happened in other platforms where something becomes a de-facto standard.  It wouldn’t surprise me either that Apple has a skunkworks project that does this as well so it’s possible that at any point Apple could go, “Because of demand, here’s the official Cocoa for Windows frameworks.”


One major issue I see with Cocotron is that you can only do code development on the Mac.  That is certainly one of RB’s strengths where you can run on Windows, Linux or Macintosh OS X and compile and debug for the other platforms (Pro editions only).


One thing that is similar to RB is that it looks like you can debug your Windows app while running in the xCode IDE.  I wonder how fast or slow that is?  I might just fire up xCode this weekend.

Your thoughts?