Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 1.1

FEATURE

Day 1: The Mission

Designing and building a complete application from scratch.

Issue: 1.1 (August/September 2002)
Author: William Leshner
Author Bio: William Leshner has been programming for twenty years and programming Macs for ten. He has spent a good deal of the last several years working in REALbasic and has come to the conclusion that REALbasic is the best development environment available anywhere.
Article Description: Follow the process of building a program from start to finish.
Article Length (in bytes): 9,637
Starting Page Number: 40
Article Number: 1012
Related Link(s): None

Excerpt of article text...

Thank you for coming to this staff meeting. We don't have a lot of time, so I'll get right to the point. Our marketing department has come up with a product they want us to design and build from scratch, and management has given us only six days to do it. In a nutshell, this new product helps developers release software by automatically generating the various documents usually found in a release, such as a readme, a user's guide, a web page describing the software, and an email announcing the software to mailing lists. These documents all share information about the software being released. For example, the name of the product, the company name, copyright information, and a brief description of the product are some of information you might find on the documents included in a software release. It is a tedious and time-consuming job to keep this information up-to-date in all of the documentation for every release. Our new product solves this problem by gathering and maintaining release-related information and using that information to generate release documents from templates. We are calling this new product ShipIt!.

Let us quickly go over our marketing requirements. ShipIt! must enable the user to enter information about the product to be released. This information must include the name of the software being released, the name of the developers, the company name, copyright information, and a short description. ShipIt! must provide templates for the documents it generates, and allow the user to edit these templates. Each template is used to generate one document by substituting release information into user-specified fields. ShipIt! must be able to save the release information and templates as a document file that can be opened and reused. Standard UI elements such as unique icons and an about box should be implemented, as well as the ability to run under Mac OS 8, 9, and X. A Windows version of ShipIt! is highly desirable, but not required. All versions of ShipIt! should have the look and feel of the platform on which they are running. In other words, a Mac OS 8 version of ShipIt! should look like a Mac OS 8 application, and a Windows version of ShipIt!, if there is to be one, should look like a Windows application.

The first order of business is choosing our development tool. We need a tool that is fast and easy to use, but powerful enough to finish the job. This tool must be able to build versions of ShipIt! that will run under older versions of the Mac OS (OS 8 and OS 9) as well as Mac OS X. A tool that can also build a Windows version of ShipIt! is preferred, and all the versions must be built from one set of code. We don't have enough time to write different versions of ShipIt! for each of our target platforms. After considering a number of development environments, we have come to the conclusion that REALbasic by REAL Software Inc. is the best tool for the job. It meets all of our requirements, and it's fun to use.

Before we build ShipIt! we must design it. A good design, taking into account our marketing requirements, is essential in creating a useful application. The first marketing requirement is that ShipIt! gather release-related information from the user. A simple form could satisfy that requirement, with fields for each piece of information we have decided will be needed in our templates. This approach assumes we have correctly anticipated every piece of information about a release that any user might want. Instead of a form, a two-column list would be more flexible. Each row in the list would contain a template field. The first column would contain the name of the field, so that we can refer to it in our templates. The second column would contain the replacement text, which will be substituted in our templates. Such a list is easy to implement with REALbasic's ListBox control. See Figure 1 for what the ListBox might look like.

Our next requirement is that ShipIt! provide templates for the release documents it generates and that these templates be editable so that a user can customize them for each software product. First we should consider what a template is and then we should figure out how to let the user edit one. Let us consider a typical release document: the readme. A snippet of a readme is shown in Figure 2.

...End of Excerpt. Please purchase the magazine to read the full article.