SSIS (SQL Server Integration Service) Control Flow Overview

Monday, December 14, 2009



Overview
The control flow in a SQL Server 2000 Integration Services (SSIS) package is constructed by using different types of control flow elements.
• Container
• Task
• Precedence constraints





Precedence Constraints

• Precedence constraints connect container and task in packages into an order control flow.

• You can control the sequence execution for tasks and containers, and specify conditions that determine whether tasks and containers run.

• Precedence constraint links two executables:

1 –The precedence executable and

2- The constrained executable.

• The precedence executable runs before the constrained executable and the execution result of the precedence executable may determine whether the constrained executable runs.

Execute SQL Tasks

The Execute SQL task runs SQL statements or stored procedures form a package. Execute SQL task can be used for the following purpose.

• Truncate a table or view in preparations for inserting data.

• Create, alter and drop database objects such as tables and views.

• Re-create fact and dimension tale before loading them.

• Run stored procedures.

Bulk Insert Task

The Bulk Insert task provides the quickest way to copy large amounts of data into a SQL server table or view.You can configure the Bulk Insert task in the following ways.

• Specify the OLE DB connection manager to connect to the destination SQL server database and table or view into which data is inserted.

Specify the File or Flat File connection manager to access the source file.

• Define the format used by the Bulk Insert task

File System Task

The File System task performs operations on files and directories in the file system.

• All File System task operations use a source, which can be a file or a directory.

• The operations that copy and move file and directories and rename file use destination and a source.

SSIS Tools and Utilities

SSIS provides the following tools and utilities:
• Integration Services and Studio Environments= Describe how to use Business intelligence development studio and SQL server management studio with integration services.
•SSIS Designer = Graphical tool for building complex packages that include control flows, data flows, and event-driven logic.
•Integration Services Wizards= These wizards are for importing and exporting data, installing packages, migrating packages and creating package configurations.
•Command prompt utilities (SSIS) = For managing and running packages.
• Query Builder (SSIS)= Graphical tool for building queries.
• Expression Builder (SSIS) = Graphical tool for building expressions.

Overview of SOAP

• SOAP (Simple Object Access Protocol) is communication protocol which communicates between applications using XML format over internet.
• SOAP is platform and language independent. It is based on XML.
• SOAP is simple and extensible and it allows passing around firewalls.
• A SOAP message is an ordinary XML document containing the following elements.
1. Envelope (Required) = this element identifies XML document as a SOAP message.
2. Header (Optional) = It contains header information.
3. Body (Required) = It contains call and response information.
4. Fault (Optional) = It provides information about errors that occurred while processing the message.

Overview of SSIS Package

  • The SSIS package is the unit of work that is retrieved, executed and saved.
  • Package is an organized collection of connections, control flow elements, data flow elements, event handlers, variables and configurations.
  • SSIS includes SSIS Designer and SQL Server Import and Export Wizard, in addition to the SSIS object model for creating packages.
  • A package typically includes at least one connection manager.

Overview of SQL Server Integration Service

Monday, December 7, 2009

What is SSIS
- SSIS is a platform for building high performance data integration and workflow solutions, including the extraction, transformation and load (ETL) operations of data warehousing.
Uses of SSIS
- Populating Data Warehouses and Data Marts
- Merging Data from Heterogeneous Data Stores
- Cleaning and Standardizing Data
- Building Business Intelligence into a Data Transformation Process
- Automating Administrative Functions and Data Loading
SSIS Architecture
- The new integration services architecture is divided into two main sections.



1- Data Transformation pipeline (DTP). - Take the place of the old DTS data pump that was used in SQL server 7 and 200. - Primary function is handle the data flow between the source and target destinations
2 – Data Transformation Runtime (DTR) - A job execution environment that controls the control flow that is used in an SSIS package.
Data Transformation Pipeline (DTP): Overview The DTP takes care of the data flow and transformations that take place as rows are moved between the data source and data target - Each of these components exposes its own distinct object model

DTP uses data adapters to connect to the source and destination data sources.
The DTP engine is accessed using the DTP Pipeline object model.
Data Transformation Runtime (DTR): Overview
The DTR is essentially a job execution environment that controls the control flow that’s used in an SSIS package.


The DTR is accessed using the DTR object framework.
The DTR run-time object framework is the API that supports the integration service import/export wizard and the integration service designer in addition to the command-line dtexe tool.

How to know LOC (Line of Code) for all the files in the project?

Wednesday, November 11, 2009

If you want to know the KLOC for every files in your project then Microsoft line of code counter tool is very useful in getting KLOC. This tool is freeware and it’s very useful in knowing the exact line number of code in particular files. You can use Team Foundation Server, Visual Source Safe or File System for input of the file. This tool also gives the report and that can be export to excel also!! You can download from below given link. http://technet.microsoft.com/en-us/library/bb897860.aspx Software Name - Microsoft Line of Code (LOC) Counter Type – Freeware Size- 10.7 MB
KLOC, Line of Code, LOC

About Click Once Deployment Architecture

Friday, November 6, 2009

• The first step in ClickOnce deployment is publishing the application.
• Publishing an application generates two manifest files associated with a ClickOnce publication: the deployment manifest and the application manifest.
• The deployment manifest contains information about the publication, including the deployment provider URL, which indicates where the application will be launched from, the update policy, and a reference to the application manifest.
• The application manifest contains the list of files that the application is composed of.
• There are four stages of the clickonce deployment.
1- Before Deployment

2- After Intial Deployment

3- Update Published

4- Update Applied

Smart Client Software Factory – Default Project Creation

Tuesday, November 3, 2009

