|
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Product Reviews The Choice of a New Generation
The Choice of a New Generation
By: Alan Williamson
Jul. 1, 1997 12:00 AM
Welcome to Your New Language The simple answer is, here. This is where the journey to Java enlightenment begins. But before we begin, let's get our essentials together. The first tool that is required in any developer's inventory is a compiler. This piece of software takes the source files and translates them into something that can be run by the Java runtime environment. Next, a text editor of some sort would make physically writing the source files a lot easier. Finally, in case the machine we are developing on doesn't have a Java interpreter, we need one just in case. So we're ready then? Good, let's get started. Hold on a minute, this isn't the Dark Ages. We don't need to fumble about with command line-driven compilers or put up with basic text editors whose major feature is the ability to Tab correctly! This is the age of the GUI: the ability to see what you're doing in fancy fonts, differing colors and countless windows. What we need is an integrated developing environment that will aid, not hinder. A tool that will allow us to drag and drop objects into place. A tool that will provide something more sophisticated than print statements for debugging. Fortunately, such a tool does exist and it is an essential component of any Java developer's library: Symantec's Visual Café Pro. This fully integrated Java development environment is one of the most popular IDEs in use today. Some 60 percent of developers are using at least one of the Visual Café range to produce their Java code. So in choosing this you will be in good company. Pop in the VC Pro CD and you are ready to begin. This column will be used to teach Java to the developer, using Visual Café Pro. Each article will travel a little further along the road, detailing features and techniques that make Visual Café Pro the only real choice for developing your Java code. As we will see in later articles, VC makes an excellent training companion through its drag and drop interface. But please note, this series is not intended to be a product endorsement, merely a companion for the large number of developers who have chosen to use Visual Café Pro as their development platform.
Installation One of the nice things about Visual Café Pro is that it is supported on both the Windows and Apple platforms. For a while, it looked as if the Java world had forgotten about the Macintosh developers, with their only choice being CodeWarrior. Now they have another option to chose from. Unlike other development platforms, Visual Café Pro is the complete package: editor, compiler, runtime environment, debugger, RAD, GUI. Whereas Microsoft's Visual J++ requires Internet Explorer to be installed in-order to run and test applets, VC provides this as part of the IDE. This is especially comforting to the novice, just dipping into Java and not really knowing what components they need and don't need.
A Quick Tour Figure 1 shows a typical working environment for the IDE. Arranged at the top of the screen is the main program toolbar. From here, many of Visual Café's features are accessible. The window to the left of the screen is the main project window which lists all the objects that are associated with the current applet. The window along the bottom is the message window, where all compiler output is placed, including any compiler errors that may be generated. The window at the right of the screen is the property window. From here, the selected object's properties can be modified. One of the best features of Visual Café is the ease with which applets can be built. Many products claim to be visual and to have a rapid application development environment, but the majority of them fail. Anyone who has used Visual J++ will know Microsoft's idea of visual is somewhat different from the rest of the world's. With Visual Café, the term visual is correctly used, and not as a tool to cash in on the latest marketing hype. VC provides a complete drag and drop interface, allowing components to be easily dropped onto a work space and manipulated, with the code being updated as each item is being adjusted. This is a novelty in itself; J++ requires the user to run a special utility to produce the code from the component builder. This is only one of the many features Visual Café Pro has underneath its surface. As an example for this first column, let's build a complete applet without looking at or modifying a single line of Java code. (Granted, from a learner's point of view this does nothing to install many of the concepts and inner workings of Java, but having a working example and then working back is the best way to learn.)
First Project Using RAD The first thing is to create a new project, which is done by selecting the 'New Project' menu item from the 'File' menu. This presents a small dialog box which contains differing project types. Choose the basic applet icon. This then creates a new project and applet form designer window. Next, we select the calendar control from the toolbar under the Utility tab and drag it onto the form designer. The control will be created as a small square at the position in the form where it was dropped. Selecting the 'Use Preferred Size' to true, from the object properties window, adjusts it to the size the original developer intended it to be. Next, size the form window to the size the applet will initially take and then center the calendar control. That's the majority of the application development completed. Next, you need to run the applet and see how it looks. This can be done by pressing the 'Play' button on the tool bar. This will run the applet in debugger mode, which will allow you to step through any code or observe the state of variables. But since our example won't be examining the code produced, this functionality will not be called upon. The calendar applet will then be compiled, loaded and run, all in a very short space of time. Gone, it would seem, are the days of making a cup of coffee while you wait for it to compile. There isn't even time to reach for the cup, never mind drink from it. Your first applet is now complete and ready for mass distribution to the world.
Note
Coming Next In future articles, I will look at how to build slightly more complicated applets, looking at how Visual Café can be used to aid code creation. These applets will range from simple animation applets to sophisticated database front-ending applets using the dbANYWHERE set of classes. Reader Feedback: Page 1 of 1
Latest Cloud Developer Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week
Breaking Cloud Computing News
|
|||||||||||||||||||||||||||||||||||||||||||||||||