Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Tuesday, February 22, 2011

Dot Net Module

MS.NET – 4.0 INCL. C#, VB.NET & ASP.NET
MS.NET FRAMEWORK
·         The .NET Framework - an Overview
·         Architecture of .NET Framework
·         Types of Applications which can be developed using MS.NET
·         MSIL / Metadata and PE files.
·         The Common Language Runtime (CLR)
·         Common Type System (CTS)
·         Common Language Specification (CLS)
·         Types of JIT Compilers
·         Security Manager
·         MS.NET Memory Management / Garbage Collection
·         MS.NET Base Classes Framework
·         MS.NET Assemblies and Modules

VB.NET AND C# LANGUAGES
·         Developing Console Application
Entry point method - Main.
Command Line Parameters
Compiling and Building Projects
·         Language Basics
Variables and Data Types
String &StringBuilder.
Boxing and Unboxing
Operators
Statements
Arrays and Strings
Procedures and Functions



·         Essentials of Object-Oriented Programming
Object and Class Definition
Understanding Identity, State, and Behavior
Using encapsulation to combine methods and data in a
Single class
Inheritance and Polymorphism.
·         Working with Classes and Objects
Adding Variables and Methods
Properties and Indexers
Constructors and Destructors
Type Initialize
Extension Methods
Anonymous Types
Memory Management and Garbage Collection
Shared / Static Members
Method Overloading
·         Anonymous Methods
·         Partial Classes & Methods
·         Operator Overloading
·         Inner Classes
Attributes and their Usage
·         Inheritance, Interface and Polymorphism
Deriving classes
Calling base class constructor
Overriding Methods
Non-Inheritable Classes.
Abstract Class
Interface Inheritance
Namespace and Access Modifiers

ADVANCE LANGUAGE FEATURES AND BASE CLASS API
·         Working With Collections
List and Dictionary
ArrayList and HashTable
·         Generic Classes & Methods
·         List and Dictionary
IEnumerable and IEnumerator
·         Exception Handling
Handling Exceptions using try and catch
Raising Exceptions using throw
Pre-defined Exception classes
Custom Exception classes
·         Using Statement
·         Inheritance, Interface and Polymorphism
Deriving classes
Calling base class constructor
Overriding Methods
Non-Inheritable Classes.
Abstract Class
·         C# Features / General Features
Unsafe Code
Fixed Keyword.
Operator Overloading.
Reflection
P-Invoke





·         Data Streams and Files
Byte Streams
Readers and Writers.
Binary Streams
Console and File I/O
Serialization & Deserialization
·         Working with Components / Assemblies
Creating a Simple .NET Framework Component
Private and Shared Assemblies
Singing Assemblies for Strong Names
Deploying .NET Assemblies in Global
Assembly Cache
·         Multithreading
Introduction
Application Domains
Creating and Managing Threads
Thread Priority
Thread States
Thread Synchronization using Monitor and
Mutex
·         Data Access using ADO.NET
Introduction to ADO.NET
Managed Providers
Working with Connection, Command,
DataReader and Transaction objects
Working with Prepared Statements and Stored
Procedures.



·         Connection Pooling and Multiple Active Result Sets
Working with DataSet
Adding, Deleting and Modifying records in a Dataset
Data Tables, Data Columns and DataRows ,
Constraints and DataRelations
Using DataView
·         Wording with DataGridView.
WinForms
Introduction
Controls
Menus and Conext Menus
MenuStrip, ToolbarStrip.
Graphics and GDI
SDI and MDI Applications
Dialogbox (Modal and Modeless)
Form Inheritance
Working with Resource Files
Working with Settings
Other Misc topics.
·         XML
Introduction
XML-DOM
XMLDocument, XMLElement, XMLAttribute
Interoperating with DataSet
XMLDataDocument
XML TextReader / XML TextWriter
XPath.



