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

Latest Forum Discussions

See All

Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »
Embark into the frozen tundra of certain...
Chucklefish, developers of hit action-adventure sandbox game Starbound and owner of one of the cutest logos in gaming, has released their roguelike deck-builder Wildfrost. Created alongside developers Gaziter and Deadpan Games, Wildfrost will... | Read more »
MoreFun Studios has announced Season 4,...
Tension has escalated in the ever-volatile world of Arena Breakout, as your old pal Randall Fisher and bosses Fred and Perrero continue to lob insults and explosives at each other, bringing us to a new phase of warfare. Season 4, Into The Fog of... | Read more »

Price Scanner via MacPrices.net

Boost Mobile will sell you an iPhone 11 for $...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering an iPhone 11 for $149.99 when purchased with their $40 Unlimited service plan (12GB of premium data). No trade-in is required... Read more
Free iPhone 15 plus Unlimited service for $60...
Boost Infinite, part of MVNO Boost Mobile using AT&T and T-Mobile’s networks, is offering a free 128GB iPhone 15 for $60 per month including their Unlimited service plan (30GB of premium data).... Read more
$300 off any new iPhone with service at Red P...
Red Pocket Mobile has new Apple iPhones on sale for $300 off MSRP when you switch and open up a new line of service. Red Pocket Mobile is a nationwide MVNO using all the major wireless carrier... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, available for $759 for 8-Core CPU/7-Core GPU/256GB models and $929 for 8-Core CPU/8-Core GPU/512GB models. Apple’s one-year warranty is... Read more
Updated Apple MacBook Price Trackers
Our Apple award-winning MacBook Price Trackers are continually updated with the latest information on prices, bundles, and availability for 16″ and 14″ MacBook Pros along with 13″ and 15″ MacBook... Read more
Every model of Apple’s 13-inch M3 MacBook Air...
Best Buy has Apple 13″ MacBook Airs with M3 CPUs in stock and on sale today for $100 off MSRP. Prices start at $999. Their prices are the lowest currently available for new 13″ M3 MacBook Airs among... Read more
Sunday Sale: Apple iPad Magic Keyboards for 1...
Walmart has Apple Magic Keyboards for 12.9″ iPad Pros, in Black, on sale for $150 off MSRP on their online store. Sale price for online orders only, in-store price may vary. Order online and choose... Read more
Apple Watch Ultra 2 now available at Apple fo...
Apple has, for the first time, begun offering Certified Refurbished Apple Watch Ultra 2 models in their online store for $679, or $120 off MSRP. Each Watch includes Apple’s standard one-year warranty... Read more
AT&T has the iPhone 14 on sale for only $...
AT&T has the 128GB Apple iPhone 14 available for only $5.99 per month for new and existing customers when you activate unlimited service and use AT&T’s 36 month installment plan. The fine... Read more
Amazon is offering a $100 discount on every M...
Amazon is offering a $100 instant discount on each configuration of Apple’s new 13″ M3 MacBook Air, in Midnight, this weekend. These are the lowest prices currently available for new 13″ M3 MacBook... Read more

Jobs Board

Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
IT Systems Engineer ( *Apple* Platforms) - S...
IT Systems Engineer ( Apple Platforms) at SpaceX Hawthorne, CA SpaceX was founded under the belief that a future where humanity is out exploring the stars is Read more
*Apple* Systems Administrator - JAMF - Activ...
…**Public Trust/Other Required:** None **Job Family:** Systems Administration **Skills:** Apple Platforms,Computer Servers,Jamf Pro **Experience:** 3 + years of Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.