TweetFollow Us on Twitter

Symantec 8
Volume Number:12
Issue Number:7
Column Tag:Programming Tools

Symantec C++ v8 Release 5

A lot more than its Caffeine is eye-opening

By Rich Parker

About Symantec’s New Release

Symantec C++ version 8 release 4 was the beginning of Symantec’s new subscription program for this product. I described it in considerable detail in my article, “New Symantec Development Tools” (MacTech Magazine 11.12 [December 1995] 43-50), and I’m not going to repeat all of that here.

Doubtless you’re interested in what’s new with Symantec C++ and the Symantec Project Manager (SPM), and there’s lots to report on that front. The new SPM has a much smaller footprint. The previous version required about 12MB of RAM to run; the new version contained in this release has a preferred size of 6.5MB. That’s a reduction of almost 50%! In addition, the new version requires less system temporary memory for precompiled headers, and that space is managed much more efficiently.

Another big step forward with the new release of the SPM is that you can develop both 68K and Power Mac applications from the same project file. This is a huge advantage for those of us who had to keep two project files and try to keep them both up to date.

There have been bug fixes and other changes to the Visual Architect and the TCL in this new version. I’m not aware of any new classes, but the existing classes have been made even more robust. One thing that users of Object I/O will appreciate is the inclusion of the “Using Object I/O” document, which goes into a quite a lot of detail about how this feature works and how it can be added easily to your application’s classes. The document is in Acrobat format inside the “Documentation” folder, within the “EIC” folder of the “Symantec C++ for Power Mac” folder.

In addition to the “Latest Symantec Tools” folder’s contents, there are quite a number of Apple software products included in the new release. There is a complete hard-disk-ready copy of MPW v3.4, including all of its compilers and tools, the latest version of MacApp (3.3), ToolServer, SourceServer, Apple debuggers, ResEdit, and a “SOM Objects for Mac OS” folder that contains the shared library, plus Apple’s statement of direction in their development plans. Code, interfaces, and examples for MPW are also included, and there are interfaces and libraries for QuickDraw 3D and drivers and interfaces for the PCI bus. There are a lot of additional Apple components that I haven’t mentioned.

But Wait, There’s More

Release 5 includes Caffeine, a translator plug-in that supports the development of Java Applets with the SPM. You will need to use the Custom Install option to install Caffeine, which also installs Sun Microsystems’ Java compiler and Applet Viewer code, as well as a ton of examples.

Caffeine is a prelude to the announcement of Café for the Macintosh, a stand-alone development environment for Java applets and applications. Symantec delivered Espresso for the Windows platform last December. This, like Caffeine, was a plug-in feature for their v7.21 C++ development environment. Symantec released the stand-alone version of Café for Windows late in March and expects to release Café for the Mac some time soon - perhaps it will have been released as you read this review. [As indeed it was. While Rich, at our urging, was madly laboring to cover Caffeine in timely fashion, Café for Mac burst upon the scene, to be sent free to all Symantec C++ subscribers - thus truly superseding Caffeine. The rapidity of events is proving somewhat overwhelming. Nonetheless, we have not excised Rich’s discussion, as it would have been wrong to rob our readers of its cogency and inherent interest. - man]

At this point, Caffeine relies on version 1.0b1 of Sun’s Java Development Kit (JDK). That kit has some outstanding problems, not the least of which is that audio files aren’t supported. There are also other bugs in Sun’s software. I’m told that Sun intends to release the second beta version of their JDK sometime in April, and that the audio problem, among others, is solved.

Even though Sun’s software is not quite up to par at this point, you can still develop applets that will run quite well with Java-equipped Internet browsers, or with the included Applet Viewer. To give you an idea of a Java applet, Figure 1 illustrates a typical SPM project file window for Java applet development.

Figure 1. SPM project for Java development

As you can see from Figure 1, a Java project includes one or more HTML files and a Java source file. The various HTML files can be used to supply different sets of parameters to the Java applet. To compile the project, choose Bring Up To Date from the Build menu. This causes the SPM to invoke Sun’s Javac compiler to compile the source file (in this case, Graph.java). When the compilation is complete, the compiled classes are stored inside the “Classes” folder of the “MacJDL 1.0b1” folder that was installed when you installed Caffeine. I compiled several of the examples and all of the compiled classes are just lumped together in that one folder. It would have been better if they were separated into individual folders, by project name. To execute the applet, you need either to move all of the classes and the HTML files into the place where your Internet browser expects to see them, or to leave them where they are and choose the Run Applet (example1.html) command from the AppleScript menu. This will cause the Applet Viewer application to be invoked with the “example1.html” file. If you wish to see the results of running any of the other HTML files, then you’ll have to either duplicate and modify the script to refer to “example2.html,” “example3.html,” and so forth, or open the individual HTML files from within the Applet Viewer, once it has been invoked. The result of running the “example1.html” file by choosing the Run Applet script is shown in Figure 2.

