Introduction
Summary
This section will touch briefly on key .NET technologies such as Component
Services (COM+), C#, and SQL Server 2000.
- A very handy feature of .NET is that COM+ attributes can be written in
code instead of configuring them during deployment. For example, a poolable
class with minimum and maximum pool sizes can be written in code as follows
<ObjectPoolingAttribute(Enabled=true, MinPoolSize=2,
MaxPoolSize=10, CreationTimeout=10000)>
public class APooledClass { ... }
- Several things differ between writing ordinary .NET components and writing
serviced one, including the following:
- It is recommended that you call Dispose() when you are finished with
an instance of a serviced component.
- Static methods are not serviceable.
- You should not use non-default constructors
- Services flow between machines, but only when DCOM is used.
- During runtime, a user executing a COM+ application must have
permission to run unmanaged code.
- Windows XP and Windows .NET Server will contain COM+1.5 with many new functionalities
- Process Recycling
With process recycling you can use code attributes to tell the
system how and when it should restart a process, for example, after a
certain amount of requests every week. This can be a simple way to
escape memory leaks!
- Configurable Isolation Level
In COM+ 1.0, COM+ transactions against SQL Server were always SERIALIZABLE.
In COM+ 1.5, the isolation level can be configured as needed.
- Applications as Windows Services
In COM+ 1.5, it is possible to run applications as Windows services.
This facility can be used as a solution for the short delay that might
occur when the first request is made to a COM+ application after system
boot (or after the application has been shut down). It is also handy if
you want to run the application using the local system account.
- Memory Gates
The feature prevents the creation of additional objects when the amount
of free memory falls below a certain level. This feature prevents
creation of new objects when there is not enough memory to support them.
Recall that strange errors occur when a system runs out of memory.
- Pause/Disable Applications
In COM+ 1.5 you can pause and disable applications. In COM+ 1.0, you couldn't
do this and you had to delete a component if you want people to use it
only for a certain amount of time.
- Process Dumping
This allows you to take a snapshot of the process without having to stop
it. You then examine the state of the process using a debugger.
- Moving & Copying Components
In COM+, if five applications used the same component, then
upgrading the component in one application will upgrade the others. In
COM+ 1.5, it is possible to configure the same physical component
several times and in different ways.
- Public/Private Components
In COM+ 1.0, all components within an application were public. In COM+
1.5, you can configure some components to be private to the current
application. The less you expose externally, the easier it will be to
make changes to the application in the future.
- Application Partitions
The purpose of application partition is to partition a machine to
that applications don't disturb each other. Consider the possibility
of running several instances of SQL Server 2000 in one single machine.
- COM+ Applications as XML Web Services
It will be possible in COM+ 1.5 to expose a COM+ application as an XML
Web Service.
There are some interesting features for developers to consider such as XML
Support, user-defined functions, distributed partitioned views, and other
interesting features:
XML Support
There are many interesting XML support features including the following:
- You can pass XML documents to stored procedures and open them for further
processing. This gives, for example, a good solution to the problem of
passing in several rows to a stored procedure in one call.
- You can fetch results from SELECT
statements as XML documents. This means that the result is created directly
in XML instead of having to convert it at the middle tier of the client.
There are three different kinds of UDFs in SQL Server 2000:
- Scalar functions
These functions take zero or more input parameters and return either a
scalar value or a table. These functions can be used in a SELECT statement
similar to using CONVERT().
- Inline Table-Valued Functions
ITVFs return a table. The result is created with one single SELECT
statement. ITVFs are similar to views but can take parameters.
- Multistatement Table-Valued Functions
MTVFs return a table. The result is created with multiple statements
defined in a BEGIN...END block. MTVFs are a
good solution where you normally use temporary tables.
Distributed Partitioned Views (DPV)
With DPVs, a table can be partitioned over several machines and it will be
completely transparent to the client.
Other Interesting Features (see MSDN for details)
- Improved replication support (queued updated with MSMQ)
- BEGIN and TABLE
data types
- Declarative cascading referential integrity
- INSTEAD OF triggers
- Multiple instances of SQL Server
- Extended properties (add own metadata to schema)
- Indexed Views
- New built-in functions
- Save TEXT, IMAGE
and so on in row value.
- Several productivity enhancements in Query Analyzer.
- Performance and scalability.