TweetFollow Us on Twitter

VIPC Review
Volume Number:12
Issue Number:3
Column Tag:Tools Of The Trade

VIP-C: A Different Kind of IDE

Program design combining visual and textual programming methods

By Edward Ringel

Why VIP-C?

To answer this question, a little personal history. I have been programming the Macintosh on a part-time and hobbyist basis for about 10 years. I have spent much time and money trying to find the “right tools” so that I could have fun and be productive. I’ve bought and used some great products; I’ve also bought and used some real stinkers. Any programmer who’s been at it for a while will admit to a similar experience. Time and money both wasted and well spent have given me the following perspective:

1. Procedural languages are all the same. Current Macintosh implementations of C, Pascal, FORTRAN, and BASIC are all able to carry out most program-ming tasks.

2. There are good ways of developing libraries of usable, extensible, reusable code that don’t rely on an object-oriented paradigm.

3. Any given object-oriented program-ming system takes a long time to learn. Once learned, that system may be quite productive. However, skills acquired in one system or library are applied only with difficulty to another.

4. Productivity depends upon the complete development environment, rather than only upon the language.

5. A good GUI builder/app framework is worth every penny spent.

6. I want to save time and develop a good product rather than adhere to an ideology of programming technique.

What does this have to do with VIP-C? The death by asphyxiation of my two favorite tools, THINK Pascal for environment and ViewIt for a GUI builder, put me on a several-month expedition to find a replacement. The ground rules for the search: I would be willing to change from Pascal; I would be willing to learn an object-oriented paradigm if it were comprehensible to mortals; I wanted an environment/GUI generator that left me with source code at the completion of development (I was unhappy with the prospect of “shared libs from hell” after the company that made one I was using went out of business and I had several thousand lines of code dependent on unsupported, dated, unalterable products); I would not work with an environment that required me to learn an elaborate series of sub-commands to get simple jobs done.

I chose to work with VIP-C and Metrowerks Gold. Everyone knows about Metrowerks; they do a great job, and nothing else needs to be said. VIP-C, however, was new to me. I have used it for several months and have been impressed with its utility, its ease of use, and the tight integration between the GUI and the actual processing of data. It is not perfect, and it is not for everybody, but it is hard to beat for turning out a finished app without sweating out every last detail. It does this without being object-oriented. It leaves me with source code at the completion of the project. I have ultimately come to view some of the peculiarities in the environment as useful. As of this writing (December 1995) the current release of VIP-C is 1.5.3. I have also used VIP-C 2.0b21 for several weeks as a beta tester. Both releases support 68K and PPC Macs. Version 2.0 of VIP-C (and of its companion product VIP-Basic) are set to debut at MacWorld Expo in San Francisco in January 1996. As such, I have not reviewed features of version 1.5.3 that are not supported in version 2.0, and have not obsessed about problems in version 1.5.3 which have been resolved in version 2.0.

[As this issue went to press, in January, the Mainstay folks were just putting the finish touches on version 2.0, so some facts may be slightly different; but they’ve told us that Ed’s description is substantially correct. - man]

What is it?

VIP-C is not a traditional text-based development environment, nor is it as visually oriented as Prograph. I prefer to think of it as another kind of IDE - an Integrated Design Environment. The product has several cardinal identifying features. It is an interpreted C environment, implementing a robust subset of ANSI C. It has integrated support for an application framework, called “the dispatcher”. It ships with a library of high-level routines that simplify a variety of programming tasks beyond mere GUI management. The environment has a built-in resource editor which performs a variety of tasks similar to ResEdit or Resorcerer, but also has extensions that dramatically simplify GUI management. The text editor has an integrated syntax checker, help system, flow diagram generator, and function palette, which together significantly reduce errors in logic, syntax, and typography. When a project is complete, a stand-alone application can be created around a VIP-C runtime kernel or through source code exported to the compiler of your choice. Commercial-quality applications have been written using this product.

The Project Model

