Professional Documents
Culture Documents
NET
SOFTWARE DESCRIBTION
Microsoft .net is a set of micro soft software technologies for rapidly building and
integrating xml web services, micro soft windows-based applications, and web solutions. The
.net framework is a language-neutral platform for writing programs that can easily and securely
interoperate. There’s no language barrier with .net: there are numerous languages available to the
developer including managed c++, c#, visual basic and java script.
The .net framework provides the foundation for components to interact seamlessly,
whether locally or remotely on different platforms. It standardizes common data types and
communications protocols so that components created in different languages can easily
interoperate. “.net” is also the collective name given to various software components built upon
the .net platform. These will be both products (visual studio.net and windows.net server, for
instance) and services (like passport, .net my services, and so on).
The clr is described as the “execution engine” of .net. It provides the environment within which
programs run. The most important features are:
Clr provides memory allocation and deal location facilities, and garbage collection. Some
.net languages use managed data by default, such as c#, visual basic.net and jscript.net, whereas
others, namely c++, do not. Targeting clr can, depending on the language you’re using, impose
certain constraints on the features available. As with managed and unmanaged code, one can
have both managed and unmanaged data in .net applications - data that doesn’t get garbage
collected but instead is looked after by unmanaged code.
Common type system - the clr uses something called the common type system (cts) to
strictly enforce type-safety. This ensures that all classes are compatible with each other, by
describing types in a common way. Cts define how types work within the runtime, which enables
types in one language to interoperate with types in another language, including cross-language
exception handling. As well as ensuring that types are only used in appropriate ways, the runtime
also ensures that code doesn’t attempt to access memory that hasn’t been allocated to it.
Common language specification - the clr provides built-in support for language
interoperability. To ensure that you can develop managed code that can be fully used by
developers using any programming language, a set of language features and rules for using them
called the common language specification (cls) has been defined. Components that follow these
rules and expose only cls features are considered cls-compliant.
.Net provides a single-rooted hierarchy of classes, containing over 7000 types. The root
of the namespace is called system; this contains basic types like byte, double, boolean, and
string, as well as object. All objects derive from system. Object. As well as objects, there are
value types. Value types can be allocated on the stack, which can provide useful flexibility.
There are also efficient means of converting value types to object types if and when necessary.
The set of classes is pretty comprehensive, providing collections, file, screen, and
network i/o, threading, and so on, as well as xml and database connectivity.
The class library is subdivided into a number of sets (or namespaces), each providing
distinct areas of functionality, with dependencies between the namespaces kept to a minimum.
The multi-language capability of the .net framework and visual studio .net enables
developers to use their existing programming skills to build all types of applications and xml
web services. The .net framework supports new versions of Microsoft’s old favorite’s visual
basic and c++ (as vb.net and managed c++), but there are also a number of new additions to the
family:
Visual basic .net has been updated to include many new and improved language features
that make it a powerful object-oriented programming language. These features include
inheritance, interfaces, and overloading, among others. Visual basic also now supports structured
exception handling, custom attributes and also supports multi-threading.
Visual basic .net is also cls compliant, which means that any cls-compliant language can
use the classes, objects, and components you create in visual basic .net. Managed extensions for
c++ and attributed programming are just some of the enhancements made to the c++ language.
Managed extensions simplify the task of migrating existing c++ applications to the new
.net framework.
C# is microsoft’s new language. It’s a c-style language that is essentially “c++ for rapid
application development”. Unlike other languages, its specification is just the grammar of the
language. It has no standard library of its own, and instead has been designed with the intention
of using the .net libraries as its own.
Microsoft visual j# .net provides the easiest transition for java-language developers into
the world of xml web services and dramatically improves the interoperability of java-language
programs with existing software written in a variety of other programming languages.
Active state has created visual perl and visual python, which enable .net-aware
applications to be built in either perl or python. Both products can be integrated into the visual
studio .net environment. Visual perl includes support for active state’s perl dev kit.
ASP.Net
Introduction
With the advent of ASP.NET we see a shift from traditional scripting to the beginning
of full-fledged programming online. VBScript isn’t the only option anymore, as
programmers can now employ the full power that lies behind both Visual Basic (VB) and
C within their ASP.NET assemblies.
There is no denying the wide spread acceptance that .NET received from the developer
community. It’s proven itself to be a well-developed framework with solid ideas on how the
programming world should continue to change. The introduction of a software solution that
enables anyone to code in any language that is compatible with the framework is
groundbreaking to say the least.
Here we will take a look at how Active Server Pages (ASP) itself began just a couple of
years ago and how it has captivated programmers ever since. It has had some problems, of
course, but the .NET architecture seems to have found solutions to many preexisting
programming problems. There have also been changes to how ASP works with the server and
client, to provide the user with the information that you want to provide.
Even though this is a stable beta, and many people are assuming already that what we
are seeing within Beta 2 is basically the “freeze” for many features, it still has a couple
of caveats, due to its beta nature. Learning of these problems within the framework can allow
for preparation against it.
Visual Basic programs, although easier to develop, when used for CGI, performed
poorly and the overhead hogged resources. Other languages such as Perl require the Web server
to launch a separate command-line program to interpret and execute the requested scripts,
increasing page-load time and reducing server performance.
CGI itself hogs resources because every page request forces the Web servers to launch
and kill new processes and communicate across these processes. This is time consuming and
also uses up precious RAM.
Another problem facing development teams in the mid ‘90s was the fact that a Web site
is a mixture of Hypertext Markup Language (HTML) and logic. They needed a way to mix the
programmer’s code with the designer’s page- layout HTML and designs without one messing
up the other. There were many solutions to this problem, ranging from custom template
systems to Sever Side Include (SSI) statements that told the server to execute code based on
special HTML comment tags.
Database-driven interactivity was another challenge. The demand for complex Web
sites had just kicked off, and developers needed to supply that demand in a manageable
fashion, but the tools available did not make this an easy task.
Those who could achieve it demanded rewards that matched the difficulty of what
they were being asked to do.
What was needed was a solution for the rest of us. It needed to be a simple
scripted text-based technology like Perl, so developers could tweak and alter their pages
without compilation and with simple text-editing tools such as Notepad.
It needed to have low resource requirements while keeping high performance;
therefore it needed to be executed within the server environment just like ISAPI, but without
the complexity.
Designers and cross-discipline teams demanded that it should include SSI and
template features to make integrating page layouts simpler to manage. To be truly popular,
it should run off a language that would be easy to pick up and was familiar to a large
community of developers. Enter Active Server Pages!
.NET
.NET is Microsoft’s platform for Web Services. Web Services allow applications to
communicate and share data over the Internet, regardless of operating system or programming
language.
The .NET Framework consists of several parts, including the Common Language
Runtime and ASP.NET.
.NET Clients
.NET Servers
The .NET Servers, including the Windows 2000 server family, make up Microsoft
.NET’s server infrastructure for developing, deploying, and managing Web Services.
Designed with performance in mind, the .NET Servers will provide enterprises with the
resources required to integrate their systems, applications, and partners via Web Services. The
.NET Enterprise Servers are
In this section, we will illustrate an important behavior of certain server- side controls.
Some server-side controls can generate automatic postbacks on selected events. That means,
to submit a form, we may not have to wait until the user clicks the submit button. For
example, the SelectedIndexChange event of an asp:ListBox is an event that is capable of
triggering a postback. If we want this mechanism to work, we will have to set the
AutoPostBack property of the List box to “True.”
To illustrate the AutoPostBack attribute of an asp control, we will revise our flower
selection example. We will remove the Submit button (although we could have kept it, too,
without any loss of functionality).
We will set the AutoPostBack attribute of the list box to be True, and we will attach
the showSelection VB function on its onSelectedIndexChanged
attribute.
When you run this form, every time you select a new flower, the system will display
your selection in the label. We do not need the Submit button because the
onSelectedIndexChanged event will generate a postback.
A Web form of your design can run on a specific browser of your choice, or it can run
on any browser and automatically render the browser-compliant HTML.
It is built on the Common Language Runtime, thereby providing a managed
execution environment, type safety, inheritance, and dynamic compilation. It can be
programmed in any CLR-supported language.
It supports WYSIWYG editing tools and development tools such as
VS.NET.
It supports a rich set of controls that enables you to encapsulate page logic into
reusable components and declaratively handle page events.
It allows for separation between code and content on a page.
It provides a set of state management features that preserves the view state of a
page between requests.
A Web form may contain directives, server-side scripts, client-side scripts, static texts,
Web controls, HTML controls, and many others.
In the remainder of this section, we will provide an overview of ASP.NET Page
directives.
The first difference an experienced ASP developer will notice is that VBScript support
has been dropped in favor of VB.NET. This is not as much of a hurdle as it sounds like, as the
syntax is quite similar, and VB.NET is a full-fledged language and so provides a lot richer
environment than VBScript ever could.
As described above, all ASP.NET languages are object oriented, event driven, and
server compiled. This brings many benefits, especially where improvements were needed
most, namely performance, stability, scalability, and manageability.
With Classic ASP, you pretty much had to code your whole application from
scratch.ASP.NET has several laborsaving additions to make life easier. Web forms introduce a
new Visual Basic Rapid Development style way of looking at forms in Web pages.
With Web Forms, the developer uses new form components that you can add in the
traditional way or through code, and they enable the programmer to call on server side event
driven programming and true separation of layout and logic. You can separate the layout code
and functions by using code behind pages that use inheritance to add methods to the form.
.NET form controls maintain the session state so the users input remains when the page
is submitted, and the controls’ property values are available to the ASP code without resorting
to querying the request object.
The framework foundation class libraries contain exciting new features, previously only
available from third parties such as the System. Drawing tools, which enable you to build
dynamic images on the fly, built in browser based file upload and system network services for
working with TCP/IP and DNS.
With Web Services and built-in support for SOAP you can distribute code and
applications. Your ASP.NET scripts can consume services across the Web, and publish and
expose routines as services just as easily. Deployment, including server configuration, is
mostly just a matter of transferring files with configuration that was previously only available
from the MMC now implemented with XML files. Now you do not need to register and un
register components, and the server can handle multiple versions of the same component
without conflicts.
Mission critical services has increased support with load balancing and several state
management options, including the ability to store state information in an SQL Server
database and pass the session ID on the URL to avoid requiring the user to have cookies.
The Request object is used to read data that was packaged inside the
HTTP request for the page.
The Response object allows you to inject data, including HTML, cookies, or redirection
headers into the response stream that is sent back to the client’s browser.
A Session object is created when the first request from a particular client is processed,
and it stays in scope until a timeout period expires following the last request from that
user, allowing you to store data and objects that span multiple requests from one user.
The Application object is similar to the Session object, but its data is shared across all
client requests over the lifetime of the application, and it also allows you to write code
that runs automatically when the applications starts or ends.
The Server object provides a set of generic utility methods for creating COM
objects, encoding data as HTML or URL strings that can be embedded within the
HTML sent back to a browser, and finding the actual file locations that correspond
to virtual paths.
Validation Controls
hopefully will be polished in the final product. The best strategy to learn the family of controls
is to learn them one at a time, and finally to apply the summary validation.
Microsoft, realizing that ASP does possess some significant shortcomings, developed
ASP.NET. ASP.NET is a set of components that provide developers with a framework with
which to implement complex functionality. Two of the major improvements of ASP.NET over
traditional ASP are scalability and availability. ASP.NET is scalable in that it provides state
services that can be utilized to manage session variables across multiple Web servers in a
server farm. Additionally, ASP.NET possesses a high performance process model that can
detect application failures and recover from them. Along with improved availability and
scalability, ASP.NET provides the following additional benefits:
Simplified development ASP.NET offers a very rich object model that developers
can use to reduce the amount of code they need to write.
ADO.NET
ADO.NET should be your strategic choice for n-tier application development in a COM
environment. While it is fairly easy for you to run your ADO code in an *.aspx page as
.NET provides backward compatibility, you will not be able to take advantage of some key
benefits of the .NET framework such as data binding. ADO uses RecordSet objects that
follow guidelines that are no longer suitable in .NET.
Therefore, you cannot use a RecordSet object to populate an ASP.NET or
Windows Forms data grid by attaching it as a data source.
Instead, you will be required to iteratively loop through the RecordSet object and
populate these data bound controls manually. Additionally, by using the ADO.NET
framework, you are inherently preparing your application for much more robust activity. Even
if you are not using XML extensively within your application today, by using the
ADO.NET framework you have set yourself up for success in the future.
ADO.NET clearly provides some key advantages in applications that require a readily
transportable disconnected data store or need to support a highly scalable middle tier.
However, there is one core feature that ADO.NET doesn’t support, the use of server side
cursors. A server side cursor requires that an open connection be maintained between the
application and the database. In client/server applications, this was a fairly common approach
and there are a number of applications and situations where you still should use server side
cursors.
The same could be said for ADO.NET. It is a vast departure in some ways, but
not in others. Suffice to say that you will have to change your existing code to make it work in
the ADO.NET world.
To start with, let us talk about the foundation.ADO.NET has taken XML to heart with
rich support for XML data, both as a data consumer and as a data provider. Later versions of
classic ADO had some support for XML, but the format was difficult to use unless you were
exchanging it with another ADO client. The XML documents that ADO.NET creates are
consistent with the XML specification and are what is known as “well-defined
documents,” making them suitable for consumption by any data access technology that
understands XML. You can take a plain XML document with just a root node and open it in
ADO.NET, add data to it, and save it back out.
The Recordset is dead.ADO.NET has a couple of new ways to serve data, which made
the Recordset obsolete. These new objects are the DataSet and the DataReader. The DataSet
has really made the classic ADO Recordset object obsolete by providing functionality that
goes far beyond what the Recordset was able to provide.
At the heart of the Recordset was the cursor. The classic ADO connection and
Recordset objects both had a property to set the location of the cursor, either client-side or
server-side. This provided a source for confusion, and enabled programmers to open
scrolling, updatable cursors directly on the database server.
This type of cursor is very expensive for the server to create and maintain.
Scrolling, updatable cursors definitely have their uses, and will continue to fill a niche in data
access applications.
The DataSet is really an in-memory relational database. A programmer will create one
or more DataTable objects in a DataSet and “fill” them with data. A DataTable contains a
collection of DataRows, each of which contains a collection of DataColumns. We can
optionally create DataViews based on these DataTables, and even define relations to enforce
data integrity. Again with all this functionality we really don’t have the need for a Recordset
object.
The process of filling a DataTable with data is simple, and provides us with a copy of
the data from the data source. The DataSet does not maintain a connection to the data source.
With this copy of our data, the application can enable the user to add, edit, and remove data.
The application can then enable the user to save this data back to the original data source.
As a matter of fact, this data can be saved to any other data source, persisted to disk, and/or
transferred just as if it were any other file. The key to this functionality is the reliance upon
XML, and the disconnected nature of ADO.NET.
The DataSet requires a DataAdapter to actually interact with a data source. The
DataAdapter represents the connection to a data source and the commands used to
communicate with the data source to “fill” a DataSet or update a data source. After we are
finished adding or updating data in the DataSet, the application would then call the Update
method of the DataAdapter to INSERT, UPDATE, and DELETE records as appropriate at the
data source.
Note that you don’t have to commit your changes back to the original source; that is,
you can transfer data to another data source as long as you have a DataAdapter that
understands how to communicate between the DataSet and the final data source. This really
serves to emphasize the total and complete disconnected nature of ADO.NET.
The other thing to keep in mind, especially since we are developing for ASP.NET, is
that since a DataSet is a disconnected copy of our data, it is most suitable for small amounts
of data. For ASP.NET, one would expect to find most of the work of retrieving data to
be done using a DataReader, with DataSets being used for relatively static data that must be
retrieved often.
A DataSet in this scenario could be used at the session level to save some processing at
the data source. For example, a Web site might have a drop-down list that contains the 50
states in the United States. If this drop-down list is used more than once on a page, and the
number of states is static, we could fill a DataSet and bind every instance of the drop-down list
to this DataSet. This way we hit the database once for all 50 states and for all instances of the
drop-down list, thus saving many database hits.
Like all major RBDMS, SQL Server supports ANSI SQL, the standard SQL language.
However, SQL Server also contains T-SQL, its own SQL implementation. SQL Server
Management Studio (SSMS) (previously known as Enterprise Manager) is SQL Server’s main
interface tool, and it supports 32-bit and 64-bit environments.
Originally released in 1989 as version 1.0 by Microsoft, in conjunction with Sybase, SQL
Server and its early versions were very similar to Sybase. However, the Microsoft-Sybase
partnership dissolved in the early 1990s, and Microsoft retained the rights to the SQL Server
trade name. Since then, Microsoft has released 2000, 2005 and 2008 versions, which feature
more advanced options and better security.
Examples of some features include: XML data type support, dynamic management
views (DMVs), full-text search capability and database mirroring. SQL Server is offered in
several editions with different feature set and pricing options to meet a variety of user needs,
including the following:
Enterprise: Designed for large enterprises with complex data requirements, data
warehousing and Web-enabled databases. Has all the features of SQL Server, and its license
pricing is the most expensive.
Standard: Targeted toward small and medium organizations. Also supports e-commerce and
data warehousing.
Workgroup: For small organizations. No size or user limits and may be used as the backend
database for small Web servers or branch offices.
Express: Free for distribution. Has the fewest number of features and limits database size and
users. May be used as a replacement for an Access database.
SQL Server is a relational database management system that is capable of handling large
amount of data apart from providing several methods to ensure data integrity; it also provides
advance administrative utilities. It renders complete data integrity protection and advanced
security to objects.
This part explains the special features of the transact-SQL, statements, which provide
flexible method of retrieving and modifying data in tables.
The query language which enables to access data in SQL server is powerful. The purpose
of this online reference is to enable the reader to comprehend the important concept of SQL
Server.
SQL Server can work with thousands of client applications simultaneously. The server
has features to prevent logical problems that occur if a user tries to read or modify data currently
being used by others.
The scalability and ease-of-use features of SQL Server allow it to work efficiently on the
client without consuming too many resources. SQL Server effectively allocates the available
resources, such as memory network bandwidth, and disk I/O, among the multiple users.
Internet Integration.
The SQL Server 2000 database engine includes integrated XML support. It also has the
scalability, availability, and security features required to operate as the data storage component
of the largest Web sites.
The SQL Server 2000 programming model is integrated with the Windows DNA
architecture for developing Web applications, and SQL Server 2000 supports features such as
English Query and the Microsoft Search Service to incorporate user-friendly queries and
powerful search capabilities in Web applications.
The same database engine can be used across platforms ranging from laptop computers
running Microsoft Windows® 98 through large, multiprocessor servers running Microsoft
Windows 2000 Data Center Edition. SQL Server 2000 Enterprise Edition supports features such
as federated servers, indexed views, and large memory support that allow it to scale to the
performance levels required by the largest Web sites.
The SQL Server 2000 relational database engine supports the features required to support
demanding data processing environments. The database engine protects data integrity while
minimizing the overhead of managing thousands of users concurrently modifying the database.
SQL Server 2000 distributed queries allow you to reference data from multiple sources as
if it were a part of a SQL Server 2000 database, while at the same time, the distributed
transaction support protects the integrity of any updates of the distributed data.
Replication allows you to also maintain multiple copies of data, while ensuring that the
separate copies remain synchronized. You can replicate a set of data to multiple, mobile,
disconnected users, have them work autonomously, and then merge their modifications back to
the publisher.
Ease of installation, deployment, and use.
SQL Server 2000 includes a set of administrative and development tools that improve
upon the process of installing, deploying, managing, and using SQL Server across several sites.
SQL Server 2000 also supports a standards-based programming model integrated with the
Windows DNA, making the use of SQL Server databases and data warehouses a seamless part of
building powerful and scalable systems.
These features allow you to rapidly deliver SQL Server applications that customers can
implement with a minimum of installation and administrative overhead.
Data warehousing.
SQL Server 2000 includes tools for extracting and analyzing summary data for online
analytical processing. SQL Server also includes tools for visually designing databases and
analyzing data using English-based questions.