What's New IntraWeb 8.0
IntraWeb 8.0 introduces several new features. However, one step taken in this
version is to re-work some of the core code to ultimately add stability and
increase performance. To this end, Atozed has been working hard on performing
tests and improving the throughput of applications, both in terms of
bandwidth reduction, as well as simultaneous sessions. We have also laid the
foundation for many new features to come in 8.1 and later.
New features in 8.0 :
- Page References. Allows access to forms directly as if they were pages
(similar to ASP.NET) and therefore provides
easier integration with
ASP.NET sites.
- Improved Session Timeout messages.
- New HTML 3.2 DBGrid component
- New and improved Standalone screen
- Tray Icon option. You can now have your Standalone applications run in the
tray icon
- Speed improvements
- JavaScript improvements
- Reduction in HTML output
- IWMenu component for Visual Studio
- IWTreeView component for Visual Studio
- Testing Framework
- Script Recorder
- Improvements to TIWCalendar, allowing localization
- Improvements to TIWTabControl, allowing greater customization
- New OnChange event of TIWTabControl, permitting users to attach an event
in response to a page change
- New Demos (GuessTest, MemoryManager)
- Code cleanup
Testing Framework
One of the biggest features of Intraweb 8.0 is the Testing Framework. It's
uniqueness is that it focuses more on allowing you to test the logic of your
application. To this effect, in combination with DUnit, you can create from
very simple to more complex tests and make sure that your applications
behaves correctly. An example ships with Intraweb, the GuessTest demo. Two
simple functional tests are performed to make sure when a number is entered,
correct steps are taken.
This GuessTest demo comes with its own version of the well known Guess demo -
it is not meant to be a regression test for the original Guess demo.
In a real world project you would of course just reference the
units of the project to be tested - and not duplicate them, as we did
for this demo here.
 |
//This test checks if the requirement is met that a number from
1..100 should be //be successful. In theory this test should be run
multiple times as we treat //the "business logic" of Guess as black
box. We can not predict what random number //it will pickup. So we have
to "hammer" on it to see if it fails somewhen. procedure
TIWTestCase2.TestSuccess; var i: integer; begin
with NewSession do try with MainForm as TformMain do
begin i:=0;
repeat
inc(i); editGuess.Text :=
IntToStr(i);
Submit(butnGuess); until Terminated or (i =
100); Check(Terminated,'Guess did not succeed
on any number from 1..100.');
end; finally Free; end; end;
//This test should fail with a probability of 80% as we only test
numbers from //1..20. This is NOT a (valid) requirements test, its just
to demonstrate how a //failed test will look like. procedure
TIWTestCase2.TestPossibleFailure; var i:
integer; begin with NewSession do try with
MainForm as TformMain do begin
i:=0;
repeat
inc(i); editGuess.Text :=
IntToStr(i);
Submit(butnGuess); until Terminated or (i =
20); Check(Terminated,'Guess did not succeed
on any number from 1..20.');
end; finally
Free; end; end; |
Script Recorder
As you can see from the previous code, we have entered the code manually for
the tests. For simple tests, this is easy, however it soon becomes
cumbersome for more complex testing. That is why IntraWeb 8.0 also has a
script recorder that allows you to record your steps and then perform tests on
them. This can be done using functionality available in the Standalone
server window.
Performance Improvements
IntraWeb has come a long way since it's origins. During each version, we have
added more and more features and improved functionality. In some cases, these
improvements have had somewhat of a trade-off in speed. In 8.0 we have
focused around these issues and have improved performance, in some cases by
up to 40%, and will continue to do so. Below are some charts on tests
performed, before and after optimizations.
General
- String handling
String handling has been
reviewed and optimized a lot. Additionally, in Delphi 2006 IntraWeb takes
advantage of Borland's optimized string functions and the new
memory manager.
- Rendering
IntraWeb's rendering process relies
on Streams which have been written to disk in previous versions. In
8.0 we have changed this to memory and this will cut down rendering time
on a typical page up to about 75%. The following charts are showing the
render time in [ms] per single page. For this test 336 page
requests have been made to get stable results. As you can see there are some
random peaks, which are caused by system activity and other
concurrent processes. The amazing point is that, when using
MemoryStreams, these peaks are smaller than the fastest page
requests with FileStreams.
Rendering using
FileStreams, IntraWeb 7.2
 Rendering using MemoryStreams, IntraWeb
8.0
Basically, the rendering time has been cut down by
about 75%:

Partial Updates
Partial updates have also been optimized a lot. The amount of data
which is going over the wire between to page request depends on the actual form
and the number forms that have been updated. Therefor we have tested 3
variants:
- Optimistic: 1 control out of 20 is updated after the user presses the
submit button
- Conservative: 8 controls out of 20 are updated
- Worst case: 9 controls out of 9 are updated.
The initial page request always transfers the full page- which is basically
the same as not using Partial Updated (umAll). As you can see even the worst
case transfers much less data now.

|