Vous êtes sur la page 1sur 24

INTERNATIONAL JOURNAL FOR INQUISITIVE APPLICATION DEVELOPERS

JANUARY - MAY 2001

SUBSCRIPTIONS ARE FREE

VOL. 8 / ISSUE 1

GUEST EDITORIAL: BEING DIFFERENT


by Daniel Will-Harris

About the author


Daniel Will-Harris
started out as a comedy
writer in Hollywood,
then discovered computers and for better or worse, was
never quite the same.
Daniel created and edited www.efuse.com, the friendly
place to learn how to build a better web site. His opt-in
e-mail FuseLetter combines autobiography, fiction and
web tips into an entertaining mix.
To subscribe to his free newsletter (the FuseLetter) go
to http://www.fuseletter.com.
His site, www.will-harris.com features the EsperFonto
system (in use by Bitstream, Hewlett Packard and Corel),
the web's only interactive typeface selection system.
Daniel's written seven books, and is currently writing a
book called "Wallet Reading: your personality in your
pocket."

When I was a kid, I just wanted to be normallike


everybody else. But I wasnt normal, as kids around me
constantly pointed out. My hair was curly when everyone
elses was straight. I was husky (the nice word for it)
when all the other kids were skinny. I liked Broadway
musicals when other kids listened to heavy metal. I didnt
play baseball, I played Legos.
Before second grade started, I insisted on a Beatles haircut. My mom obliged, and when I walked into school (I
can still remember it clearly) I looked around and realized to my horror that no one else had a haircut like mine.
The rest of the boys mostly had crew cuts (which I called
toothbrush hair). They all looked like Dick in the
Dick and Jane books, and there I wasa mop-top fab
four, age seven.

years trying to fit in. Trying to be like everybody else. No


one was fooled, not even me. And then, since I was a
lemon, I finally started to make lemonade. I stopped trying to be normal and started to enjoy being an individual.
I wore different clothes (interesting things from the thrift
shop, and anything else that I liked). I worked unusual
jobs. As a teenager, I was the Nurseryland Bee. I stood on
the sidewalk dressed in a big bee costume and tried to
attract customers driving by in cars. What I mostly did
was cause traffic accidents, scare adults (kids werent
scared) and almost pass out from the heat.
I bought an unusual car, an AMC Pacer (which is still on
my driveway, only now as a kind of non-kinetic sculpture). I thought (and still think) its beautiful. I put eccentric and fun things in my house. Next to my computer
monitor is a stuffed toy elephant hanging like King Kong
on the top of an aluminum model of the Chrysler building (and I dont care who knows it!). I didnt do any of
this just to be different, I did it because this is what I
liked, and I wasnt afraid to show it.
When I started to write computer books, I decided they
shouldnt be like other computer books - high-tech and
boring. Mine were funny and looked elegant. They were
different and they sold well.
What I learned from all of this was that being different
makes your work stand out. While thats terrifying as a
kid, as an adult, it can be a big advantage.
A study by the J. Walter Thompson advertising agency
concluded, We see that the most popular products are
those which seem unique in terms of style or functionality. Look at the hottest selling car today, the Chrysler PT
Cruiser. It couldnt be more different than most cars on
the road, and its precisely that difference that makes it
sell so well - theres a two-year waiting list for one.

I was, in short, different. And I didnt like it. I spent many


Page 1

Continued on page 2

PowerTimes
While being different may mean that some people may
not like you, being boring means no one will. If youre
different, chances are more will.

Whats Inside

The same is true for web sites. Most sites tend to look so
similar its as hard to tell them apart as it is to tell a
Toyota Camry from a Nissan Sentra (and where do they
get those names?).

Editorial: Being Different

Lately Ive worked for some people who, despite being


adults, are still afraid to be different. These people range
from late 20s to late 40s, and theyre still acting like
theyre 14 - as if being different is the worst thing in the
world. They point to other sites and want to look just like
them.

Future Visions: Surviving on the Network Edge

I say, If youre just a copy of them, why should anyone


choose you instead of them? I think, Grow up!.
So when you work on your site, dont try to look and
sound like everybody else. Dont be afraid to be different.
Turn your differences into advantages. It can and will
work for you.

by Daniel Will-Harris

Impressum
on Page 2

by Barry Morris on Page 3

Getting Technical: DataWindow Linkage and


the LUW in the Jaguar CTS environment
by Vladimir Uzlaner on Page 9

Product Overview: Optimizing Software Development Projects


by Jean Aeschbach on Page 17

I love you - not really


by Rolf Andr Klaedtke on Page 21

Look whats out there

Daniel Will-Harris
http://www.FuseLetter.com,
http://www.eFuse.com

Websites introduced by Daniel Will-Harris on Page 23

PowerTimes: Whats coming on the website and


in the journal
be the editors on Page 24

PowerTimes is an international developers journal


published several times a year. It is targeted towards
client/server and web application developers.

Contact addresses:
Editor:
Rolf Andr Klaedtke
Bchlistrasse 21
CH-8280 Kreuzlingen / Switzerland
Fax: ++41 - (0)71 - 670 01 71
e-mail: rak@powertimes.com
Co-Editor:

Mark A. Lansing
Eichmatt 17
CH-6343 Rotkreuz / Switzerland
Fax: ++41 - (0)41 - 790 74 79
e-mail: mlansing@powertimes.com

On the web: http://www.powertimes.com


Back issues
Back issues are available on our website at
http://www.powertimes.com as Adobe Acrobat files.

Editorial Board in alphabetical order:


Don Draper
Boris Gasin
Rolf Andr Klaedtke
Mark Lansing
Alan Walsh
Subscriptions
Subscription are available for free: just go to our website
at http://www.powertimes.com and register on our
mailing list. Each time a new issue is available, mailing list members will be notified and receive the password for the issue.
Disclaimer
Articles or opinions published in PowerTimes do not
necessarily reflect the opinion of the editorial board.
They reflect the opinion of the submitter. We assume
that the copyright of all submitted articles is owned by
or granted to the submitter. We must decline every
responsability regarding technical correctness or truth
of submitted articles and opinions.

Page 2

PowerTimes
FUTURE VISIONS: SURVIVING ON THE NETWORK EDGE
by Barry Morris
No More Web Sites

About the author


Barry Morris is the CEO of
IONA
Technologies
(www.iona.com). Mr. Morris
joined IONA in November of
1994 and has served in a number of executive and management roles since that time including IONAs Chief
Operating Officer, Senior Vice President of Product
Development, and Vice President of Business Development. Mr. Morris is a graduate of New College, Oxford University. You may contact him at bsm@iona.com

Introduction
With almost incomprehensible speed, the Internet has
gone from a medium for serving up static marketing messages to a ubiquitous computing platform. And with the
pace of change accelerating, the next few years will see
an ever more profound evolution:

Within the next few years, commercial Web sites as


we know them will no longer exist. As organizations
increasingly are driven to conduct business on the
Internet, their Web sites will evolve into enterprise
portals. Ultimately, all organizations will use an enterprise portal to establish their Internet presence.

As they evolve their portal strategies, organizations


will learn that todays standalone application and
integration servers are not designed to support enterprise portals and the applications that they contain. Instead, organizations will turn to portal servers to build their on-line businesses. Application
server vendors who do not respond to this evolution
will be gone.

The demands of conducting business on-line and the


distributed architecture of the Internet will force organizations to re-engineer their applications. In place
of traditional applications, organizations will deploy
what Gartner Group calls e-services, and servicesbased application architectures will dominate.

Services-based applications will require an e-business platform that does not exist today. As organizations increasingly do business over the Internet, organizational boundary lines will blur. This blurring
will occur most quickly among those organizations
that gravitate to these new, entirely standards-based
e-business platforms. Proprietary platforms will increasingly isolate their users at great competitive cost
to them.

It should be obvious to anyone reading this article that


Web sites, as we know them, even straight-ahead, highvolume e-commerce sites, do not represent an effective
or credible e-business strategy. The reason behind the
demise of the Web site lies at the network edge.