Default Projects created by SCSF
When we create the new Smart Client Application, The SCSF creates the following projects by default. SCSC creates one Shell Projects and four Infrastructure projects.
Projects
1. Shell = This Shell project is the main starting point of the any windows based smart client application. It contains the configuration and the actual main form that hosts the shell layout.
2. Infrastructure.Interface = Interface project defines interfaces for basic services created by SCSF.
3.Infrastructure.Library = Library project contains the implementations of the additional services generated by SCSF.
4.Infrastructure.Module = Module is an empty module where you can add your own infrastructure services. By default, this module consists of an empty module controller (which is a default root WorkItem for a module). In this module, you should only add services used by the whole smart client application that is typically always loaded with your application independently of other modules.
5.Infrastructure.Layout = A Layout project SCSF creates if you selected that you want to put the shell’s layout into a separate module. It contains a SmartPart and a presenter for this SmartPart for the shell layout.

Brief details about Smart Client EndPoint Catalog Application Block

About Smart Client EndPoint Catalog Application Block
• It provides features to expose the physical addresses and other details of remote services used by smart client applications.

• Uses a dictionary to store individual endpoints and the associated credential for each endpoint.
• An endpoint consists of a name, a default URL (address), credential, and a series of child network items.
Following is the sample of EndPoint Configuration.
<configuration>
<Endpoints>
<EndpointItems>
<add Name="ProjectPlanning" Address="http://localhost/ProjectDetails/ProjectPlanningService.svc" /> </EndpointItems>
</Endpoints>
</configuration>

About Smart Client Disconnected Service Agent Application Block

• It provides management features for running Web services from occasionally connected smart client applications.
• With a disconnected service agent, the application can maintain a queue of Web service requests when offline (disconnected) and then replay them when a connection to the server application becomes available.
• Provides following features :
– Queues web service requests and keeps track of the asynchronous callbacks that the application expects to receive when the Web service responds.
– Includes a dispatcher that determines exactly when to dispatch each call to a Web service, depending on connectivity conditions.
– When the correct conditions occur, the dispatcher makes the request, using the appropriate credentials and addresses for the endpoint.

Smart Client Connection Monitor Block

Monday, November 2, 2009

About Smart Client Connection Monitor Block
Connection Monitor Block monitors the available connections and networks through which the smart client application can connect to services.
• A logical network is defined by the developer and represents a set of remote resources (for example, Web services). The following are examples of logical networks:
- The Internet
- A corporate or home network
- A set of public Web services
• You define a name for each logical network along with a representative address.
• The name is used to identify the network, while the representative address is used to determine the connectivity status for all network addresses in the collection.
• You can also use the application block to monitor connectivity changes for physical network adapters.
• The key component of the Connection Monitor Application Block is a class named ConnectionMonitor, that exposes keyed collections of Connection and Network instances.

Following is the configuration settings required to configure Connection Monitor Block.

<ConnectionMonitor>
<Networks>
<add Name="Intranet" Address="http://companynet"/>
<add Name="Internet" Address="http://www.microsoft.com"/>
</Networks>
<Connections>
<add Type="WiredConnection" Price="1"/>
</Connections>
</ConnectionMonitor >

Microsoft Visual studio 2010 and .NET 4.0 CTP features

Tuesday, October 27, 2009

The latest release of microsoft visual studio 2010 and .NET 4.0 CTP has many enhanced features ,which include
1) Enhanced User experience providing better support for floating documents and windows.Enhanced document targeting and improved animation support
2) Parallel Programming providing IDE support and native C++ libraries that use lambda functions.Resource management of hardware and parallel debugging views as well as windows are provided.
3) Better Application Lifecycle management which helps you to design and share multiple digram types of usecase and sequence diagrams.It also provides better tooling for documentation of test scenarios and includes a new Test Impact View.
4) It provides C++ development experience which helps developers navigate and understand complex C++ source code.
5) For web development it has enriched Javascript Intellisense,one click deployment and full support for silverlight
6) Windows Azure tools for visual studio provides C# and VB templates for building cloud services,tools to change service role configuration and building packages of cloud services
7)Multiple database support which helps Developers to work with IBM DB2 and Oracle in adition to SQL Server.

Anonymous Types

Friday, October 23, 2009

