Chapter 4. Cross-Platform Application Development


DESPITE HOW WELL REALBASIC HAS DONE masking developers from all the underlying considerations required to develop applications for Macintosh, Windows, and Linux, there are still some things about the different platforms that you, the developer, should be aware of.

One consistent element of REALbasic is that they take a practical approach to everything they do. They are not purists. They are pragmatic. As a consequence, their object-oriented language retains procedural programming features that often make things easier to do. Likewise, they take a practical approach to cross-platform development. This means that as a developer, you are often given access to platform-specific features, something that is a little different from the philosophy of Java, which tends to view that sort of thing as if not impure, then at least not pure. That makes perfect sense in many situations, but there are also times when it makes sense to leverage the unique aspects of the individual platforms for which the application is being developed.

Throughout REALbasic's documentation are references to platform-specific features, most commonly Macintosh features that reflect the language's Macintosh origins. If you're a Windows or a Linux developer, you might find it a little confusing. Likewise, both modern Macintosh operating systems and Linux share a common UNIX heritage, and if you are a Windows developer, you might find this confusing as well.

The most fundamental cross-platform activity is compiling your application, so I will return to the HTMLViewer example application from Chapter 2, "Programming with REALbasic," and walk through the steps required to compile that simple application for all the platforms REALbasic supports (recall that the cross-platform compilation features of REALbasic are a feature of the Professional Edition).

As I step through this example I will give a brief history of each platform and an overview of platform-specific terminology or functionality that you are likely to run into while developing your cross-platform applications.

The second aspect of REALbasic programming where you will encounter the idiosyncrasies of each platform is when dealing with folders and files. All three platforms use different file systems, and they organize their file structure in different ways. I will document each platform's file system and delve into REALbasic's FolderItem class and supporting functions that you will use to manipulate files and folders.

Beyond this, there are also some classes provided by REALbasic that apply only to a particular platform or that have methods or properties that apply only to a particular platform. These will be discussed in detail in the section pertaining to the class. Before I get started, I think it can be informative to take a brief look at Java's approach to cross-platform programming, pointing out the differences between the two strategies and weighing the relative strength of both approaches.




REALbasic Cross-Platform Application Development
REALbasic Cross-Platform Application Development
ISBN: 0672328135
EAN: 2147483647
Year: 2004
Pages: 149

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net