Contact us
Technology Skills
Interview Q & A
Management Skills
Free SMS Collection
Set as Homepage | Add to favorites

Bestest Blog of All- Time


Get Free SMS !!

Important Tips and Tricks

Tip 1:
How to Setup SQL State Server
The following steps should be executed on the SQL Server machine
Step 1: Goto :\WINDOWS\Microsoft.NET\Framework\ Directory in DOS Prompt
Step 2: Execute the following command :
aspnet_regsql.exe -ssadd -sstype p -U -P
Step 3: Verify that ASPState Database is created
Step 4: Verify that Tables and Stored Procedures created in ASPState Database are as shown in Figure Below:

Step 5: Open Administrative Tools, and then click Services
Step 6: In details Panel, right-click ASP.NET State Service, and then cProperties
Step 7: On the General tab, in the Startup type listbox, click Automatic
Step 8: Under Service status click Start, and then click OK. The State service starts automatically when the Webserver is restarted

Step 9: Modify the Session State Configuration in Application's web.config file to:

sessionstate timeout="20" cookieless="false" sqlconnectionstring="data source=server;user id=uid;password=pwd" mode="SQLServer"

Technology Skills:
.NET Framework: The .NET Framework is the infrastructure for the new Microsoft .NET Platform. The .NET Framework is a common environment...More

Web Services: What are Web Services? In recent years, the imperative to connect people, information, and processes has changed the way software is being developed...More

Serialization: Serialization in .NET allows the programmer to take an instance of an object and convert it into a format that is easily transmittable over the network...More

ASP.NET Fundamentals: It is observed that many people who are new to ASP.Net are having some fundamental difficulties understanding how it actually works...More

Service Oriented Architecture: A Service Oriented Architecture (SOA) is set of principles that define an architecture that is loosely coupled and comprised of service providers and service consumers that interact according to a negotiated contract or interface...More

C# v/s VB.NET: Get the exhuative and in-depth comparions between C# and VB.NET like case sensitive, Statement Delimiter, Statement Blocks...More

ADO v/s ADO.NET: ADO.NET is an evolutionary improvement on ADO. One way to quickly understand the advantages of ADO.NET is to compare its features to those of ADO...More

Interview Q&A:
C#, .NET, XML: 1. What is .NET Framework? The .NET Framework has two main components: the common language runtime and the .NET Framework class library ...More

Management Skills:
Project: Project is a temporary endeavor with a beginning and an end. It creates a unique product, service or result. It is done for a purpose and has interrelated activities. Project is progessively elobrated...More

People: A manager's most important, and most difficult, job is to manage people. You must lead, motivate, inspire, and encourage them...More

Leadership: Have you noticed that some people are incredible leaders and some aren’t? What is it about those that are that separates them from those that aren’t?...More

Sales: The following 7 sales skills that are found to be the most important skills for professional salespeople. Get good at these, and you'll be able to ...More

Lyrics: Download free Lyrics and update your skills with entertainment...More

Nursery Rhymes: Download free Nursery Rhymes...More

Service Oriented Architecture

Service Oriented Architecture (SOA)

A Service Oriented Architecture (SOA) is set of principles that define an architecture that is loosely coupled and comprised of service providers and service consumers that interact according to a negotiated contract or interface. These services provide the Interfaces to Applications in the IT landscape. The primary goal of SOA is to expose application functions in a standardized way so that they can be leveraged across multiple projects. This approach greatly reduces the time, effort and cost it takes to maintain and expand solutions to meet business needs.
It is important to note that SOA is not an off-the-shelf technology; rather it is a way of architecting and organizing IT infrastructure and business functionality. SOA is a paradigm for designing, developing, deploying and managing discrete units of logic i.e. services, within a computing environment, and has the following attributes:

• Functionality is organized as a set of modular, reusable shared services
• Services have well-defined interfaces and encapsulate key business processes
• Customer facing solutions serve as customized views of these services for different segments, and can access these shared services as needed.
• The reusable shared services are built without making any assumptions of who (portal or another service) will consume these services

SOA is vital to an enterprise as an architecture paradigm because it allows the business to become agile and respond rapidly to changes and challenges it faces internally and externally from its customers, stakeholders and various federal mandates and regulations to accomplish mission critical objectives.

Benefits of SOA

SOA promotes loose coupling of software resulting in services that are easier to integrate as they utilize lower-cost tools and have standards based exchange formats and interface. Some of the key benefits that an enterprise can achieve from SOA are:
Agility to collaborate – SOA provides ability to securely and easily share information, with partners and stakeholders by presenting a standard coarse grained service which any authorized business partner can use, there by extending the enterprise.
Agility to adapt – SOA promotes the ability to rapidly reconfigure the business process by selecting from the available set of services, thereby providing the agility to adapt to the business requirements introduced by stakeholders and business partners.
Reduction of cost - SOA primitives are standards based For example, WSDL, SAML, SOAP & UDDI, providing a modular architecture, thereby enabling sharing and reuse of services.
Improvement in efficiency - SOA promotes a modular enterprise, promising a high degree of reusability of business services, ensuring consistency.
Better business operations: SOA based services enable a common architecture and approach to be pervasive in an enterprise containing heterogeneous legacy systems.
Ease of introducing new technologies – SOA’s coarse grain modularity allows enhancements to service by introducing new more efficient technologies as they are introduced without actually changing the service interface.

