You are on page 1of 55

IBM WebSphere Studio Application Developer

Workbench Basics
Jojo Joseph
IBM India Software Labs
Bangalore

© 2005 IBM Corporation


Objectives
• Getting started with the workbench
• Set workbench preferences
• Work with perspectives (add, remove,
customize)
• Import to and export from the workbench
• Use local history
• Manage multiple workspaces
• Use the team programming tools

© 2005 IBM Corporation


Workbench
• The workbench is the user interface for
WebSphere studio.
• The term workbench refers to the desktop
development environment.
• The workbench features an integrated
development environment with customizable
perspectives that support role-based
development.
• It consists of interrelated views and editors.
• More than one workbench window can exist on
the desktop at any given time.
© 2005 IBM Corporation
Starting the Workbench

• Click Start ->programs ->IBM WebSphere


studio -> Application Developer 5.0

© 2005 IBM Corporation


Workbench

• workbench opens when you launch


Application Developer.
© 2005 IBM Corporation
Setting Up the Workbench
• After installation of WSAD and before we
start creating projects we may want to
modify some of the default workbench
settings to suit our needs or site
standards. e.g
– Java class path variables
– Java coding preferences
– Automatic builds
– Workbench window preferences

© 2005 IBM Corporation


Preferences
• You can set various preferences for the
workbench under Window >Preferences
• Preferences can also be set for the
different tools and components of the
workbench
• Difference between Preferences and
Properties
– Preferences are for the whole work bench
– Properties are particular to a project

© 2005 IBM Corporation


Setting Preferences
To set the Workbench
preferences select
Window >Preferences

To set preferences for a


project Right Click on the
project and select
properties

© 2005 IBM Corporation


Workbench Preferences

• In the Workbench Preferences dialog you can


specify how you wish the workbench to behave
© 2005 IBM Corporation
Workbench Preferences

© 2005 IBM Corporation


Editor Preferences

© 2005 IBM Corporation


File Editors

© 2005 IBM Corporation


Key Binding and Local History

© 2005 IBM Corporation


Java Preferences

© 2005 IBM Corporation


Java Preferences

© 2005 IBM Corporation


Team Preferences

© 2005 IBM Corporation


Perspectives

© 2005 IBM Corporation


Build Order
• Order in which projects are built
– The workbench allows users to explicitly define the order
in which projects are built
– if one project
requires the Java
classes which were
defined in another
project, the first project
must be built after its
prerequisite classes
have been built

© 2005 IBM Corporation


Workbench Workbench
Java Perspective Web Perpective
Views Views

Type
Hierarchy Packages Navigator Gallery
View View View
Repository
View

Editors Editors

Java User Page web.xml


There are many different
Defined
Editor Editor
Designer Editor
perspectives within a
project all sharing
resources of that project
and displaying it through a
different view depending on
what role you play in the
development lifecycle.
Java Developer Web Developer

© 2005 IBM Corporation


Projects and Perspectives
• Projects • Perspective
– Organize resources – Initial set and layout of
• Folders • Views
• Files • Editors
– Type of Projects – Types of perspectives
• Java • Java
• EAR (J2EE) • Web
• Web • J2EE
• EJB • Server
• Server • Database
• Application client • Debugging
• Plug-in development • Team

© 2005 IBM Corporation


Perspective Layout

© 2005 IBM Corporation


Views
• Perspectives are made up of views
• Display a view by selecting Window > Show
View
• Views support:
– Editors
– Provide alternative
presentations
– Provide navigation
of the information

© 2005 IBM Corporation


Views
• A view displays specialized information
– E.g.: Bookmarks view displays all
bookmarks in workbench
• A view might appear by itself, or
stacked with other views in a tabbed
notebook
• Views can be floated by Selecting the
blue bar at the top of the Tasks view
and drag it on to the desktop

© 2005 IBM Corporation


Editors
• When you open a file, the workbench
determines what type of file you have selected,
based on the file extension, and opens the editor
that is associated with that extension
• File associations can be changed in the
– Window >Preferences >Workbench>File editors
dialog
– E.g. a Java editor for .java and .jav files; and a text
editor for .txt files; HTML editor for .jsp and .html files
• You can show/hide the editors from your
perspective by toggling the Show Editors/Hide
Editors menu item in the Perspective menu
© 2005 IBM Corporation
Perspective
• A group of related
views and editors is
called a perspective
• Configurable
•There is a perspective for each of the different roles
in a development life cycle (some roles overlap)
•Open different perspectives by
•Perspective>Open>Other
•Selecting Open Perspective Button
•To switch between perspectives use: alt & alt

