Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
VOL. 9 / ISSUE 1
Page 1
Continued on page 2
PowerTimes
Whats Inside
on Page 3
ASP.NET Performance
Take care,
Rolf Andr Klaedtke, editor
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
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
POWEROPINIONS:
POWERBUILDER VS. J AVA VS. VISUAL BASIC VS. C#
Introduction
This is not an ordinary article. In fact its not really an article
at all. Its actually a discussion thread that took place between
some very qualified people who have frequently written
proper articles for PowerTimes over the years.
The following thread took place at the end of August in 2001.
We took out the irrelevant comments and submitted the
document to all participants again this year for a final review.
As the Editor of PowerTimes and the one who has submitted
the questions to the participants, I take full DIScredit for not
having published this much earlier. I apologize for this.
I hope youll enjoy reading the very interesting comments
as much as I did. And if youd like to add your opinions or
remarks, please feel free to send us an email:
opinions@powertimes.com.
The Question
The thread starts off with a question from Tom Brackney to
Bruce Eckel (author of various books, including the famous
Thinking in Java), who then forwarded it to the Editor
here at PowerTimes.
Right now I am learning Java through your book (i.e.
Thinking in Java) and CD. My question is what is your
opinion of PowerBuilder? Have you had enough exposure
to it or know someone who has that has and has the same
credentials you have to give an opinion as to PB vs. Java?
I guess I am seeking your opinion on PB from an
experienced OOP that has used other tools besides PB.
In a second mail, Tom added the following:
One more question if its ok. In what way are you seeing
Java implemented mostly? I am not seeing any Java except
in connection to the web as servlets or programs running
on the web server to accommodate a client request. Is this
true in your experience and what you have seen Java is
mainly used for? Personally I dont think PowerBuilder
has out lived its usefulness especially with what I have seen
in the new version. But, marketing and packaging has a
great deal to do with what products are ultimately used in
any IS shop. What is considered to be the leading edge or
hottest development language is not necessarily the best
tool to use for a particular project. But when your managers
say this is the standard tool we will be using in this
corporation, then thats it.
The Answers
So, here comes what others had to say. Please refer to the
end of the article or our website (www.powertimes.com)
for a short bio of the participating people. Thanks to Tom
Page 3
PowerTimes
the client and java on the server are much easier because
data can be passed via XML over HTTP. Im not sure if PB
is getting into Web Services (Ed. note: the answer is yes, in
PB 9) with a stub generator for WSDL or not. There is no
need for developers to spend time parsing XML - a waste of
their time; let a code generator do it. It would be pretty easy
to write a WSDL -> PB NVO compiler I think. VB is a little
easier if you use .NET because it is already Web Services
savvy.
Peter Horwood, aka Madman Pierre integrated some
other tools/languages in his opinion:
So Ill throw in some really quick comments from my
perspective and then get back hard to work making $$ from
my opinions J.
I have worked/team lead with all 4 (PB, VB, C++ and Java)
in the past 6 months.
When we were in the building process of the VB project I
was thinking. Hmm. VB isnt as bad as I remember,
obviously it has improved drastically in the past few years.
However, when we got into testing, I remembered - oh yeah...
terrible debugging, stupid errors that would have been caught
at compile time by any decent language. By the time the
project was over, I came to loath VB - purely because it
doesnt compile time error check like Java and to a large
degree PB. I even came away thinking compared to VB,
even C++ does a lot of compile time checking.
Years ago I read an article on debugging in Dr. Dobbs. I
noted in an article I subsequently wrote that if the Dr.
Dobbs article is correct, a fully debugged C++ program is
equivalent to a Java program that simply compiles. So
that would give you an idea how far down the line VB is
in my opinion. The BIGGEST advantage to VB is cheap
DEVELOPERS. If I am doing a project that is small
enough that the runtime compiling and debugging wont
frustrate me to no end, then VB is great because I can hire
reasonably competent developers and pay them in small
amounts of cheap Canadian Dollars. This is a huge
advantage.
I still like C++ for non-db stuff where you want a small tight
program. (Personally I dont touch C++ - I hire the staff).
And my companies have used C++ in the past couple years
when writing tiny utilities and operating system type drivers.
But, since Sybase dropped Power++ I do not like C++ for
anything else.
Page 4
PowerTimes
Give me the old menu painter and the old DataWindow
painter any day.
As someone who has been trying to evangelize the ObjectOriented analysis, design, and implementation approach,
PowerBuilder was always a superior language compared to
VB.... until now. What especially I like about Java, in contrast
to PB or C++, is that it is a pure object-oriented language.
With PB or C++, you could create classes and develop fully
object-oriented code, or you could choose to use the
languages non object-oriented features instead. With Java,
everything is a class, and you must create fully object-oriented
code, for better or for worse.
I agree with the suggestions that PB and VB are better than
Java for traditional fat-client/server applications. The clientside user interface capabilities and issues have always left a
lot to be desired. I also agree with the observation that few
Java developers are fully taking advantage of J2EE features
such as EJBs. I agree with the opinion that most people are
using Java for server-side processing such as generating
HTML, Servlets, JSP, etc. A few people are using Java for
transaction based processing.
As we compare Java with PB, VB, C#, and C++, I think it is
helpful to separate issues about the language from the
development environment and the execution environment.
In the case of PB, the language, the IDE, and the execution
environment are PB (with or without Jaguar CTS/EAS). I,
for one, found the EAS environment slow, unreliable, and
frustrating to use with native PB NVO components, although
with EAS 3.5, and PB 7.0 things started to get a little (only
a little) better.
With Java, the language is defined by Sun. But the IDE and
development environment can be PowerJ, Visual J++,
JBuilder, Symantec Cafe, Visual Age, Silverstream, and
others. Each of these has their base of loyal followers. In
itself, Java IDEs are a subject of great debate. The wars here
are not over. For runtime environments, in the case of Java
application servers, the leaders seem to be WebSphere, and
WebLogic with a host of also rans, each with their compelling
features. Apologies to those who love SilverStream, but I
dont think it comes close to the market share of either IBM
or BEA.
Page 5
PowerTimes
platform. Applications talking to applications over the Web.
This is the power of Web Services. Applications sending and
receiving XML messages formatted in a standard way (using
SOAP). Text-based XML messages sent over HTTP.
Application integration using data formatted in XML
documents and messages formatted in XML/SOAP. The MS
Visual Studio .Net is the best RAD environment for
developing Web Services in almost any language.
Okay, kill me now.
With VB .Net the language has really evolved. It now fully
supports inheritance, function overloading, function
overriding, polymorphism, encapsulation... all the things I
loved about PowerBuilder. But it goes beyond that. With
Visual Studio .Net, I can develop a class in any .Net language
(such as COBOL), and inherit from that component in any
other language (such as VB or C#). Cross-language
development, cross-language inheritance, cross-language
debugging, cross-language structured error handling (try
catch), debug from client to server to database. It is a beautiful
thing.
Page 6
PowerTimes
Since VB has been brought into the category of first-class
languages (OO, data types are the same as other languages,
no more variant data type, data types are classes, etc.) the
choice is more one of preference. Today, a VB class and a
C# class will look almost identical from a syntax perspective.
Yes, C# has { } (curly braces) and VB has Function/End
Function syntax, but the same underlying class from the
framework are used.
So a VB class and C# class that contain the same basic code,
will compile to the same intermediate language (MS IL),
which is conceptually similar to Java Byte code. A .Net
assembly, either a DLL or EXE, contains this intermediate
language. At runtime, the classes in the assembly are then
compiled by a Just In Time (JIT) compiler. The resulting
machine code binary is cached for subsequent executions.
Since both VB and C# compile to the same MS IL, they will
perform nearly identically at runtime. There no longer is a
performance advantage to using C++ or C# over VB.
So, if you are tired of typing curly braces and semi-colons, if
your shift key is wearing out, code in VB. On the other hand
if you want a syntax more similar to Java and C++, code in
C#.
VB is definitely worth looking at. Especially since developers
are a dime ($.01 CDN) in your neck of the woods.
Breath Here J.
Page 7
PowerTimes
Page 8
PowerTimes
Communication Middleware for Mobile
Applications A Comparison
by Dr. Silvano Maffeis, CTO, Softwired AG
About the author
Dr. Silvano Maffeis is CTO at Softwired, a company specializing in mobile messaging middleware. He holds 6
years of practical experience with CORBA middleware,
and 4 years of practical experience in Java messaging
middleware and wireless. Silvano Maffeis is the author of
various articles and books related to middleware.
He can be reached at Silvano.Maffeis@softwired-inc.com,
Phone: +41-1-445-2370.
Introduction
In this article we argue that to provide compelling data-driven
services to the mobile user, one often needs to deploy a
customized client application on the mobile device. This
client application usually has to communicate with
applications running on a server back-end. To expedite
the development of wireless services, companies are using
mobile middleware platforms to connect mobile Java
applications to the back-end. Two different middleware
standards are compared from the viewpoint of mobile
services: CORBA and JMS. We conclude that from the point
of view of user experience, scalability, and fit into a Java
application server environment (J2EE), a wireless enabled
JMS solution is preferred. This article assumes familiarity
with the general concepts of communications middleware,
as well as with CORBA and JMS.
Page 9
PowerTimes
The disadvantages are:
Higher development costs, because client applications
need to be developed.
Higher complexity of the overall solution, because
application code is distributed over client and server.
In summary, by using a middleware enabled client
application, users get a better usage experience and more
fun, at a lower cost. However, we believe that both models
(middleware and micro browsers) are appealing and have
their application areas. Actually, the two models can be
combined. For example, a micro browser can be used to
browse the service offerings of a provider, and to dynamically
download a middleware enabled client application.
CORBA Middleware
It has been proposed to use CORBA middleware on mobile
devices. Low-footprint CORBA implementations are being
worked on. Also, the OMG is working on a draft specification
titled Wireless Access and Terminal Mobility in CORBA
(dtc/01-05).
The CORBA specification was first presented back in 1992.
Thus, CORBA was not designed for mobile communications
and is used almost exclusively in server environments over
corporate networks. The standard has gained popularity until
about 1998. With the success of the Java platform (and
notably J2EE application servers), attention has been moving
away from CORBA, towards middleware solutions which
are better integrated into the Java platform and are less
complex than CORBA: RMI and Enterprise JavaBeans
(EJBs) became popular.
As a matter of fact, CORBA was conceived for computing
environments in which multiple programming languages are
used. However, in homogeneous environments, for example,
J2EE or Microsoft .NET, developers tend to prefer the
middleware tools integrated into that environment.
These are the points in favor of using CORBA on mobile
devices:
CORBA is a well accepted standard
CORBA can be used from various programming
languages, and not only from Java. CORBA is
programming-language agnostic
There is a substantial amount of CORBA experience,
books etc. available.
If a company has invested a lot in developing CORBA
based services, mobile clients can connect to those
services more easily, by using a CORBA ORB on the
device.
These are the points against using CORBA on mobile
devices:
CORBA is inherently based upon a request/response
synchronous communication model. There is a misfit
between this communication model and between the
nature of wireless networks: wireless networks are
packet based, sporadic network disconnects do occur,
References:
Page 10
PowerTimes
the 1970s.
Messaging middleware has a large share of the
middleware market and is the solution of choice for
financial trading floor systems, Enterprise Application
Integration (EAI), order processing systems, and other
areas.
There exist very large JMS installations with thousands
of concurrent users.
JMS is an asynchronous transport. Asynchronous
transports are ideally suited to packet-oriented networks
over which 2.5 and 3G services will operate.
Although JMS was not explicitly designed for mobile
devices, it provides an ideal abstraction layer for
developing mobile applications.
Increased scalability: Many mobile devices can send
messages to a server simultaneously. When messages
arrive at the server, they are added to an inbound queue
and can be dealt with when resources are available, or
can be forwarded to other servers for load sharing.
JMS middleware provides mechanisms for
implementing fault-tolerance and load balancing. This
is important for mobile services, which are likely to have
large numbers of concurrent users.
JMS middleware is inherently more scalable than
CORBA: Communication is mostly asynchronous, and
hence throughput is increased. Also, JMS messages can
be routed from one data center to another, or can be
dispatched to a cluster of servers for load sharing.
The JMS model is simpler and less complex than
CORBA. Therefore developers need less time to get up
to speed.
In practice, JMS allows wireless services to operate more
responsively, to recover from sporadic network outages
easily, and to allow mobile applications to be operated
offline. This makes for a much richer user experience.
Messaging can be implemented elegantly atop
Bluetooth, Wireless LAN, GPRS, UMTS, and Mobitex.
etc.
Messaging middleware typically provide more QoS
customization, as well as integrated security.
JMS implementations for mobile devices are becoming
commercially available, for example, iBus//Mobile from
Softwired.
JMS can be integrated with XML and SOAP, as well as
with other middleware technologies (CORBA, EJBs,
IBM MQSeries, Microsoft .NET, etc.).
Conclusions
Wireless networks behave differently than wireline networks:
devices tend to lose and regain network coverage, sporadic
network disconnects do occur, bandwidth is much lower and
varies substantially over time. Communications middleware
thus needs to addresses these problems and to provide an
adequate programming model. In this article we have shown
that Java messaging middleware (JMS) is better suited than
CORBA for running applications over wireless networks.
The main reason is that JMS provides an asynchronous,
message based transport. Using message queues hosted on
both the client and the server side, JMS applications can be
operated in disconnected mode, and data synchronization
occurs transparently and immediately, without user
intervention.
References
PowerTimes
USAGE METERING WITH MOBILEBUILDER AND ASA ULTRALITE
by Daniel Wenger and Arthur Hefti
What is MobileBuilder?
Introduction
The target of our project was the creation of a handheldbased prototype that could be used to enter values from heat
usage and other meters. The daily work would be
synchronized from a PC to the handheld device and the
collected data would be synchronized back for further
processing.
For this prototype we decided to use a Palm and the ASA
UltraLite database from Sybase. For an IDE we evaluated
MobileBuilder from PenRight.
MobileBuilder IDE
Coding in MobileBuilder is done in C. To compile a project
depending on the deployment platform a C compiler is
defined which is called from the IDE.
MobileBuilder IDE with Project Tree on the left and Script Window on the right
Page 12
PowerTimes
Adaptive Server Anywhere UltraLite
Conclusion
Project Details
More Information
PenRight! Corporation
6480 Via Del Oro
San Jose, CA 95119, USA
Web: www.penright.com
Sybase Incorporated
Worldwide Headquarters
6475 Christie Avenue
Emeryville, CA 94608 USA
Web: www.sybase.com
PowerTimes
THE ARCHITECTURAL IDE AND OMGS MDA
by Richard Hubert
Introduction
This paper provides an overview of the an Architectural IDE
an automation platform implementing the concepts of the
OMG Model Driven Architecture in the context current
OMG submission (MDA 2002) and as defined in the recent
OMG Press book, Convergent Architecture (Hubert 2002,
www.ConvergentArchitecture.com ).
PowerTimes
to rapidly record and structure significant amounts of
business information without hindering the dynamics
of group analysis sessions. The resulting models should
then be equally valuable as a source of business
information as well as for convergent refinement into
software systems.
Implementation, Build, Deployment and Test Artefacts: Significant portions of these artefacts can be automatically generated from any UML design models that
conform to the modeling style. This generation occurs
according to a documented Technology Projection that
has been designed to map a style-conform UML model
to a particular technology. Thus, the IDE must support
pragmatic, flexible configuration of Technology Projections and their automatic use in an incremental development process. Lastly, the tools must help developers create new Technology Projections or modify and
extend existing Technology Projections.
ArcStyler
The rest of this article describes how an available
Architectural IDE, the ArcStyler (iO 2002), meets these
requirements.
Figure 2 introduces the main modules of the ArcStyler, an
Architectural IDE as defined by the Convergent Architecture.
The figure positions the components, or modules, of the IDE
with respect to the RUP workflows. It also shows some of
the major tools that are currently encapsulated or explicitly
coordinated by the IDE: Rational Rose, JBuilder, J2EE/EBJ
Page 15
PowerTimes
Page 16
PowerTimes
steps. In addition, combinations of cartridges can be used in
concert to guarantee proper modularity and separation of
concerns between coexisting types of infrastructures. The
source code and other artifacts generated by the cartridge
are of consistent, pre-determined quality. The internals of
the generated artifacts (e.g. source code, deployment
configuration, build configuration) can be modified at places
deemed appropriate by the architectural style. The cartridge
uses several techniques to enable the controlled modification
of generated artifacts. However, it is important to note here
that the Convergent Architecture mandates clean modelbased, model-driven development. This means that all
artifacts that were generated from the UML-model can only
be extended or modified in a controlled manneras defined
by the architectural style. This is an explicit enforcement of
model-driven development approach. However, the rigor of
this enforcement can be regulated using the Meta-IDE
(below) to modify the rules of the code generation.
Not all aspects of a system can be reasonably represented in
UML models or derived and generated from UML models.
These aspects must be developed at the source code level.
To do this, the Architectural IDE leverages one of the several
Java IDEs available on the market. The Java IDE may be
used to refine, compile and debug the artifacts generated by
the C-GEN module. These include Java programs,
configuration files, the build environment, test infrastructure
and deployment information. During the generation process,
the cartridge clearly demarks and annotates the areas where
additions can or should be made in the Java IDE. This helps
the developer make rapid additions while maintaining
structural integrity and synchronization with the UMLmodels. In addition, the cartridge generates the artifacts
required by the Java-IDE in order to load, build, deploy and
test the system in the context of a specific runtime
infrastructure. This includes default test code to permit
evolutionary modification and testing of the system.
The Convergent Meta-Programming IDE (Meta-IDE) is
the visual development environment for a generator
cartridge. The development of a cartridge can be regarded
as meta-programming since the scripts developed here drive
the translative generation of many other programs and
models in accordance with MDA concepts. The Meta-IDE
is required only when a developer needs to extend or adapt a
cartridge. In this case, the cartridge is visually developed,
tested, traced and debugged in a similar fashion to well
known programming IDEs for C++ or Java. The Meta-IDE
is used, for example, to modify the HTML- and J2EEgeneration templates in order to produce a different lookand-feel in compliance with a particular web site branding
or a corporate identity. Using the Meta-IDE, the chief
architect and lead designers of large, multi-team IT
organizations have a tool to tailor and adapt the architectural
style and its MDA support in a well defined place and well
defined form. This helps guarantee a consistent level of welldocumented quality and architectural integrity across all
projects.
Conclusion
An architecture-driven approach according to the OMGs
Model Driven Architecture requires significant tool support
for both model-to-model and model-to-code transformations.
In addition, tool automation according to a well-formed
architectural approach can significantly improve quality
along the critical development path as well as across
development projects. For this reason, the Convergent
Architecture defines a full-cycle tool platform, known as an
Architectural IDE, as an integral part of a holistic architectural
style. The intense effort required to develop or integrate a
dependable tool environment is chronically underestimated.
In fact, the effort and skills required to develop a high-level
platform for Model Driven Architecture is prohibitive even
the largest IT organizations. Thus, introducing a pre-defined,
pre-tested Architectural IDE can significantly reduce costs
and risks in IT projects.
In this article, the underlying concepts and the rational behind
an Architectural IDE were outlined, and an available product,
the ArcStyler, was used to exhibit how these concepts are
applied in real-world situations.
Bibliography
MDA, 2002, OMG Model Driven Architecture
Initiative, http://www.omg.com/mda, http://www.omg.org/
cgi-bin/doc?ormsc/02-01-04.pdf
Kruchten, P. 1998. The Rational Unified Process,
Addison Wesley Longmann. ISBN 0-201-60459-0
Hubert, R. 2002. Convergent Architecture: Building
model-driven J2EE systems with UML. New York: John
Wiley and Sons, OMG Press, ISBN 0-471-10560-0,
www.ConvergentArchitecture.com
Page 17
PowerTimes
iO GmbH. 2002. (Interactive Objects Software GmbH)
The ArcStyler Architectural IDE for MDA.
www.ArcStyler.com . www.io-software.com
UML, 2000, The OMG Unified Modeling Language
Specification, Version 1.3, March 2000, http://
www.omg.org/cgi-bin/doc?formal/2000-03-01
Graham, I., Henderson-Sellers B., Younessi H. 1997. The
OPEN Process Specification. Addison Wesley Longman.
ISBN 0-201-33133-0
Taylor, D. A. 1995. Business Engineering with Object
Technology. New York: John Wiley & Sons. ISBN:0-47104521-7-522
The following are some of the articles that you will find in
the next issue that we are already preparing:
by Alan Walsh
Page 18
PowerTimes
WEBWORKER: CREATING A SEARCH FORM
USING A STORED PROCEDURE
by Rolf Andr Klaedtke
About the author
Using a stored procedure to query your
database
Introduction
Over the past few years I have developed several websites,
almost all of them consisting of static HTML pages, mostly
by using HoTMetaL Pro and later Adobes GoLive.
About a year ago, I thought that it would be a good idea to
finally back the PowerTimes web site with a database. As
our provider supports MS SQL Server 7 and ASP, that was
the technology to be used.
These are the base tools, as I use other utilities Ill introduce
them as well.
Page 19
PowerTimes
Creating the Stored Procedure
Before creating the form, we need to create the stored
procedure. For this example, we use MS SQL Server 7.
In the Enterprise Manager, open your database and select
Stored Procedures. You should see a certain number that
have been created when you set up the database. Select the
option to create a new one (right-click in the right panel will
do) and a window will open, allowing you to enter the code
for the procedure. Heres the one that were using for this
example, without any extra code for validation or error
checking:
CREATE PROCEDURE sp_listEvents @title
varchar(100) = NULL, @location varchar(50) =
NULL, @city varchar(50) = NULL, @state
varchar(50) = NULL, @country varchar(60) =
NULL, @typeofevent varchar(50) = NULL, @organiser varchar(75) = NULL, @startdate varchar(10)
= NULL
/*
Object: sp_listEvents
Description: Displays a list of events according to parameters received
Author: Rolf Andr Klaedtke
Date: November 11, 2001
*/
AS
SELECT * FROM dbo.event
WHERE (evt_title like @title OR @title = OR
@title is NULL) AND (evt_location like @location OR @location = OR @location is NULL)
AND (evt_city like @city OR @city = OR @city
is NULL) AND (evt_state like @state OR @state
= OR @state is NULL) AND (evt_country like
@country OR @country = OR @country is NULL)
AND (evt_typeofevent like @typeofevent OR
@typeofevent = OR @typeofevent is NULL) AND
(evt_organiser like @organiser OR @organiser =
OR @organiser is NULL) AND (evt_startdate
like @startdate OR @startdate = OR
@startdate is NULL) AND (evt_PublishFlag = Y)
ORDER BY evt_country, evt_city, evt_startdate,
evt_title
2.
3.
PowerTimes
Page 21
PowerTimes
TESTING YOUR WEB APPLICATION:
A QUICK 10-STEP GUIDE
by Krishen Kota
About the author
Introduction
Interested in a quick checklist for testing a web application?
The following 10 steps cover the most critical items that I
have found important in making sure a web application is
ready to be deployed. Depending on size, complexity, and
corporate policies, modify the following steps to meet your
specific testing needs.
Step 1 - Objectives
Make sure to establish your testing objectives up front and
make sure they are measurable. It will make your life a lot
easier by having written objectives that your whole team
can understand and rally around. In addition to documenting
your objectives, make sure your objectives are prioritized.
Ask yourself questions like What is most important: minimal
defects or time-to-market?
Here are two examples of how to determine priorities:
If you are building a medical web application that will assist
in diagnosing illnesses, and someone could potentially die
based on how correctly the application functions, you may
want to make testing the correctness of the business
functionality a higher priority than testing for navigational
consistency throughout the application.
If you are testing an application that will be used to solicit
external funding, you may want to put testing the aspects of
the application that impact the visual appeal as the highest
testing priority.
Page 22
PowerTimes
Page 23
PowerTimes
less. This rule will of course depend on your particular
application and the expectations of the people using it.
Conclusion
Testing a web application can be a totally overwhelming task.
The best advice I can give you is to keep prioritizing and
focusing on the most important aspects of your application
and dont forget to solicit help from your fellow team
members.
By following the steps above coupled with your own
expertise and knowledge, you will have a web application
you can be proud of and that your users will love. You will
also be giving your company the opportunity to deploy a
web application that could become a run away success and
possibly makes tons of money, saves millions of lives, or
slashes customer support costs in half. Even better, because
of your awesome web application, you may get profiled on
CNN, which causes the killer job offers to start flooding in.
Proper testing is an integral part of creating a positive user
experience, which can translate into the ultimate success of
your web application. Even if your web application doesnt
get featured on CNN, you can take great satisfaction in
knowing how you and your teams diligent testing efforts
made all the difference in your successful deployment.
Page 24
PowerTimes
ASP.NET PERFORMANCE
by Alan Walsh
The server automatically checks for changes and if it detects
a new version of your page it compiles it and then replaces it
in cache, after servicing all remaining requests for the page.
From the user perspective everything appears to keep
humming along even as the code changes.
Introduction
Output Caching
Page 25
PowerTimes
form that allows users to look up details about products in a
catalog. On the page that processes the request you could
include a directive like:
<%@
OutputCache
VaryByParam=ProductID %>
Duration=120"
Database Access
Even with caching, sooner or later your data is going to have
to make that trip all the way back to the database. Luckily
the .NET Framework also includes an improved facility for
data access. Under ASP developers used ADO for access to
data. Not surprisingly the .NET Framework version is now
called simply ADO.NET.
ADO.NET is quite a significant change from ADO and
certainly too deep a subject for us to cover here. But for our
purposes the relevant performance improvements in
ADO.NET can more or less be addressed by one question:
which provider do you use?
First there was ODBC, and then came OLEDB, and now
we have managed providers. This is the layer in ADO.NET
that sits between your abstract data access code and the
grungy bits that actually talk to your back end database. You
the developer write your data access code independent of
the data source and then the managed provider takes care of
translating that into something that the database can make
sense of. And thats where the hidden performance gains
are made. ADO.NET managed providers can provide big
performance gains for your application, particularly if you
are using SQL Server.
The SQL Server managed provider uses TDS, or Tabular
Data Stream, in its implementation. TDS is the native wire
protocol of SQL Server and so naturally performance is
astounding. Your mileage may vary, but expect a very
significant performance gain in your application just by
switching to ADO.NET and using the SQL Server managed
provider.
What if you are not lucky enough to be using SQL Server as
your database? All is not lost. ADO.NET also includes
managed providers for OLEDB and ODBC. The latter is a
relatively new add-on that you can download separately from
the .NET Framework. It is also the best bet for performance
if you dont have a native managed provider (i.e. SQL
Server). The ODBC managed provider should work with
any compliant ODBC driver, although it has only been tested
with the following:
Conclusion
Moving to ASP.NET offers significant performance
improvements over ASP applications. If you are starting a
Page 26
PowerTimes
new web project you should undoubtedly be using ASP.NET
for your coding. If you have existing ASP applications and
you are interested in improving performance you should
seriously consider migrating your code to ASP.NET.
Fortunately, ASP and ASP.NET can coexist quite happily on
the same server. And you can mix and match ASP and
ASP.NET pages within your application. Look at which
pages can benefit most from migrating and start there. You
can download the .NET Framework SDK right now on the
MSDN web site at http://msdn.microsoft.com.
Page 27
Dlf Alpiger
Mountain Bike
53 km from Samedan to Davos
Sandra Kreis
Swimming
2km in the Lake of Davos
Reto Kunz
Bike
139km from Davos to Amriswil
Rolf Andr Klaedtke
Running
21km from Amriswil to Weinfelden
Barbara Meier
Inline Skating
20km from Weinfelden to Frauenfeld