A service oriented architecture (SOA) can be evolved based on existing system investments rather than requiring a full-scale system rewrite. Organizations that focus their development effort around the creation of services, using existing technologies, combined with the component-based approach to software development will realize several benefits:

• Leverage existing assets
• Infrastructure, a commodity
• Faster time-to-market
• Reduced cost
• Risk mitigation
• Continuous Business Process improvement
• Process-centric architecture

Principles and Definitions

Services share a formal contract
Services are loosely coupled
Services abstract underlying logic
Services are composable
Services are reusable
Services are stateless
Services are discoverable


SOA is an architectural style whose goal is to achieve loose coupling among interacting software agents. A service is a unit of work done by a service provider to achieve desired end results for a service consumer. Both provider and consumer are roles played by software agents on behalf of their owners.

Collection of services
These are services that communicate with each other

• Business Service Security
• Business Service Governance & Auditing
• Service Level Compliance
• Business Service Lifecycle Management

Key Components of SOA
• Service
• Message
• Dynamic Discovery
• Web Service

SOA lifecycle

Difference between SOA & Webservices
Service-Oriented Architecture is an IT business system design methodology that is focused on reusability, breaking down silos, and enabling rapid and on-going optimization of business processes.
An SOA can be implemented using any number of technologies. However, in practice the Web services standards and technologies (XML, SOAP, WSDL, WS-Security, WS-Policy, etc.) are at the heart of forming every organization's SOA implementation.

Interview Q&A on Crystal Reports

1. What is Crystal Report?
Ans: Crystal report is a report generation tool. Generally have interface with VB6. Crystal report basically generates dynamic data. You can format the data in whichever way you feel like.

2. Can we use Crystal report as a stand-alone application?
Ans: Generally we use Crystal Reports with VB6. However we can make crystal report stand-alone application also. But for that limitation is for viewing the report user should have crystal reports installed on his/her PC.

3. How do we connect to the database?
Ans: There are two ways of creating the report: -

Use crystal report built in query.
Use the tool ‘ Crystal SQL Designer’ provided by crystal report.
When you create report using crystal report built in query then it asks for the data source name that you have created. When you run the report, then for the first time it will ask for the user id and password. After that it will store the same.

When you create ‘.qry’ using ‘Crystal SQL’ Designer then at that time it will ask for the user id and password. When you run the report for the first time instead of asking for the user id and password it will ask for the ‘.qry’ file location. You can change the query location also. For that open the report, select ‘Set Location’ option in Database menu item, and set the location.

4. How do we format field?
Ans: For formatting any field just right click on it and you will get many options like ‘Format Field.’ ‘Browse field data’ etc. Click on ‘Format Field.’ You can align data, suppress, make it multiline, change the font size, style, and type, make it hyperlink etc.

If it is an amount field then you can display currency symbol also. Right click on the field select ‘Format Field’.

5. Can we give parameters to the report?
Ans: We can very well give parameters to the report. For creating parameters select ‘Parameter Field’ in Insert menu item. ‘Create Parameter Field’ dialog box will popped up, it will ask for the name of parameter, prompting text and datatype. Now when you run the report it will prompt for these parameters.

6.Can we create our own formulas in reports?
Ans: We can create our own formulas in reports. Select ‘Formula Field’ in Insert menu item. Write the formula in ‘Formula Editor’. Here you will get ‘Field Tree’, ‘Function Tree’, and ‘Operator Tree’, which will display the report fields, functions that are supported by crystal reports (like CDATE () etc.), operators (arithmetic, strings etc.) respectively.

7. Can we create report using more than one database?
Ans: We can create report using more than one database like Oracle, Access. Create data source name for both the databases. Select tables from them and create the report.

Only restriction is if you use two databases then you cannot see the SQL generated by crystal reports.

8. Can we export data of reports into other format like in world doc etc?
Ans: Generated data can be exported to word doc, or in rich text format. Just click on ‘Export’ icon in the menu. Export dialog box will be popped up. It will ask for the ‘Format’ like comma-separated value (csv) etc and the ‘Destination’ like disk, application etc. After that it will ask for the file name and save the data.

Only restriction is formatting of data will be lost, but crystal report will try to maintain as much formatting as it can.

9. Can we use our own SQL for creating a report?
Ans: We can also make our own query using ‘Crystal SQL Designer’ tool provided by SQL. Here you can insert your SQL statement as such. It will save this file as ‘.qry’ . And when you create a report instead of using ‘Database’ button use ‘Crystal SQL Statement’ button.