an explosion of access
technologies shows no sign of
slowing
Inside, organizations have spent years evolving their information system infrastructure. For most organizations,
this infrastructure includes one or more operating platforms, typically involving some combination of mainframe, UNIX and Windows environments. The infrastructure also typically includes a variety of applications designed to automate business processes. Depending on an
organizations sophistication and technical prescience,
these applications interoperate to a greater or lesser degree. Finally, the infrastructure contains content, comprising both structured application data and unstructured
text, HTML pages, and other material.
Outside, an explosion of access technologies shows no
sign of slowing. Broadband technologies provide an evergrowing pipe to end users, which spurs their appetite for
access, which drives the growth in pipe capacity, and so
on. A growing variety of appliances, some user-driven
and some automated, places ever-greater demands on organizations to furnish information in multiple formats
simultaneously. And the growth in wireless access technology in particular means that appliances/users can demand information wherever they are, whenever they want
it.
Infrastructure and access meet at the network edge, where
organizations are increasingly driven to deliver pervasive, personalized content and commerce. Outside the
network edge are billions of Internet devices. Inside the
network edge is the enterprises very competitive machinery. Whatever organizations erect at the network edge
must be extremely scalable, highly reliable and available,
very secure, and online all the time.
Clearly, we are not describing a Web site here. We are, in
fact, describing an entirely new use of the Internet, designed to meet the unique demands placed on an organization at the network edge. The name for this new phenomenon is an enterprise portal.

Page 3

PowerTimes
An enterprise portal is an Internet site owned and operated by an organization in support of its business operations. The enterprise portal is a single point of contact
and community between the enterprise and all of its
stakeholders and prospects. Like the popular consumer
portals, an enterprise portal organizes a variety of information, using indexes and visual presentation.

Properly architected, enterprise


portals create enormous
opportunities for organizational
effectiveness and agility.
An existing companys Web presence is as important to
its brand identity, customer perception, and overall performance as its storefronts, direct selling process, partner programs, and other channels. Most enterprise Web
sites now contain huge amounts of information, managed
by dozens of servers. Enterprise portals will help companies better organize all of this information, in part by
allowing stakeholders to create custom views of it.

Integration, on the other hand, requires that the portal be


able to integrate data from different places and make it
work together. For example, a customer care application
may pull information from multiple sources, filter that
information, and then present it in a single customer
screen.
Properly architected, enterprise portals create enormous
opportunities for organizational effectiveness and agility. They make it possible for companies to explore entirely new business models, new products, and new ways
of connecting with entities that matter. At the same time,
poor design, disjointed processes, system outages, and
botched interactions can destroy these potential benefits
of enterprise portals. Enterprise portals will either distinguish their owners from the mass of Internet commerce
sites or damage franchises and brand names built up for
years. Success will require careful design, robust infrastructure, and an architecture that can sustain value
through rapid changes to portal content and organization
over time.
With enterprise portals becoming the new standard definition of e-business, anything less ambitious will become
irrelevant. Organizations that cannot provide this level
of service and connectedness to its stakeholders will fail.

In addition to information, though, an enterprise portal


also organizes tools, applications, and transactions provided by the enterprise to its employees, customers, and
other stakeholders. Enterprise portals support customized
views of these applications, data, and transactions, as well
as access to those resources, along with external resources
such as news sites and procurement sites.
Enterprise portals are also the platform for active delivery of information and commercial transactions to customers, partners, prospects, investors, and other
stakeholders. A customers view of the portal will contain different resources and data than an employees view,
but both will be provided by a common architecture.
Access, delivery and personalization are the bedrock of
the architecture. However, enterprise portals will also
support linkage between and integration of information
and processes in both the online and off-line worlds, and
provision of new services and products.
Linkage is the interconnection of different applications,
data, and transactions to support a user action. For example, linking ordering, inventory status, and credit
checking into a single user action will require coordination of three different systems in the typical enterprise.
To accomplish this linkage, the enterprise portal must be
able to maintain the users context, including security,
transmit the right instructions and values to each system,
and ensure that each operation is in the proper sequence.

For a true e-business to succeed


its applications have to readily
integrate and interoperate with
other applications

No More Application Servers


If enterprise portals are the inevitable vehicles by which
organizations expose their enterprises to the Internet at
the network edge, how will these portals be built and how
will they be supported? It is clear to us that application
servers, the application platform of choice today, are insufficient as a portal platform. Instead, organizations will
adopt what Gartner Group calls portal servers.
Application servers were to late 1990s computing what
database servers were to the early 1990s. Just as database servers liberated developers from many of the programmatic responsibilities associated with data storage
and management, so too did application servers make it
easier to programmatically isolate business logic into a
separate application tier. Application servers, components
and the Java programming language proved to be highly
complementary, and each of the three phenomena contributed to the others popularity.

Page 4

PowerTimes
Application servers are useful for function-rich Web sites,
and even for low-end consumer portals, because they provide a rich container for new application logic. However,
enterprise portals are far more demanding than this.
For example, enterprise portals require extensive integration of existing enterprise applications on mainframe,
UNIX and Windows NT platforms. This integration needs
to be non-intrusive, standards-based, both synchronous
and asynchronous in nature, and driven by a flexible business process modeling and workflow mechanism. Additionally, enterprise portals require extremely feature-rich
Web-facing capabilities. Portal implementers will need
features such as personalization, access control and management and content management, and they will want to
be able to expose portal content to a variety of client devices.
Application servers are good at supporting business logic.
They are not good at application integration or content
management or any of a number of other important enterprise portal functions.
As a growing number of organizations realize the importance of back-end integration to their portal strategies,
application server vendors have begun to bolt integration
capabilities onto their standard application server offerings. We believe that this is a misguided approach to portal construction that in the end will not allow developers
to maintain pace with the nature of Internet application
development, because it ignores the fundamental change
in application architecture that we believe is imminent.
We believe that application servers will evolve to become
what the Gartner Group calls portal servers. Portal servers provide organizations with all of the development,
deployment and management functions they need to build
effective enterprise portals. Portal servers offer not only
an application platform, but also an integration platform
and a Web-facing platform. In other words, they provide
the combined functionality that organizations need to
build and deploy enterprise portals.
Portal servers are more than a loose collection of application server, integration server and Web development technologies. Portal servers are designed from scratch to supply what Gartner Group calls front-end to back-end integration via composite-applications-oriented solutions.

No More Applications
Applications today, whether they are intended for
mainframes or J2EE application servers, tend to be
architected as distinct, single systems. While these applications may be designed to interact with other systems and may even be built in accordance with one of todays
standard distributed application architectures - they nonetheless are islands. And integrating these islands is a difficult and expensive undertaking.

For a true e-business to succeed its applications have to


readily integrate and interoperate with other applications
on other platforms and other environments, becoming
what Gartner Group calls composite applications. This
is the very definition of e-business computing. Todays
application architectures do not easily meet these criteria. This suggests to us that applications have to be built
in an entirely different way going forward, if organizations hope to leverage the benefits of enterprise portals
and the larger Internet on which they operate.
If todays applications are largely custom built and seldom designed to interoperate with other systems, the next
generation of applications will be designed from the
ground up to interact and collaborate with other systems.
What will make this possible is a new approach to application development that relies on a services-based application architecture. More than ever before, organizations
will build applications using components. These components will present themselves as a collection of services,
operating in a context in which discovering and invoking services is done in a standardized fashion.
These services will be entirely independent of underlying
system APIs and component models. Of course, these services will be location, language and platform independent. They will reside and interconnect on the Internetstandard transport, HTTP. They will communicate using
an RPC-like technology, which we believe will be
SOAP *.
Services-based architectures are nothing new to organizations that employ CORBA (Common Object Request
Broker Architecture), the Object Management Groups
standard for platform- and language-independent application inter-operability. However, the typical CORBA
developer is a software engineer writing C++ applications. For mainstream business application developers,
services-based architectures represent a very different
approach to application design and implementation.

developers of services-based
applications will focus far more
often on interactions.
Microsoft, with its .NET strategy, is popularizing services-based application architectures among business application developers. These architectures are at the heart
of Microsofts strategy, which envisions constellations
of computers, devices, and services that work together to
deliver broader, richer solutions [where] computers, devices, and services will be able to collaborate directly with
each other, and businesses will be able to offer their products and services in a way that lets customers embed them
in their own electronic fabric.
* Editors note: SOAP and other terms: see later in this
article

Page 5

