CS 580 Client-Server Programming
Fall Semester, 2002
Lecture Notes Index
© 2002, All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 16-Sep-02
Contents of Doc 5, Store
Code Management Guide, doc/SourceCodeMgmtGuide.pdf in VW 7 installation
is VW source control management system
uses a database to store the source code
notes use PostgreSQL a free open source database
class repository use PostgreSQL
Your Own Local Repository
instructions for install on Windows 2000
Store PostgreSQL drivers are part of VW7
Sept 14, 2002 StoreForAccess was updated to correct a bug
more recent version of StoreForAccess can be obtained on VW Public repository
gain access to the repository see:
Store into an Image
the StoreForPostgreSQL parcel
the Parcel manager
the launcher in the System menu select “Parcel Manager”
the Parcel Manager Window select Developer Tools
the upper right window to find StoreForPostgreSQL
on the load Parcel icon.
“Load Parcel” icon is the left more icon on the icon bar.
Parcels & Categories
a System browser
browser now supports three ways to organized code:
Launcher in Browse menu select “System Browser”
select the “System Browsers” icon – the third icon from the
left in the Launcher
the System browser use the “Browser” menu to switch between viewing
the code via these methods
collection of classes
to view any class in the system
package can contain:
collection of classes
added to classes elsewhere in system
to perform when loaded
time grouping of related code
can be stored in a repository
be grouped into bundles for large projects
based version of a Package
grouping of related code
binary for fast loading
be created without Smalltalk source if you wish to hide source from users
a System browser and set it to view packages
the System Browser “Browser” menu select “Package” item
the System Browser “Package” menu select “New” and the
submenu item “Package”
will be prompted for a package name
this document I will use the name “StoreLectureExamples”
your new package selected in the System Browser “Package” menu
select “Make Current”
will cause any change you make anywhere in the system to be part of your
package when you are dealing with Categories
you can set the browser to show categories until you are ready to save your
code to the repository
Code to a Package
can created a package
have made the package the current package
are viewing code in Category mode
have a System browser open
a change to an existing class
our own class
an Existing Class
to the Integer class
“Integer” in the find box and hit return
the asGrade method to the converting category
"Answer the letter grade represented by self"
self > 90 ifTrue:[^'A'].
self > 80 ifTrue:[^'B'].
self > 70 ifTrue:[^'C'].
self > 60 ifTrue:[^'D'].
the bottom of the browser you should see that method is in your package. See
Level Source Control
System browser provides some source control without dealing with Store
see this functionality
the asGrade method changing 90 to 95
80 to 85 and save the method
70 to 75 and save the method
click on the “Undo” icon to undo the last change
can rollback all the changes to asGrade with the undo icon
the redo icon to redo each change
see the history of all changes to asGrade
asGrade is selected, in the browser “Method” menu select
a New Class
a new category for your new class
the Browser “Category” menu select the “New” menu
create a new class
the notes & class demo I will use the following class.
Smalltalk defineClass: #BankAccount
instanceVariableNames: 'balance '
BankAccount class methodsFor: 'instance creation'
^super new initialize
BankAccount methodsFor: 'accessing'
balance := balance + aNumber
balance := balance - aNumber
to the CS580 Store Repository
saving a package we must connect to the repository
connect to the CS580 repository on rugby.sdsu.edu your machine needs a
connection to the Internet
the Launcher Store menu select the “Connect to Repository” item
the “Connect to Database” window:
Interface select PostgreSQLEXDIConnection
Environment type rugby.sdsu.edu_cs580
me for a username and password
BERN as owner of the table.
you click on the “Save...” button you can give the settings a name
to make it easier to connect later.
click on the “OK” button to connect to the repository
all went well you are now connected to the repository. If you do not get any
errors you will be connected.
Existing Items in the Repository
you are connected to a repository you can view its contents
the Launcher’s “Store” menu select “Published
resulting window will show you the contents of the repository. When you select
a package you will see the different versions of the package. When you select
version you see the comment for that version. When a version is selected you
can either right click in the upper right window or use the File menu to load
that version into your image.
a Package into the Repository
put a package into a repository
a System browser if one is not currently open
the Package view (Browser menu item “Package”)
the package you wish to publish
the browser “Package” menu select the item “Publish...”
your commit comment in the “Publishing package” window
on the publish button
are a number of other useful things one can do like merge different versions of
a package. However, you should know enough to read the manual to find out how
to do that.
Copyright ©, All rights reserved.
2002 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA.
OpenContent license defines the copyright on this document.
visitors since 16-Sep-02