10. Can we edit SQL made by Crystal reports?
Ans: We cannot edit the SQL made by crystal reports. However we can view the SQL. For that select ‘Show SQL Query’ in Database menu item. Limitation is if you are using only one database. If you use two databases then you can’t even view the SQL prepared by crystal report.

11. Are there any limitations in crystal reports?
Ans: There are certain limitations in crystal reports. They are: -

If database is having field whose length is more than 255 characters, then you cannot make formula using that field.
While exporting data formatting is lost.
When you browse data just by right clicking on the field then it displays that is there in the database not the data selected by the query.

12. Can we suppress printing in crystal reports if 0 records are fetched?
Ans: Yes, we can suppress printing if no records are fetched. Select ‘Report Options’ in File menu item. ‘Report Options’ dialog box will pop up. In that there is one option ‘ Suppress printing if no records’ Check this option. If no records are found then nothing will be printed on the report.

13. What are the sections that we have in Crystal reports?
Ans: Report has got standard sections like ‘Page Header’, ‘Page Footer’, ‘Report Header’, ‘Report Footer’, and ‘Details’.

However you can add other sections also. Select ‘Sections’ in the Insert menu item. You can insert group sections also.

If you don’t want to show any section just right click on that section and suppress that.

14. Can we add any database field once we have chosen ‘Close’ button?
Ans: Yes, we can add any database field afterwards also. Select ‘Database Field’ in Insert menu item.

If you are using crystal report built in query then it will display the tables that you have selected. And you can select whichever field you want to display on the report.

But if you are using ‘.qry’ file then it will display Query and you can select only those field, which are there in the query.

15. Does Crystal Report support all the functions that we have in Oracle?
Ans: No, Crystal report does not support all the functions. Like Decode function is there in SQL but not there is crystal report. You need to convert that in crystal report format (in if and else etc.).

However if you use ‘.qry’ files then it take the SQL as such. There is no need of changing any syntax.

16. Can we use stored procedure for creating the report?
Ans: Yes, we can use stored procedure.

17. Is there any feature like summing total in crystal report?
Ans: Crystal reports provide features like grand total, sub-total, running total etc. You can select any of these features in Insert menu item.

You can sum up records on the basis of each record or on change of group using ‘Running Total ‘ option in Insert menu item.

18. I am using two tables one is of access database and other is of oracle database, I am getting an error saying that ‘SQL odbc error’ what should I do?
Ans: If you are getting such an error then click the icon for ‘Report Expert’. It will give a warning saying that formatting will be lost. Ignore this you will get ‘Standard Report Expert’ dialog box. Reverse the links of access database table and it will work.

.NET Framework

.NET Framework
The .NET Framework is the infrastructure for the new Microsoft .NET Platform.

The .NET Framework is a common environment for building, deploying, and running Web Services and Web Applications.

The .NET Framework contains common class libraries - like ADO.NET, ASP.NET and Windows Forms - to provide advanced standard services that can be integrated into a variety of computer systems.

The .NET Framework is language neutral. Currently it supports C++, C#, Visual Basic, JScript (The Microsoft version of JavaScript) and COBOL. Third-party languages - like Eiffel, Perl, Python, Smalltalk, and others - will also be available for building future .NET Framework applications.

The new Visual Studio.NET is a common development environment for the new .NET Framework. It provides a feature-rich application execution environment, simplified development and easy integration between a numbers of different development languages.

The .NET Framework is a new development platform that provides consistent and efficient support to distributed enterprise applications over local area networks (LANs) and the Internet. Key features of this new platform include the following:

• Provides a consistent language-independent, object-oriented development environment to leverage the developer's programming knowledge

• Provides hassle-free software deployment, avoiding versioning problems with related components

• Is a rich execution model, independent of storage location, where components can be stored and executed locally, or stored remotely and executed locally, or stored and executed remotely from an Internet location

• Provides safe code execution, with superior security settings to match the security needs of today's organizations

• Provides a consistent programming environment for both Windows and Web applications

• Improves execution performance of Windows and Web applications by efficient code compilation in both environments

• Is compliant with communication standards to ensure that .NET-connected applications can coexist and integrate with other applications and other platforms

The .NET Framework has two main components:

• The Common Language Runtime (CLR)

• The .NET Framework Class Library

The CLR is the system agent that runs and manages .NET code at runtime. This agent is responsible for basic system services such as memory management, threading, error control, and type safety.

Developers can use any .NET-compatible programming language to write their applications, and their particular compiler converts their code into Intermediate Language (IL) code. The CLR uses efficient Just In Time (JIT) compilation to convert language-independent IL code into machine code of the device on which the code is intended to run.

Managed code always runs in compiled mode and is optimized for the current platform; however, the code is still managed to prevent common execution errors. This new programming model offers tighter control over program execution, which provides a more robust platform on which to run distributed applications.