Figure 2. Graph layout applet in execution

The static picture in Figure 2 doesn’t do the applet justice. The positions of the various nodes of the graph are set initially to random positions and then, during the applet’s execution, the nodes eventually drift into a steady state, which is the point at which the figure was captured. If you click the Scramble button, then the node-locations are scrambled and the graph again drifts to a (perhaps different) steady state. The Shake button, when clicked, causes the nodes to be shaken up and down to reposition them, and then they gravitate to another steady state. The Stress and Random checkboxes cause the nodes to behave differently, although I’m not quite sure I understand the purpose of these settings. Nevertheless, the Graph Layout is only one of the many examples of dynamic Java applets that were written by Sun and included in Symantec’s Caffeine release.

Figure 3 shows the contents of the “example1.html” file that was used to specify the parameters of the graph to the compiled applet. I arbitrarily chopped the <param> directive into multiple lines for purposes of showing the entire specification in the figure.

Figure 3. Example1.html file’s contents

By this time, you’re probably wondering what the Java source code looks like. I captured a portion of the code from the Graph.java source file, and it is shown in Figure 4.

Figure 4. Portion of graph.java source code

The code shown in Figure 4 is just a sample of one function in the overall file. It shows how Symantec’s built-in editor provides syntax coloring of keywords and character strings in the Java language. You can choose character styles and colors for language keywords, preprocessor directives, comments, string literals, and character constants. These choices are global and apply to these features for every language supported by the SPM.

