Page 153 - DCAP312_WEB_TECHNOLOGIES_II
P. 153
Unit 8: Creating More Advanced ASP.NET
• For advanced developers who want to use APIs as powerful as the ISAPI programming Notes
interfaces that were included with previous versions of ASP, ASP.NET offers the
IHttpHandler and IHttpModule interfaces. Implementing the IHttpHandler interface
gives you a means of interacting with the low-level request and response services of the
IIS Web server and provides functionality much like ISAPI extensions, but with a simpler
programming model. Implementing the IHttpModule interface allows you to include
custom events that participate in every request made to your application.
• ASP.NET takes advantage of performance enhancements found in the .NET Framework
and common language runtime. Additionally, it has been designed to offer significant
performance improvements over ASP and other Web development platforms. All ASP.
NET code is compiled, rather than interpreted, which allows early binding, strong typing,
and just-in-time (JIT) compilation to native code, to name only a few of its benefits. ASP.
NET is also easily factorable, meaning that developers can remove modules (a session
module, for instance) that are not relevant to the application they are developing. ASP.
NET also provides extensive caching services (both built-in services and caching APIs).
ASP.NET also ships with performance counters that developers and system administrators
can monitor to test new applications and gather metrics on existing applications.
• Writing custom debug statements to your Web page can help immensely in troubleshooting
your application’s code. However, they can cause embarrassment if they are not removed.
The problem is that removing the debug statements from your pages when your application
is ready to be ported to a production server can require significant effort. ASP.NET offers
the TraceContext class, which allows you to write custom debug statements to your pages
as you develop them. They appear only when you have enabled tracing for a page or entire
application. Enabling tracing also appends details about a request to the page, or, if you
so specify, to a custom trace viewer that is stored in the root directory of your application.
• The .NET Framework and ASP.NET provide default authorization and authentication
schemes for Web applications. You can easily remove, add to, or replace these schemes,
depending upon the needs of your application.
• ASP.NET configuration settings are stored in XML-based files, which are human readable
and writable. Each of your applications can have a distinct configuration file and you can
extend the configuration scheme to suit your requirements.
• Applications are said to be running side by side when they are installed on the same
computer but use different versions of the .NET Framework. To learn how to use different
versions of ASP.NET for separate applications on your server, see Side-by-Side Support
in ASP.NET.
8.1 Page Sub-classing
A subclass, heir class, or child class is a modular, derivative class that inherits one or extra
properties from a different class. The properties in query vary from language to language,
other than commonly include class data variables, properties, and methods or functions. Some
languages support the inheritance of other properties as well. For example, in Eiffel, contracts
which define the specification of a class are also inherited by heirs. The superclass establishes
a common interface and foundational functionality, which specialized subclasses can inherit,
modify, and supplement. The software inherited by a subclass is considered reused in the subclass.
In some cases, a subclass may customize or redefine a method inherited from the superclass. A
superclass method which can be redefined in this way is called a virtual method.
In the RoR application, we are not making use of the model layer because the model is
implemented through a C++ server and my RoR application communicates with that server
using a middleware product.
Relay nice about my C++ server is that it holds very rich meta information describing the business
objects it returns in great details. This allows me to implement a single controller/view that can
render any object type in a very generic way.
LOVELY PROFESSIONAL UNIVERSITY 147