The .NET Framework Class Library is a comprehensive collection of object-oriented types that you can use to develop any application, service, or component. This class library supersedes the Microsoft Foundation Classes (MFC) commonly used in C++ development, and it is designed to be easily extensible to provide object-oriented programming support to other services, such as Microsoft Windows Server System products that currently provide proprietary-only Application Programming Interfaces (API).

The .NET Framework opens the door to sharing components over the Internet. The technology uses Web Services that can be consumed not only by Windows-based applications but also by applications running on other platforms if the applications use Internet standards such as TCP/IP, HTTP, XML, and SOAP.

Applications developed for the .NET Framework can still use COM components, which leverages the investment already made in previous developments. However, this compatibility comes with a performance cost due to the inherent translation between both standards. Therefore, the migration of COM components to managed code that .NET-connected applications use natively can greatly improve performance.

.NET Core Building Blocks

Web Services
Web Services provide data and services to other applications.

Future applications will access Web Services via standard Web Formats (HTTP, HTML, XML, and SOAP), with no need to know how the Web Service itself is implemented.

Web Services are main building blocks in the Microsoft .NET programming model.

More detail is avalibale at http://refreshskills.blogspot.com/2006/11/web-services.html

Internet Directory Services
.NET supports a new kind of directory services that can answer XML based questions about Internet Services, far more exactly than search engines and yellow pages.

These services are built on the UDDI standard.

Internet Storages
.NET offers secure and addressable places to store data and applications on the Web. Allowing all types of Internet devices (PCs, Palmtops, Phones) to access data and applications.

These Web Services are built on Microsoft's existing NTFS, SQL Server, and Exchange technologies.

Internet Calendar
.NET supports Internet integration of work, social, and private home calendars. Allowing all types of Internet devices (PCs, Palmtops, and Phones) to access the data.

These services are built on existing Outlook and Hotmail technologies.

Internet Dynamic Delivery
Reliable automatic upgrades by demand and installation independent applications.

.NET will support rapid development of applications that can be dynamically reconfigured.

Internet Identity
.NET supports many different levels of authentication services like passwords, wallets, and smart cards.

These services are built on existing Microsoft Passport and Windows Authentication technologies.

Internet Messaging
.NET supports integration of messaging, e-mail, voice-mail, and fax into one unified Internet Service, targeted for all kinds of PCs or smart Internet devices.

These services are built on existing Hotmail, Exchange and Instant Messenger technologies.

Standard Communication
Official Web standards (XML, UDDI, SOAP) will be used to describe what Internet data is, and to describe what Web Services can do.

Future Web applications will be built on flexible services that can interact and exchange data, without the loss of integrity.

.NET Framework Class Library
The .NET Framework class library is a collection of reusable types that tightly integrate with the common language runtime. The class library is object oriented, providing types from which your own managed code can derive functionality. This not only makes the .NET Framework types easy to use, but also reduces the time associated with learning new features of the .NET Framework. In addition, third-party components can integrate seamlessly with classes in the .NET Framework.

For example, the .NET Framework collection classes implement a set of interfaces that you can use to develop your own collection classes. Your collection classes will blend seamlessly with the classes in the .NET Framework.

As you would expect from an object-oriented class library, the .NET Framework types enable you to accomplish a range of common programming tasks, including tasks such as string management, data collection, database connectivity, and file access. In addition to these common tasks, the class library includes types that support a variety of specialized development scenarios. For example, you can use the .NET Framework to develop the following types of applications and services:

· Console applications.

· Windows GUI applications (Windows Forms).

· ASP.NET applications.

· XML Web services.

· Windows services.

For example, the Windows Forms classes are a comprehensive set of reusable types that vastly simplify Windows GUI development. If you write an ASP.NET Web Form application, you can use the Web Forms classes.

Client Application Development
Client applications are the closest to a traditional style of application in Windows-based programming. These are the types of applications that display windows or forms on the desktop, enabling a user to perform a task. Client applications include applications such as word processors and spreadsheets, as well as custom business applications such as data-entry tools, reporting tools, and so on. Client applications usually employ windows, menus, buttons, and other GUI elements, and they likely access local resources such as the file system and peripherals such as printers.

Another kind of client application is the traditional ActiveX control (now replaced by the managed Windows Forms control) deployed over the Internet as a Web page. This application is much like other client applications: it is executed natively, has access to local resources, and includes graphical elements.

In the past, developers created such applications using C/C++ in conjunction with the Microsoft Foundation Classes (MFC) or with a rapid application development (RAD) environment such as Microsoft® Visual Basic®. The .NET Framework incorporates aspects of these existing products into a single, consistent development environment that drastically simplifies the development of client applications.

The Windows Forms classes contained in the .NET Framework are designed to be used for GUI development. You can easily create command windows, buttons, menus, toolbars, and other screen elements with the flexibility necessary to accommodate shifting business needs.