VIP-C uses a project model. When a new project is made, three files are created which contain the resources, code and variables. Resources are stored in a standard format (the file has a ResEdit type); the code and variables are in a proprietary format. This is in sharp distinction to Metrowerks and Symantec, where even a small project can have dozens of associated .c, .h, and other files. Unlike Metrowerks, which offers a variety of project types, VIP-C offers only two options: to use the dispatcher framework or not.

The project window maintains a list of all functions, not files, further emphasizing the differences between a traditional environment and VIP-C. All functions are at “top level” with no equivalent to a function local to a .c file. Functions can be viewed alphabetically or as a diagram showing relationships among dependent functions. [Mainstay are working on a revision where these relationships will be portrayed in a Finder-like manner. - man.] All Macros and Type definitions are also at top level and are global to the project. This is occasionally inconvenient as it can make for long scrolling lists. A list of global variables is also available at this level. A final list available is that of the Resource constants, which is a means of generating and editing resources. These different lists are maintained in “mini-windows”.

Activating a mini-window permits definition of an object or editing of an existing object. Each type of object has its own editor, but there is a uniform editor interface. Both typing and menu-based pickers can be used for creating the definitions. A dyed-in-the-wool C programmer will shudder at the absence of a long list of #defines and declarations at the beginning of the program, but the definition system is easy to learn and very addictive.

Figure 1. The project window contains a list of functions, modification and creation dates, and other information. The small window-like creatures contained within the project window are the mini-windows mentioned in the text.

Functions are defined in a similar fashion. Indirection, parameters and return values are all established in a definition window and added to the main project window. The combination of typing and pickers reduces typographical errors significantly.

Figure 2. The function definition window is representative of the various object definition windows supported by VIP-C.

A Rich, Helpful Editing Environment

Function code is developed in an editor window, and here VIP-C really shines. In addition to the previously mentioned mini-windows, local variables can be defined in their own mini-window. (It is not possible to create local variables with scope limited to a block.) Typing <semi-colon> <return> triggers a syntax check; errors are reported in an error panel and auto-formatting is inhibited if an error is detected. The same key sequence triggers an update of a flow diagram that models the textual data. At first I thought the flow diagram was gimmickry, but selecting a line of code in the text area selects the same “place” in the diagram and vice versa. This feature is very useful in debugging errors of logic.

Figure 3. The text editor shows a function which consists of a switch statement. Mini-windows are at left, and at bottom left are the parameter and local variable mini-windows. The flow diagram and text areas are self-evident. The arrow in the flow diagram corresponds with the downward triangle in the text area. Clicking on the downward triangle brings up the function palette. The “?” at the top of the window activates the help apparatus, and the surrounding panel returns the requested definition.

Typing is reduced by the use of an icon-based palette of functions. Each icon represents a group of functions, which can be organized and edited by the user. Typical C constructs such as if then, switch, etc., can easily be dropped into place. Similarly, variable names can be dropped into statements from the mini-windows by a simple selection process.

VIP-C is aware of the function definitions of the Toolbox, your functions, and several hundred high-level functions supplied with the program that handle a variety of processes: the GUI, string processing, math, complex lists, text editing, networking, to name a few. These functions, if they have been incorporated into the palette, can be chosen from a scrolling list and pasted, without typing, into your code. At the time of this insertion, a small dialog box comes up that allows you to match your variables to the required variable types. This dramatically increases accuracy. If you do need to review a function definition, or any other definition for that matter, there is a help system that can recall information quickly. My only quibble here is that long definitions, such as large structs or functions with many parameters, are not well formatted and are difficult to read when presented in the help panel.

The predefined functions work well alone, in Toolbox-based code, or with the dispatcher routines. The dispatcher is an application framework that takes care of many housekeeping tasks, and includes a number of hooks for your code. For example, a _do_idle() hook is available, so that if you want to do something beyond dispatcher functions during null events (though these are actually quite complete), you simply call your function from this hook. In general, I have found the dispatcher desirable to use, and the documentation has been easy to follow. The tutorial was particularly helpful here.