One of the things that I really hate about Sun’s Java code is the old-style statement formatting. I have campaigned for years against the old “Unix-style” statement formatting, and it seemed as though people were listening. More and more, code printed in magazines has been formatted for readability rather than for saving lines of code that took time to output on the old ASR 33 teletype printers. It really bothers me that Sun is creating a bad example that other Java programmers will tend to blindly follow. It isn’t necessary to put the opening brace on the same line as the if statement, nor is it necessary to save lines by writing ugly code such as } else {. I just hope that programmers reading this review will think twice about the way that they format their own Java code. Please don’t blindly follow Sun’s lead.

That said, and having shown one example of the Graph Layout applet, I thought it would be useful to show the result of running the “example2.html” file, with the Stress checkbox selected. The source program does not need to be recompiled to use a different HTML file as input. Just open the “example2.html” file from within the Applet Viewer application (or from within your Internet browser, if you’ve installed the classes and HTML files where they belong). The result is shown in Figure 5.

Figure 5. Result of running example2.html

By running the example with the Stress checkbox checked, the nodes arrange themselves into a ring. The faint numbers on the lines connecting the nodes seem to be “weights” or “distances” that need to be preserved in this mode. Without the Stress checkbox checked, the nodes might arrange themselves into a number of different configurations. I’ve seen them in a figure-eight pattern.

More About Java

Although the Caffeine application doesn’t support stand-alone applications, there is a lot that can be done with Java applets - as is amply demonstrated by the sophisticated examples. Sun’s JDK includes the entire Java class library, including all of the AWT (Another Windowing Toolkit) classes, net (TCP/IP) classes, components (menubar, menu, container, scrollbar, window, dialog, panel, and so forth), as well as input/output classes, image classes, errors and exceptions, and many others. The Java class libraries are very well developed and seem to be mostly error-free. I’ve used the Windows version of Café to build a stand-alone application that has all of the elements of a standard application, except that it must still be executed with Sun’s Java interpreter. This will undoubtedly be the case for the Mac version of Café when it is released.

The Java language is a kinder, gentler version of C++. There are no pointers in the new language, and applets are prevented from performing I/O on the user’s machine. With the exception of the import of audio or graphic files, Java applets can be safely distributed on the net (at least that’s the intention). Instead of requiring a “server-push” capability to provide dynamic Web pages, you’ll be able to supply a Java applet that is transferred to the user’s machine and executed by the Java-equipped Web browser (the released Mac version of the Netscape browser is still Java-challenged, but beta versions that offer Java support are available for download from Netscape’s Web site). Java applets are also checked before they are executed to ensure that they don’t try to wreak havoc on the user’s machine.

The Windows version of the Netscape browser offers full Java applet execution. If you log on to Symantec’s Café Web page, you’ll see steam rising from the coffee cups that serve as bookends at the head of the page. This is accomplished by a Java applet that is downloaded to your machine automatically when you visit the page.

And Now Back To the Review

Symantec’s SPM editor now includes drag-and-drop editing, proper opening and reading of files created with Unix, DOS, or Macintosh line-endings, and syntax coloring for all of the supported languages, including Java and PowerPC assembler files.

The Debugger has been improved to support deferred generation of debugging information. Applying this feature to files that you seldom debug can result in significant savings of disk space, as well as saving time during compilation.

The Visual Architect has been improved both by eliminating reported bugs and also by streamlining the user interface.

This release contains a set of highly interactive tutorials that guide you through the fundamental steps of using the Symantec development environment. Apple Guide files for four projects (Hello World, MiniEdit, Object Bullseye, and Beeper) are provided. These tutorials are accessible from the Guide menu whenever the Symantec project manager is running. In addition, there is a “Shortcuts & Tips” guide that is also accessible from the Guide menu. It provides useful information when using the Symantec Project Manager. The main page of the aforementioned guide is shown in Figure 6.

As you can see from the guide window in Figure 6, there is information on quite a number of topics. I chose the “Drag and drop” item and got the explanation shown in Figure 7.

The SPM now includes Apple’s MrC and MrC++ translators for optimized compilation. You’ll have to use the Custom Install option and choose the “Additional Drop-in Tools” category for these to be installed. In addition to the MrC and MrC++ translators, this category includes the Caffeine translator and the Sun SDK software, as well as Language Systems’ LSPascal compiler. The new LSPascal compiler is still undergoing development; however, the version that is included in the current release is able to compile quite a number of applications, including the “NIH Image” image-editor demo program that is provided in the release. I understand that others have run into some problems with this version of the LSPascal compiler, so your mileage may differ.

In addition to the LSPascal translator, there is also a MacMindy translator that offers the ability to create Dylan applications for the Mac. Although the applications are interpreted, the MacMindy translator will give you the opportunity to play around with the Dylan language.

Figure 6. Shortcuts & Tips guide

Figure 7. Drag and Drop features

More About 68K and Power Mac Development

The SPM provides a unified environment for PowerPC and 68K application development. A single project can be configured to target both architectures, using named sets of project and translator options. This allows the use of the same source code and the same project file to build your application. You have a choice of building a PowerPC, standard 68K, or CFM (Code Fragment Manager) 68K application, library, or shared library. You can even choose to merge an already built 68K application into a PowerPC application, creating a fat application. The SPM itself is fat, as are the translators, the Visual Architect, and other tools.

The complete THINK Reference™ Viewer and databases are also included in this release. Although the references to the Macintosh toolbox aren’t entirely up to date, THINK Reference is a must-have tool if you’re programming with the Standard ANSI Libraries or the TCL. Apple’s Macintosh Programmer’s Toolbox Assistant doesn’t cover those topics.

Symantec Goodies

Release 5 includes quite a number of additional “goodies” pertaining to the SPM. There is a “Compiler Toolkit” that explains how to host a new compiler within the SPM environment. The kit contains instructions and example projects. There’s also information concerning external editors. If you have a personal editor preference, then you might be able to use it instead of the built-in SPM editor. Both Bare Bones Software’s BBEdit and the Alpha shareware editor work well as external editors for the SPM. I’ve heard that Object Master also works in conjunction with the SPM, although there may be a problem with the SPM recognizing that files have been altered and need to be recompiled when that product is used.

The release also contains a folder full of scripts called “Do for Each Project,” that perform operations such as “Remove Objects” on a set of projects. The Rainmaker Build Script provides an exhaustive log of the system features and memory usage during the build process. If you want to know everything about memory usage during compilation, then this script’s for you.

An “SPM Color Manager” application provides the ability to change the SPM’s default background and normal text colors. It’s a FaceSpan application and comes with an installer and the FaceSpan extension.

There’s source code too. The CMoviePane class offers the ability to show QuickTime movies in a pane. The CColorBackground and CColorBorder classes offer the ability to use color in the background or border of a window or dialog pane. And the CDoubleText class operates like the CIntegerText class, except that it handles text strings that represent “real” numbers. All of the foregoing classes are experimental and are not supported by Symantec, but are provided as extra “goodies” for you to use.

There are many more goodies than I have space to mention. You’ll just have to scour the CD to see the wealth of programs and data that the release has to offer.

Third-Party Goodies

The release also contains a wealth of third-party shareware and demo applications. There are offerings from Bare Bones Software (a demo of the BBEdit v3.5 editor), NeoLogic (full source and demos for the neoAccess cross-platform object-oriented database engine), demo versions of a variety of utilities, including Resorcerer, Script Debugger, Developer VISE, VOODOO, CMaster v2.0.3, Tools Plus v2.1.6, and many others. There are also free versions of ProFont (a font created especially for displaying and printing code) and ShrinkWrap (an application that lets you mount disk images on your desktop, instead of having to install system versions or other software from floppy disks).

The Bottom Line

The Symantec C++ for Power Macintosh product retails for $399. Those of us who received this product after having purchased Symantec C++ v8.0 will see that renewal of the subscription for the next three issues will cost $149.95. CodeWarrior users can also trade up to this product for only $149.95, which is $50 less than renewing their CodeWarrior subscription.

There’s very little not to like about the product. I like the smaller footprint and the increased efficiency of this release. I also like the ability to develop Java applets within the integrated environment. The built-in editor, compilation, and viewing features are quite efficient. I think you’ll like this product too.

 
AAPL
$116.47
Apple Inc.
+0.16
MSFT
$47.98
Microsoft Corpora
-0.72
GOOG
$537.50
Google Inc.
+2.67

MacTech Search:
Community Search:

Software Updates via MacUpdate

Cobook 3.0.7 - Intelligent address book....
Cobook Contacts is an intuitive, engaging address book. Solve the problem of contact management with Cobook Contacts and its simple interface and powerful syncing and integration possibilities.... Read more
StatsBar 1.9 - Monitor system processes...
StatsBar gives you a comprehensive and detailed analysis of the following areas of your Mac: CPU usage Memory usage Disk usage Network and bandwidth usage Battery power and health (MacBooks only)... Read more
Cyberduck 4.6 - FTP and SFTP browser. (F...
Cyberduck is a robust FTP/FTP-TLS/SFTP browser for the Mac whose lack of visual clutter and cleverly intuitive features make it easy to use. Support for external editors and system technologies such... Read more
Maya 2015 - Professional 3D modeling and...
Maya is an award-winning software and powerful, integrated 3D modeling, animation, visual effects, and rendering solution. Because Maya is based on an open architecture, all your work can be scripted... Read more
Evernote 6.0.1 - Create searchable notes...
Evernote allows you to easily capture information in any environment using whatever device or platform you find most convenient, and makes this information accessible and searchable at anytime, from... Read more
calibre 2.11 - Complete e-library manage...
Calibre is a complete e-book library manager. Organize your collection, convert your books to multiple formats, and sync with all of your devices. Let Calibre be your multi-tasking digital... Read more
Herald 5.0.1 - Notification plugin for M...
Note: Versions 2.1.3 (for OS X 10.7), 3.0.6 (for OS X 10.8), and 4.0.8 (for OS X 10.9) are no longer supported by the developer. Herald is a notification plugin for Mail.app, Apple's Mac OS X email... Read more
Firetask 3.7 - Innovative task managemen...
Firetask uniquely combines the advantages of classical priority-and-due-date-based task management with GTD. Stay focused and on top of your commitments - Firetask's "Today" view shows all relevant... Read more
TechTool Pro 7.0.6 - Hard drive and syst...
TechTool Pro is now 7, and this is the most advanced version of the acclaimed Macintosh troubleshooting utility created in its 20-year history. Micromat has redeveloped TechTool Pro 7 to be fully 64... Read more
PhotoDesk 3.0.1 - Instagram client for p...
PhotoDesk lets you view, like, comment, and download Instagram pictures/videos! (NO Uploads! / Image Posting! Instagram forbids that! AND you *need* an *existing* Instagram account). But you can do... Read more

Latest Forum Discussions

See All

Ubisoft Gives Everyone Two New Ways to E...
Ubisoft Gives Everyone Two New Ways to Earn In-Game Stuff for Far Cry 4 Posted by Jessica Fisher on November 21st, 2014 [ permalink ] | Read more »
Golfinity – Tips, Tricks, Strategies, an...
Dig this: Would you like to know what we thought of being an infinite golfer? Check out our Golfinity review! Golfinity offers unlimited ways to test your skills at golf. Here are a few ways to make sure your score doesn’t get too high and your... | Read more »
Dark Hearts, The Sequel to Haunting Meli...
Dark Hearts, The Sequel to Haunting Melissa, is Available Now Posted by Jessica Fisher on November 21st, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Meowza! Toyze Brings Talking Tom to Life...
Meowza! | Read more »
Square Enix Announces New Tactical RPG f...
Square Enix Announces New Tactical RPG for Mobile, Heavenstrike Rivals. Posted by Jessica Fisher on November 21st, 2014 [ permalink ] With their epic stories and gorgeous graphics, | Read more »
Quest for Revenge (Games)
Quest for Revenge 1.0.0 Device: iOS Universal Category: Games Price: $4.99, Version: 1.0.0 (iTunes) Description: The great Kingdom of the west has fallen. The gods ignore the prayers of the desperate. A dark warlord has extinguished... | Read more »
Threadz is a New Writing Adventure for Y...
Threadz is a New Writing Adventure for You and Your Friends Posted by Jessica Fisher on November 21st, 2014 [ permalink ] In the tradition of round-robin storytelling, | Read more »
SteelSeries Stratus XL Hardware Review
Made by: SteelSeries Price: $59.99 Hardware/iOS Integration Rating: 4 out of 5 stars Usability Rating: 4.5 out of 5 stars Reuse Value Rating: 4.25 out of 5 stars Build Quality Rating: 4.5 out of 5 stars Overall Rating: 4.31 out of 5 stars | Read more »
ACDSee (Photography)
ACDSee 1.0.0 Device: iOS iPhone Category: Photography Price: $1.99, Version: 1.0.0 (iTunes) Description: Capture, perfect, and share your photos with ACDSee. The ACDSee iPhone app combines an innovative camera, a powerful photo... | Read more »
ProTube for YouTube (Entertainment)
ProTube for YouTube 2.0.2 Device: iOS Universal Category: Entertainment Price: $1.99, Version: 2.0.2 (iTunes) Description: ProTube is the ultimate, fully featured YouTube app. With it's highly polished design, ProTube offers ad-free... | Read more »

Price Scanner via MacPrices.net

15″ 2.2GHz Retina MacBook Pro on sale for $17...
 B&H Photo has the 2014 15″ 2.2GHz Retina MacBook Pro on sale today for $1749. Shipping is free, and B&H charges NY sales tax only. B&H will also include free copies of Parallels Desktop... Read more
27-inch 3.5GHz 5K iMac in stock today and on...
 B&H Photo has the new 27″ 3.5GHz 5K iMac in stock today and on sale for $2299 including free shipping plus NY sales tax only. Their price is $200 off MSRP, and it’s the lowest price available... Read more
21-inch 1.4GHz iMac on sale for $979, save $1...
B&H Photo has the new 21″ 1.4GHz iMac on sale for $979.99 including free shipping plus NY sales tax only. Their price is $120 off MSRP. B&H will also include free copies of Parallels Desktop... Read more
13-inch 1.4GHz/256GB MacBook Air on sale for...
B&H Photo has lowered their price on the 13″ 1.4GHz/256GB MacBook Air to $1059.99 including free shipping plus NY sales tax only. Their price is $140 off MSRP, and it’s the lowest price for this... Read more
Save up to $400 with Apple refurbished 2014 1...
The Apple Store has restocked Apple Certified Refurbished 2014 15″ Retina MacBook Pros for up to $400 off the cost of new models. An Apple one-year warranty is included with each model, and shipping... Read more
New 13-inch 1.4GHz MacBook Air on sale for $8...
 Adorama has the 2014 13″ 1.4GHz/128GB MacBook Air on sale for $899.99 including free shipping plus NY & NJ tax only. Their price is $100 off MSRP. B&H Photo has the 13″ 1.4GHz/128GB MacBook... Read more
Apple Expected to Reverse Nine-Month Tablet S...
Apple and Samsung combined accounted for 62 percent of the nearly 36 million branded tablets shipped in 3Q 2014, according to early vendor shipment share estimates from market intelligence firm ABI... Read more
Stratos: 30 Percent of US Smartphone Owners t...
Stratos, Inc., creator of the Bluetooth Connected Card Platform, has announced results from its 2014 Holiday Mobile Payments Survey. The consumer survey found that nearly one out of three (30 percent... Read more
2014 1.4GHz Mac mini on sale for $449, save $...
 B&H Photo has lowered their price on the new 1.4GHz Mac mini to $449.99 including free shipping plus NY tax only. Their price is $50 off MSRP, and it’s the lowest price available for this new... Read more
Check Apple prices on any device with the iTr...
MacPrices is proud to offer readers a free iOS app (iPhones, iPads, & iPod touch) and Android app (Google Play and Amazon App Store) called iTracx, which allows you to glance at today’s lowest... Read more

Jobs Board

*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
*Apple* Solutions Consultant (ASC)- Retail S...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
Project Manager, *Apple* Financial Services...
**Job Summary** Apple Financial Services (AFS) offers consumers, businesses and educational institutions ways to finance Apple purchases. We work with national and Read more
*Apple* Store Leader Program - College Gradu...
Job Description: Job Summary As an Apple Store Leader Program agent, you can continue your education as you major in the art of leadership at the Apple Store. You'll Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.