For example, the .NET Framework provides simple properties to adjust visual attributes associated with forms. In some cases the underlying operating system does not support changing these attributes directly, and in these cases the .NET Framework automatically recreates the forms. This is one of many ways in which the .NET Framework integrates the developer interface, making coding simpler and more consistent.

Unlike ActiveX controls, Windows Forms controls have semi-trusted access to a user's computer. This means that binary or natively executing code can access some of the resources on the user's system (such as GUI elements and limited file access) without being able to access or compromise other resources. Because of code access security, many applications that once needed to be installed on a user's system can now be deployed through the Web. Your applications can implement the features of a local application while being deployed like a Web page.

Server Application Development
Server-side applications in the managed world are implemented through runtime hosts. Unmanaged applications host the common language runtime, which allows your custom managed code to control the behavior of the server. This model provides you with all the features of the common language runtime and class library while gaining the performance and scalability of the host server.

The following illustration shows a basic network schema with managed code running in different server environments. Servers such as IIS and SQL Server can perform standard operations while your application logic executes through the managed code.

Server-side managed code

ASP.NET is the hosting environment that enables developers to use the .NET Framework to target Web-based applications. However, ASP.NET is more than just a runtime host; it is a complete architecture for developing Web sites and Internet-distributed objects using managed code. Both Web Forms and XML Web services use IIS and ASP.NET as the publishing mechanism for applications, and both have a collection of supporting classes in the .NET Framework.

XML Web services, an important evolution in Web-based technology, are distributed, server-side application components similar to common Web sites. However, unlike Web-based applications, XML Web services components have no UI and are not targeted for browsers such as Internet Explorer and Netscape Navigator. Instead, XML Web services consist of reusable software components designed to be consumed by other applications, such as traditional client applications, Web-based applications, or even other XML Web services. As a result, XML Web services technology is rapidly moving application development and deployment into the highly distributed environment of the Internet.

If you have used earlier versions of ASP technology, you will immediately notice the improvements that ASP.NET and Web Forms offer. For example, you can develop Web Forms pages in any language that supports the .NET Framework. In addition, your code no longer needs to share the same file with your HTTP text (although it can continue to do so if you prefer). Web Forms pages execute in native machine language because, like any other managed application, they take full advantage of the runtime. In contrast, unmanaged ASP pages are always scripted and interpreted. ASP.NET pages are faster, more functional, and easier to develop than unmanaged ASP pages because they interact with the runtime like any managed application.

The .NET Framework also provides a collection of classes and tools to aid in development and consumption of XML Web services applications. XML Web services are built on standards such as SOAP (a remote procedure-call protocol), XML (an extensible data format), and WSDL ( the Web Services Description Language). The .NET Framework is built on these standards to promote interoperability with non-Microsoft solutions.

For example, the Web Services Description Language tool included with the .NET Framework SDK can query an XML Web service published on the Web, parse its WSDL description, and produce C# or Visual Basic source code that your application can use to become a client of the XML Web service. The source code can create classes derived from classes in the class library that handle all the underlying communication using SOAP and XML parsing. Although you can use the class library to consume XML Web services directly, the Web Services Description Language tool and the other tools contained in the SDK facilitate your development efforts with the .NET Framework.

If you develop and publish your own XML Web service, the .NET Framework provides a set of classes that conform to all the underlying communication standards, such as SOAP, WSDL, and XML. Using those classes enables you to focus on the logic of your service, without concerning yourself with the communications infrastructure required by distributed software development.

Finally, like Web Forms pages in the managed environment, your XML Web service will run with the speed of native machine language using the scalable communication of IIS.

Web Services

What Are Web Services?
In recent years, the imperative to connect people, information, and processes has changed the way software is being developed. Successful IT systems increasingly require interoperability across platforms and flexible services that can easily evolve over time. This has led to the prevalence of XML as the universal language for representing and transmitting structured data that is independent of programming language, software platform, and hardware.

Building on the broad acceptance of XML, Web services are applications that use standard transports, encodings, and protocols to exchange information. With broad support across vendors and businesses, Web services enable computer systems on any platform to communicate over corporate intranets, extranets, and across the Internet with support for end-to-end security, reliable messaging, distributed transactions, and more.

Web services are based on a core set of standards that describe the syntax and semantics of software communication: XML provides the common syntax for representing data; the Simple Object Access Protocol (SOAP) provides the semantics for data exchange; and the Web Services Description Language (WSDL) provides a mechanism to describe the capabilities of a Web service. Additional specifications, collectively referred to as the WS-* architecture, define functionality for Web services discovery, eventing, attachments, security, reliable messaging, transactions, and management.

Microsoft Support for Web Services
Since their inception, Web services have formed the foundation of Microsoft's interoperability efforts. In addition to building its entire developer platform around Web services with .NET, Microsoft continues its commitment to the standardization process—driving vendor consensus and interoperability for both horizontal and vertical standards.