GUI And Program Are Built Simultaneously

Aside from the editor, the other major advantage of VIP-C derives from the interaction between the dispatcher and the resource editor. Alerts, menus, dialogs and other program elements that interact with the user can be built in the usual fashion. The editors are robust and are better than ResEdit for the universal ('MENU', 'DLOG', etc.) resources supported. This feature does not require great explanation. Extensions to the usual editor functions are the prize feature. If using the dispatcher, you can directly associate routines for update, action, get/set etc., with a menu as a whole, a dialog as a whole, or individual objects within the menu, dialog, alert, etc. If a menu item, for example, is moved within the menu, the routine linkage remains intact. In some respects this is similar to facilities in Visual Architect or MacApp’s view builders, but it is simpler to use, and does not require an intimate knowledge of a class inheritance structure.

At build time, the dispatcher automatically detects these linkages and generates code that assures that when a button is pressed, for example, the action proc routine for that button is called; you are responsible only for writing the action proc, not for creating the code for the linkage. The code for this is quite interesting and depends heavily on C’s facility for working with function pointers.

Resource editors are handled as plug-in libraries, which simplify upgrades, and permit the addition of new editors created either by the user or by Mainstay or a third party. Sample code and instructions for writing the editors are part of the package.

A new resource type and companion editor and set of functions, 'FORM', makes its debut in version 2.0. This feature permits graphic construction of a complex window with “pretty” controls, pictures, color, lists, grids (VIP’s answer to the Table class in object environments), styled text, etc. The interface to the editor is excellent, and there is a full-featured function set for get/set of all types of data, update routines, etc. The functionality is massive, and therefore the learning curve is a bit steeper than the rest of VIP, but the end result is well worth the investment. The FORM type and editor integrate particularly well with VIP’s database manager, and I could see a real value to the simultaneous acquisition of both products if you were planning any kind of database work. Tutorial and reference materials are to be updated to provide complete support for this interface constructor. The database manager itself comes with a construction kit for laying out record types, and this integrates fully with the FORM manager.

Figure 4. The FORM editor shows just a few of the graphic and programming elements that can be placed in a window. The tool palette is at left. Radio 2 radio button is selected, and the window in which this control is defined is at right. The visible layer controls the appearance of the control. The “Events” layer, which is not visible, controls the interaction with the functionality of the program.

Runtime Environment and Debugging

When you are ready to run the project, VIP-C has multiple built-in facilities for runtime and debugging support. Code can be checked function by function or for the whole project. The syntax checker will identify syntax errors and will find any undeclared identifiers. The latter are presented in list form, and you can either find the text used (and fix a typo) or declare the identifier through the appropriate editor. The code is then run via interpreter. Because of the nature of programming the Macintosh and the structure of VIP-C, much of the actual work in a program is not done in the interpreter itself, but in the Toolbox or in VIP-C-specific shared libs or code resources (PPC or 68K respectively) to which the interpreter has passed control. Thus, I have not found the interpreter to be horribly slow, either on a Power Mac (6200CD) or a IIsi. I suspect that complex iterative loops with large n’s might degrade performance, but I have not tested this.

Debugging is similar to other environments. Step and trace commands, breakpoints, and a variable observer window are all supported. There is type-casting support for viewing variables. Complex structures (and their pointers and handles) can be viewed fairly easily.

I have found the debugger to be somewhat fragile. Unstable buggy programs make their neighbors unstable, and I don’t expect the stability of a MacsBug, but TPM and Metrowerks debuggers have held up better to equivalent abuse. The debugger and VIP function and run their programs within a “pseudo-Finder environment” similar to the THINK Pascal environment. Thus, context switches have at times corrupted the appearance of the screen, which is not the case when the debugger, the project manager, and the application are true separate processes. This runtime environment also precludes receiving Apple Events, so if you are planning strong support for Apple Events, this aspect of development must wait for a port to a traditional compiled environment. For large, complex commercial applications, the Apple Events issue may well be the greatest obstacle to using VIP-C, unless you are prepared to do a second round of debugging and testing in the final make environment. Another complaint: VIP-C does not permit setting a breakpoint on a token such as a closing brace, for example, so I have had to add dummy assignment statements at the end of a function if I want to check variables “at exit.”

