南华's profileThe Absolute ChallengePhotosBlog Tools Help

南华

There are no photo albums.
January 20

ASP.NET Runtime

What is the HTTP Runtime?
All the secret objects that work behind the scenes during each page request.
What is an HttpModule?
An HttpModule is a .NET class that executes with each and every page
request.
What is an HttpHandler?
An HttpHandler is a .NET class that executes whenever you make a request for a page with a
certain path.
 
1.Create an HttpModule
Step1 Create a .NET Class
Counter : IHttpModule
IHttpModule interface
Two Methods: Init(HttpApplication)  Dispose()
Step2 Register Class in Web.config
Web.config
<httpModules> Element
2.Configures the HTTP modules within an application
Create an HttpHandler
Step1 Create a .NET Class
Three mehod for creating an HttpHandler:
Implement IHttpHandler Interface Two things that you must implement:
ProcerssRequest(HttpContex)  IsReusable
Derive from the Page Class
Not Recommended Method
Step2 Register Class in Web.config
 
3.Ensure that the HttpHandler file name extension is registered within Internet Information
Services (IIS).
January 19

Authentication, Authorization, and Access Control

Authentication is any process by which you verify that someone is who they claim they are. This usually involves a username and a password, but can include any other method of demonstrating identity, such as a smart card, retina scan, voice recognition, or fingerprints. Authentication is equivalent to showing your drivers license at the ticket counter at the airport.

Authorization is finding out if the person, once identified, is permitted to have the resource. This is usually determined by finding out if that person is a part of a particular group, if that person has paid admission, or has a particular level of security clearance. Authorization is equivalent to checking the guest list at an exclusive party, or checking for your ticket when you go to the opera.

Finally, access control is a much more general way of talking about controlling access to a web resource. Access can be granted or denied based on a wide variety of criteria, such as the network address of the client, the time of day, the phase of the moon, or the browser which the visitor is using. Access control is analogous to locking the gate at closing time, or only letting people onto the ride who are more than 48 inches tall - it's controlling entrance by some arbitrary condition which may or may not have anything to do with the attributes of the particular visitor.

Because these three techniques are so closely related in most real applications, it is difficult to talk about them separate from one another. In particular, authentication and authorization are, in most actual implementations, inextricable.

.Net Architecture

What is .NET?
.NET is a framework
.NET is platform independent
.NET is language insensitive
.NET specs are publicly available


.NET Architecture
The .NET Framework is a managed environment. The common language runtime monitors the execution of .NET applications and provides essential services. It manages memory, handles exceptions, ensures that applications are well-behaved, and much more.
Language interoperability is one goal of .NET. .NET languages share a common runtime (the common language runtime, a common class library), the Framework Class Library (FCL), a common component model, and common types. In .NET, the programming language is a lifestyle choice. Except for subtle differences, C#, VB.NET, or JScript.NET offer a similar experience.
 
.NET Components
.NET introduces a new component model that is largely implicit. The messiness of COM(Component Object Model) is removed. In .NET, developers use standard language syntax to create, publish, and export components. There is nothing else to learn. .NET addresses many of the shortfalls of COM, including susceptibility to DLL Hell, language incompatibilities, reference counting, and more.
How do you create a component in .NET? In the server application, you define a public class, using the syntax of the preferred .NET language. In the client, you import a reference to the component application and then create an instance of the component class. That is it. You can then use the component. The arcane syntax of COM is gone.
January 06

Notes of 《Core Java 2》:Objects and Classes(1)

1.Introduction to Object-Oriented Programming
Object-Oriented programming(OOP) is the dominant programming paradigm these days.
Java is totally object-oriented.
You don’t care how the functionality was implemented. In OOP, you only care about what the object expose.
The Vocabulary of OOP
A class is a template or blueprint from which objects are actually made.
Encapsulation(date hiding) is a key concept in working with objects. Formally, encapsulation is nothing more than combining data and behavior in one package and hiding the implementation of the data from the user of the object.
When you extend an existing class, the new class has all the properties and methods of the class that you extend.
Objects
The three key characteristics are:
 The object’s behavior – what can you do with this object, or what methods can you apply to it.
 The object’s state – how does the object react when you apply those methods?
 The object’s identity – how is the object distinguished from others that may have the same behavior and state?
Relationship Between Classes
 Dependence(“uses-a”)
 Aggregation(“has-a”)
 Inheritance(“is-a”)

2.Using Existing Classes
Objects and Object Variable
In the Java programming language, you use constructors to construct new instance. A constructor is a special method whose purpose is to construct and initialize objects.
Constructors always have the same name as the class name.
An object variable doesn’e actually contain an object. It only refers to an object.
You should think of Java object varialbes as analogous to object pointers in C++:
Date birthday; //Java
is really the same as
Date* birthday; //C++
All Java objects live on the heap. When an object contains another object variable, that variable still contains just a pointer to get another heap object.
Mutator and Accessor Methods
Methods that change instance fields are called mutator methods and those only access instance field without modifying them are called accessor methods.

translation of words:
dominant – stronger, more powerful, or more noticeable than other people or things.
paradigm – a very clear or typical example of something
expose - show
combine – mix, join together

October 16

2005 JavaChina Developer Conference

September 13th 2005 is a special day for me, I had taken part in the 2005 JavaChina Developer conference.
It's the first time that Java Developer Conference hosted in China. The conference lasted two days.
The most impressive words to me are "Participation" and "NetBeans". It seems that Sun is launching a campaign to reclaim its leadership in Java technology.
Developers, IT managers, and business professionals who develop and deploy java-technology based applications or work with Java-related technoligies are invaited to the conference.
Scott McNealy -- The CEO and chairman of Sun Microsystem,and James Gosling -- the Java progenitor gave keynote speeches.A number of companies, both local and international, are making announcements at JavaChina event.

Why Blog?

In general, the reason I have a weblog, and the reason I advocate to other that they ought to maintain weblogs themselves, is because I think it's important for people to have a place to express their opinions and thoughts, and to get feedback on those ideas.
I blog to learn, I self-evalueate. Blogging helps me discover what I think.
I blog to keep up my spirit, to stir the spirit of others, to stir my blood, my brain, and my beliefs.

What's a blog?

A blog is a personal diary. A daily pulpit. A collaborative space. A political soapbox. A breaking-news outlet. A collection of links. Your own private thoughts. Memos to the world.
Your blog is whatever you want it to be. There are millions of them, in all shapes and sizes, and there are no real rules.
In simple terms, a blog is a web site, where you write stuff on an ongoing basis. New stuff shows up at the top, so your visitors can read what's new. Then they comment on it or link to it or email you. Or not.