In the coming years, Web services will play an even more pivotal role across the Microsoft platform—with new developer offerings, an amplified focus on IT operations and management, expanded offerings for consumers and information workers, innovation in the business applications market and increased community outreach. For developers, the Windows Communication Foundation (WCF) is Microsoft's next generation platform for building secure, reliable, and transacted Web services. For IT Professionals, Windows Server and Microsoft Operations Manager will enable the management of heterogeneous software and hardware systems using WS-Management. For consumers, Windows Vista will support the discovery of and interaction with Web services-enabled devices, such as printers, digital cameras, and home control systems.

In addition, Microsoft's vision for Web services extends beyond support in its own products. As a platform vendor, Microsoft is focused on delivering a Web services platform upon which other vendors and customers can build customized solutions.

Standards and Interoperability
Broad vendor agreement on standards and proven interoperability have set Web services apart from integration technologies of the past. During the ongoing process of interoperability and standardization, Microsoft has driven efforts to create both horizontal as well as industry-specific Web services standards.

Horizontal Web Services Standards
WS-* Architecture
As the Web services market rapidly expanded, the need for advanced standards governing Web services security, reliability, and transactions arose. Microsoft and other vendors across the industry responded to this need by authoring a set of specifications referred to collectively as the WS-* architecture. The goal of these specifications is to provide a blueprint for advanced functionality while retaining the simplicity of basic Web services.

The most important attribute of the WS-* architecture is composability. Protocol composability enables incremental development of Web services solutions only as individual requirements (such as security, reliable messaging, attachments, discovery, etc.) are needed. In isolation, each of these requirements solves an elemental need. In composition, they address higher-level functionality commonly required by distributed applications. As such, the WS-* specifications can be used either independently or in combination with one another. This eliminates the complexity and overhead associated with specifications that attempt to define multiple capabilities or are tightly coupled with other specifications. It also enables developers to apply only the specific functionality needed to solve the immediate need. As new application requirements arise, new specifications can be authored without compromising backwards compatibility.

Vertical Web Services Standards
The agreement on horizontal Web service standards, such as XML, SOAP, and the WS-* architecture created the foundation for the emergence of vertical Web services standards. Microsoft has played an active role in the creation of these standards, driving over a dozen vertical standards in the education, health care, finance, automotive, and telecommunication industries through working relationships with the following standards bodies:

· Association for Cooperative Operations Research and Development (ACORD)

· Association for Retail Industry Standards (ARTS)

· Automotive Industry Action Group (AIAG)

· Clinical Data Interchange Standards Consortium (CDISC)

· Continental Automated Buildings Association (CABA)

· Distributed Management Task Force (DMTF)

· EAN International and the Unified Code Council (EAN.UCC)

· EPCglobal

· European Forum for Electronic Business (EEMA)

· Financial Information eXchange (FIX/FPL)

· Health Level Seven (HL7)

· Human Resources XML (HR-XML)

· IMS Global Learning Consortium (IMS)

· Interactive Financial eXchange Forum (IFX)

· OPC Foundation (OPC)

· Open Financial Exchange Consortium (OFX Consortium)

· Open Travel Alliance (OTA)

· RosettaNet

· Schools Interoperability Framework (SIF)

· Society for Worldwide Interbank Financial Telecommunications (SWIFT)

· TeleManagement Forum (TM Forum)

Reference: http://msdn.microsoft.com/webservices/default.aspx?pull=/library/en-us/dnwebsrv/html/wsmsplatform.asp#wsmsplat_topic2

Serialization in .NET

Serialization in .NET allows the programmer to take an instance of an object and convert it into a format that is easily transmittable over the network or even stored in a database or file system. This object will actually be an instance of a custom type, including any properties or fields you may have set.

For examples: Include the ability to send an instance of your object to another portion of a local or remote application, such as over a Web service. Another example of when to choose to serialize objects is for data within objects that would normally be stored in a database, but these pieces of data do not need to be stored individually (their own fields in your tables). Streamline the database design by only holding those pieces of data for each record you need to query on, and the rest of the pieces can simply be serialized within a custom type and stored as a complete object within the database.

Also at some point in time, application will likely need to persist this data structure to disk, minimally so that the user can close the application down and reopen it. Traditionally, we write some code that would go through the list of employees and add a record for each employee into a database. When we want to, we read the records from the database back into memory. In a sense, we serialized the data structure for each employee into a series of bytes in the database and then deserialized the bytes back into a data structure at a future time.

ASP.NET Fundamentals

Introduction: It is observed that many people who are new to ASP.Net are having some fundamental difficulties understanding how it actually works. This is particularly important with ASP.Net, much more so than with ASP. Why? Because ASP has a fairly straightforward approach to creating dynamic content, and is procedural. ASP.Net is object-oriented, and has a number of features built in which seem to confuse people. For example, with ASP it was fairly obvious to most of us that there is an impenetrable gulf between the server and client, because HTTP is stateless, meaning that the browser and server only respond to individual page requests, and do not maintain any kind of state between requests. But Microsoft did some fancy tap-dancing, and came up with an event-driven object model which seems to eliminate this gulf, when, in fact, it does not. It simply works around the gulf. For some, understanding object-oriented programming concepts has turned out to be very difficult. However, as Internet programming becomes more and more powerful, the organization that object-oriented programming affords will prove out.