Anonymous Types (C# Programming Guide)
Anonymous types provide a convenient way to encapsulate a set of read-only properties into a single object without having to first explicitly define a type. The type name is generated by the compiler and is not available at the source code level. The type of the properties is inferred by the compiler. The following example shows an anonymous type being initialized with two properties called Amount and Message.
var v = new { Amount = 108, Message = "Hello" };
Anonymous types are typically used in the select clause of a query expression to return a subset of the properties from each object in the source sequenceAnonymous types are created by using the new operator with an object initializer.
Anonymous types are class types that consist of one or more public read-only properties. No other kinds of class members such as methods or events are allowed. An anonymous type cannot be cast to any interface or type except for object.

LinQ Queries

LINQ Queries
A query is an expression that retrieves data from a data source.

Queries are usually expressed in a specialized query language. Different languages have been developed over time for the various types of data sources, for example SQL for relational databases and XQuery for XML. Therefore, developers have had to learn a new query language for each type of data source or data format that they must support.

LINQ simplifies this situation by offering a consistent model for working with data across various kinds of data sources and formats. In a LINQ query, you are always working with objects. You use the same basic coding patterns to query and transform data in XML documents, SQL databases, ADO.NET Datasets, .NET collections, and any other format for which a LINQ provider is available.
Three Parts of a Query Operation

All LINQ query operations consist of three distinct actions:
1. Obtain the data source.
2. Create the query.
3. Execute the query.


The following example shows how the three parts of a query operation are expressed in source code. The example uses an integer array as a data source for convenience; however, the same concepts apply to other data sources also.

class IntroToLINQ
{
static void Main()
{
// The Three Parts of a LINQ Query:
// 1. Data source.
int[] numbers = new int[7] { 0, 1, 2, 3, 4, 5, 6 };
// 2. Query creation. // numQuery is an IEnumerable
var numQuery = from num in numbers
where (num % 2) == 0
select num;
// 3. Query execution.
foreach (int num in numQuery)
{ Console.Write("{0,1} ", num);
}
}
}

About WSE

Monday, October 12, 2009


Introduction
Web Services Enhancements for Microsoft .NET (WSE) is a .NET class library for building Web services using the latest Web services protocols, including WS-Security, WS-SecureConversation, WS-Trust, and WS-Addressing. WSE allows adding these capabilities at design time using code or at deployment time using a policy file.

WSE Architecture
At its heart, WSE is an engine for applying advanced Web service protocols to SOAP messages. This entails writing headers to outbound SOAP messages and reading headers from inbound SOAP messages. It may also require transforming the SOAP message body — for instance, encrypting an outbound message's body and decrypting an inbound message's body, as defined by the WS-Security specification. This functionality is encapsulated by two sets of filters, one for outbound messages and one for inbound messages. All messages leaving a process — request messages from a client or response messages from server — are processed using the outbound message filters. All messages arriving in a process — request messages to a server or response messages to a client — are processed using the inbound message filters. The following diagram shows this simple architecture.

WSE filter chains are integrated with the SOAP Messaging built-into WSE, as well as the ASP.NET Web services infrastructure.

Quick Reference Guide to Windows Workflow Foundation

Tuesday, October 6, 2009

Workflow Overview

Workflows describe a business process

  • A series of work units, decisions, and rules needed to complete a specific business process/activity
  • People or automated process
  • Described graphically
  • Long running
  • Stateful
  • E.g. Sales management, Supply chain automation, Document processing, Bug tracking
Autonomous Workflows in Workflow driven applications.
  • Freestanding independent software package providing workflow functionality
  • Integration with different application systems (desktop or server) which handle processing of the elementary workflow activities
Embedded Workflows in Workflow based application
  • Workflow-functionality is part of the (application) software system (ERP, DMS, PPC etc.)
  • Controls the sequence of elementary functions of the system within the application


Why Use Workflow

  • Runtime Infrastructure
  • Flexible Flow Control
  • Long Running and Stateful
  • Design Time Transparency
  • Runtime Transparency
  • Workflow makes development process more understandable.

When to use workflow

  • Code increases with the complexity of business processes and becomes correspondingly harder to understand and maintain
  • Is apt for Long running transaction where state needs to be maintained
  • Coordinate work where part of the work is done by humans and part by the system
  • Coordinate multiple processes based on their outcomes
  • Compensate for cancelled processes automatically
  • Track and audit multiple processes

What is Workflow Foundation

WINDOWS WORKFLOW Foundation – A preview
Windows Workflow Foundation is a framework, not a language.

  • Windows Workflow Foundation is flexible and extensible
  • Windows Workflow Foundation enables model-driven workflow development
  • Makes workflow technology accessible to all .NET developers - means that it provides full support for C# and Visual Basic .NET, debugging, a graphical workflow designer and the ability to develop your workflow completely in code
  • Provides capabilities previously only available in BizTalk
  • Single workflow technology for the Windows platform
  • Finally, “The” technology for Future Release of Biztalk Server
  • Component of .NET framework 3.0 –
  • Supported on Windows Vista, XP SP2, Server 2003 and above
  • Released with Windows Vista in January 2007
  • Need Visual Studio 2005 and above for IDE integrated development
  • Ships with / used by Office 2007 as well
  • Six Microsoft products are built on WF: Microsoft Office SharePoint Server 2007, Microsoft BizTalk Server "vnext", Microsoft Speech Server 2007, Microsoft System Center "Service Desk", Microsoft Identity Integration Server "future version", and Microsoft Dynamics "future version".

AJAX Developement Model

Wednesday, September 30, 2009

AJAX Development Model
We will see how AJAX development is done by adopting client centric and server centric model.




Client side page lifecycle
The client side lifecycle of a web page is made up by three stages called init, load and unload. When each stage is entered, Sys.Application fires the corresponding event (init, load or unload).

Client Framework :-
Type System
The goal of the Type System is to introduce familiar object-oriented programming concepts to JavaScript -like classes, inheritance, interfaces and event-handling. In addition, this layer also extends existing JavaScript types. For example, the String and Array types in JavaScript are both extended to provide added functionality and a familiarity to ASP.NET developers. In short, the Type System lays the groundwork for the rest of the Ajax core library.
Components layer
Built on top of the solid foundation that the Type System offers, the Components layer does a lot of the heavy lifting for the core library. Within this layer is support for JSON serialization, network communication, localization, DOM interaction and ASP.NET application services like Authentication and Profile.
Application layer
Similar to the page lifecycle in ASP.NET, this layer provides an event-driven programming model that developers can use to work with DOM elements, components and the lifecycle of an application in the browser.
HTML, JavaScript and Xml-Script
ASP.NET AJAX-enabled web pages are written in HTML, JavaScript and a new xml-based, declarative syntax called xml-script. This provides the developer with more than just one option for authoring client-side code - they can code declaratively with xml-script and imperatively with JavaScript. Elements declared in xmlscript are contained in a new script tag:
ASP.NET AJAX Service Proxies
The client framework offers the ability to call Web Services from JavaScript via a set of client-side proxies that are generated from the server. These proxies can be leveraged much like a Web Reference would in managed .NET code.
Server Framework :-


  • Provide an easy-to-use, highly productive framework: The main objective here is to simplify the efforts of adding Ajax functionality to web applications. This is accomplished essentially by providing a rich client library and a comprehensive set of server controls that are easy to use and integrate into existing applications.
  • Server programming model integration: Server controls provide ASP.NET developers with a familiar paradigm for developing web applications. These controls emit the JavaScript needed to Ajax-enable a page with little effort or knowledge of JavaScript and the XMLHttpRequest object.
  • World-class tools and components: Components and tools built on top of the framework not only extend the framework but also provide the development community with a rich collection of tools to leverage and build upon. This also includes tools for debugging, tracing and profiling.
  • Cross platform support: Support for Internet Explorer, Firefox, Safari and Opera extract away the hassle of dealing with browser differences and discrepancies.
Client Centric Development Model

Presentation tier is driven from the client-script using DHTML and JavaScript
• Smarter and more interactive application is delivered from the server to the browser when the page is first loaded.
• Interaction between the browser application and the server is limited to retrieving only the relevant data necessary to update the page.
• The client-centric model is also ideal for mashups and applications that wish to fully exploit all the features that DHTML has to offer.


Server Centric Development Model


  • The application logic and most of the user interface rationale remains on the server.
  • Incremental changes for the user interface are passed down to the browser application instead of the changes being made from the client-side script.
  • The difference between this model and the traditional model in ASP.NET is that only the portions of the UI that need to be rendered are passed down to the browser application, rather than the whole page.
  • When working with controls like the GridView and Repeater in ASP.NET, the server-centric model offers the simplest and most reliable solution.
UpdatePanel for partial rendering
<asp:UpdatePanel ID="panel1" UpdateMode="Always Conditional" runat="server">
<ContentTemplate>
Partial Rendering
</ContentTemplate>
<Triggers>
<ajax:AsyncPostBackTrigger ControlID="" EventName="click textChanged" />
</Triggers>
</asp:UpdatePanel>

AJAX Control Tool Kit
The “Ajax" Control Toolkit is a collection of samples and components that makes it easier then ever to build and consume rich client-side “Atlas” controls and extenders. The toolkit provides both ready to go samples and a powerful SDK to simplify the creation and re-use of your own custom controls and extenders.
Can be downloaded from
http://ajax.asp.net/

Create your own MS AJAX web site
Download installable at
http://ajax.asp.net/
Open Visual Studio
Navigate to File à New à Web Site
Select “ASP. Net AJAX Enabled Web Site”
Website created with necessary config options.

Smart Client Application Components

Thursday, September 24, 2009

Smart Client Application has major six components.
- Application Shell

- Workspace
- Work Item
- Smart Parts
- Modules
- ProfileCatalog.xml
We will discuss above component in the details.


Application Shell
• The main user interface common to all the dynamically loaded modules is the Shell. Typically a form, it always hosts a root WorkItem, which is the root access to all the services, modules, and WorkItems registered by the modules.

• Derives from the class “FormShellApplication” in the namespace “Microsoft.Practices.CompositeUI.WinForms”.
public class MyApplication : FormShellApplication{}


Workspace
• A workspace is a control that is primarily responsible for holding and displaying Views.
• The Composite UI Application Block includes the following types of workspaces:

- WindowWorkspace
- MdiWorkspace
- TabWorkspace
- DeckWorkspace
- ZoneWorkspace

• The Workspace class has functions for :

- Displaying a View
- Hiding a View
- Activating a View
- Closing a View

WorkItem
• A WorkItem is a class encapsulating all the logic required for a use case.

• Technically, it's a container that contains all the required objects such as views and their presenters or controllers, state and commands.
• A CAB application has a tree of WorkItems. The Application Shell contains a reference to the root WorkItem. Given a WorkItem, you can go up one level to its ParentWorkItem, or down to the next level by accessing the workItem.WorkItems collection.

• A WorkItem also contains various other collections.
It has collections of:
- Workspaces
- SmartParts
- Commands
- EventTopics
- Services
- Items

Smart Part

• SmartParts are the visual components of the application. They are hosted by a Workspace.
• You can create SmartParts by simply customizing a standard user control. All you have to do to make a control a SmartPart is to mark the class with the [SmartPart] attribute.

[SmartPart]
public partial class MySmartPart : UserControl
• They are designed to be pluggable and reusable within the same or other applications.
SmartsParts communicate and cooperate between themselves by publishing and subscribing to events.


Modules
• A module is a collection of components (Work Items, services, and so forth) that are needed when performing a certain task.

• You can separate areas of your application into different modules to be able to deploy them to different users or applications.
• When one module has a dependency on another module, you express the dependency with the ModuleDependency attribute.
The CAB will load modules based on the contents of the ProfileCatalog.xml file.

Profile Catalog.xml
• Tells CAB what modules your app has

• Your application will not load a module that is not listed!
<solutionprofile xmlns="http://schemas.microsoft.com/pag/cab-profile">
<modules>
<moduleinfo assemblyfile="CABDemo.Inbox.dll">
<moduleinfo assemblyfile="CABDemo.Calendar.dll">
</modules>
</solutionprofile>

Programming Guidelines

Sunday, September 20, 2009

Following are the standard programming coding guidelines one should follow while developing the application.
Architecture Guidelines

- We should try to use the multi tier architecture which helps in developing application more feasible.
- We should have database class layer which communicates to the database and helps in support and migration of the DB easily.
- We should use the try-catch block to handle all the database exceptions and we can throw the exception into another layer of the application and do take the proper action.
- We should have group all the utility classes into the separate class assemblies.
ASP.NET Session Guidelines
- We should use session variable only within classes only using System.Web.HttpContext.CurrentSession.
- We should store large object in session which might take more memory if number of users are very high on the application.
- We should use the style sheet for standard look and feel of the web pages.It will be help in consistent look of the application.

Coding Guidlines - Naming Convention

Monday, September 14, 2009

Following are naming conventions one should follow as best practice during the development of the application.
- We should use Pascal case for giving name to Classes. E.g. public class EmployeeDetails
- We should use Pascal case for method names E.g. int EmployeeSalary(int empId) { }
- We should use Camel case for declaring the variables. E.g. int totalSalary = 0;
- We should add the prefix “I” for giving name to interface with Camel Case E.g IEmployeeEntity
- We should not use Hungarian notation for declaring the variables instead we should use came casing. We should not use abbreviations also. E.g. string address and not string add
- We should avoid giving single character name for variable. E.g. i, n.
- We should avoid adding underscore for local or temporary variables.

How ClickOnce deployment works?

Thursday, September 10, 2009

Overview
· ClickOnce is a deployment mechanism of the .NET framework application.
· It allows automatic update and deployment from the server side.
· For deployment of the application we need to publish it on the deployment server and provide the link to the system users.
· When users run the application through the given link, the application will be automatically deployed and stored in client computer and it runs.
Deployment Modes
There are two deployment modes of ClickOnce.
1-Installed
2-Online
Installed = In the installed mode the application is still available even though the client machine is in offline mode. The application can be launch through the programs section in the start menu.
Online = In online mode the application will be run through the URL of the deployment server. In this case client machine must be connected to the deployment sever.

ClickOnce runtime is used for automatic updates on client machine.

ClickOnce Deployment Architecture is as below
- First user has to publish the application through the ClickOnce deployment which will generate deployment manifest and application manifest.
- Deployment manifest =It has information related to publication like deployment server URL, the update policy and references of the application manifest etc.
- Application manifest = It has list of application files which are needs to be deployed on client machine.

Smart Client Overview

Monday, September 7, 2009

Smart Client Definition
A Smart Client is an application that uses local resources, utilizes XML Web Services and can be deployed and updated from a centralized server.
It can work both in the connected and disconnected modes.
Smart Client combines the best features found in both the thin and thick architectures.
Smart Client includes following features from the think and thick architectures.

Thick Application
• Rich User Experience
• Offline Capable
• High Developer productivity
• Flexible
Thin Application
• Easy to update
• Easy to deploy
• Easy to manage

Smart Client Features
Local Resource Utilization – A smart client may take advantage of the local CPU, local memory or disk, or any local devices connected to the client
Connected – The application interacts with a number of Web services that provide access to data or an application
Offline Capable – Because they are running on the local machine, one of the key benefits that smart client applications offer is that they can be made to work even when the user is not connected. Intelligent
Install and Update – Applications can be updated while running and can be deployed on demand by clicking on a URL.

Disadvantage of Smart Client
• The MSIL EXE gets downloaded at client side. So it takes more time to load at the first time
• Since MSIL EXE gets downloaded at client there is risk of client "de-compiling" your code
• There is no central control on the application once it gets deployed to the users.

Types of Smart Client Application
• Windows Smart Client applications - These kinds of applications typically use Windows Forms to provide a familiar Windows-style user interface
•Office Smart Client applications - With an Office smart client solution, one can integrate data sources, accessed through Web services, with the features of Word 2003, Excel 2003, InfoPath 2003, or other Office applications.
•Mobile Smart Client applications - Mobile smart clients are applications that run on smart devices — Pocket PCs, Smart phones, etc. These applications are developed using the .NET Compact Framework, which is a subset of the full .NET Framework.

What is Repository Factory

Monday, August 31, 2009

Repository Factory
Repository factory is a part of microsoft pattern and practice.
It comes with web service software factory.
It is a data access guidance package which allows to create the entity class and you can map those classes for database tables and fields.

ADO.Net Overview

Sunday, August 30, 2009

Background
• ADO (ActiveX Data Objects) was originally designed as a connected and tightly coupled model.
• ADO was more appropriate for the client/server architectures and not designed for a distributed and n-tier environment.
• ADO was not hierarchical like XML structures.
• ADO object was not well factored.

What is ADO.Net
• ADO .NET is a collection of classes, interfaces, structures, and enumerated types that manage data access from relational data stores within the .NET Framework
• ADO.NET collections are organized into the following namespace.
- System.Data,
- System.Data.OleDb,
- System.Data.SqlClient, etc.
• ADO .NET is an evolution from ADO.

Managed Providers
- Merges ADO and OLEDB into one layer
- Each provider contains a set of classes that implement common interfaces

Initial managed provider implementations:-
-ADO Managed Provider: provides access to any OLE DB data source
- SQL Server Managed Provider: provides optimal performance when using SQL Server
Data Access Style
ADO.NET access data into two ways.
- Connected mode: Forward-only, read-only mode
- Application issues query then reads back results and processes them.
- ADO.Net uses DataReader object in connected mode.
- Disconnected mode
- Application issues query then retrieves and stores results for processing of the data.
- Minimizes time connected to database
- ADO.Net uses DataSet object in disconnected mode.

Remote Objects

Saturday, August 29, 2009

In remoting there are two kind of remote objects are available.
1. Client activated Objects – A client activated objects is created and destruction is done by the client application. An instance of the remote object is created when client invokes new operator on the server objects. This instance lives as long as client requires it.

The client object will be destructed once its existence is no longer required by any client.

2. Server activated objects – A server activated object’s lifetime is managed by the remote server and not by the client which instantiates the objects. Server activated objects are not created by the client when it calls new operator. They are created when client invokes proxy method.

There are two kinds of server objects.
Single Call
– Single call objects handle only one request from a client. Single call objects are stateless objects.
Singleton – Singleton objects instance serves multiple clients. Singleton objects are stateful objects.

Quick reference guide to WCF

Monday, August 17, 2009

What is WCF?
• WCF stands for Windows Communication Foundation.
• WCF delivers Microsoft’s first platform built specifically for advanced service-oriented architecture (SOA), with a framework intended to bring it within reach of most developers.

It provides a unified programming model and communications infrastructure for developing connected systems.
• WCF simplifies development process through a service-oriented programming model in which autonomous programs are composed using asynchronous message passing.
WCF Fundamentals
A WCF Service is a program that exposes a collection of Endpoints.
Each Endpoint is a portal for communicating with the world.
A Client is a program that exchanges messages with one or more Endpoints.
A client may also expose an Endpoint to receive Messages from a Service in a duplex message exchange pattern.
Endpoints components
A WCF Service Endpoint has an Address, a Binding, and a Contract.
The Endpoint's Address is a network address where the Endpoint resides.
The EndpointAddress class represents a WCF Endpoint Address.The Endpoint's Binding specifies how the Endpoint communicates with the world including things like transport protocol (e.g., TCP, HTTP), encoding (e.g., text, binary), and security requirements (e.g., SSL, SOAP message security).
The Binding class represents a WCF Binding.
The Endpoint's Contract specifies what the Endpoint communicates and is essentially a collection of messages organized in operations that have basic Message Exchange Patterns (MEPs) such as one-way, duplex, and request/reply.
The ContractDescription class represents a WCF Contract.WCF RuntimeThe WCF Runtime is the set of objects responsible for sending and receiving messages. MessageThe WCF Message is the unit of data exchange between a Client and an Endpoint.

About SilverLight

Overview of Silver Light
- Silver Light is plug-in software for Internet based Graphical application.
- Its cross- browser plug-in and similar to FLASH program.
- Silver Light uses XAML, HTML, JavaScript to create animation, vector graphics for making application more interactive.
- Using Silver Light we can play windows media file also and its deployment package is less than 2 MB.
- We can use Silver Light XMAL into the WPF application also.
- Silver Light is platform independent and we don’t require .NET framework also.

Following are the Silver Light Features
- Silver Light is platform independent and it can run on IE 6 and above, Firefox and Safari browser. It doesn’t support on Linux platform currently.
- The setup package is very lightweight and it is less than 2 MB size.
- Silver Light supports the 2D drawing and animation.
- Silver Light supports to play WMA, WMV files also.
- We can call ASP.NET web service or WCF service through the Silver Light application.

For more detailed information please visit following sites
- http://www.silverlight.net
- http://msdn.microsoft.com/silverlight

About LinQ

Thursday, July 30, 2009

What is Linq

• LinQ is Language Integrated Query.

• Unified approach for querying different databases, XML files and Text files.

• Unifying the tools across layers-

C# for Presentation Transformations

- C# for Business Objects-

C# for Data Queries

Language Enhancement in C#

• Query Syntax

• Typed local variables and arrays

• Anonymous Types

• Automatic Properties

• Object Initializers

• Extension Methods

• Lambda Expression

About AJAX

About AJAX
• AJAX stands for Asynchronous JavaScript and XML.
• AJAX is become popular with Google application like Google suggestion
AJAX Components
• HTML
• CSS
• DOM
• JavaScript
• XML
• JSon
• XMLHttpAJAX Framework
• Built on top of ASP.NET 2.0, there is a valuable set of controls and services that extend the existing framework with Ajax support.
• This tier of the server framework is called the ASP.NET AJAX Server Extensions.
• The server extensions are broken up into three areas: server controls, Web Services Bridge and the Application Services Bridge.
• Each of these components interacts closely with the application model on the client to improve the interactivity of existing ASP.NET pages.

ASP.NET AJAX Server Controls
The new set of server controls add to the already impressive arsenal of tools in the ASP.NET toolbox and are predominantly driven by two main controls.
ScriptManager - is considered to be the brains of an Ajax-enabled page. One of the many responsibilities of the ScriptManager isorchestrating the regions on the page that are dynamically updated during asynchronous postbacks.

UpdatePanel - is used to define the regions on the page that are designated for partial updates.

Design Patterns Categories

About Design Patterns
Design patterns are used for day to day problems we encounter during the development of the application.
There are mainly three categories of design patterns.
• Creational Patterns
- Abstract factory (Frequently used)
- Builder
- Factory method
- Prototype-
Singleton (Frequently used)
•Structural Patterns
- Adapter
- Bridge
- Composite
- Decorator-
Façade (Frequently used)
- Flyweight
- Proxy
• Behavioral Patterns
- Chain of responsibility
- Command-
Interpreter
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template method
- Visitor

Definition of DOM

DOM

• The Document Object Model, or DOM, is a way to represent HTML or XHTML data in a hierarchical structure, and also to provide programmatic access to that data.

• By using the DOM, you can manipulate individual elements of your Web pages, including content, styles, and structural information.

Brief about ADO.Net Components

ADO.Net Components
• ADO.Net is a disconnected data access framework in .net which allows to access database very efficiently and scalable.
• In ADO.Net data is represented by DataSet which is in disconnected form. (In- memory representation).
•In ADO.Net architecture consist of main four components.
- Connection (connection object is used for connecting the database)
- Command (command object is used execute SQL command or stored procedure in the database)
- Data Reader (data reader command is used for forward only, read only data access from the database)
- Data Adapter (data adapter command is used for interaction between database and dataset. It is used to fill the dataset and update the database through the dataset)
Visual Studio .Net provides two data provides.
- SQL data provider
- OleDb data provider

Difference between overloading and overriding

Difference between overloading and overriding

Overloading: - In overloading we can create the multiple methods having same name but different signature.

Overloaded methods can have same or different return type and access levels.

Overriding: - In overriding we change the behavior of base class method by putting override keyword in child class. We can hide the implementation of base class by putting new keyword in child class method.

About Unit Testing

Unit Testing
• Unit testing is used for testing the use case or unit of our application which we have developed.
• We test our use case by creating the test cases.
• In test case we defined the certain input parameter or input condition and test against our developed use case.
There are two kind of test case.

- Positive test case (proper input data and check for desired output)
- Negative test case (improper input data and handle the exceptions)

Test Driven Development using NUnit

Introduction


NUnit is a free, open-source tool for .NET that is developed as a framework which can help automate unit testing. (The same unit test framework was already available for Java and was named jUnit.)


NUnit can be downloaded from NUnit site or the SourceForge NUnit page.


Installation and Setup of NUnit


After downloading the NUnit from either of the above download pages, run the installation program, NUnit-XXX.msi. At the time of this writing, the current version of NUnit is 2.2.0 and the setup file name is NUnit-2.2.0.msi. This setup will install the required libraries.

NUnit provides two utilities which can be used for running automated tests:

1. nunit-gui.exe, a GUI tool which I most commonly use, and

2. nunit-console.exe, which is a console program

Once you have installed NUnit you can test if the installation has gone through properly using the nunit-gui.exe tool.

This can be run from Start Menu --> Programs --> Nunit --> NUnit GUI.

After opening the tool, click on the File --> Open and open the nunit.tests.dll from the C:\Program Files\NUnit 2.2\bin folder. (The folder could be different if the installation has happened by choosing a different folder.)

When the DLL is chosen, NUnit-GUI shows all the unit test code written for the particular DLL using the NUnit framework.

If the button Run is clicked, it will show the results as follows.

• Passed Test - Green color

• Failed Test - Red color

• Ignored Test - Yellow color

The nunit.tests.dll DLL contains over 600 tests and when run all of them should pass and turn the color to Green.

For more details, visit http://www.nunit.org/index.php?p=home

Quick reference guide to C#

Quick referece guide to C# language
• In C# there are two kinds of variable types.
- Value Type (All value type variables are stored in stack)
- Reference Type (All reference type variables are stored in heap)
• We can use import keyword to import namespace which can be used to reference classes of that namespace in your class. We can assign the constant name to imported namespace also.
• To create new instance/object of class use new keyword.
• We can create read only and write only property in C# to extend member variables and objects.
• There are five kind of access modifier in C#.
- Private
- Public
- Protected
- Internal
- Protected Internal
• We can implement interface in c# two ways.
- Implicit (implement interface members without fully qualified name)
- Explicit (implement interface members with fully qualified name)
• Colon ( : ) is used to implement inheritance in class.
• The enum keyword used to declare an enumeration which can be numeric type only.
• In C# we can create one dimensional or multidimensional array.
• We can change the behavior of base class functionality in your child class by overriding (using override keyword) or hiding (using new keyword).
• We can access the base class functionality using base keyword.
• We can use try catch block for exception handling in our program.Structure of exception handling consists of three blocks.
1. try block
2. catch block
3. finally block (finally block will execute every time, whether exceptions occurs or not)
• In catch block we will catch any exceptions occurred during the executions of program in try block. We can use throw keyword inside a catch block to throw exceptions.
• There are three kind of error we face while working on our programs.
1. Syntax errors (compiler errors. Without fixing compiler errors we cannot move ahead in running application)
2. Run time errors (run time errors occurs when an expected operations are done on application) 3. Logical errors (logical errors occurs when application doesn’t work as per the business rules or functionality we have defined in the program)
• We use debug and trace class which allows us to trace and log message in application execution which can be useful in debugging the application.

Classification of MSMQ

Classifications of MSMQ are as below
MSMQ stands of Microsoft Message Queuing.
Application Queues
1. Message Queues- Public Queues- Private Queues
2. Administration Queues (All administration queues must be non-transaction queues)
3. Response Queues
4. Report Queues
System Queues
1. Queue journals
2. Dead-letter queues

About MTS application

About MTS application
• An MTS (Microsoft Transaction Server) application contains one or more components/objects.
• Components can be either- Server Application- Library Application
• In Server Application component executes in a separate server process.
• In Library Application component executes in process of client.

How COM works in server application and client application
Server Application
• Component executes out- of process.
• If component misbehaves it cannot kill the client.• Slower execution (Suited for web application)
Client Application
• Component executes in-process.
• If component misbehaves it can kill the client.
• Faster execution.

MTS maintains the standard COM principal of Location Transparency. Client component access a component without knowing actual physical location of component. MTS stores this information in windows registry.

Difference between XML and HTML

Definition of XML

XML is a text based markup language that is fast becoming a standard for data exchange on the web.As with web you identify data using tags, collectively the tags are known as “Markup”.
Difference between XML & HTML

• Unlike HTML, XML tags tell you what the data means, rather than how to display it. XML tag acts like a field name in your program. It puts a label on piece of data that identify it.

• XML document is always well formed.

• In HTML, there is a fixed set of tags that we can use to tell the application (web browser) how to display data (formatting of data).While in XML, you are free to use any tags that make sense for a given application. We can define tags in the same way as we define field names for a data structure.

• With HTML, whitespace is essentially irrelevant, because it gives the representation of data not contents or meaning of data.

• In XML, you could easily search a data set for messages containing “cool” in the subject, because the xml tag identifies the content of data rather than specifying its representation.

Definition of Resource Dispensers

About Resource Dispensers

MTS (Microsoft transaction server) provides resource dispensers to recycle valuable system resources in a similar fashion to the way it recycle objects.

• For example on an ODBC connection. An ODBC resource dispenser recycles database connections.

• When an ODBC database connection is no longer required MTS just deactivates connection rather than close it. When a component requires an ODBC database connection, MTS will first try to assign a connection from its pool of deactivated connections. A new one is only established only when pool is empty.

Distributed Transaction Coordinator

How DTC Works
• DTC (Distributed Transaction Coordinator) is installed with MTS. DTC is as services with is stored when system is booted.
• Where as COM provide inter object infrastructure. DTC manages transactions over the network.
• DTC inter operates with database resource manager.
• DTC also includes transactions like MSMQ – read message.
• DTC monitors transactions for any failure, if problem occurs, it will automatically handle the database rollback.

Definition of COM, COM+ and MTS

Tuesday, July 28, 2009

COM
Basic aim of COM was to reuse the code written in one language to be available to any language at binary level.
• COM exposes a standard interface that a language needs to implement to access the functionality of COM components.
• But these implementation & representation of data type are different in different languages.
• COM helped us to develop applications by assembling purchased components. We don’t have to write everything from scratch.

COM +
• COM+ extends the concept of COM to following complexities that are encountered while developing multi tier computing architecture.
- Threading issues
- Object pooling
- Transactiono Security controlled access
MTS
• MTS works as an object broker for COM+ components.
• MTS acts as a middle layer, assisting in the interoperability between client application and software components. (COM+ Components)
• It provides simple but powerful security framework for controlling who has access to the functionality within a software component. We can restrain user access to a particular object.
• Automatically manageso All threading issueso Object re-poolingo Sharing of resourceso Handling of transaction context access objects.
• Allows developer to concentrate only on business logic.

About COM threading architecture & the Apartment.

Definition of Apartment

• COM objects in the process are divided into groups called apartments.

• A COM object lives in exactly one apartment, in the sense that its methods com legally be directly called only by a thread that belongs to that apartment. Any other thread that wants to call the object must go through a proxy.

COM Threading Architecture is as below.

[PROCESS]

[Object]

Apartment

Difference between Single Threaded and Multi Threaded apartment

Single Threaded

• Single threaded apartment consist of exactly one thread.

• All COM objects that live in a single threaded apartment. COM receives method calls only from the one thread that belongs to that apartment.

• All method calls to a com objects are synchronized with the windows message queue.

• A process with a single thread is simply a special case of this mode.

Multi Threaded

• Multi threaded apartment consist of one or more thread.

• All COM objects can receive methods calls directly from any of the threads that belong to the multi-threaded apartments.

• All method calls to COM objects are synchronized by the objects themselves.

• Threads in MTA use model called free threading.

Definition of Process and Threads.

Definition of Process and Threads.
Process:-
A process is a collection of following.
• Virtual memory space
• Code
• Data
• System resources.
Thread:-
A thread is code that is to be serially executed within a process. A processor executes threads and not process. Below given is the framework of process and threads.

[Process]
• Virtual memory
• Data
[Thread]
• Primary
• Secondary

Attributes of process and threads.
• A win32 application has at least one process.
• A process has at least one thread called primary thread. A process can have multiple threads in addition to primary thread.
• Processes communicate with one another.
• A thread continues to execute until it is killed or being interrupted by a thread with higher priority.
• Each thread shares that process global variables and resources.
• A thread scheduler determines when and how often to execute a thread accordingly to a combination of the process’s priority class attribute and thread’s base priority.

Definitioin of SGML and SGML Application

Definition of SGMLSGML:-
SGML stands for Standard Generalized Markup Language
• SGML designed to make data storage independent of any software package or software vendor.
• SGML is a Meta language or a language for describing markup languages. HTML is one such markup language and is therefore called an SGML application.
SGML Application:- SGML application specifies which characters are to be interpreted as data and which characters are to be interpreted as mark up.
• An SGML application consists of an SGML declaration and an SGML DTD.

XML Structure

Types of XML structure There are two kind of structure in XML. • Physical structure• Logical structurePhysical Structure - Arrangement of entities gives a physical structure.Entity – A unit of information or a storage object. A document entity is an entity which contains all other entity. Entities can reference other entities and can cause them to be included in the XML document. They can be internal or external.e.g.

[home.page] [head] [title] [banner] [body] [main.title] [rule] [text] [para] [footer]

Logical Structure - Arrangement of the elements gives a logical structure.
Each XML doc must have only one root element and all the other elements must be perfectly nested inside that element.
This means that if an element contains other element, those elements must be completely enclosed within that element.

Hence, we can logically represent XML doc as a tree like structure with root element at the top of the tree.
• The elements that are inside an element are called its children.
• Elements that share the same parent elements are called siblings.

Sample XML doc

source=”topbanner.gif” <'main.title>Welcome to my home page Sorry, this page is still under construction. Please come back soon !



And you can use the elements accordingly to the needs of the application.

How object pooling works in MTS

How object pooling works in MTS.With standard COM, object is released whom client deletes the object or client process terminated, but with MTS (Microsoft Transaction Server), however clients can hold on to the references to objects, but the objects becomes “deactivated” for the period when their services are not required.When client needs the services of an object MTS will try to assign one from its pool of deactivated objects (if available) before resorting to the instantiation of a new object (if name is available).This increases performance of scalability because • Few objects can be shared over many clients, thus reducing the demand over system resources.• Objects can be initialized and waiting “ready to go”, this enables them to react to a request immediately on demand.For example – Database connection is a notoriously expensive operation and in large system can result in unacceptable performance levels.

Continuous Integration using Cruise Control

Saturday, July 11, 2009

Abstract
The practice of continuous integration represents a fundamental shift in the process of building software. It takes integration, commonly an infrequent and painful exercise, and makes it a simple, core part of a developer's daily activities. Integrating continuously makes integration a part of the natural rhythm of coding, Continuous integration is about progressing steadily forward by taking small steps.
About Cruise Control
Cruise Control is a framework for a continuous build process. A web interface is provided to view the details of the current and previous builds.
The CruiseControl.NET Server offers several key features:
Integration with a variety of Source Control systems
Integration with other external tools Visual Studio Team system
Can build multiple projects on one server
Remote management and reporting


Applicable areas
This is applicable to any .NET technology based development project.

CruiseControl.NET Tools
The other applications in the CruiseControl.NET suite are:
Web Dashboard: A .NET web application that gives you a status and detailed view of the CruiseControl.NET projects and servers of project.
CCTray: A client System Tray application that enables you to see 'at a glance' the state of project from any machine on your network.
Cruise Control Configuration Files
Cruise control uses ccnet.config files for the configuration.
.



Business value generated
· After implementing Continuous Integration, the entire development process is streamlined.
· The build and deployment process is automated as against manual dependency earlier faced on build manager.
· At any point in time, the management can know the status of the code quality / builds.
· The dashboard is made available to the client as well so that they now have a transparent insight in the development process.
· The developers are happy as they now know their mistakes immediately after they check in the code, rather then very late at the time of delivery. This resulted in faster turn around time.

Tools & techniques used
· CruiseControl.Net – Continuous integration tool (
http://confluence.public.thoughtworks.org/display/CCNET/)
· TFS –Version Control Tool
· VSTS 2005– IDE for ASP.NET 2.0 development
· (
http://msdn.microsoft.com/en-us/library/ms181232(VS.80).aspx)

I. Take Away
· Automation of the build process reduces resource dependency that would come with it being done manually.
· Early detection of errors and defects, which results in reduced turnaround time to fix the same.
· Increased transparency as all the stake holders have access to all the reports generated and published via the CruiseControl dashboard.
· Reduces last minute surprises in the otherwise happening integration phase, which in turn reduces risk.


II. Resources
http://confluence.public.thoughtworks.org/display/CCNET/Documentation
http://msdn.microsoft.com/en-us/vsts2008/aa718916.aspx

Copyright and Disclaimer

Sunday, June 14, 2009

Disclaimer:Whatever the information shared in this blog is just my opinion/my knowledge and i request people not to take the information as suggestion or advice. If anyone has any statutory rights on the information posted here,it will be removed from the blog at the earliest of their information to us. I am not responsible for any legal action if the information posted here is misunderstood. For any discrepancies please mail me.

 
 
 
Your Ad Here