·         Windows Services
Purpose and Advantage
Developing and Deploying
Debugging Widows Service
Sending Custom events
·         Packaging and Deployment
·         Compiled Deployment of ASP.NET application.
Types of Deployment Modules
Working with a Setup and Web Setup Project
Working with a Merge Module Project
·         Debugging and Tracing
Debug and Release Compilation
Debug and Trace Objects
Tracing Switches & Listeners
·         Debugging JavaScript from VS.NET
·         Debugging SQL-Server Stored Procedures.
Developing N-Tier Architecture Application Using
SQLHelper, DAO, Business Object, Data Objects and
Presentation Tier











ASP.NET
·         Basic of HTML and JavaScript
·         Introduction to ASP
ASP Architecture
ASP Objects
Request and Response Structure
Forms and Querystring
·         Overview
ASP.NET Architecture
Virtual WebServer
New Features over ASP and ASP.NET 1.1
·         Event Handling
·         Web Forms
Introduction
Advantages
Comparison with HTML Form
Page Processing States
Event Model
View State Management
·         Cross-Page Postback
·         Using Web Controls
HTML Server Controls
Standard ASP.NET Sever Controls
·         Basic Controls
Validation Controls
Web User Controls
Master Pages &UserControl
·         URL Rebasing in a Master Page


·         Accessing a Master Page from Code
·         Nesting Master Pages
·         Master and Content Pages
Applying Themes and Styles to Controls
·         Working with CSS
·         Using Themes to Customize a Site
·         Named Skins within a Theme
·         Server-side Styles using Themes
·         Contents of a Theme and Skin
·         Themes and Profiles
·         ASP.NET State Management
Static / Shared Members
ViewState Object
Cookies
Session Management
Application State
HttpContext
·         ASP Intrinsic Objects
Request and Response
Session Objects
Application Objects
Server and Context
·         ASP.NET Web Application
Creating Virtual Directories
Global.asax& Managing Application Events
HttpApplication Instance
HTTP Handlers and creating Custom Handler



·         URL Redirection
Data Access Controls
Data Binding Server Controls
·         SqlDataSource, ObjectDataSource
·         GridView
·         DetailsView and FormView
·         Data List and Repeater
ListView
·         Caching
Overview
Page Output Caching
·         CacheProfile
Page Fragment Caching
Data Caching
·         SQL Cache Invalidation
·         Notification-based Invalidation
·         Polling-based Invalidation
Expiration Policies and Cache Dependencies
·         Configuration
Configuration Overview
Machine.Config and Web.Config
Inheritance of Configuration Settings
Configuration File Format
URL Rewriting - (Programmatically and using config files)
Custom Error Handling.





·         Trace Functionality
Overview of Tracing
Trace Information
Page-Level Trace
Application-Level Trace
·         Security
Authentication & Authorization
Windows Based Authentication
Form Based Authentication
Authorizing Users and Roles
Impersonation
·         Using Login Controls
·         ASP.NET Membership and Roles
·         Securing Non-ASP.NET files
·         Globalization and Localization
Request and Response Encoding
·         Local and Global Resources
·         Implicit Expressions to Local Resources
·         Explicit Expressions to Local Resources
·         Programmatic Access to Global Resources
·         Localizing Static Content
·         Storing Language Preferences
Right to Left Mirroring
Culture specific formatting
Personalizing Using Web Parts
·         Webpart Controls
·         Editing Webparts



·         Personalizing
AJAX.NET
·         Architecture
·         Working with AJAX Pro
Using AJAX.NET Controls
Accordion
Calendar
CascadingDropDown
CollapsiblePanel
FilteredTextBox
NumericUpDown
ModalPopup
PopupControl
·         Distributed Application
·         Development
·         Introduction
Comparison between 2 and 3-tier
Limitations of SOCKET communication
Stub / Proxy Architecture
Comparison between DCOM / CORBA & RMI
Protocol for communication.
Serialization and Marshalling.
·         Web Services
Architecture and Advantage.
SOAP Significance.
Building Services & Hosting Services
Using WSDL to Build Proxy for clients
Setting up a 3-Tier Application using Web
Service.

·         Remoting
Architecture
Advantages over Web Services
Channel Types
Server activated : Singleton / Single Call
Using Remoting Object in Web Application
Client activated

MS.Net Suite: MS.NET + SharePoint + Sql Server  Live Project
MS.Net Advanced: LINQ + WCF + WPF + Silverlight + WF
MS.Net JUMBO = All the Above Topics are included.

