Contact TLCC

Multiple Rational Developer Workspaces Click here to see all the Developer/Admin Tips

Date tip published:08/22/2005
Description:When working in Rational Application Developer you will generally be working with several different projects. Projects are the container folders that hold the components that make up the application you are working on. The Workspace is the top level container folder for your projects and it also stores how your Workspace appearance is set. Rational Developer can support multiple workspaces to allow you to have two or more totally different Workspaces. You may want to have one Workspace for training and experimenting and another for real production work. This tip will show you how to manage the multiple workspaces.


To learn more about Rational Developer 6 and WebSphere development use the following links:

Introduction to WebSphere Using Rational Developer 6
Introduction to WebSphere for Domino Developers using Rational Developer 6
Servlet and JSP Programming for WebSphere using Rational Developer 6
Servlet and JSP Programming using Rational Developer 6 for Domino Developers



Click here to try the Introduction to WebSphere Using Rational Developer course for FREE!

Multiple Rational Developer Workspaces

When working in Rational Developer you will generally be working with several different projects. Projects are the container folders that hold the components that make up the application you are working on. The Workspace is the top level container folder for your projects and it also stores how your Workspace appearance is set. Rational Developer can support multiple workspaces to allow you to have two or more totally different Workspaces. You may want to have one Workspace for training and experimenting and another for real production work. This tip will show you how to manage the multiple workspaces.


Note
Rational Developer refers to Several IBM products



In this tip we use Rational Developer to refer to the following IBM products:
    • IBM Rational Web Developer 6
    • IBM Rational Application Developer 6
    • IBM Rational Software Architect 6
They all work the same for using a Workspace (the topic of this tip.) Software Architect and Application Developer have increased functionality compared to Web Developer.

Click here for more information on what Rational Developer 6 is, how to download the trial version and certification information.


First a few definitions. In Rational Developer, the application resources are organized into "projects". Projects are container objects which map directly to file folders on the file system. Projects contain all the file resources for an application. When you use Rational Developer to add a resource to a project, like an HTML page or a Java servlet, a file is created and added to the project's folder on your file system.

In the following image, Rational Developer is shown on the left and Windows Explorer is shown on the right. Notice that the project names in Rational Developer are the same as the folder names in Explorer. Also notice the same subfolder hierarchy under the TLCC_RAD6C1_Demo_Web project and folder. Note the same files listed in the pages folder for both Rational Developer and Explorer. Finally, notice that the TLCC_RAD6C1_Demo project, which you imported in the previous activity, is comprised of two project folders, the TLCC_RAD6C1_Demo folder and the TLCC_RAD6C1_Demo_Web folder. Certain project types can contain several project modules which are stored in separate project folders. For example an Enterprise Application project type can include Web modules, Enterprise Java Bean modules, and Application Client modules. The TLCC_RAD6C1_Demo project is an Enterprise Application project which includes a Web project module. The different project types are described later in this course module.





Note for Domino Developers
Rational Developer Projects are Like .NSF Databases in Domino

The Notes/Domino database (.NSF file) is the storage container for all of the resources in a Domino application. A Domino database can include forms, views, agents, framesets, pages, images and many other design components.

In Rational Developer, the Project serves this same purpose. A project folder can include servlets, JSPs, HTML pages, images and other file resources to deliver the application. However, unlike a Domino database, a Rational Developer project is not a document (data) container.





Selecting the Workspace

Whenever you start Rational Developer, you are prompted for the location of your workspace. This feature allows you to have more than one Rational Developer workspace on your local development environment at one time. Each time you start Rational Developer, you can choose which workspace you want to work on in that application session. To access an alternate workspace, close Rational Developer and start it again or choose File | Switch Workspace... from the menu. If the directory you choose does not contain an Rational Developer workspace, then a new workspace folder is created at the specified location. The following image shows the prompt for the default workspace location.



To create a new Workspace just type in a new directory path. The next time Rational is started you can use the pull down menu to choose another workspace.







Resetting Rational Developer to Prompt for a Workspace

When you check the option to 'Use this as the default and do not ask again', as shown in the following image, the specified workspace is used for subsequent Rational Developer startups and you are not prompted to select the workspace.



Follow these steps to reset Rational Developer to prompt for a workspace on startup:

  1. Start Rational Developer.
  2. Go to Windows - Preferences.
  3. Expand Workbench and click on Startup and Shutdown.
  4. Check the box to "Prompt for workspace on startup.


Note
This is different from how WebSphere Studio 5 worked!




Note that the previous way to do this in WebSphere Studio was to start WebSphere Studio from a DOS prompt with the -setworkspace option. This does not work in Rational Developer 6.





Switch Workspaces On the Fly!

Rational Developer 6 now adds the ability to switch Workspaces.

To change the Workspace (or to create a new one) do the following:

1. Go to File - Switch Workspace in Rational.



2. Choose an existing Workspace or type in a new location for a new Workspace. Then click OK.



3. Rational Developer will then shut down the current Workspace and open up the Workspace chosen. If this Workspace did not exist then it will be created.