1. Delphi's Reusable Components
Delphi incorporates an object
oriented component model that allows for maximum code reusability
Developers create components
from within the Delphi Environment.
A large number of Third
Party custom components are readily available to provide specific
functionalities. There exist over 1000 third party tools and
Delphi's Visual Development
Environment allows a developer to simply grab a pre-built component
and drop it into an application. There are over 100 standard
components that ship with Delphi Client/Server Suite 2.0 which
enables rapid application development. Additionally Delphi can
turn any OLE Control (OCX) into a custom component providing open
access to a growing third party market. Today, Delphi developers
have incorporated Microsoft's Internet Control Pack, WinInet and
ISAPI functionality into applications in order to leverage client
server application over the Internet.
Because Delphi is an object-oriented
development environment, it is easy to create your own custom
controls. Through Component Building Experts and Visual Form
Inheritance, over 50% of Delphi customers are creating customized
controls to extend the power and functionality of the environment
to meet the changing business needs.
1: Delphi Client/Server Suite 2.0 has an extensible palette
of over 100 components.
A key feature of Delphi is
the ability to create new components as necessary from within
the Delphi environment. Delphi components are written in Delphi.
These new components can be as simple as an existing component
with some added functionality, or a completely custom component
that is based entirely on new code. Additionally, Delphi has
an expert to build the skeleton structure of a component with
a single click. Customized components meet the changing needs
of the development team and can be reused in many different applications
thereby increasing productivity and maintainability.
Developers constantly search
out ways of enhancing productivity and leveraging the expertise
of specialists; one way to do this is to utilize custom components
written by third parties. There is a very large and rapidly expanding
market of Delphi VCL components including enhanced database controls,
Internet controls graphing engines, spell checkers, calendars,
financial and statistical calculation engines, internationalization
components, spreadsheets and many more. The healthy growth of
the add-on component market is testament to the demand by the
market place for component based solutions.
Once a Delphi application
is compiled, the component becomes part of the executable and
does not require external files as is the case with DLLs, VBXs
and OLE components. There a several advantages to this approach
- the most important of which are:
- Simplified maintenance
- Reduced costs due to versioning
problems associated with installation of runtime environments
on end user machines.
2. PowerBuilder Controls
PowerBuilder ships with a
limited set of 22 controls covering only the most basic of design
needs. In fact, a number of the controls such as Line, Oval,
Rectangle and Round Rectangle are simply variations of a shape
control and are useful for nothing more than form decoration.
This effectively reduces the number of useful PowerBuilder controls
to approximately fifteen.
PowerBuilder developers cannot
create reusable controls that integrate into the PowerBuilder
development environment. The lack of full Object-Oriented support
prevents effective component creation and forces the PowerBuilder
developer to use other products such as C++ or Delphi to create
specialized DLL's. This forces the developer to have access to,
and be skilled in, multiple development products.
Conclusion: PowerBuilder developers
cannot effectively enhance their development environments by creating
reusable components which in turn limits developer productivity.
C. Exception Handling
Summary: Application developers
spend a lot of time "bullet-proofing" client/server
applications to meet the demanding requirements of their customers.
Only Delphi provides easy
to use exception handling mechanisms to help developers deploy
robust mission critical applications.
Delphi, having been written
in Delphi, takes advantage of its own exception handling. It
is the most stable application development environment resulting
in less down-time and more productive developers.
Exception Handling reduces
the amount of code written thereby increasing developer productivity
and decreasing maintenance costs.
In a perfect world there would
be no mistakes: Client/Server applications would never encounter
a problem; networks would never fail; hard drives would never
run out of space; people would never attempt to divide by zero;
and programmers would always write perfect code. When creating
client/server applications it is essential to write code that
is able to deal with the possibility of any process failing.
Here is how a leading PowerBuilder developer describes the error
handling capabilities of PowerBuilder:
"The PowerScript language
is less than ideal when it comes to error handling, Most functions
can diagnose errors, but with very few exceptions the default
action is 'ignore the error and proceed.' There are no debugging
switches or compiler directives to change this behavior to 'trap
all errors and halt.' With the exception of the global SystemError
event, there is little language support for automatic error detection
or handling, let alone any kind of 'on error then' construction
that applies to a particular even or object.", Breck Carter
To Check or Not To Check (Error Codes) PowerBuilder Developer's
Journal - 1994 Special Issue
This lack of support from
the PowerScript language makes it difficult, if not impossible,
to create robust error handling routines without writing enormous
amounts of code. In contrast, Delphi uses a more powerful error
handling methodology. To understand how important this new approach
is, we must first look at how it is done.
Fundamental to Delphi is the
concept of exceptions. When an error occurs, Delphi instantiates
an Exception object of that exception type. For example if a divide
by zero error occurs an EDivideByZero object is created. All forms
have built in to them the means of dealing with most errors. Rather
than having to write code to test for every possible failure,
the following construct is used:
on Exception do
// specific exception handling code here
// default exception-handling code here
Delphi also allows developers
to create their own exception types as follows:
EpasswordInvalid = class(Exception);
This new user type exception
is used simply as follows:
if Password <>CorrectPassword then
raise EpasswordInvalid.Create('Incorrect password entered' ) ;
Exceptions have capabilities
far beyond this. For instance an exception class can be created
to automatically log all SQL violations in order to audit trail
important applications. It can also be used to trap null pointers
in an application and then prevent a Windows access violation.
Conclusion: The exception
handling construct provides enormous power and flexibility not
available in PowerBuilder. It can significantly reduce the amount
of code needed to create stable applications thereby shortening
the development cycle. RAD Client/Server development tool stability
and application stability should be a major criteria for the selection
of a RAD tool.