C# LANGUAGE EXTENSIONS IN 3.5 (PREREQUISITE)

  • Type Inference

  • Object Initializers.

  • Anonymous Types

  • Extension Methods

  • Partial Methods


LINQ ARCHITECTURE

  • Understanding the LINQ Framework

  • LINQ Providers

o   LINQ to Objects

o   LINQ to SQL

o   LINQ to Dataset

o   LINQ to XML







LINQ TO OBJECTS

  • IEnumerable and IQueryable interfaces

  • System.Linq namespace

  • Query Expressions

  • Lambda Expression

  • Using Custom Class Collection



LINQ TO SQL

  • Defining the Data Model classes

  • Using Mapping attributes

  • Using the Data Context class

  • Defining Relationships using Associations

  • Creating a customized Data Context class

  • LINQ to SQL Designer (DBML File)

  • Performing Add/Edit/Delete/View perations

  • Tracking changes to entities

  • Submitting changes

Web Service and WCF Course Details

WebService
    • What is Distributed Application
    • High Level Architecture on how RMI/CORBA/DCOM works
    • Introduction to WebService & SOAP
    • To build an WebService application and client
    • Pass by value and reference behavior
    • Working with SoapHeader Attribute
    • Asynchronous Call to the WebMethod
    • Security in WebService
WCF 
Introduction to WCF
    • Evolution of WCF
    • Evolution of Service Oriented Architecture (SOA)
    • Four Tenets of SOA
    • What is WCF
    • Where does WCF Services fit in?
Developing WCF Service Application and Client
    • Hosting WCF Service in IIS/ASP.NET Development Server
    • Using a Service in the client application
    • Understand Contracts in the service
      • ServiceContract.
      • OperationContract.
      • DataContract.
    • Understand Instancing behavior in the service
      • Single
      • PerCall
      • PerSession
    • Building WCF Library based Host and Client application.
Endpoints in configuration file
    • End points in Configuration File.
    • ABC - Address, Binding & Contract of the service in Configuration File.
    • Understanding importance of base address.
    • Importance of IMetadataExchange Contract / Endpoint.
    • Configuring service behavior in configuration file
    • WCF Service Configuration Editor
    • Creating Endpoints through Code
Channel Stacks & Bindings in WCF
    • Understanding Channel Stack
    • Introduction to Binding
    • Types of Bindings
    • Binding Comparison
    • Thumb rules in choosing endpoint binding
    • Configuring a Service and Client for Multiple Bindings
    • Binding Class Properties.
Understanding Service and Data Contracts
    • About Service Contract
    • Data Contract & Data Member
    • Versioning using Interface IExtensibleDataObject
    • Version Tolerance
    • Implications of Modifying Service Operations
    • Implications of Modifying Data Contracts
    • Working with Known Types
Handling WCF Exceptions/Faults
    • Overview
    • Producing Faults
    • SOAP fault with FaultCode and FaultReason
    • Culture specific SOAP fault
    • Strongly Typed SOAP fault
    • Consuming Faults
    • Proxy State for Managed Exceptions Vs SOAP Fault
Message Exchange Patterns
    • Request – Reply Pattern
    • One way Operations
    • Duplex Pattern
    • Duplex Publisher Subscriber Example
Transactions
    • What is Transaction and ACID
    • How to enable Transaction in WCF Service
    • TransactionScope in to begin a transaction.
    • Transaction Isolation
    • Transactions and Sessions
MSMQ
    • Introduction
    • Advantages of using MSMQ
    • Transactional Queues
    • Steps to follow to Build a MSMQ application
WCF Security
    • Concepts.
    • Security Mechanisms.
    • Default Security Settings.
    • Demonstrate how Messages are encrypted.
    • Authentication
      • Windows Authentication
      • HTTPS / SSL Authentication.
      • ASP.NET Membership Authentication
      • Custom Authentication
    • Authorization
      • Windows Group/Role based Authorization
      • Custom Role based Authorization
      • ASP.NET Role Provider



  • Concurrency error handling issues

  • Join Query

  • Validating Entities

  • Transaction Handling

  • Executing Stored Produces

  • LINQ to SQL architecture