PowerTimes
Applications built around what Gartner Group calls eservices and what Microsoft calls Web services will feature business services that involve both new functionality and recapture existing application functionality and
front-end services providing portal access to a variety
of users at a variety of clients.
Expect that these applications will involve an enormous
variety of data. Todays business application developers
are often concerned with database-centric transactions,
and even today many application server vendors respond
to this concern by focusing attention on their OLTP capabilities. But enterprise portal users will need access to
more than database data. With exposing the entire enterprise to a heterogeneous audience as their fundamental
design goal, enterprise portals will support applications
that are concerned substantially with mixed and often
unstructured data. Accordingly, developers of servicesbased applications will focus far more often on interactions. Certainly, these interactions may subsume traditional transactions, but they will also involve unstructured data and business logic.
Expect that these applications and their services will involve transactions and interactions that transcend machine, application space, and even enterprise boundaries.
SOAP will provide the standard communications protocol for these services and, indeed, for Internet-wide computing in general.
Expect that these services-based applications will have
to accommodate a variety of client devices and, on each
device, a variety of customized and personalized interfaces. Users will increasingly anticipate that their unique
needs will be met by each applications front-end services.

known extensible language that is both human- and


machine-readable, that supports content modeling,
content management and application data storage and
manipulation, and that easily interoperates with existing Internet technologies.

SOAP (Simple Object Access Protocol), authored by


Microsoft, IBM, IONA and others, provides an open
network protocol supporting invocation of application functionality across the Internet. XML provides
the language by which these method calls are defined and managed, and the standard firewall-safe
Internet protocol HTTP provides the vehicle. SOAP
opens the door to the device-, platform- and languageneutral service-based application architectures that
will change the way applications are designed and
deployed.

UDDI (Universal Description, Discovery and Integration), proposed by IBM, Microsoft and Ariba,
begins to solve the problems inherent in bringing
together e-businesses, each with its unique business
processes, unique collection of business automation
technology, and unique services made available to
customers and potential customers. UDDI provides
a universally available, standard means for unique
entities to describe and promote themselves on these
various dimensions.

J2EE (Java 2 Platform, Enterprise Edition), Sun


Microsystems specification for large-scale distributed Java systems, is intended to provide a standardized, services-rich platform for building enterprise
Java applications.

.NET, Microsofts vision for the future of the Internet,


provides a device- and platform-neutral architecture
on which application services can be built and deployed across the Internet and made available to an
open-ended variety of client devices.

Finally, expect too that a vast collection of standardized


services will be provided by one or more standard e-business platforms.

No More Operating Systems


These new services-based applications will require an
underlying e-business infrastructure designed to support
such applications and the enterprise portals that contain
them. Whereas once the terms infrastructure and operating system were largely synonymous, the coming e-business infrastructure is entirely operating system independent. In fact, operating systems have already become less
important, and as enterprise portals increasingly drive
end-users computing experiences, operating systems will
become entirely irrelevant.
The Internet represents the triumph of computing standards. The e-business platform will be entirely standards
based, with support for:

XML (Extensible Markup Language), the now well-

Because Internet applications demand it, the e-business


platform will be tremendously scalable. It must be constructed on technology that can scale quickly, both in
volume and in functionality. Accordingly, it cannot be
device dependent, nor can it require system shutdowns in
order to scale.
Given that it must support composite applications, with
their substantial back-end services and concomitant application integration, the e-business platform must provide support for synchronous and asynchronous transactional event/message paradigms.
With composite applications running on top of it, the ebusiness platform must provide a service-based, locationtransparent architecture for systems and application components. And because developers from a number of backgrounds and disciplines, using a number of programming

Page 6

PowerTimes
languages, will be relying on the e-business platform to
solve an enormous variety of programming challenges, it
must provide programming personalities for native XML,
EJB/J2EE, mainframe (i.e., CICS, IMS, COBOL and PL/
1), CORBA and COM/DCOM.
Enterprise portal applications will, from organization to
organization, present a dizzying variety of services and
functionality to a diverse population of end-users. Developers will, from project to project, need some application
features and services and not others. The e-business platform must allow for this, and provide pluggable qualities
of service, including security, distributed transactions,
management, load-balancing, fault tolerance, and so on.
Business application developers using XML and Java, who
have no particular .NET- or CORBA-like experience, will
particularly appreciate the e-business platform. With its
ability to expose existing back-end applications and other
enterprise resources as services, it will ease the transition
for mainstream developers into the world of services-based
architectures and portals.

No More Status Quo


The Internet changes everything. We see all around us
evidence that organizations are rapidly gravitating to
enterprise portals. These portals will be the vehicle by
which organizations expose their enterprise processes to
their customers and partners at the network edge, using
the Internet and its technology standards. Enterprise portals will be built and deployed in a new kind of container,
a portal server. Portal servers will provide developers with
business logic, application integration, and portal access
and control development and deployment environments.
Executing in these environments will be composite applications that conform to a services-based architecture.
In these applications, both new components and existing
applications will present themselves according the services they can provide, and developers will work to assemble the services they require to meet a particular composite application need. And finally, underlying all of this
will be an XML-native e-business platform, providing a
standards-based infrastructure and a set of enterprise services for all of the layers and devices above it.

Editors Note: This article was first published in the EAI


Journal. We are thankful to IONA Technologies for allowing us to republish this article.

Page 7

PowerTimes

Page 8

PowerTimes
Getting Technical: DataWindow Linkage and
the LUW in the Jaguar CTS environment
by Vladimir Uzlaner
About the author
Vladimir Uzlaner is an
independent contractor,
specialized
in
PowerBuilder applications. He has over 6 years experience in PowerBuilder, including PFC, OLE 2 and Distributed environments. You can contact him on
vuzlaner@sympatico.ca

tention has been paid to this problem. Unfortunately I


have faced this issue on my last two projects. Actually on
a recent project, parts of modules were moved to production and I received complaints of having to spend the
whole day restoring data that become inconsistent after
Jaguar failed in the middle of a set of transactions. Bad
news!
In the end, I used the first two methods to resolve this
problem, so I will cover the details of these in this article.

Introduction

Using a Stateless Component With Many


Blobs

I would like to discuss a very serious issue in this article.


I havent met strict direction in how to resolve this problem, neither in the industry journals, nor in the documentation, (at least not properly emphasized.)

This section covers using stateless components with three


major points related to this. Later I am going to cover
using statefull components for updating linked
DataWindows in one transaction.

The issue relates to DataWindow linkage, and what difficulty a developer may face because of DataWindow synchronization and related matters required in the development of a PowerBuilder application for the Jaguar distributed environment.

It is recommended that developers create stateless components for multi-user, high-volume applications. Such
components are destroyed (actually deactivated, and
pooled) after every method invocation. In this case, if a
given component is transactional, all transactions are
going to be completed. To state this in a more direct fashion, even for Jaguar novices, this means that if you update many database tables and you are going to do it in
one transaction, you must do it in a single function.

It is recommended to use stateless components against


statefull ones. But the major problem for stateless components is that after every method invocation the component is destroyed and the transaction is completed (or
aborted). So if we have on the client side many
DataWindows that we want to update in one logical unit
of work (LUW), we cant do it using stateless components in a straightforward manner.
As far as I know there are three methods to solve this
problem:
1.

2.
3.

Using a stateless component, passing to its


of_Update() function as many blobs for as many
DataWindows we want to update in one LUW.
Using a statefull component with its lifetime only
for the period of the database transaction.
Using one huge DataWindow object which shares
all linked DataWindows. In a stateless component
we are updating this DataWindow in one transaction

Note that DataWindow synchronization worked only in a


non-Web client. I have a feeling, that most projects that
are built upon Jaguar are Internet-based. Such applications are not required to update many DataWindows in a
single transaction. (Actually, I have heard that programmers use the third method with a shared DataWindow
for such situations). Thats why, I believe, not much at-

Well, you can do this in one public function from which


you can call as many private/protected functions as you
need. Because Jaguar sees only public functions, and only
sees such functions after invocation, the component is
losing its state.
This is the first axiom.
The next problem is what to do if you have a linkage
chain between a parent DataWindow and child
DataWindow(s). Normal treatment of any DataWindow
is DataWindow synchronization, whereby you pass to the
components method a blob where you store your
DataWindow with all its workings. You can ask if I
may only use one public function for updating, should I
pass to it all the blobs from all linked DataWindows?
The only answer I see is YES. If you have twenty
DataWindows in linkage, you have to pass twenty blobs
to this single function. You could keep all of them in an
array and pass this array, but you do need to do it all at
once - remember to pass by reference! This is the main
drawback of using stateless components when updating
linked DataWindows in one transaction.

Page 9