The purpose of this article is to give a little look "under the hood" of ASP.Net, to familiarize you with the similarities and differences between ASP.Net and ASP. You may be surprised to discover that the 2 technologies are not really that much different. If you are unfamiliar with the fundamentals of ASP, you should read the beginning ASP tutorials on this web site first, as this article will not reiterate those points, but will focus instead on the similarities and differences between ASP and ASP.Net. We will begin, however, with a review of the underlying technology, including the basics of HTTP Thin-client Applications.

HTTP Thin-client Applications: HTTP is a protocol for transferring data between a web server and an HTTP client application. The most commonly-used HTTP client application is a Web Browser. A Web Browser is a "thin client" meaning that it contains virtually no code for doing much of anything but making requests to a server, executing certain kinds of code, such as JavaScript, in an HTML page, and displaying HTML documents. The concept of a thin-client application is that the server does all of the processing work, and delivers content in the form of HTML to the client, which simply renders the HTML output from the server. The client browser can have HTML elements in it for uploading data with its request to the server, such as forms, Query Strings, and Cookies. But, other than some client-side JavaScript (or applets, ActiveX controls, SWFs, etc.), the browser does very little processing.

HTTP State Considerations: HTTP is stateless, meaning that when the browser makes a request for a page, script, or whatever, it retains no knowledge of the currently loaded document, nor does the server. Each document is loaded into memory by itself as it is received from the server, and unloaded with the next request. The server, likewise, keeps no record of the past requests, but receives each request as if it were brand new. This means that maintaining state (persisting data between page requests) is a problem. A number of workarounds have been developed over the years, for the purpose of emulating state between requests. These include Cookies, passing data in Query String parameters, Form post data, and the Microsoft concept of Sessions. Sessions are a bit different, however, as they reside on the server. A Cookie is created on the client with the Session ID, to maintain the Session ID from one request to the next, and the actual Session data is stored on the server. However, note that each of these solutions doesn't actually bridge the client-server gap, but emulates a bridge, by passing data back and forth between the client and server. This is possibly the most important concept that you can grasp here, as much of what follows is built on this foundation.

Now, while state can't be maintained on the client side, it can be maintained on the server side, via a couple of possible alternatives:

Data passed back from client browser is passed back to client browser.
Data can be stored in memory on the server: Application State, Session State, other Cache objects, database, file system
Note that so far, we are talking about both ASP and ASP.Net, as the environment hasn't changed; only the programming model. This is very important to keep in mind!

How ASP Maintains State: One of the biggest differences between ASP and ASP.Net is that in order to do something as simple as maintaining the selected index of a drop-down list box ("select" object), you had to cook up your own code to do it. What you would do is to use the Request Collection to get the selected item from the drop-down list box, and write ASP/HTML code that wrote "selected" as an attribute of the appropriate drop-down list box in your HTML. See the following code illustration:

As you can see, this is fairly straight-forward, but if you have a lot of state to maintain, it can get quite verbose.

How ASP.Net Maintains State: When Microsoft developed ASP.Net, they analyzed the various types of common functionality which ASP programmers have had to incorporate into their applications, and developed the ASP.Net object model around this. Because ASP.Net is object-oriented and event-driven, classes were developed which would handle this sort of thing automatically. For this reason, and several others we will explore later, Microsoft developed Web Controls and HTML Controls. We will see that all of the differences in the programming interface add up to the same basic operation as ASP for maintaining state.

ASP.Net adds a hidden form field to a WebForm, called "__VIEWSTATE". This form field corresponds to a server-side object called ViewState. The ViewState object is a Collection of values from the form, which includes the values of all Web Controls and HTML Controls which have been set to maintain their state1 between PostBacks (a "PostBack" is simply the posting of the WebForm back to itself).

How ViewState Works: Here's how it's done. When the WebForm's HTML output is streamed to the browser, the hidden "__VIEWSTATE" field is added to the form. When the form is posted back to the server, the Request.Form Collection (same as ASP) contains the values of the posted form. The Server Control reads the form POST data, extracts the values, and updates (rewrites) the ViewState value to be sent back to the client. At the same time, the Server Control adds the appropriate HTML to the HTML object text to "set" it in it's proper (remembered) state, that is, the state the form field was in when the form was posted. In essence, ASP.Net is doing the same thing that ASP does, although you don't have to write all that code to make it so.

ASP.Net and Events: Another new feature of ASP.Net is Events. Events have been around for quite awhile in terms of object-oriented programming, but as ASP was not object-oriented, this was not available. An Event is a message, of sorts. Basically, what happens is this: When something happens, whether it is something a User has done through an interface, or something internal to a program's logic, the object which hosted the action sends a message to the Operating System. This message is in the form of an Event object, which contains certain data about the object which spawned the Event. Any object which hosts an Event Handler Method for that object's Event will be notified of the Event by the Operating System, and the Event Handler method is fired when the Event is "raised."