Despite all this, the dispatcher, the built-in functions, and the up-front syntax checking reduce errors greatly. The flow diagram has been a lifesaver more than once. I have had most of my problems with the usual carelessness and early dementia stuff - allocating and deallocating memory, invalid pointers and handles, etc.; this, of course, will clobber any debugger. I have found myself doing the old tricks of using beeps, Alert() and ParamText() calls, etc., more than I used to; but I do get by adequately.

There are a number of other features in the environment that I have not covered. There are a fair number of user preferences that can be set. Function palettes are easily customized. Flowcharting can be suspended. There are many keyboard shortcuts for common activities. Find/replace text searching is on a par with other development environments.

Putting It All Together
(And Taking It All Apart)

When a project is complete and fully debugged, it can be made into an application in two ways: it can be attached to a runtime kernel, or it can be compiled in a traditional C environment. VIP-C can communicate with the Metrowerks IDE by Apple Events, and can export source code and create a MW project, automatically. Independent C source code can also be generated. It’s worth spending some time with this aspect of the product. Before we do this, however, we need some knowledge of how VIP-C actually runs your program.

VIP-C is designed as a central application that contains the interpreter, the text editing functions, the parser, the resource editor hooks, etc. VIP-C itself ships as two applications, a 68K app and a PPC app. The toolbox interface, the built-in functions, and other extensions to the core product are maintained as fat shared libs (used by both the PPC and 68K). Source code for most of these libraries is provided. When your program executes, VIP-C dispatches a call to a built-in function to the appropriate library, and your code effectively executes that function as a compiled, not interpreted, fragment.

You can add new Apple Managers, third-party function libraries (for example, Mainstay sells a database manager), or your own libraries and attendant definitions. This process is handled differently in 1.5.3 from 2.0. Version 1.5.3’s procedure is quite cumbersome and has happily been changed to a much better system in version 2.0; I will only describe the 2.0 system.

Since the 68K and PPC environments contain their functionality in fat shared libs, to add to the environment you simply drop a new lib into VIP’s folder in the Extensions folder. Each shared lib must have an .h file containing the appropriate prototypes, #defines, enums, and typedefs that define the interface. VIP-C recognizes the presence of a new library and asks for the header file, which is read in once, and that’s it. As for building your own libraries, sample code is provided in the form of the core library source code, and instructions are also available. Existing code that was used as a compiled Metrowerks library, for example, would need to be altered for use in 68K environments because meticulous attention must be paid to maintenance of an A4 world. However, it is fairly easy to see how to do this. (Code resources are easier to convert.) PPC libraries require almost no changes except appropriate recompilation. As an aside, it should be noted that you can import code into a specific project (as opposed to the VIP-C environment) quite easily.

Mainstay recognizes that an application attached to a runtime kernel may be big and clunky, and that most serious development will end in a port to a fully compiled environment. Version 2.0 currently comes with stationery projects for only Metrowerks 6 and 7 (version 1.5.3 supported MPW and Symantec as well). These projects contain libraries which correspond to the core of the VIP shared libraries explained above. Creation of a compiled application requires (1) creating source code files, (2) adding the VIP-C specific libs, (3) adding the resource file(s), and (4) adding the runtime stuff everybody needs.

As might be expected, this can get a little hairy at times. However, VIP-C can communicate with the Metrowerks IDE via Apple Events and do it all for you with really quite minimal intervention. If you wish to use an unsupported environment, or for some reason just want source code, you can generate source code alone. VIP-C-generated source code is simply function after function without organization, generated for direct feed to a compiler, not for a human reader. This is not a big issue if you don’t plan to modify the code any further. However, if you assume that you’ll be tweaking the code in the final make environment, you’ll need to take full advantage of Metrowerks’ function pop-up menus, etc. Project stationery and libraries are available to create applications, code resources, and shared libs. Version 2.0 supports the new Apple API (2.01).