PowerTimes
This is the second axiom.

Client-side DataWindow Linkage

Another problem I had to resolve was in what order to


update DataWindows from parent/child chains. First I
have to update child DataWindows (only the Delete part)
and then the parent DataWindows (Update/Insert part).
For more information you can go to the following link
and check the PFC code for the linkage service:

As an example, consider a screen where we have


d_master for a parent DataWindow control object and
d_detail for a child DataWindow control object. The
latter is the parent DataWindow for another child
DataWindow control with d_detail_items as the data
object. So we have two layers of linkage:

http://www.pfcguide.com/extensions/ext_0006.asp

d_master -> d_detail -> d_detail_items

For those of you who are interested in the idea only and
not in the details, you can skip the example below and go
straight to the section on page 15 which covers using a
statefull component.

Suppose the user creates a new purchase order (PO), adds


ordered items for this PO and creates PO notes for every
item and then clicks

Example

Save. Or the user retrieves a PO, deletes some items,


adds new ones, adds notes and

First, create a DataStore object that we will use on the


Jaguar side for interaction with database. Inherit this from
a standard nonvisual object, say, n_ds_non_pfc. We will
add some common functionality and a protected instance
variable:

then clicks Save. In the clicked event of the Save button we call a remote of_Update() function of the component in_bo_jag, declared as an instance variable :
n_bo_jag
in_bo_jag

Protected:
string
is_UpdatesAllowed=IUD
// I-Inserts U-Updates D-Deletes
of_SetUpdatesAllowed(string as_arg)
//function to set this variable to desired value
(D, U or I):
is_UpdatesAllowed = as_arg

Then call CreateInstance(in_bo_jag) somewhere in the


postopen() event of the Window).

In the SQLPreview event add the following code:

//Check the arguments.


if IsNull(sqltype) or IsNull(sqlsyntax) or IsNull(buffer) then return
// Only perform the requested SQL (insert, update, delete) statements.
if (sqltype = PreviewSelect!) or &
(sqltype = PreviewInsert! And Pos(is_UpdatesAllowed,I)>0) or &
(sqltype = PreviewUpdate! And Pos(is_UpdatesAllowed,U)>0) or &
(sqltype = PreviewDelete! And Pos(is_UpdatesAllowed,D)>0) then
// Allow the continuation of the SQL statament.
else
// Stop this SQL statement from being executed.
// return 2 - Skip this request and execute the next request.
return 2
end if

Listing 1, n_ds_non_pfc.SQLPreview() event


The SQLPreview event is fired just before PowerBuilder
sends a SQL statement to database. This is the only place
where we can check which statement (INSERT, UPDATE
or DELETE) PowerBuilder is sending to the database.
Well use it in our code to first DELETE rows in any
child DataWindows and then to UPDATE/INSERT rows
in the parent DataWindows.

Before calling the remote of_Update() method we have


to GetChanges() to a blob for every DataWindow. The
full cb_save clicked event is below (I removed all error
checking and other stuff to save space):

Continued on page 10
Page 10

PowerTimes
Long ll_row
String
ls_error
Blob lblob_master, lblob_detail, lblob_detail_items
Long ll_rtn
ll_row = dw_master.GetRow()
dw_master.GetChanges(lblob_master)
dw_detail.GetChanges(lblob_detail)
dw_detail_items.GetChanges(lblob_detail_items)
ll_rtn = in_bo_jag.of_Update( ls_error, lblob_master, lblob_detail, lblob_detail_items, &
gnv_app.of_get_userid(), il_gen_num)
ll_po_notes_row = dw_detail.GetRow()
If ll_rtn < 0 then
<Error Message >
Return
Else
//
dw_master.SetChanges(lblob_master)
//
dw_detail.SetChanges(lblob_detail)
//
dw_detail_items.SetChanges(lblob_detail_items)
dw_master.ResetUpdate()
dw_detail.ResetUpdate()
dw_detail_items.ResetUpdate()
if ll_row > 0 then
dw_master.SetFocus()
dw_master.SetColumn(gen_number)
il_gen_num = Long( String( ll_rtn))
dw_master.SetItem(ll_row, gen_number, il_gen_num)
dw_master.SetItemStatus(ll_row, gen_number, Primary!, NotModified!)
end if
End If

Listing 2, cb_save.clicked() event


As you can see we get every DataWindow object to separate Blob and then pass to of_Update()three blobs. I also
will show you a trick on how to resolve a kind of bug
when the Identity column (it is for Sybase users) is not
returned to the inserted row from Jaguar, even if you
checked the Identity Column check box in the
DataWindow painter.
The calls to SetChanges() are going to unload blobs with
ResetUpdated on the Jaguar-side DataWindows to our
DataWindow controls. ResetUpdate() does the same thing,
but is faster.
To all remote functions we pass a user id to show in an
error message on the Jaguar side to whom these errors
belong. It doesnt mean I use global variable in the Jaguar environment, I just call gnv_app.of_get_userid()
method on the client side, get UserID and pass it to a
remote function.

DataWindow after SetChanges()). So, I am passing it from


Jaguar to the client through the il_gen_num parameter
and then calling SetItem() on the Client Side.

Server-side DataWindow Linkage


At last lets see how our of_Update() function in the
n_bo_jag object looks. Its big, but dont be frightened:

(Editors note: code starts on next page. For your convenience, the code will be available for download from
our website at http://www.powertimes.com. Look under
Resources.)