Of course, this brings up the question: How can an event which occurs in a client-side browser, which is disconnected from the server, be recognized by the server, and handled appropriately by both the server and the browser? And of course, the answer is obvious: An event is a message. The browser sends a "message" to the server with each Request. The Event can be communicated to the server in the Request. And the server can then render the appropriate HTML back to the browser according to the Event Handler, thus having the browser "react" to the event as well.

In fact, this is exactly what Microsoft designed into ASP.Net. When you create a WebForm page with Server Controls in it, ASP.Net adds several other hidden form fields to the page, as well as JavaScript "onclick" (for the most part - a select object, for example, has an "onchange" event handler added to it)) event handlers which call a JavaScript function called "__doPostBack()"2. The form fields are called "__EVENTTARGET" and "__EVENTARGUMENT". The following code was copied from the HTML of an ASPX page

When you add a server-side event to a Server Control or HTML Control, for example, an "onclick" event to a button, ASP.Net automatically adds a client-side "onclick" event handler to the HTML for the object2. The event handler calls the __doPostBack() method, passing the id of the control which fired the event in the "__EVENTTARGET" field, along with any special "__EVENTARGUMENT" data that may be needed on the server side. Note that the __doPostBack() method submits the form back to the server, creating a Request which contains the event data in the hidden form fields.

When the server-side Page class receives the Request, it sees the data in those hidden form fields, and reacts accordingly, raising a real (server-side) Event, which can then be handled by the Event Handler method you have developed (if any).

ASP.Net Controls: We have been using the word "control" fairly frequently here, and now would be a good time to explain the concept of ASP.Net Controls. In the Common Language Runtime (CLR), all classes of objects which are used in ASP.Net interfaces (the HTML document rendered) are derived from System.Web.UI.Control in some form or fashion. The origin of this term can probably be traced back to Windows Forms. All interface elements in a Windows Form are called Controls. The idea of ASP.Net Controls is basically the same: A Control is a class which has back-end processing, and renders a User Interface. In Windows Forms, the interface and back-end are in the same memory space, part of the same Application. In ASP.Net, Controls have back-end processing, and render an HTML interface in the Page. The main difference is that the HTML interface is separated from the back-end processing by the client-server "gulf".

Even the ASP.Net Page class inherits System.Web.UI.Control, just as a Windows Form inherits from Control. A Page has back-end processing and renders an interface in the browser. Like any other Control, it has a Controls Collection. It has the same sequence of Events that any other Control has, plus a few others derived from System.Web.UI.TemplateControl, which is its immediate Base class.

What seems to confuse people who are new to ASP.Net is that while the conceptual model has changed, the platform has not. We're still dealing with HTTP and HTML here, and the control's interface element is just text streamed to the browser. Part of the problem that people have may stem from the way that these controls appear in Visual Studio.NET, and how they appear in the source code for an ASP.Net page. In Visual Studio.NET's IDE, the HTML for Controls is rendered, making it look like there's actually something there. But there's not. If you view the code for the control in the HTML view, you will notice that there is NO HTML for the Control in the page. This is because the Control renders HTML to the page when the page is executed. One of the Event methods that a Control has is the Render() Method. This method literally writes HTML for the control into the HTML output stream of the Page.

Don't let this confuse you, however. Underneath it all, ASP.Net is simply automating much of what you had to hand-code into your ASP applications. It is still writing HTML to the output stream to the browser. Part of the output stream, however, is certain types of HTML elements, such as the client-side event handlers that call the __doPostBack() function, the ViewState hidden form field, and __doPostBack() JavaScript, which are used to emulate the link between the client and server, enabling client-side events to trigger server-side event handlers.

By creating the idea of a WebForm, all of this is brought together into a programming model which acts much like a Windows Form. A Windows Form handles its own events. A WebForm does this too, by sending event messages with a POST to the server, which then streams back the updated state of the WebForm. This is why a WebForm always posts back to itself.

Conclusions: In many ways, ASP.Net is an entirely different animal than ASP. But underneath it all, ASP.Net is still doing everything that ASP does, just in a more organized and object-oriented way. ASP.Net automates many of the common tasks demanded from an ASP developer, and hides much of the automation from the developer, as any good object-oriented technology should.

A WebForm (Page Class) is the ASP.Net equivalent of a Windows Form. It has similar programming characteristics to a Windows Form. The back-end and interface elements, however, are separated by the "gulf" of the Internet and stateless HTTP protocol. To bridge that gap, elements have been introduced on the client- and server-sides, to enable event and state messaging between the client interface and server code.

1. Server Controls must have their "EnableViewState" property set to True in order to use the ViewState
2. This is true only for Controls which have server-side events, and have their "AutoPostBack" property set to True