Managing Information Technology

(Frankie) #1
Chapter 2 • Computer Systems 49

date) provide specific details about the information that
follows. The end of details about the game is indicated by
the tag. One of the key features of XML is its
ability to have nested tags (i.e., tags within tags). The
“Score” tags provide an example of how one can use this
feature to add meaning to the information contained within
the tags.
The data display for a set of XML documents is
controlled by the use of eXtensible Style Language
(XSL) specifications. These specifications indicate how
to display XML data in different formats, such as
HTML. Let us emphasize that XML (used with XSL) is
not merely a replacement for how HTML documents are
created. It is also being used as a language to allow dif-
ferent applications residing on different machines (both
inside and outside a company) to communicate with one
another. This in turn allows a new way of developing
business applications using Web services,which are a
way of sharing computer software such that anyone, any-
where can use or reuse the logic or functionality provided
by a computer program.
It has been a long-standing practice to reuse code to
reduce software development time and costs. However,
Web services allow an entirely different way of reusing
code. Let’s use an analogy of a familiar toy by comparing
code reuse to LEGO blocks. By creating programs as if
they were small building blocks (like LEGOs) and allow-
ing these programs to be pieced together, companies have
been able to save time and money by building systems
faster. However, until the recent advent of Web services,
these building blocks wouldn’t necessarily fit with other
blocks. This was analogous to having plastic building
blocks from two different toy companies (e.g., LEGO and
Mega Bloks).
Web services are reusable programs like we have
seen for years, and many times they are written in the same
languages as before. The difference is that Web services
allow us to make all the “blocks” fit together. Previously,
developers had to concern themselves with what kind of
computer hardware and what programming language
would be used by a particular “block.” With Web services
these factors become transparent and thus a nonissue when
developing a system. The Web services “blocks” can work
with any computer hardware and any programming
language that can handle XML files. XML is the key to
making Web services work.


Object-Oriented Programming


Object-oriented programming (OOP)languages are not
new (dating back to the 1970s), but OOP has received
renewed attention because of the increased power of work-


stations and the excellent GUIs that have been developed
for these computers. OOP is neither a 3 GL nor a 4 GL but
an entirely new paradigm for programming with roots in
both the procedural 3 GLs and the nonprocedural 4 GLs.
Creating the objects in OOP is somewhat akin to 3 GL pro-
gramming in that the procedures (called methods) are em-
bedded in the objects, while putting the objects together to
create an application is much closer to the use of a 4 GL.
The fundamental ideas of OOP are to create and pro-
gram various objects only once and then store them for
reuse later in the current application or in other applica-
tions. These objects might be items used to create the user
interface, like a text box or a check box, or they might
represent an entity in the organization, such as Employee
or Factory.
The most prominent OOP languages today are C++,
an object-oriented version of the original C language; Java,
a platform-independent language developed by Sun
Microsystems; and Visual Basic .NET and C#, both devel-
oped by Microsoft. C++ is a superset of the C language, in
that any C program can also be a C++ program, but C++
introduces the power of reusable objects, or classes. Java is
a general-purpose programming language well-suited for
use on the World Wide Web, and it has quickly gained
widespread acceptance by most vendors and by program-
mers everywhere.
Java programs come in three flavors: stand-alone
desktop applications, applets, and servlets. Stand-alone
applications are run on your desktop, whereas appletsare
programs that are downloaded from a Web server and run
on your browser. The most prominent use of Java today is
servlets,programs that reside in and are run on a Web
server.
Other object-oriented languages that are gaining
prominence are those that are part of the .NET framework
from Microsoft. Introduced in 2002, the .NET framework
allows programmers to write programs in a variety of OOP
languages, including Visual Basic .NET (abbreviated as
VB.NET) and C# (pronounced “C sharp”) (see the box
“J2EE Versus .NET”).
To work with an OOP language, one must think in
terms of objects. The programmer must start by defining
those entities that are referred to as classes. A class is the
blueprint or specifications for creating an object. To work
with the class, we must create an instance of the class,
which is then referred to as the object. An object has attrib-
utes, or properties, that can be set by the programmer, or
even by the user when the program is running, if the
programmer desires. An object also has methods—prede-
fined actions taken by the object. Objects can also respond
to events, or actions taken upon the object. Objects,
properties, methods, and events can all be a bit difficult to
Free download pdf