New <Identity Column> number is getting a new system-generated value as an identity column, but because
of a bug, after DataWindow synchronization this value is
not shown on the client screen. Even if you set the properly Identity Column in DataWindow painter (actually
it is part of a more common problem: if you SetItem()
between GetChanges() and Update() functions, these
changes are made in the database, but not on the client
Page 11

PowerTimes
/*******************************************************
Object
: n_bo_jag
Function : of_update
Access
: Public
Desc.
: Update data through appropriate DataWindow object, passed as parameter
Args
: String as_error ( by ref ) Store Error Message
Blob ablob_master ( by ref ) - for d_master synchronization
Blob ablob_detail ( by ref ) - for d_detail synchronization
Blob ablob_detail_items ( by ref ) - for d_detail_items synchronization.
String as_user - current user for statistic
Long al_gen_num. If there was no changes in the dw_master DataWindow, we cant get
po number from their blob, so we pass it as a parameter
Returns :
Long
*******************************************************/
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

We need update all DataWindows in one transaction. Because we use stateless components,
after every method invocation, all transaction will be completed and component will lose
the state.
Thats why we need make all updating and completing transaction in one function call
(this function).
So we need to pass in this function blobs for all our DataWindows.
If some of DataWindows was not changed, SetChanges() function return -1 !? So before
dealing with a
DataWindow I check if this DataWindow was changed( Len( ablob_...) <> 0
PFC Linkage service like situation:
When we are going to update chain of related DataWindows, the sequence of updating is
very important.
- If we insert row in the Master DataWindow we must first update Master DataWindow and
then Detail DataWindow,
or user will get Database Error Message like: Row in Parent table is not found
- If we delete row from the Master DataWindow we must first update Detail DataWindow and
then - Master DataWindow,
or user will get message like: Cannot delete record, because records in Child Table is
found. Actually we can avoid this
message if, in the DataWindow update property set Cascade Delete, but this decision is
very dangerous and not recommended.
We use here the same logic as PFC Linkage service does:
1. Update Detail DataWindow, Delete part only. We pass to the of_Update_Linkage_DW()
function D parameter. It is
mean that before issuing SQL statement for ids_data, the SQLPreview() event is fired.
There we check if Delete statement
is passed and is_UpdatesAllowed = D, then go ahead, if Update or Insert statement
are issued, then stop.
2. The same manner we completely Update MasterDataWindow( Update, Insert and
Delete statements).
3. At last we update Detail DataWindow Update and Insert parts only
In Purchase Order case we have more complicated situation: dw_master - Master DataWindow,
dw_detail detail DataWindow of this Master, and dw_detail_items - the Detail of dw_detail.
In this case the order of updating like that:
1. Update dw_detail_items Detail DataWindow, Delete part only.
2. Update dw_detail Detail DataWindow, Delete part only.
3. Update dw_master MasterDataWindow( Update, Insert and Delete statements).
4. Update dw_detail MasterMasterDataWindow( Update and Insert statements).
5. Update dw_detail_items Detail DataWindow, Update and Insert parts only.
It is important to keep of_Update_Linked_DW() function is private. In this case the n_bo_jag
component wont loose the state and it wont close transaction! Remember we have to
close Transaction
ourselves in the end of this function, if all updating were successful.

Long ll_test
long ll_ind, ll_count
string ls_product_id, ls_serial_num
long ll_manuf_id
DateTime ldt_today
boolean lb_transaction_good = TRUE
dwItemStatus l_stat
Double ll_rc

Continued on page 12
Page 12

PowerTimes
il_gen_num = al_gen_num
// Updating the Detail Items DataWindow, Delete part
if Len( ablob_detail_items ) <> 0 then
// check if there were changes in d_detail_items DataWindow
if this.of_Update_Linked_DW( d_detail_items, D, as_user, ablob_detail_items, &
as_error) < 0 then
lb_transaction_good = FALSE
GOTO Quit
end if
End if
// Updating the Detail DataWindow, Delete part
if Len( ablob_detail ) <> 0 then
// check if there were changes in d_detail DataWindow
if this.of_Update_Linked_DW(d_detail, D, as_user, ablob_detail, as_error) < 0 then
lb_transaction_good = FALSE
GOTO Quit
end if
End if
// Updating the Master DataWindow, all parts
if Len( ablob_master ) <> 0 then
// check if there were changes in d_master DataWindow
if this.of_Update_Linked_DW( d_master, UID,as_user, ablob_master, as_error) < 0 then
lb_transaction_good = FALSE
GOTO Quit
Else
// Because of DW Synchronization - Identity column problem, store it in il_gen_num,
// then we will get it from of_GetIdentityColumnValue() function.
if ids_data.RowCount() > 0 then
il_gen_num = ids_data.GetItemNumber( 1, gen_number )
ll_rc = ids_data.GetChanges(ablob_master)
// Probably here we are loosing Identity Column Value
end if
End if
// Updating the Detail DataWindow, Update/Insert
if Len( ablob_detail ) <> 0 then
// check if there were changes in d_detail DataWindow
if this.of_Update_Linked_DW(d_detail, UI, as_user, ablob_detail, as_error) < 0 then
lb_transaction_good = FALSE
GOTO Quit
else
ll_rc = ids_data.GetChanges(ablob_po_item)
end if
End if
// Updating the Detail Items DataWindow, Update and Insert parts
if Len( ablob_detail_items ) <> 0 then
// check if there were changes in d_detail_items DataWindow
if this.of_Update_Linked_DW( d_detail_items, UI, as_user, ablob_detail_items, &
as_error) < 0 then
lb_transaction_good = FALSE
GOTO Quit
else
ll_rc = ids_data.GetChanges(ablob_detail_items)
end if
End if
Quit: if lb_transaction_good then
If ib_distributed Then
its_jag.SetComplete()
Else
Commit Using itrans;
if itrans.SQLCode <> 0 then

Continued on page 13
Page 13

PowerTimes
as_error = SQL Error during committing the transaction~n + &
String( itrans.SQLDBCode ) + : + itrans.SQLErrText
ll_rc = -1
end if
End If
ll_rc = il_gen_num
Else
If ib_distributed Then
its_jag.SetAbort()
iel_jag.log ( as_user + : + Classname() + . of_update(). Error : + as_error )
Else
Rollback Using itrans;
End If
ll_rc = -1
RETURN ll_rc
End If
if

il_gen_num > 0 then


return il_gen_num

else
RETURN ll_rc
end if

Listing 3, n_bo_jag.of_Update() function


Sorry for using GOTO, but I am not a follower of strong principles. In our situation only the code wins, because in
case of an error we cant just leave the function, we have to do some standard procedure. In the application I use a
regime (indicated by ib_distributed variable), by which the program can run in a distributed Jaguar environment or
locally on the client machine. If anybody is interested in such a technique, please, let me know.
il_gen_num is an instance variable:
Private:
long il_gen_num

And now the protected of_update_linked_dw() function:

//********************************************************************************
//
//
Object:
n_bo_jag inherited from n_bo_ancestor
//
Function:
of_update_linked_dw
//
Access:
protected
//
Argument
s:string as_dw_name
//
string as_updates
//
string as_user
//
ref blob ablob_notes
//
ref string as_error
//
Returns:
integer
//********************************************************************************
long ll_rc, ll_ind, ll_count
string ls_product
ids_data.DataObject = as_dw_name
ids_data.SetTransObject( itrans )
ll_rc = ids_data.SetChanges( ablob_dw )
If ll_rc = 1 Then
ids_data.of_SetUpdatesAllowed( as_updates)
if Pos( as_updates, I) > 0 then
// if you try insert row
ll_count = ids_data.RowCount()
FOR ll_ind = 1 TO ll_count
ids_data.SetItem( ll_ind, last_update_userid, as_user)
ids_data.SetItem( ll_ind, last_update_dt, DateTime( Today(), Now()))
NEXT
end if

Continued on page 14
Page 14

PowerTimes
CHOOSE CASE as_dw_name
CASE d_detail
if Pos( as_updates , I) > 0 then
// if you try insert row
FOR ll_ind = 1 TO ll_count
// Copy common field from Parent DW to Child DW:
ids_data.SetItem( ll_ind, gen_number, il_gen_num)
NEXT
end if
if as_updates <> D then
// if you are not deleting the rows
//Update Product table
< Here is some logic for updating related to this transaction tables>
CASE d_detail_items
if Pos( as_updates , I) > 0 then
FOR ll_ind = 1 TO ll_count

// if you try insert row


// Copy common field from Parent DW
// to Child DW:
ids_data.SetItem( ll_ind, gen_number, il_gen_num)

NEXT
end if
END CHOOSE
ll_rc = ids_data.Update( TRUE, FALSE)
If ll_rc = 1 Then
// Dont drop the update flags, if you process Delete part only
if as_updates <> D then
ids_data.ResetUpdate()
as_error =
Else
as_error = as_user + : SQL Error for + as_dw_name + : + &
String( ids_data.of_get_sqldbcode() ) + : + &
ids_data.of_get_sqlerrtext()
return -1
End If
Else
as_error = as_user + : Error setting changes for + as_dw_name + &
~n+ this.of_SetChangesMsg( ll_rc )
End If
return ll_rc

Listing 4, n_bo_jag.of_update_linked_dw() function:


In some places I use double data type instead of long,
because we had a Sybase Identity Column Gaps problem and we got very big values there. Anyway it wasnt
working because of a bug: when you pass a parameter
with double data type to a function, this function still
treats this parameter as a long. To resolve this problem
we had to clean the Gap, reduce the identity column length
from numeric(18) to numeric(7) and update the Burning
Set Factor. But that is another story.
We have to call ids_data.ResetUpdate() only on the final
Update/Insert stage.
To sum up, this method of using stateless components is
reasonable to use when you have 2-3 DataWindow linked,
otherwise its better to use a more elegant method with
statefull components.

Using Statefull components


Another idea on how to update linked DataWindows in
one transaction is to use a statefull component, lets call
it n_update.

I know some people who will stop reading this part after
seeing the words statefull component. Statefull components are considered Jaguars resource eaters. But this
is not true - if we handle them in right way.
Lets look closer on the n_update function. Statefull components consume Jaguar resources until they are destroyed.
A statefull components behavior will be exactly the same
as a stateless one, if after every remote function call we
destroy the instance of that component.
It is dangerous to create an instance of a statefull component somewhere in the windows Open() event and destroy it in the Close() event. In this case, the component
will hold Jaguars resources until the user finishes their
data entry or comes back from lunch.
The lifetime of the n_update component will be from when
the user clicks the Save button until Jaguar issues
SetAbort() or SetComplete(). It will take approximately
the same time as if we use a stateless component, passing
1-8 blobs to the only of_Update() function. This difference will hit Jaguar very hard.

Page 15

PowerTimes
So, I propose to create two functions in the n_update component:
1. of_Update( <DataObject name>, blob, )
Here we call the ids_datastore.Update() function. If it is
fails, call SetAbort() function. In this case the whole transaction will be aborted and n_update destroyed immediately.
2. of_Commit().
Here we call SetComplete(), the transaction is committed and n_update is destroyed immediately.
Actually you can create these two functions from your
of_Update() that you use in the stateless component by
just moving the last part of code with SetComplete() to
the of_Commit function.

could do there what we wanted. Now every DataWindow


is being updated from the pfc_update() event and to set
the right updating order we have two choices:
1.
2.

use the PFC linkage service or


use w_main.of_SetUpdateObjects() function

I was able to adapt PFCs 2-tier DataWindow Linkage


service to a 3-tier version. I had to drop this approach
because we used Stored Procedures for updating
DataWindows. In this case we couldnt use a trick that
PFC uses in the u_dw.SQLPreview() event to filter out
INSERT, DELETE or UPDATE statements according to
the order of updating.
But
we
could
use
the
function
w_main.of_SetUpdateObjects() for this purpose:

On the client side we have next schema (if you use PFC,
if not the schema is similar). When the user clicks the
Save button, the pfc_save() event is fired on a window
inherited from w_main. This event triggers the following events:

lpo_objs[1]
lpo_objs[2]
lpo_objs[3]
lpo_objs[4]

w_main.pfc_BeginTrans()
Here well call CreateInstance( n_update). Its better to
put this code in w_main.

The order that DataWindows are defined in the lpo_objs[]


array is the order they will be updated in.

u_dw.pfc_Update()
Will be in a loop for all DataWindows that have an update pending. For every DataWindow in this event well
call
the
remote
function
inv_update.of_update(this.DataObject,lblob_1, )

To summarise: this approach will allow you to easily upgrade any of your application to a 3-tier model. It is very
simple, it allows Jaguar to handle DataWindow updating
on a one by one basis and not in a single 8 blob hit.

In this case will need declare an instance variable


n_update inv_update in w_main and copy the proxy of
n_update to pfe_main.pbl.

Order

for

dw_1
dw_2
dw_3
dw_4

return this.of_SetUpdateObjects(lpo_objs)

w_main.pfc_EndTrans()
Here
well
call
the
remote
function
inv_update.of_Commit(). Again its better to put this in
w_main.

Setting Link
DataWindows

=
=
=
=

Updating

As you know we need to set an update order, because


when the user creates a new record in the Master and
then in the Detail DataWindows, we have to update the
Master DataWindow first and then the Detail. But if the
user deletes a record from the Master DataWindow we
have to update the Detail DataWindow first and then the
Master. It will allow the user to update DataWindows in
our forms in any order and save all the changes in one
Save button click.
In this second method we cant set the order for updating
linked DataWindows as we did in the case of a stateless
component with one function and many blobs. In that
case we could do it because we had one function and we
Page 16

PowerTimes
PRODUCT OVERVIEW: OPTIMIZING SOFTWARE

DEVELOPMENT

PROJECTS

by Jean Aeschbach
StarTeam Overview

About the author


Jean Aeschbach is a senior
product manager for
StarTeam with Datasign AG in Basel/Switzerland.
He can be reached at jean.aeschbach@datasign.ch.

Introduction
High speed high change is today for many software
development projects the name of the game, especially in
the E-Business area. In order to keep pace in such a high
demanding environment and to stay away from chaos, it
is highly recommended to use well-known project management principles combined with best-of-breed tools.
StarTeam from Starbase Corporation is a project oriented,
collaboration toolset including configuration management, change management, task management and team
communication. It has been designed for ease of use and
is based on the Internet as the underlying communication infrastructure.
Also, the flexibility of the StarTeam model allows you to
finally manage all of your information assets, source code
as well as documentation, graphics and multimedia,
through a single coherent system. StarTeam is thus ideal
for all types of businesses and will help you optimise your
software development projects.

The StarTeam product line is comprised of the StarTeam


VirtualTeam Server and its clients: StarTeam, StarDisk,
Universal Edition, and Web Connect. When the
administrator sets up the StarTeam VirtualTeam Server,
he configures the server using the database of choice:
Microsoft Access, Microsoft SQL Server, IBM DB2,
Informix, Sybase SQL Server or Oracle.
Users can be located at one site or widely dispersed across
the globe. Users access the StarTeam VirtualTeam Server
via one of the clients:
StarTeam, StarTeam Web Edition, Universal Edition,
StarDisk or one of the supported IDEs.
StarTeam, a Windows application, provides an intuitive
GUI that displays the project, views, folders, files, etc.
The tabbed panes make navigation and deployment easy,
whether youre working on bug fixes (change requests),
product discussions (topics), work assignments (tasks)
or developing code (files).
StarTeam integrates with many popular IDEs, for
example, Allaire Coldfusion, IBM VisualAge, Inprise
Delphi, Microsoft Developer Studio, Oracle Developer,
Rational Rose, Sybase PowerBuilder and Webgain Visual
Caf.
It interoperates with PVCS and SourceSafe allowing you

Virtual Team
Server

StarTeam
StarTeam Client
Client
Windows
WindowsInterface
Interface

StarTeam
Archive

StarTeam
StarTeam Web
Web Edition
Edition
Web
Web Browser
Browser

StarTeam
StarTeam Universal
Universal
Java
Java based
based Interface
Interface

StarDisk
StarDisk

PVCS
Archive

optional

VSS
Archive

ODBC
Database

Windows
Windows Explorer
Explorer Interface
Interface

IDE
IDE // SCC
SCC Interface
Interface

Oracle, SQL
Server, Sybase,
DB2, .

Custom
Custom Applications
Applications

COM/Java
COM/Java using
using StarTeam
StarTeam SDK
SDK

Clients

optional

TCP/IP

Projects Repository

Figure 1, StarTeam Architectural Overview


Page 17

PowerTimes
to convert existing SCM projects to StarTeam. It also offers
a command-line interface.
StarTeam Web Edition users access project repositories
via a standard web browser. It allows users to check files
in and out of a StarTeam, PVCS or VSS repository, as
well as, create, edit and report on change requests and
tasks and participate in team discussions.
The Universal Edition makes the graphical user interface
available on platforms that support Java version 1.1 or
higher. This allows Unix or Mac users to access the
StarTeam repository.
StarDisk allows users to access file revisions over TCP/
IP networks through a virtual StarDisk drive. StarDisks
integration with Windows Explorer provides transparent
access to some of the benefits of StarTeam.
Customized clients can also be created using StarTeams
SDK.

Basic StarTeam Concepts


In the following paragraphs a more technical description
of the capabilities of StarTeam is given. Be aware that
the mentioned concepts are valid for all processes such
as code development (files), bug fixes (change requests),
product discussions (topics) and work assignments (tasks)
under a single integrated environment.

Repository
The backbone of the StarTeam system is the StarTeam
repository, which is supported by the StarTeam
VirtualTeam Server. This repository is an object-oriented
data store that supports object versioning, linking and
configurations. Any object (file, change request, topic,
task), known as a StarTeam item, stored in the repository
has its history recorded so that a prior state of the item
may be retrieved and restored. StarTeam items may be
linked to any other item in the repository so that the
relationships between the various information assets can
be maintained and used in your work processes.
Configurations containing many items can be created,
maintained and restored through the services of the
StarTeam repository.

Projects
StarTeam uses projects, views and folders to organize the
items stored in the StarTeam repository. A StarTeam
project is best thought of as a collection of closely related
views. Each view represents a configuration of items from
the repository and can support a different line of
development on the same code base. Folders cluster items
into groups. For example, you might want to check out
all the files in a folder to work on a particular feature of
your product. However, there are no restrictions on items
found in different projects. The items in a repository can
be moved or shared between any views, regardless of the

Figure 2, StarTeam Windows GUI


Page 18

PowerTimes
rebuild 4.1 in the future or to allow a company
that wants to purchase your source code to review
that source code after signing a tentative
agreement.

projects the items and views are found in.


Projects provide an additional layer of organization, but
they allow you provide a hierarchical structure for the
views as well as assign rights at the project level. How
projects are used is largely up to you.
You might create a project for each product that your
company produces. Or, depending on how you build your
product, you might prefer to create a project for each of a
products major components. Using a separate project for
each product components provide flexibility as each
component can easily be labeled, branched, and sent
through its own promotion model sequence.

Views
When you open a StarTeam project, you must either accept
the default (or main) view or select an alternate view.
The default view for a project typically contains the
configuration that is used for primary development.
Additional views can be derived from, that is created based
upon this view, and can take on different behaviors. The
selected view presents the items found in a particular
configuration.
Views typically have names such as Baseline, 4.0
Maintenance, Special 4.0 for Australia, and 5.0 New
Development. They represent configurations of items and
support different development baselines on the same code
base. Views can be compared and merged. For example,
you might want to merge files from both 4.0 Maintenance
and 5.0 New Development back into the Baseline view
eventually.
You can create and use views that:

Dynamically show the source code and


document changes of your project. This is the
typical use of the default (or main) view in a
project when the Current Configuration option
is specified from the View menus Select
Configuration command. This dynamic view
shows all the items as they change and is used
for collaborative development.
Reference a subset of items found in the original
view. These are often called reference views. Any
change made in the new view changes the same
item in the original view. This is because the
subset view contains references to the original
items in the original view and does not branch
when changes are made. Typically reference view
has names such as Development View or
Documentation View, exposing only items of
interest to, for example, developers or writers.
Are read-only and based upon a specific state
of the original view. This is typically done for
convenience so that the revisions of items used
in product releases can be easily located. For
example, a 4.1 Release view might be used to

Permit branching of the items in the new view.


This view can be used to modify the items found
in a specific view state without affecting the main
development. This is typically done when
creating and maintaining a maintenance
baseline.

An important feature of a view is that you can reconfigure


it to show the items as they existed in that view at an
earlier point in time or based on a view label or associated
promotion state. You roll back a view using the View
menus Select Configuration command. A rolled-back
view is read-only, showing a precise state of the items
and no longer permitting changes to them.

Folders
Each StarTeam view contains a folder hierarchy used to
organize its items. Folders reflect the logical organization
of the configuration represented by the view. Folders
typically have names such as Source Code, Schedules,
and User Manuals. They group the items based on who
needs to access them or on the closely related nature of
the set of files in them. While folders can be organized
into any hierarchy, the structure typically follows the
structure of the working folders that the files are checked
out to.
Folders can also be useful when you need to create different
configurations of shared items. You can share folders,
files, change requests, tasks, and topics between and
within views so long as the views use the same server
configuration. When a folder is shared, users of both views
can access its contents, including child folders and their
contents.
Sharing folders can be an important part of setting up a
view. For example, suppose all products use the companys
general libraries to some extent. Even though those
libraries are not maintained by the developers of a given
product, the product is based on some revision of the
source code in them and must be compiled with it.
Therefore, some of the library folders should be shared
into the products view.

View Labels
Another feature of a StarTeam view is the view label. A
view label is used to identify static configurations
containing specific revisions of items in a view. When
you create a view label, it stores a time stamp for the
view. A view label gives you a static snapshot of the
dynamic view that it was created in.

Page 19

PowerTimes
Branching Views
A common operation in software development is to create
a new configuration that holds branched items based on
some prior static configuration. This is done whenever a
user wishes to perform maintenance on a previous build
of the system but does not want to affect the current
development. StarTeam supports this through branched
views.

Linking

Merging Views

The ability to link any item to any other item is a powerful StarTeam feature. Many customers use this feature to
record the relationships between items such as requirement documents (stored in files), specific change descriptions (stored in change requests), design discussions
(stored in topics) and source code changes (stored in files).
Since links can also be pinned (or attached) to specific
revisions of linked items, you have an environment that
provides complete tracability.

Often you will want to merge these independent branched


items back into the original view or into another view.
You can merge items from different views or even the
same view but from different folders. The StarTeam View
Compare/Merge utility performs a complete comparison
of the folders, files, change requests, tasks and topics.

More information on StarTeam including the download


of the software is available at
www.datasign.ch or www.starbase.com.

Page 20

PowerTimes
I L OVE YOU - NOT REALLY
by Rolf Andr Klaedtke
Countermeasures

About the author

The mail received by the user had an attachment with a


name in the form picture.jpg. Unfortunately, the real
file name was picture.jpg.vbs but the extension vbs
didnt show up, which seems to be the default on most
systems. Unfortunately, Windows doesnt show certain
file extensions, even if you tell it to. So, the user didnt
know that he was not opening a JPG (picture) file, but
had instead just started a VBS (Visual Basic) script, with
the result described earlier.

Rolf Andr Klaedtke is an


independent consultant and
software developer with over
15 years in the IT industry,
mainly working with IBM midrange systems. He is
the publisher of PowerTimes and has been the president of the Sybase and PowerBuilder User Group Switzerland. In 1996 and 1997 he has been the main organizer of the Swiss PB Conference. Currently he is
mainly working in AS/400 and web development
projects using Macromedias tools. You may write Rolf
Andr at rak@powertimes.com.

To prevent users (and you) from such a possibly fatal


error, it would help to link the file extension VBS to an
inoffensive program like Notepad.exe, so that if a script
is opened by error, it would not be executed, but displayed
in Notepad.

This Article Is For You If...

Instead of doing this manually, you could use the script


published at the end of this article.

What is KIX32.EXE ?

you use MS-Outlook as your e-mail client or


youve heard about (or worse been the victim of) the
I love you or a similar virus or
youre curious to know what the program
KIX32.EXE on your (Windows NT) system is about?

If not, then read on anyway as it is surely interesting!

A Live Virus Attack


Some time ago, while working on site for a client, I had
the privilege to assist in fixing a live virus attack. One
of the users had inadvertently opened the attachment of a
mail received from an unknown user that promised a nude
picture of the tennis player Anna Kournikova.
Fortunately for the client, they were well organised and
the user immediately contacted IT staff to let them know
about his error. Furthermore, on that same day, they happened to have had a network specialist from their European IT headquarters on site for some training.
The PC in question was immediately taken off the LAN
and then observed. The network specialist isolated the
virus and printed its source code, showing us its construction. It was not harmful in the sense that it didnt
destroy any data, but nevertheless it destroyed all network mappings on the PC and tried to send itself to all
addresses in the address book. You can imagine the damage in a company with thousands of users! Cleaning the
systems alone takes up valuable time that would have
turned this virus attack into a major nightmare even with
no data destroyed!

The script can be executed using a program called


KIX32.EXE, which can be found on the Windows NT
Server Resource Kit version 4.0. You can also download
it for free from the website http://kixtart.org/ where you
can find more information too.
Another source of information is the online article Installing and Using the KiXtart Login Processor Tool that
can be found at:
http://support.microsoft.com/support/kb/articles/Q175/7/
32.ASP.
Heres a short description partly taken from that article:
KiXtart is a login script processor and enhanced batch
language for Windows NT. You can do all sorts of things
with its free-format scripting language like conditionally
display information, set environment variables, start programs, connect to network drives and read or edit the
Windows registry, etc.
The script following this article does the latter: it edits
the registry to prevent VBS scripts from being executed.
Instead, it opens an editor that shows the content of the
script. To let the KiXtart tool do that for you, simply start
it by typing in the command
KIX32 vbsfix.kix

vbsfix.kix being the name of the script file attached. If


you dont want to type the script file you can either copy
it from this article or download it from the site
www.powertimes.com under Resources. I have also in-

Page 21

PowerTimes
cluded a sample text file with a VBS extension
(text.txt.vbs). Once you have executed the above command successfully, you can double-click this sample file
and it should open in the editor, otherwise youll get an
error message announcing a VBScript compilation error.

By the way, if you really need to invoke a VB Script, then


you may still do so by opening it on purpose from the
engine intended.
I hope this article helps you to protect your system from
potentially dangerous scripts. Of course, the first thing
not to do is to open mail attachments from unknown
sources.
For your convenience, you can download the following
script from my website at http://www.raksoft.ch under
Resources.

Script to attach VBS files to Notepad.exe by default


; Subroutine : fix for VBS virus files - set edit as default
; vbsfix
If EXISTKEY(HKEY_CLASSES_ROOT\VBEFile)=0
$ShellDefault=READVALUE(HKEY_CLASSES_ROOT\VBEFile\Shell,)
If $ShellDefault <> Edit
$rc=WRITEVALUE(HKEY_CLASSES_ROOT\VBEFile\Shell,,Edit,REG_SZ)
$rc=WRITEVALUE(HKEY_CLASSES_ROOT\VBEFile\Shell\Edit,,&Edit,REG_SZ)
SelectCase $OS_version=W9X
$rc = WRITEVALUE(HKEY_CLASSES_ROOT\VBEFile\Shell\Edit\Command,,%windir%\Notepad.exe %1",REG_SZ)
Case $OS_version=NT4"
$rc = WRITEVALUE(HKEY_CLASSES_ROOT\VBEFile\Shell\Edit\Command,,%SystemRoot%\System32\Notepad.exe
%1",REG_SZ)
Case $OS_version=W2K
$rc = WRITEVALUE(HKEY_CLASSES_ROOT\VBEFile\Shell\Edit\Command,,%%SystemRoot%%\System32\Notepad.exe
%1",REG_EXPAND_SZ)
Endselect
Endif
Endif
If EXISTKEY(HKEY_CLASSES_ROOT\VBSFile)=0
$ShellDefault=READVALUE(HKEY_CLASSES_ROOT\VBSFile\Shell,)
If $ShellDefault <> Edit
$rc = WRITEVALUE(HKEY_CLASSES_ROOT\VBSFile\Shell,,Edit,REG_SZ)
$rc = WRITEVALUE(HKEY_CLASSES_ROOT\VBSFile\Shell\Edit,,&Edit,REG_SZ)
Select
Case $OS_version=W9X
$rc = WRITEVALUE(HKEY_CLASSES_ROOT\VBSFile\Shell\Edit\Command,,%windir%\Notepad.exe %1",REG_SZ)
Case $OS_version=NT4"
$rc = WRITEVALUE(HKEY_CLASSES_ROOT\VBSFile\Shell\Edit\Command,,%SystemRoot%\System32\Notepad.exe
%1",REG_SZ)
Case $OS_version=W2K
$rc = WRITEVALUE(HKEY_CLASSES_ROOT\VBSFile\Shell\Edit\Command,,%%SystemRoot%%\System32\Notepad.exe
%1",REG_EXPAND_SZ)
Endselect
Endif
Endif
RETURN

Page 22

PowerTimes
LOOK WHATS OUT THERE
Websites introduced by Daniel Will-Harris

About the author


Please see on the title
page for the authors
bio.
We would like to thank Daniel Will-Harris for the permission to republish these tips that have been published
in his newsletter, the FuseLetter. If youd like to receive this interesting newsletter (its free, as is
PowerTimes), then go to http://www.fuseletter.com to
sign up.

The best Clip-Art - for free (and almost free)


If you're looking for truly great clip art that doesn't look
like clip art and doesn't cost an arm and a leg, look no
further than http://www.nvtech.com 's Image Task Force.
It's a truly amazing collection of clip art that's so good it
doesn't look like clip, just art.
(Tip: Choosing images of the same style helps you present
a more consistent image--and makes your graphics look
more professional--as if one artist created them all, and
Task Force has a feature that lets you find images with
the same style).
The collection comes with software that lets you organize, search, even edit colors. You can download their excellent image organizer for free--then download seven
groups of free art. Once you do, you will certainly want
to buy the entire package. For a mere $39.95, you get
over 35,000 top quality images.
I highly recommend this collection, to designers--and nondesigners alike! http://www.nvtech.com

Working with Design Clients (including yourself)


As soon as you decide to redesign your site, or someone
else asks you to redesign theirs, you have just entered
into a relationship, my friend. And like any relationship,
there are problems that crop up.
I recently read some quotes from designers about this relationship, and I though they were so right that you might
enjoy reading them, too. Linda Hemenway
(lhemenway@santarosa.edu), an instructor of Computer
and Information Sciences at Santa Rosa Junior College (
http://www.santarosa.edu/~lhemenw ) asked some professionals to answer questions for her "Business of Web
Design" class. Santa Rosa Junior College's training program stresses the use of the Web as a platform to deliver
solutions to business problems.

The answers are revealing, educational, and worth your


while whether you're a designer, or a client.
http://gracie.santarosa.edu/web_training/client-des.html

See who links to you


Want to find out what sites link to yours? Here are two
easy ways: On http://www.google.com - in the search box,
type LINK: followed by your URL, like this
link:www.efuse.com -- you'll see how many sites link to
you, and the sites themselves.
Fast search: My favorite search engine is http://
www.alltheweb.com - to find sites that link to yours here,
click on the "Advanced search" link (or go directly to:
http://www.alltheweb.com/cgi-bin/advsearch ), then in the
boxes below choose: (from the drop down menu) Must
Include then type your web site address (from the drop
down menu) in the link to URL
It's good to use both these sites, because they have different databases. Google found 1,650 sites that linked to
eFuse, while AlltheWeb found 2,101.

Netwhistle.com: It blows when your site goes


down
The more dependent you are on the web, the scarier it gets
when your site isn't working. Unless you're going to sit
there checking your own site, every few minutes, it's hard
to tell when it's down.
I just read that "only 4% of dissatisfied customers will tell
you, the other 96% will just go away and never come back."
So what about people who try to get to your site, but can't,
because it's down. This happens to everyone (I know, it's
happened to me). And the sooner you know about it and
take action, the better.
Now there's a new, free way to monitor your site (and email accounts) once per hour. http://www.netwhistle.com
checks your site 24/7, and sends alerts to either e-mail or
pagers when there's a problem.
It's a useful way to make sure your site visitors and potential customers can actually get to your web site--and send
you e-mail.
If you don't even want to wait an hour to hear about a
problem, then you can have it check every 5 to 30 minutes. The more often it checks, the more it costs, but even
so, the cost is reasonable, from $28.95 to $48.95 a month.
If you do business on your site, it's worth it.
So try it now--the one hour alert option is free, and a great
way to find out how reliable your system really is.

Page 23

PowerTimes
POWERTIMES: WHATS COMING ON THE WEBSITE
AND IN THE JOURNAL
by the editors
www.PowerTimes.com - whats new
Yes, we admit that there has not been going on a lot on
our website after the last redesign. We were all very busy
- but behind the scene a lot of work has been done.
So, what will be coming ? Look out for the following:
Polls
Very soon youll be able to share your opinion with
others and see the results online on our site. And youll
even have the possibility to submit your own questions to the PowerTimes community.
Event Calendar
Event organizers will have the possibility to enter their
event in our database, which will be searchable by
country, city, topic, etc. This can be user group meetings or technical conferences. That way, site visitors
know whats going on in what place. This can be especially helpful if youre on a trip in a foreign country or city and want to get information about the local
events.
Searchable database of authors and articles
This has been announced on our website already: youll
have the possibility to search our database for an author or an article or by keyword.
Links
There will be a dynamic link section: in fact, the links
are stored in a table which allows for categorization
and searching. We will also add a feature that allows
you to submit your most interesting links. These will
be reviewed prior to publication to insure that only
relevant links will be listed.

Simply put: without authors, theres no PowerTimes. Even


thousands of subscribers wouldnt change anything on
that rule.
So - if you know something that others may not know but
be interested in - talk to us. Wed like to discuss your
ideas and will provide as much help as we can. If you
dont feel secure or need translation assistance - again,
let us know, we are sure to find a way.
Please contact either Rolf Andr Klaedtke at
rak@powertimes.com or Mark Lansing at
mlansing@powertimes.com if you are interested in contributing something to PowerTimes. We cant promise
you fortune, but all the glory will be yours !

Other plans
We have in mind to create a new column called Introducing... where wed like to introduce PowerTimes readers to you. In fact, PowerTimes has subscribers all over
the world and we think it would be very interesting to
know a little about other people in other countries.
There will be a form online where readers can provide
some information and if picked by the editors, they will
soon be introduced in these pages.
While this doesnt sound very technical in a technical
journal, we believe that you will agree with us that human beings are very important and that it can indeed be
very interesting knowing more about them.
Oh, there will also be something technical: in fact, besides introducing readers (and why not authors ?) to you,
well also ask them to tell us their favorite internet links,
technical books or even provide a short technical tip.

Coming articles

Something to win...

Currently, articles on the following topics have been announced or promised:


- Knowledge Management
- Active Server Pages
- Microsofts .NET architecture
- A review of PowerBuilder 8

Last but not least, there will be something to win: we will


organize a prize draw towards the end of the year. There
will be a prize for one of the readers that we introduce to
you.

Looking for Authors


This has been a constant: were allways looking for articles, respectively authors who are willing to write for
PowerTimes. Of course, the fact that we unfortunately
cant pay for articles plays a certain role - but on the other
hand, we dont charge for subscriptions either, so its not
that were keeping all the money for ourselves. Rather,
we spend our spare time and money in this project.

Furthermore, you will have the possibility to vote for your


favorite author/article. The winner will receive a small
recompensation.
Finally, we will draw a prize among all the authors. As
mentioned earlier we cant pay for all the articles but well
pick at least one and will send him a small gift. It will
definitely be a surprise, but we will let you know on time,
dont worry.

Page 24