© 2005 IBM Corporation


Perspective
• There is a perspective for each of the different
roles in a development life cycle (some roles
overlap)
• Open different perspectives by
• Perspective>Open>Other
• Selecting Open Perspective Button
• To switch between perspectives use: alt & alt

© 2005 IBM Corporation


Perspectives List
1 Data You can explore, import, design, and query databases
2 Debug Tuned for debugging your Java programs.
Help Gives help pointers to assist with task such as Getting
3 Started, Scenarios, Concepts, Tasks, Reference, and
Samples
4 J2EE Provides the useful views for the EJB/J2EE developer
Java Number of views that provide the information that you need
5
to work on a Java project
Java Type Hierarchy Displays the type in its full context (i.e., superclasses and
6 subclasses) It can be opened on types and compilation
units and consists of the Hierarchy view and an editor.
7 Plug-in Development Functionality for developing plug-ins
Resource Allows you to view what resources you have as well as
8
check your team repositories location and streams
Scripts Allows you to view you script properties and run scripted
9
user interfaces script and javascript actions
Server Allows you to start IBM EJB Test Client to test EJBs, take
10
instances of the server, and start application server
11 Team Functionality for version control to work with a team
Trace Has functionality to analyze problems and look at
12
performance
13 Web Provides the useful views for HTML/JSP developer
XML The XML Editor is a visual tool for creating and viewing
14
XML files

© 2005 IBM Corporation


Perspective Menu
Supports:
•Customize perspective
•Close perspective
•Close all perspectives
•Reset perspective
Select reset
perspective

© 2005 IBM Corporation


Open a Perspective
• To open another perspective in the Workbench,
select the Open Perspective icon in the top
left corner of the workbench working area
• or From Perspective Menu, select Open and
then Other.
• Depending on the Workbench preferences the
new perspective will either be opened in the
same window, replacing the current perspective,
or in a new window

© 2005 IBM Corporation


Show View in a Perspective
• To add more views to a perspective, select
Perspective > Show View from the menu bar.
• You can close, resize,
or move any of the views
that are currently shown.
• You can maximize and
minimize the view inside
a perspective by double
clicking on its label.

© 2005 IBM Corporation


Customize Perspectives
• Open any perspective you
want to customize
• Add more views you need,
using window->Show View
• Close the views you don't
need by clicking on the X
button at right top
• Save the perspective layout
with the new name using
window->Save Perspective
As option

© 2005 IBM Corporation


Customize Menus

© 2005 IBM Corporation


Types of Projects
• Application elements are organized at the highest
level into projects. A project is a grouping of
folders and files needed for a specific task.
Different configurations of WebSphere Studio offer
different project types. Here are a few examples:
– Web project
– Java project
– Server project
– EJB project
– Application client project
– Enterprise Application project

© 2005 IBM Corporation


Project Import
• In most development efforts you have existing
resources. These resources can be imported into
Application Developer projects in many ways using
Import Wizard :
– Files from a directory (Java source, HTML, JSPs...)
– ZIP and JAR files (import as individual files for editing, or leave
as ZIP/JAR file if only used for compilation)
– EJB JAR files with existing EJB definitions (for example, from
VisualAge for Java)
– EAR and WAR files from existing Web applications and J2EE
archives
– FTP or HTTP access to existing Web sites for import of HTML
and associated files

© 2005 IBM Corporation


Drag and Drop
• You can use your operating system's file system browser
to copy folders and files from the file system into the
workbench.
• This option works only in Navigator view of Workbench.

© 2005 IBM Corporation


Import Wizard

© 2005 IBM Corporation


Import From File System

© 2005 IBM Corporation


Importing Web sites using HTTP

© 2005 IBM Corporation


Importing Web sites using FTP

© 2005 IBM Corporation


Importing Web Archives

© 2005 IBM Corporation


Importing EJB Jar File

© 2005 IBM Corporation


Importing an EAR File