LINQ to XML

  • Understanding the LINQ to XML Class hierarchy

  • Create an XML document

  • Loading existing XML document

  • Querying XML using LINQ to XML

  • Manipulating XML

    • Adding nodes

    • Modifying nodes

    • Deleting nodes


LINQ to Dataset

  • Querying DataSets

  • Querying typed DataSets

  • Using LINQ over DataSet with Table Adapter





















LIVE PROJECT EXECUTION PROCESS

1.  Developing 3-tier architecture windows based application (Video Session)
A video of developing a 3- tier architecture windows based application will be provided online, which will be giving you a clear picture of how to start with the project and what care should be taken during the implementation.

2.  Developing 3-tier architecture Web based application (Sample code will be provided)
For web based application in 3 tier we are going to provide you with the sample code of a project which will giving you an overview of how to and what steps need to be followed at the time of coding.

3.  Analyze the Requirement – A brief overview of the requirement – Abstract Document.
Requirement Analysis is the first and most important for the success of project, it is also referred names such as requirements gathering, requirements capture or requirement specification.
By analyzing the requirements it provides a contract between the project sponsors and the developers about what to do. In other words the requirement analysis provides the information about the need of what a particular product or service should perform. These requirements are given as input to the Design phase.
Some of the below categories of requirements should be analyzed before starting of the project,
  • Customer Requirements
  • Functional Requirements
  • Non Functional Requirements
  • Software Requirements
  • Hardware Requirements
  • Design Requirements
Documenting the requirements will give an over view and the difficulties and of the project.





4.  Identify Roles and their tasks – Roles Overview Document.
For every project there are some Roles defined with the help of which it is known what a particular user’s responsibilities are, according to a particular position or status in a group or organization he/she belongs to. Based on the roles the privileges to access a particular page is given to the user.

5.  Detailed documentation about Individual modules – Module Document
Every project will be divided in to one or modules, each module will have its own functionality and importance. Project will be divided in to modules in order to ease the understanding of the project and development. Based on the project requirement and the roles identified the modules will be indentified. In module document we are going to specify what the module is about, functionalities of a module and which role is going to use this module.

6.  Based on the above document designing dat abase – Database design document
For storage and retrieval we need a persistent storage which we call as a Database, here we need to specify the following:
  • What are the different tables
  • What are the fields in each table
  • What is the data type of each field
  • Defining the relationships between tables
  • Validation rules for each field
All the above will be documented properly.

7.  Creating Tables in Dat abase (SQL Server)
Based on the above database document we are going to create the tables in Database
  • Creating the columns in each table with its respective data type and size
  • Mapping the relations between the tables
  • Creating the Database diagram

8.  Insert ting Sample Data into the tables
Once the database is created we need to enter the sample data (proper data), this will help when we wrote the code and trying to check the application. So if the Database is empty it will be difficult to test the code whatever a developer has developed.

9.  Detailed Process document for each module.
This will be a semi technical document created by a developer for the end user. In this document developer is going to specify the sequence of actions to be performed by the user.

10.  Writing Data classes
In the Data classes the developer is going to represent each table of database as a separate data class which holds every column of the table as a property with specific return type as the data type of the column in the table.

11.  Create Stored Procedures for the required functionality
Stored procedures are the important aspect in the application development, stored procedures enable the users to change the logic without tinkering with the application. Even the developer can pass the parameters to the stored procedure from the front end, in .Net CLR makes it possible for the developers to write the stored procedures, triggers, user-defined functions and creating the database using the managed language such as C#.Net.

Developer should identify the basic functionalities like Insert, Delete, Update, GetAll, GetRecordById etc.. of the application and then start writing the stored procedure for them for each table.

12.  Write Helper class and add SqlHelper class to the application
Helper class is a user defined class where the common functions are defined. Common functions are the ones which are being used in more than one page so instead of writing them in each and every page we are going to put them in one class called “Helper”.
Sql Helper class is the one which is going to be used in the Data Access layer, it contains definitions for Execute Reader, Execute Dataset, Execute non Query, For establishing a connection and closing a connection etc., this also behaves like a common class for all the Database related operations which can be accessed in any of the Data Access layer.