Stand-alone applications can also be created without a compiler. Version 2.0 allows you to choose whether the application-to-be needs the VIP shared libs available or not. This makes sense in that something you give to a friend, or sell, needs to be genuinely stand-alone; programs you write for yourself will by definition have all runtime resources available and can therefore be smaller.

Wish List

A wish list would include an execution environment with the application running as a separate process. This would be much more in keeping with current emphasis on the importance of Apple Events and support of complex debugging environments. I’d like to see better support for Apple Events in the dispatcher, and hooks for preference files in the dispatcher. I’d like to see more robust sample code; many of the samples make the teaching point but no more. Finally, I’d like to see a somewhat more stable debugger, particularly one which could stand up to illegal memory access a bit better. Multiple Observe windows in the debugger would also be nice.

Bottom Line

My concerns and wish list notwithstanding, I think this is a great package for general purpose programming. I don’t think this is the way to write tightly optimized code, games, or VBL tasks; and if you have an uncontrollable urge to micro-manage every aspect of your code, forget it - you won’t do that here. General purpose business applications, scientific applications, graphical applications, and particularly data management applications are VIP’s forte. Networking and serial communications tasks are also nicely supported. This is also a very good environment for the programmer who needs to complete a task rather than create an elaborate application. It’s not that the latter can’t be done, because it can, and well; but VIP most notably offers the opportunity to knock off some quick code and get the job done without reinventing the wheel. Tech support (I’ve used e-mail to their Compuserve address from my internet account) has been prompt, courteous, and has answered my questions satisfactorily. I would purchase this product again without hesitation.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Rodeo Stampede guide to running a better...
In Rodeo Stampede, honing your skills so you can jump from animal to animal and outrun the herd as long as possible is only half the fun. Once you've tamed a few animals, you can bring them home with you. [Read more] | Read more »
VoxSyn (Music)
VoxSyn 1.0 Device: iOS Universal Category: Music Price: $6.99, Version: 1.0 (iTunes) Description: VoxSyn turns your voice into the most flexible vocal sound generator ever. Instantly following even subtle modulations of pitch and... | Read more »
Catch Battleplans on Google Play from Ju...
Real-time strategy title Battleplans is due for release on Google Play on June 30th, following its release for iOS systems last month. With its simple interface and pretty graphics, the crowd-pleaser brings a formerly overlooked genre out for the... | Read more »
iDoyle: The interactive Adventures of Sh...
iDoyle: The interactive Adventures of Sherlock Holmes - A Scandal in Bohemia 1.0 Device: iOS Universal Category: Books Price: $1.99, Version: 1.0 (iTunes) Description: Special Release Price $1.99 (Normally $3.99) | Read more »
Five popular free apps to help you slim...
Thanks to retail and advertising, we're used to thinking one season ahead. Here we are just a week into the summer and we're conditioned to start thinking about the fall. [Read more] | Read more »
How to ride longer and tame more animals...
It's hard to accurately describe Rodeo Stampede to people who haven't seen it yet. It's like if someone took Crossy Roadand Disco Zoo and put them in a blender, yet with a unique game mechanic that's still simple and fun for anyone. [Read more] | Read more »
Teeny Titans - A Teen Titans Go! Figure...
Teeny Titans - A Teen Titans Go! Figure Battling Game 1.0.0 Device: iOS Universal Category: Games Price: $3.99, Version: 1.0.0 (iTunes) Description: Teeny Titans, GO! Join Robin for a figure battling RPG of epic proportions! TEENY... | Read more »
NinjAwesome: Tips and tricks to be a mor...
Sorry about that headline, but I'm going to go ahead and assume that GameResort would not have named its game NinjAwesome without expecting some of that. It is, in fact, pretty awesome the way it combines an endless runner and old school arcade... | Read more »
Into Mirror (Games)
Into Mirror 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: "Is all that we see or seem, but a dream within a dream?"- Edgar Allan Poe New game by Lemon Jam Studio, the team behind Pursuit... | Read more »
Perchang (Games)
Perchang 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: Welcome to Perchang! A test of skill and puzzle solving across 60 stunning levels. | Read more »