© 2005 IBM Corporation


Exporting an EAR File
• Following set of information is contained
within the EAR file exported from WSAD
– Web modules
– EJB modules
– Application client modules
– Any supporting JAR files
– Information to configure the server

© 2005 IBM Corporation


Project Validation
• Comprehensive support for running validation
– EJB project: EJB validator, Map validator
– EAR project: EAR validator
– Web project: WAR validator
– Server project: Configuration files
• Manual validation
– Project -> Validate Project
• Automatic validation (on save)
– Project -> Properties -> Validation
• Can specify which validators to run
• Is somewhat expensive
– Validation results are shown in the task list
© 2005 IBM Corporation
Project Properties
• There are a number of properties that you can
set for individual projects
• These properties deal with all phases in the
lifecycle of project
• These Properties takes precedence over
workbench level preferences
• Properties that can be set for a project depends
upon type of project e.g. Web Project, J2EE
Project, Java Project
• To set the properties Select Properties from
context menu of project
© 2005 IBM Corporation
Project Properties List
Info General information on project type, location, and modification
status.
Debugger Source Specify the contents and order of the lookup path for the debugger.
Lookup The default lookup path is the project's build class path.
Beaninfo Path Specify the contents and order of Java Bean search paths to
provide Bean information relevant to the project. (add, remove, and
Java Build Path reorder)
View or change the information about the Java build path that you
supplied when creating the project
JRE Select a specific JRE version for launching Java programs. The
default is the JRE that ships with WebSphere Studio Application
Developer.
Launcher Specify the launch environment that is used for running and
debugging the modules
Project References Reference other projects that exist on your workbench workspace.
Server Preference Select the server instance used to test, and publishing functions for
the project.
Team Specify Team environment, the appropriate repository and shared
development stream.
Validation Specify which validators based on the types of resources in your
project should run for the project, and whether validation should
occur automatically when resource updates are written to the
project.
Web Specify or edit the context root for the project. The context root is
the Web application root, the top-level directory of your application
when it is deployed to a Web server.

© 2005 IBM Corporation


Manage Multiple Workspaces
• One can open multiple copies of the workspace
in order to easily switch from one project to
another which is required when
– Working on different applications or different releases
of the same application
– Want to keep different versions of the workbench for
each project
• To override the default workspace directory and
create a new workspace directory by starting
WebSphere Studio from a command prompt and
typing WSINSTALLDIR\wsappdev -data .\new
workspace location
© 2005 IBM Corporation
Local History
• Local history of a file is maintained when you
create or modify a file. Each time you edit and
save a file, a copy of it is saved
• Each state in the local history is identified by the
date and time the file was saved
• Allows you to compare your current file state to a
previous state, or replace the file with a previous
state
• Neither projects nor folders have local history

© 2005 IBM Corporation


Compare With Local History

© 2005 IBM Corporation


Replace With Local History

© 2005 IBM Corporation


Summary
• We have learnt
– A group of related views and editors is called
a perspective
– Every Perspective can be customized in
workbench
– Import to and export from WSAD Workbench
in different forms
– Depending upon the role one can switch to
various views in a Perspective

© 2005 IBM Corporation


Review Questions
• Which of the following views BEST supports
understanding the structure of an Enterprise
Application?
a) Navigator
b) Package
c) J2EE
d) Data
e) Application

© 2005 IBM Corporation


Review Questions
• A web developer wants to work with multiple Application
Developer workspaces. The developer would like to start
Application Developer by dragging a selected workspace
folder on to the Application Developer desktop icon. How
should the properties of the desktop shortcut be
configured to support this behavior?
a) Configure the "Start in" entry to the folder containing the
workspace.
b) Replace the default contents of the "Target" to point to the
root directory containing the workspaces for your projects.
c) Add the "-data" parameter to the end of the default "Target"
properties.
d) Associate the ".WAD" file extension with the wsappdev.exe
executable file.

© 2005 IBM Corporation


Review Questions
• When Action Sets are added to a perspective
from the Perspective - > Customize menu item,
they may be visible as: (select 2)
a) Workbench level menu items
b) Workbench level toolbar buttons
c) View specific menu items
d) Editor specific toolbar buttons

© 2005 IBM Corporation


© 2005 IBM Corporation

You might also like