13.  Writing DAO classes for actions to be performed over dat abase.
All the classes of DAO will be in the Data Access Layer (DAL). This layer provides a simplified access to the persistent storage or Database.
Here DAO is the Data Access object with complete attributes instead of row of fields from a database table, which allows us to create the client modules with a higher level of abstraction. DAL will hide the complexity of underlying data source to the external world.
For instance, instead of using the commands such as insert, delete, update to access a specific table in the database, we can write a class and few stored procedures in the database and we can call the stored procedure from a method inside the class which would return the object of specific type containing the requested values. Also we can fetch data from several tables of the application with a single call.
We can also make the DAL to support multiple database types, so the application can be now able to use different whatever the DAL can talk database.

14.  Documenting Business Objects functionality
Business object is an entity which is going to hold the business logic of application, here we are going to do the non technical documentation which will be similar to an algorithm or a procedure and is going to define the functionality of the class.

15.  Setting up the web application
Creating and setting up the application in the solution in visual studio, means, creating different folders for distinguishing different classes like BO, Data, DAO, utility etc. for ease of navigation and maintenance of the project.

16.  Technical process document of BO classes including Exception handling
Here we are going to document the classes and program, we are also going to handle the
exceptions by implementing the Exceptional handling methodologies. Complete sample program will be written.


17.  Design GUI
To get an idea about how the screens are going to look we are going to visit few websites and based on the above inputs and details we are going to develop the screens on paper and if everything looks fine then we are going to start designing the screens. After preparing the screens we have to integrate the application with the respective Bos.

18.  Testing the entire application
We are going to perform the UI testing and the functionality testing.

Wednesday, February 2, 2011

Resource file in .Net

What is Resource File?

  • A resource file is a XML file that contains the strings that we want to

    a. Translate into different languages.

    b. Can be updated dynamically so that user themselves can modify values in resource files once the application is deployed on the server without re-compiling the entire application itself. 

  • The resource file contains key / value pairs.
  • Each pair is an individual resource.
  • Key names are not case sensitive.

Types of Resources:

There are two types of resources

  1. Local Resources
  2. Global Resources

Local Resources:
  • Local resource is specific to a single Web page and used for providing versions of a Web page in different languages.
  • Local resources must be stored in App_LocalResources sub folder.
  • Local resources must be named in format <WebPageName> [.language / language and culture].resx.
  • Ex: Default.aspx.resx- Base resource file. This is the default, or fallback, resource file.

    Default.aspx.de.resx- A resource file for German etc.

Generating Default Resource File using VS2005:

  • In Visual Studio designer, click the designer surface or a control.
  • Select Tools --> Generate Local Resource
  • An XML - based local resource file for the Web page in the App_LocalResources folder with Text and ToolTip values for all existing controls on the page, as well as the page title will be generated.

Generating Resource Files for Other Cultures:

In Solution Explorer
  • Right click the 'Default.aspx.resx' file and click the Copy
  • Right click the App_LocalResources folder and click the Paste
  • Right click the 'Copy of Default.aspx.resx' and click the Rename
  • Type the new name for the resource file that includes the new language and culture code before the extension.
  • Ex: 'Default.aspx.fr.resx' to create a French language version of 'Default.aspx' page.
  • Double click the resource file to open it in Visual Studio. Update the values of each resource for the new culture, and save the file

Testing Resource Files for Other Culture

ASP.NET automatically determines the user's preferred culture based on information provided by the Web Browser. To test other culture we need to update the preferred language in Web Browser as

  • In Internet Explorer, select Tools --> Internet Options
  • Under General tab, select Languages
  • In Language Preference dialog box click on Add button, Select the language from Add Language dialog box and click on Ok button
  • In Language Preference dialog box, under Language list make newly added language on top using Move Up , and then click on Ok
  • Now Webpage will be displayed using selected language resource.

Global Resources:

  • Global resource can be read from any page or code that is in the application.
  • Global resource must be stored in App_GlobalResources at the root of the application.