Price Scanner via MacPrices.net

15-inch Retina MacBook Pros on sale for $200-...
B&H Photo has 15″ Retina MacBook Pros on sale for up to $210 off MSRP. Shipping is free, and B&H charges NY tax only: - 15″ 2.2GHz Retina MacBook Pro: $1799.99 $200 off MSRP - 15″ 2.5GHz... Read more
Mac minis on sale for up to $100 off MSRP
B&H Photo has Mac minis on sale for up to $100 off MSRP including free shipping plus NY sales tax only: - 1.4GHz Mac mini: $449 $50 off MSRP - 2.6GHz Mac mini: $649 $50 off MSRP - 2.8GHz Mac mini... Read more
Clearance 2015 13-inch MacBook Airs available...
B&H Photo has clearance 2015 13″ MacBook Airs available for $300 off original MSRP. Shipping is free, and B&H charges NY sales tax only: - 13″ 1.6GHz/4GB/128GB MacBook Air (MJVE2LL/A): $799.... Read more
Apple refurbished Mac minis available for up...
Apple has Certified Refurbished Mac minis available starting at $419. Apple’s one-year warranty is included with each mini, and shipping is free: - 1.4GHz Mac mini: $419 $80 off MSRP - 2.6GHz Mac... Read more
ABBYY TextGrabber: 1,000,000 Installs in 5 Da...
ABBYY, an international OCR technologies provider, has announced that their image-to-text application TextGrabber, got installed 1,000,000 times in just five days while being featured by the App... Read more
New SkinIt Waterproof Case For iPhone 6
With its impact and waterproof design, the Skinit Waterproof case provides security and protection to guarantee your phone will get you through even the most demanding outdoor conditions. The impact-... Read more
iMacs on sale for up to $150 off MSRP
B&H Photo has 21″ and 27″ iMacs on sale for up to $150 off MSRP including free shipping plus NY sales tax only: - 27″ 3.3GHz iMac 5K: $2181.11 $118 off MSRP - 27″ 3.2GHz/1TB Fusion iMac 5K: $1949... Read more
12-inch 1.1GHz Retina MacBooks on sale for $5...
B&H Photo has 2016 12″ 1.1GHz/256GB Retina MacBooks on sale for up to $50 off MSRP. Shipping is free, and B&H charges NY tax only: - 12″ 1.1GHz Space Gray Retina MacBook: $1249 $50 off MSRP... Read more
WWDC Announcements Revisited Still Underwhelm...
I was disappointed that no new MacBook hardware was announced at this year’s all-software World Wide Developer’s Conference. Not even a hint about what’s in the development pipeline. Of course, we... Read more
Twelve South Compass 2 iPad Stand Now Availab...
Twelve South has updated its most popular iPad stand, Compass 2, with the introduction of two new colors — Gold and Rose Gold. These new color options n perfectly complement the new Rose Gold iPad... Read more

Jobs Board

*Apple* New Products Testers Needed - Apple...
…we therefore look forward to put out products to quality test for durability. Apple leads the digital music revolution with its iPods and iTunes online store, Read more
*Apple* Solutions Consultant - APPLE (United...
Job Summary As an Apple Solutions Consultant, you'll be the link between our future customers and our products. You'll showcase your entrepreneurial spirit as you Read more
*Apple* Retail - Multiple Positions - Apple,...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
*Apple* Retail - Multiple Positions, Towson...
Job Description:SalesSpecialist - Retail Customer Service and SalesTransform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
*Apple* Professional Learning Specialist - A...
Job Summary The Apple Professional Learning Specialist is a full-time position for one year with Apple in the Phoenix, AZ area. This position requires a high Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.