Converting REALbasic Code to Yuma
Issue: 7.2 (January/February 2009)
Author: Brad Weber
Article Description: No description available.
Article Length (in bytes): 2,612
Starting Page Number: 50
RBD Number: 7215
Resource File(s): None
Related Web Link(s):
Known Limitations: None
Excerpt of article text...
In previous columns I covered web-specific topics like session management and HTML form post validation in Yuma. This time, I thought I'd take the opportunity to remind the REALbasic developers who are reading this publication that your Yuma code will be remarkably similar to your REALbasic code. In fact, we provide a free, open-source utility for you to convert the classes in your current REALbasic framework for use on the web. For this column, I've created a new REALbasic project and defined a simple class named "address". The class contains five properties-- street, unit, city, state, and zip (my apologies to non-US readers) and one getDisplay method that omits empty lines from an address block for display. When saving the project, I selected the "Version Control Project" format so that my address class would be saved as address.rbbas in my project directory on disk. (See Figure #1.) Alternatively, I could have saved the project in any format and exported the address class alone in version control format by right-clicking or control-clicking on the class in REALbasic's project window and selecting "Export..." from the contextual menu. (See Figure #2.) You'll find a "converter" directory in your Yuma download. It contains an open-source "RB to Yuma Converter" REALbasic project. It simply converts .rbbas files to .yuma files. Launch it to see it's single-window interface. (See Figure #3.) For each .rbbas file you drag and drop into the application's window, it will create a matching .yuma file, ready for you to use in your Yuma application. To take advantage in my Yuma project of the address class I created for this column, I dropped my address.rbbas file (See Code Listing #1.) onto the converter window to get an address.yuma file (See Code Listing #2.). Then, I just need to include that file in an HTML (Yuma) page with Yuma's #include directive: #include "/framework/address.yuma" For more information about Yuma's #include directive and my general tips for managing your Yuma framework, check out the aptly named "Managing Your Yuma Framework" entry in the Yuma blog at www.yumadev.com/blog/. Yuma provides a great opportunity to leverage your REALbasic desktop application framework when you build web applications. You can copy and paste a few lines of code at a time from the REALbasic IDE into your HTML/Yuma files or convert an entire directory of classes with a simple drag and drop onto the free converter tool as described here. Please visit www.YumaDev.com for product documentation, community discussion forum, and an occasional blog entry about Yuma development.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.