Generating Global Resource File using VS2005:

  • In Solution Explorer, right-click the root of your Web Site or Project in Web Application, click add ASP.NET folder and the click App_GlobalResources folder
  • Right click the App_GlobalResources folder, then click on add new item.
  • Under visual studio installed template, click on Resource file. Give any name with an extension .resx [e.g.MyResource.resx].
  • Copy and paste the resource file to create the resource file for creating different cultures. For each culture, add the culture identifier immediately before the .resx extension [e.g.- MyResource.fr.resx- for French culture]

Working with Resources in Web Pages:

Resource files are used in ASP.NET

  • To fill the property values of controls on the page.
  • To update the resource values dynamically i.e. after publishing the web site, to change the Page Titles, Error Messages, and Labels Text etc.

To use resource to set control's property values, we can use

Implicit localization

  • If local resource files are created in Application, then implicit localization can be used to fill the property values for the control.
  • To use implicit localization, following naming convention must be used for resources in local resource file

    key.property

    Where key:
    Any name for the resource
    Property: Property of the control that we are localizing

    Ex: If we are creating resource for control label named lblErrorMsg, you need to create following key/value pairs in local resource file

    lblErrorMsg.Text  = "Error Message"
    lblErrorMsg.ForeColor= "Red"
  • In aspx page, we need to use a special meta attribute in the markup for the control to specify implicit localization as-
    <asp:Label ID="lblErrorMsg" runat="server" meta:resourcekey=" lblErrorMsg" Text="Label"></asp:Label>
  • No need to explicitly specify which properties are localized.
  • The resourcekey value matches a key in resource file.
  • At run time, ASP.NET matches resources to control properties using the resourcekey, if property value is defined in resource file, ASP.NET substitute the resource value for the property.

Explicit localization
  • We use resource expression for each property of a control
  • For ex: A label control that is configured to set a text and fore color property from global resource look like-
    <asp:Label ID="lblErrorMsg" runat="server" Text="<%$ Resources:ResourceFileName, lblErrorsgText %>"></asp:Label>
  • The resource expression takes the following form

    <%$ Resources:Class, ResourceID %>

    Where Class:
    Identifies the resource file to be used
    ResourceID: Identifier of the resource to be read from resource file

Localizing Static Text

  • ASP.NET Localize control is used to localize the static text on the page.
  • The Localize control renders no markup, it just function to act as a place holder for static text
  • At run time ASP.NET treat Localize control as a Literal control
    <asp:Localize ID="WelcomeMessage" runat="server" meta:resourcekey="literalResource" Text="WelcomeMessage" />

Retrieve Resource Values Programmatically

  • Call the GetLocalResourceObject() or GetGlobalResourceObject() method to read specific resource from local or global resource file, respectively.

    Ex: string localresourcestring = string.Empty;

         string globalresourcestring = string.Empty; 

         // Get the local resource string.

         try
         {

             localresourcestring = (String)GetLocalResourceObject ("LocalResourceString1");

         }

         catch
         {

             localresourcestring = "Could not find local resource.";

         }
         // Get the global resource string.

         try
       
     {

             globalresourcestring = (String)GetGlobalResourceObject("MyResource", "GlobalResourceString1");

         }

         catch
      
      {

             globalresourcestring = "Could not find global resource.";

         }

Editing Resource Files after publishing in ASP.NET 2.0

The beauty of the resource file in ASP.NET 2.0 is modifying the resource file after the application is deployed on a server without re-compiling the entire application itself.

But the ability to do so depends on what project model we have followed for Web application in VS 2005

Project Model- Website Project Model (Default in VS2005)

  • Resource file only under the App_LocalResources will get published as a raw .resx files on the server as these are not compiled. These resources files can be edited on the server as they are compiled during runtime.
  • Files under the App_GlobalResources folders are compiled into individual resource specific dlls and published on the server, so we cannot edit resource under this folder

Project Model- Web Application Project(WAP)

  • Files both under the App_LocalResources or App_GlobalResources folders will get published as raw .resx files which are editable.
  • So with this project model, we are able to edit the resource files after publishing the web application.