You are on page 1of 52

.

NET basics
IL code
JIT(just in time)

Why is ithalf compiled ?

CLR

CTS
CLS

CAS
What has happed for CAS .NET 4.0 ?

How does the .NET code compile ?


Managed code
Assembly
DLL and EXE

Manifest

how do you do versioning

What are strongly typed and weakly typed references ?

What is DLL Hell ?


what is ref and out ?
Strong names

Delay signgin
sn.exe

Value and Reference types

Stack , heap

boxing , unboxing
Does unboxing and boxing bring down performance ?
How can we avoid Boxing and unboxing ?

Garbage collector
How does the GC run
Does garbage collector clean unmanaged code ?

Do I need to write clean up code for managed objects ?


So what do I do for unmanaged ?
What kind of problems do we have with destructors
from GC pewrspecticve ?

What are gen0 ,1 and 2?

Finalize a.k.a destructor


how to ensure that lot of objects are not created in Gen
1 with class having destructor ?

What is Dispose function ?

Finalize and Dispose


can we force garbage collector

What are namespaces ?

OOP

Why do we need object oriented programming ?

Important principles

How is the reusability problem solved in OOPs ?

What is a class and what is aobject


Encapsulation
How do we implement encapsulation
Can namespace span across DLL

Abstraction

Abstraction and Abstract classes

difference between Abstraction and Encapsulation

Private , public , protected etc

What are constructor and desctructor ?

Inheritance parent child which constructor fires first


What is multiple interfaces are implemented
How to prevent inheriting futher

What is Static classes ?


How to prevent object creation
Where do we use the same ?
Inheritance(:)

Polymprphism

Method overloading
What are the different ways of overloading

What is virtual and override keyword ?

Whats the difference between overloading and


overriding ?

Dynamic polymorphism
Static Ploymorphism

What is a interface

What is the use of interface ?

Point to be remembered for interfaces


can we define public , private acess modifiers in
interface ?
Do child classes need to implement all the methods of a
interface ?

Can we create a object of interface or abstract class


Abstract and virtual
Multiple constructor with parameters

what is a abstract class ?

What are abstract method and non-abstract method ?

Point to be remembered for Abstract classes

Abstract classes and interfaces


Can we have static methods in Abstract class ?
I have a interface IMyInterface which is implemented by
class1 and class2 , I want to add some more functions
and methods to the interface , what should I do ?
Multiple code level inheritance
versioning

operator overloading
Delegates
create and invoke a delegate

Use of delegate

Delegate and interfaces

Multicast delegate(+= , -=)


Use of Multicast delegate
What is Unicast ?

Events

Difference between delegates and events

Asynchronous delegates
covariance and contravariance(.net 4.0)

Shadowing

Shadowing and overriding


Shadowing practice
Property indexer
1.1 collection differences

Difference between Array and Arraylist


What is a generic list
Generic confined the type

Hashtable
Stacks and Queues
Are there any performance problems with normal .NET
collection ?

Regex and validation

GAC

how do we register in GAC ?


If you have different versions ?

satellite assembly
Delay signing

Generics

What are generic collections / Where have you used


generics
Does generic improve performance
Threading

How do we use threading


can we set thread priority
threading can we stop and suspend
Background and foreground thread
readonly and constant

What is reflection ?

In what scenarios we would use reflection ?

hod o you do reflection

What is Serialization ?
ASP.NET and Webservices
Objects in ASP.NET
Autoeventwireup

Autoeventwireup
IIS , PORTS and Website
Application pool concept

HttpHandler and httpModules


HttpHandler

.ASHX
HttpModule

Create a HttpModule

Create a HttpHandler

ASP.NET application and page life cycle

What logic should be written in what events ?

What is the difference between render and pre-


render ?
What is a ISAPI ?
UI controls ( buttong , text box , drop down ..

why do you need Session ?


how do we do Session management in ASP.NET ?
how do we implement Inproc session management in
Asp.Net ?
Are session variables are local to a user ?

What is a viewstate ?
What is difference between viewstate and session
variables ?
What are the problems with viewstate
What is web farm ?

What is a loadbalancer?

What is web garden ?

How to implement web garden ?


Why do we need a outproc session ?

How can we do out proc session


What are server side session management and client
side management ?
Whats the life of session ?
state server

How can we cache a ASP.NET page ?


What are the various ways by which you can cache your
page ?
How can we cache the whole page and sections of the
page should be dynamic ?
Cache whole opage

Whole page dynamic and sections of the page is cached

Whole page achced and sections of the page is dynamic


How can we cache as per location
What is a Application and Cache object ?
What is the difference between cache and application
object ?

What is cache dependency ?


If cache dependencies changes does it reload the
depedency ?
Absolute and sliding
what is scavenging ?
Postback

Autopostback

Ispostback
Configuration setting in web.config

Server.transfer and response.redirect

Authentication
Authorization
How do you know the user logged in to ASP.NET
system ?
What are different ways of authentication and
authorization

What is Forms Authentication ?

What does actually a ticket mean ?

What is windows authentication ?

What is passport authentication ?

how can we implement Windows authentication ?

How can we do Forms Authentication ?

what if cookies are diabled in forms authentication ?

Single sign on
How can we implement Single sign on ?

aspnet membership and roles

how does ASP.Net membership roles work ?.

Debugging and Tracing in ASP.NET


how can we do tracing in ASP.NET pages

whats the problem with trace=true

How can we configure tracelisteners and source ?


What is the namespace ?

Ajax

What is updatpanel

What is Script manager proxy ?


Enablepartial rendering

How can we consume webservices in Ajax ?

What is Jquery ?

Difference between datagrid , datalist and repeater


Gridview and datagrid
Paging in datagrid
SQL Server
Database and Tables
SQL
self/equi joins
Referentrial integrity

Normalization

Normalization

Denormalization

When should we use normaliztion and denorm

Indexes

Balance tree
Clustered indexes

Non-Clustered indexes

When will use a clustered index and not clustered index


?
Self join
inner join
left jon
right join
cartesian
case statements
Select all rows from both tables
in group by if we put a column which is not in group
what wuill happen
cross join / cartesian

Stored procedures

What is advantage of SP over inline SQL

What are triggers ?

What are types of triggers ?


What are inserted and deleted ?

Functions

Difference between function and stored procedure


How to handle errors in Stored procedures
Paramters in Stored procedure

profiler

optimzation
sql plan
sql server locking
SQl injection
How can you avoid SQL injection

SSIS
SSRS
SSAS
Difference between delete and truncate ?
ADO.NET

What are ADO.NET components ?


Whats the difference between Dataset and
datareader ?

In what scenarios we will use a dataset and


datareader ?

How do you connect to ADO.NET

how do you load a dataset


Dataview
Command object methods

how can we use stored procedure in ADO.Net


Wht connection.close

How do you write and read using XML using ADO.Net

Problems of Locking

optimistic and pessimistic

how can we do optismistic locking in ADO.Net ?

Pessimistic locking
Scnearios of pessimistic and optimistic

What is a transaction ?

how can we implement trans

Connection pooling

How do you pass parameters t stored procedures


how can you automatically fill command object
Datarelation
nerge

Reporting
Where do you get Crystal reports ?

How did you create report using crystal reports


how to provide inputs to crystal report

Remoting , Webservices and WCF

What is Appdomain ?

What's the advantage of Appdomain ?

What is the use of remoting ?

How do you create a remoting object ?

Problems with remoting


Comparison of DCOM and remoting
remoting objects life time

what is a webservice ?
How can we do webservice security

UDDI and DISCO

What is WSDL ?

What is SOAP ?

What is difference between Webservice and Remoting

What is Service Oriented Archotecture ?

Why WCF ?
What is WCF ?

What is Address binding Contract ?

What is Service contract , Operation contract and Data


contract ?
namespace of WCF

what's the difference between WCF and Webservices ?


What are the different hosting mechanisms of WCf
services ?
how do host in IIS ?

How do you do self hosting ?

When should we go for Self hosting and when to go for


IIS

What are the important bindings/


BasichttpBinding and WshttpBinding
How to secure basichtppbinding

Ho can we do debugging and tracing in WCF


How can we do transaction in WCF ?
WCF Security

WCF Transport

WCF overloading is it allowed


Dynamic polymorphism
WCF Duplex
WCF message
WCF Instancing
WCF concurrency

WCF REST
WCF integration
LINQ and EF 4.0

What is LINQ
What is a Entity class

What is data context


How do we declare 1 to many and 1 to 1 relation
LINQ to SQL
Optimization using data load options
CRUD example using LINQ
Call Stored procedures using LINQ
LINQ locking
PLINQ
LINQ transactions
DBML

WPF and Silverlight


GDI , GDI + and Directx
Simple WPF application
Rendering in WPF application
Architecture of WPF

What is silverlight ?
Architecture of Silverlight
Animation fundamentals in Silverlight

What are different way of silverligjt layoutin..


What are the different ways of binding the silverlight UI
with .Net classes and objects ?

In what scenarios you will use what ?

How can we connect froom Silverlight to SQL Server

Why not directly ?

Consume WCF service in Silverlight

Database operations using Silverlight


Prism
MVVM

WWF
WWF architecture
Composite and leaf activities
Sequential and State machine work flow
Simple example of WWF
State machine work flow

Design patterns

Which design pattern have yu used ?

Design patterns
What are the categories of Design patterns

Factory pattern©
Abstract Factory Pattern
Builder Pattern
Prototype Pattern
Where is prototype used ?
Singleton Pattern

How did you implement singleton pattern ?

We can achieve the same by cache and application


we can achieve the same by using static object
Adapter Pattern
Bridge Pattern
Composite Pattern
Decorator Pattern
Facade Patetrn
Flyweight Pattern
Proxy Pattern
Mediator Pattern
Memento Pattern
Interpreter Pattern
Iterator Pattern
COR Pattern
Command Pattren
State Pattern
Strategy Pattern
Observer Pattern
Template Pattern
Visitor Pattern

DIIOCConcept Pattern

What is MVC,MVP and MVVM

How is MVP

Model view controlle

MVP and MVC

When to use these patterns


UML

Use Case Diagrams

What does use case have normally ?

How did you document your requirement ?

What are primary actors and secondary actors ?


In which format did you gather your uses cases
How did you show relationship n uses cases

How did you translate your requirement to design ?

Class Digrams

How do you denote a class diagram in UML ?


How to demote public , private and protected in class
diagram
How do we define relationships in UML

What is composition and aggregation


How can denote inheritance ?

How can we denote abstract classes and interfaces


Object Diagrams
Sequence Digrams

how did you draw a sequence diagram ?

How do you show synchronous and asynch messages


Recursive message

Conditcion

Message branching

Collaboration Diagrams
Activity Diagram

Parallel processing , partionting and conditions


State chart Diagrams
Component Diagrams
Deployment Diagrams
Stereo Types Diagrams
Package Diagram
UML Project Flow

Functionpoints
Introduction

EI Fundamentals
EO Fundamentals
EQ Fundamentals
EIF Fundamentals
ILF Fundamentals
GSC Fundamentals
Productivity Factor
How did you reconcile
How did you accommodate SDLC

RUP
What is Agile
How did you do Agile

What are the principles in Agile


What is Agile SCRUM ?

How does SCRUM process work

When Agile and Waterfall ?


How did you code review?

Role of your current project(SDlC)

simplicity your projects

Can you explain the architecture of your current


project ?

What software process did you follow for your


project ?
How did you test your project ?
How did you do requirement for your project ?
technical Design
Acceptance
How did you do unit testing in .NET ?
Summary
Speak abt yourself
OOPs
.net basic
asp.net
Why Gap ?
Differences ( .NET , ASP.NET and SQL Server)
HLD and LLD
Key words
Partially compiled
IL code to machine language
So that at run time we can detect the machine configuration ,
operating system give out optimized machine compiled code.
Heart of the engine , GC , compilation , CAS(Code access security) , CV
( Code verification)
Common data type for different .net languages so that integration is
seamless
Sepcification of the IL code
It helps assign the .NET code permission of what they are capable of
doing.

write the code (c#,vb.net,c++.net)-- compiles to a IL code -- CLR gives


it to JIT -- JIT compiles to the machine specific language
x`
Its a unit deployment ( EXE , DLL)
EXE - Self starting , DLL - You have to link
it describes more about the assembly ( Meta data):-Versioning,
References , dependent objects , Security , Scope

Assemblyinfo.cs / right click properties -- assembly information

They help you to identify the publisher. Strong typed means we


identify the DLL with a public key token while weak references are just
simple references and identified only by class names

versioning done here

They ensure that the class name is unique to avoid confusion

This is meant to protect DLL identity from your internal team


developers , public key is give to the developer byextracting using
SN.EXE -p , when you ready to go for production you will onject the
private key in the DLL SN.EXE -R

Values types int , double , bool etc , Reference types objects and
strings. Value types are allocated on stack and reference types are
allocated on heap. Value types are stored on different memory
locations while reference types point to the same memory location
They are memry types .Stack has value types , heap has reference
types
Box - Convert from value to reference , unboxing - reference type to
value
yes they do bring down performance because data has to jump
between heap and stack memory types.
You can not avoid it just minimize it

Managed Unused objects will be cleaned by this mechanism. As a


best practice you do not write any clean up code for managed unused
objects.
Its run in background
No

No, GC is smart to figure out unused objects and clean them up


You need to write the cleanup in destructor

lot of objects created in gen1

Age of the objects.Gen 0 has newly created objects , gen 1 has objects
which are bit older , while gen 2 has objects which is more older
than gen 1.This is for GC optimization , garbage collector checks Gen 0
frequently rather than Gen 1 and Gen 2.

It’s a desctructor for cleaning up unmanaged objects.Decreases


performance because of objects move more to Generation 1. The
time GC sees a destructor in a class it moves them to Gen 1
Implement Idisposable -- Expose a Dispose function -- Call
GC.SuppressFinalize
Its method exposed for clean up for client,Idisposable , Dispose ,
GC.SuppressFinalize

Finalize is a destructor and dispose is function which is implemented


via Idisposable.Finalize is nondeterministic since we dont call it. It is
up to the GC to call it. However dispose gives more control to the
developer to perform cleanup. Since we can call it explicitly.
Yes , GC.Collect

They help us to logically group classes.

1.No thinking in terms of real world 2. Reusability 3. Extensibility 4


Simplicity and maintainability
APIE (OOPs ( Encapsulation , inheritance , Polymorohish and
Abstraction))

Its solved by using classes and creating objects wherever necessary

Class -> Blue print , template , Objects -> Bring life in Class , they make
them live
Hide the complexity and make your object simple for external world.
Encapsulation is implemented by using access modifiers
yes , namespace are logical grouping of classes they can span
Show only what is necessary and its more a thought process and
abstraction is implemented by encapsulation
Abstraction is OOPs concept and Abstract classes is half defined
classes
Abtsraction complement Encapsulation , Encapsulation implements
abstraction

Private - Only with in Class , Public - Seen everywhere , Protected -


With in same class and inherited classes , Internal - Within same class
and same project and Protected internal is combination of protected
+ internal i.e. with in same class , iherited class and same project file.

Constructor(same name as class name with no return type) -


initialization purpose , while destructor(~) is for cleaning purpose.

Parent Constructor fires first and then child.


It will qualify with interface name
use the sealed keyword
Static object has ony instance of the object created through out your
application.
Create the constructor as private
In Singleton pattern
Depicts parent child relationship between classes

objects will act different in differently under different situation

You can have same method name with different number / types of
parameters and depending on different parameters and types the
appropriate functions will be invoked.
types , order , ref m out … do it

Virtual keyword gives permission to its child classes to override the


function / method. The child classes will then use the override
keyword to override the same.

Overloading we have same method / function names with different


signatures ( input types) while overriding is a child parent concept
where we override functionalities of the parent class.

Method overriding and Virtual. You point your parent class object to
child class objects to fire the necessary implementation on runtime.
Even interfaces can be used to implement dynamic polymorphism
Method Overloading , we call same method with different input
parameters
Its looks like a class but has no implementation. It has only empty
definition of methods , functions, events , indexer.

to Establish a standard contract/standardization , to decouple


classes, dynamic polymorphism( runtime bhevior) ,version , multiple
inheritance

Interface keyword is used to define interfaces.


Interface can not have field variables.
Interfaces can not have implemented functions and methods.
All methods in a interface in child class needs to be implemented.
Interface can be used to implement run time polymorphism.
You can implement multiple interfaces.
All interface methods are public

No , by default everything is public.

Yes

No
Abstract no implementation and virtual has implementation

Half defined parent class / base class and child classes provide
concrete implementation, like a generalization and specialization

Abstract method will not have any implementation while non-abstract


methd will have implementation they are normal .NET methods

An abstract class cannot be a sealed class.


An abstract method cannot be private. You can have protected and
internal if you want to.
The access modifier of the abstract method should be same in both
the abstract class and its derived class. If you declare an abstract
method as protected, it should be protected in its derived class.
Otherwise, the compiler will raise an error.
An abstract method cannot have the modifier virtual. Because an
abstract method is implicitly virtual.
An abstract member cannot be static.

Interface is a contract / standardization while abstract class is a half


defined class for increasing reusability. Interface is forced
implementation while abstract class is reusability via inheritance.
Yes
Create a new interface with additional methods or inherits from the
interface and create a interface with methods and apply them. This
ensure that the current contracts do not get disrupted.

Operator overloading is a concept of plymorphism where you can


redefine operators like + , - , * etc with additional functionalitiues. For
instance we can redefine the + functionalities to add obejcts like obj1
+ obj2.
It’s a abstract strong typed pointer to a function
Declare , Create , point and invoke.

Delegate refers via pointers so in case new methods are added or


methods name changed we do not need to change at lot of places ,
dynamic calling of methods on run time. Its also strongly typed.
Second - asynch calling and call back of methods
Delegate is at method level while interfaces are at class and object
level.
It helps them to point to multiple functions and execute them
sequentially.
For boardcasting to multiple classes
When one delegate point to one function its called as unicast.
Events encapsulates(hides) delegates. They are useful for boradcasting
, publisher and subscriber

Events use delegates internally. Delegates are pointer to function


while events encapsulates ( hiudes) delegate function. In event clients
can only subscribe while in delegates the client can subscribe as well
as call all the functions of the delegates.
Begininvoke and endinvoke , calls the methods of delegates asynch ,
for parallel execution.
This helps to point delegates in a very generic fashion
It replaces the complete element of the parent class. Like method
becomes a variable

in shadowing the complete elements is replaced and in overriding you


only replace the implementaton while the type remains same.
Should avoid Shadowing as far as possible.

Array - Fixed , ArrayList - resizable , Array has performance improve


ment as no boxing and unboxing takes place while in array list it does ,
Arraylist can not store mutiple data types while array has fixed data
types
Strognyl typed list and improves performance by avoiding boxing and
unboxing
public class cls<T> where T : String
Stores the value as hashed key , good for comparison , but bad in
terms inserting valies
First in first out and last in first out

yes boxing unboxing happens

Regex is nothing pattern matching and then validating the data using
the pattern
To share the assembly across multiple application in the same
computer (C:\WINDOWS\assembly)
Give strong name to DLL by click on the signing tab -- second you use
thr GACUTIL -I to register the assembly in GAC
Use Bindingredirect , Oldversion and newversion

It’s a compiled DLL which has images , text files any resource files. In
other words no can tamper with your images , text files , icons etc.

Its to increase reusability by seperating logic and data type and its
strong typed.

Generic collections enable simple .NET collections to be generic


enabled. So a normall List can be attached with any data type and we
can avoid casting
Yes , type casting is avoided
Threading is used to do pararellel execution.
Create the thread object , pass the method name using thread start
and call the start function.
ThreadPriority
yes by using thread.start , suspend , stop

BY using System.reflection you can read meta data like properties ,


methods and also if needed you can invoked the methods and
functions dynamically.
technological tools like VS IDE , code reviews tools like Fxcop , unit
testing NUNIT etc

Import system.rflection , get the type of t he object using gettype and


then you can browser through functio an dproperties , to invoke use
the invokemember
Helps to store in memory object in file and dessrialization means read
the value from file and bring it in memory back.

request , response , context , session and application


When the request is send to the server from a UI element like
button , drop down etc the postback happens

They are means by which you can inject pre/post-processing logic


before the request reaches the page /gif/html
HttpHandler is extension based processor.

Its nothing but Httphandler below , they helps us to display data


which does need asp.net pages and thus they improve performance
HttpModule is a event based processor

Create a class ,implement IhttpModule, attach events with your


methods and register the class in web.config in httpmodule tag

Create a class implement IhttpHandler , define implementation for


processrequest, register the class in web.config with file extensions in
httphandler tag

environment created(request , response , context) - http module


event ( begin request etc) - httphandlers ( page extensions) - page
event (S/ILVER)-http module (end request)

init (add controls dynamically), load(write logic),validate(fire your


valdation),event(ui element events),pre-render(changes before HTML
is generated) , render ( changes before HTML is sent to the browser)
and Unload ( clean up)

Pre-render event happens just before the HTML is generated while


render event happens when the HTML is sent to the browser.

HTTP is a statless protocol and in order to remember states during


postback we need session variables
inproc (session object), outproc ( sql server and state server)

by using session object of ASP.NET


Yes

Its meant for session management and it uses hidden fields


internally.Viewstate is a way to manage session using client browser ,
it uses hidden fields internally.
Viewstate value is accessed only in the current page while session
variables can be accessed in different pages also.
Securuity
Many times our current load demand increases. We can then create
Web farm which has two or more servers to meet the load.On the
front end there is load balancer who routes the load to the
appropriate server on load basis.

Loadbalancer helps to decide which server the request should be


routed. There are many load balancers one of the is Windows NLB
( network load balancer) in windows server

You would like your IIS processes to run on different processors of the
machine rather than loading only one processor.

In the process model tag ( web.config or machine.config) provide the


CPU mask value in decimal quivalent of the binary.
Outproc sessions are needed in web farm environment

step 1 - create session tables using ASPNET_REGSQL , Step 2 : Set


<sessionState mode="SQLServer" with connectionstring point to the
database where session tables where created.

Session time out or when the user closes the browser


aware used for outproc session

By using the <%@ OutputCache Duration="20" Location="Client"


VaryByParam="*" %>

Param , Headers , Custom and UserControl.

By using ASP:Substituion ( post cache substituion)


outputcache directive at page level

Outputcache directive at usercontrol levele.

Substituion control.
location = server , downstream , client
They help to create global objects in Asp.Net application.
In cache we can define dependency while application objects we can
not define depedency.

you can define 3 kins of dependency file , time and key. If these
dependencies change then the cache object becomes null.
No Cachdepedency does not have automation , we need to write t he
code of refresh and reload.
When your user control sends data to the server postback event
happens

When you want to send data to server as soon as the value changes in
the control. It’s a simple property which we need set on the control.

It’s a page property tpo check if the postback has happened or not
in the appsettings

response.redirect has a double trip while server transfer transfers


control from the server itself. Using response.redirect you can redirect
cross domains while server transfer you can redirect only between
pages of the same domain.

Who the user is?


What rights does the user has ?
using principal and identity objects which belongs to System.Security
namespace.

Windows , Forms and Passport


It’s a ticket based authentication . Tickets are passed via URL or stored
in cookie file at the user browser.

Ticket is a identification saying that you are a valid user. By using ticket
you do not need to send userid and password again and again. Userid
and password are sent first time , ticket is generated and later this
ticket identifies your security role and rights.

In this the users are validated from windows local users and groups.

In this the users are validated from microsoft sites like hotmail ,
devhood , MSN etc , ticket is generated and that ticket can be used to
do authentication . Autho in your web application.

Create users in yours windows user group -- in web.config file define


<authentication mode="Windows"/> -- <deny users="?"/> Deny
anonymous users - map page name and roles.
Authentication mode = forms in web.config file
,FormsAuthentication.RedirectFromLoginPage/Authenticate

Its passed via browser URL.


Single sign on is a concept where you login to one website and it
automatically authorizes and authenticates other websites.
Create a machine valudation key using (using
RNGCryptoServiceProvider) - define the same machine validation key
in to the web.config file for all websites which will be coming in the
single sign on -- use forms authentications

It helps to expedite your development for authentication and


authorization by giving ready made user and roles tables , user
interfaces and API to connect to those tables.

run aspnet_regsql -- do web.config configuration ( connectionstring ,


providers and roles) -- call the API from your ASP.NET behind code
(Membership.CreateUser,Roles.CreateRole and
Membership.ValidateUser)

Tracing is a way to monitor the execution of your ASP.NET application.


You can record exception details and program flow in a way that
doesn't affect the program's output.

Trace=true
our debugging is shown to the end users , so we need to use
tracelisteners

In web.config file define your source and listeners , in your code


create the trac object and start sending messages(trace.write)
It logically groups calsses together

Ajax is a technology by which you can do asynhcrounous processing


and only the ncessary values are posted rather than posting the whole
page. Performance and great user experience.

Updatepanel is a component which ensures that your server objects


become Ajax enabled.It logicall groups them so that only that data is
posted.

In Ajax we can have only one scropt manager. But there are condition
like master pages where we would need two script manager
This enables asynchrounous processing
In Script manager proxy give asp:servicereference and give ASMX
path and use javascript to call the objects
Jquery is javascript library to make your javascript development
simpler.

Datagrid displays everything as table , datalist has tables but gives


flxibility like number of columns to displayed , while repeates is highly
customizable, performance goes first repeater , then list and finally
grid
Gridview is the sucessor of datagrid,Automatic handling of sorting,
paging, updates, and deletes,Additional column types and design-
time column operations, rich design capaibilities

It’s a database design technique to avoid repetitive data.

3 normal form , 1st normal form Break is Smallest unit , 2nd normal
form any repetitive data should be moved to a separate table and
forigen key , 3rd normal form Any non key field should not depend on
other non key fields of the table

Its combining multiple table data in one table thus avoiding joins for
performance imporvement ex - reporting applications
Normalization ( integrity , avoide redudant) and denorm ( faster
treival , reporting etc)
Indexes helps to make your search faster by using balance tree( B
tree) concept

It’s a tree structure with leaf nodes having actual data , non leaf node
and root node. So rather than browsing through records sequentially
it zeroe's on range of records , this making your search faster
The leaf node points to actual data

Leaf node points to a pointer and that pointer points to actual data

You will choose fields with unique values as clustered indexes while
fileds which participate in search criterias you will select them as non-
clustered indexes.
SELECT *
FROM Customer INNER JOIN
CustomerPaid ON Customer.Id = CustomerPaid.Id
union
SELECT *
FROM Customer left JOIN
CustomerPaid ON Customer.Id = CustomerPaid.Id
union
SELECT *
FROM Customer right JOIN
CustomerPaid ON Customer.Id = CustomerPaid.Id

Query will no fire

Stored procedures are SQL Server objects which have one or many
SQL statements
They are precompiled and thus increases perforance ( parsing , plan
and then execution)
Trigers are logic which you want to execute insert , delete and update
operation on a table

After trigger ( fires after the operation )and instead of trigger ( before
the operation). Operation means insert , update delete

It returns a scalar value and is called from stored procedure

Function reduce redudant code in SP.Function - You can not change


data while in stored procedures you can , can return only one value
while SP returns multiple values, functions can be called inside a SP
but not the vice veras
using Raiserror function , give message severity and state
input , ouput , return( only one)

It’s a simple listerner tool which tracks what kind of SQL statements
are fired on your SQL server and using it you can do debugging and
improve performance depending on the trace file

Create indexes ( balance tree), SQL Plan ( Table scan or Index scan) ,
SQL profiler and Data tuning advisor for getting suggestion of indexes
Describes how your SQL statements will execute.
set isolation level read committed etc etc in stored procedure
It is a Form of attack on a database-driven Web site in which the
attacker executes unauthorized SQL commands by taking advantage
of insecure code on a system.
use stored procedures and avoid on the fly SQL concatenation.

SSIS helps us to do ETL ( Extraction - Transformation and Loading). We


need to create a Business intelligence project define source ,
transformation and destination and run the DTS package.

Connection , Command , Dataset , dataadapter , datareader(2C and


3D)
Dataset(back and forth) - works disconnectly , CRUD , reader works
connecteldy

Dataset :- When you want to take group of records , modify/browse in


offline mode( move back and forth) and then send the whole
changes online. Datareader :- You have huge number of records and
you want browse in the forward onnly direction
connection , Command , ExecuteNonQuery/ExecuteQuery , use it and
close it
connection , Command , Dataadapter , load dataset by Fill method ,
use it and close it
Helps to search, sort filter dataset
Executereader , executenonquery and executescalar

ObjCommand.Commandtype = CommandType.Storedprocedure , give


the stored procedure name
To ensure the SQL Server resources are released

readXML , WriteXML function of dataset object

Dirty Reads,Unrepeatable reads,Phantom reads and Lost updates

Pessimistic means locks are acquired when the record is fetched until
the updation and optimisitic means locking is acquired when the data
is updated
dataset and dataadapter by default supports optimistic locking ,
timestamp,checking old values and new values

Read committed( reads data which is committed) , Read uncommitted


( reads data which is yet not committed), repetable read ( No updates
allowed)and Serializable (Exclusive lock no updates , insert and
selects).
Transactional screens / data enty screen where large number of
users,critical batch processes done at the end of the day or
year( closing of accounts).

When you have group of statements . Process doing insert update and
delete , you would want either all of them pass or either all of them
fail.
call begintransaction in connection object , committransaction or
rollback, in stored procedure begin tran tr1 and commit tr1
Reuse the connection object rather than reusing from scratch.In
connection string specify pooling=true
dataset is collection of tables with relationship and recordset has only
tables
Paramater collection of command object
Command builder.

It’s free available in VS


used RPT file -- Define my data sources -- Finally uses the
reportviewer to display the RPT file on the UI.
By parameter field

Appdomains make logical boundary / isolation inside a process.


Process -- Appdomains(task and application).
If one Appdomain crashes the other Appdomain or the whole process
is not closed / terminated.

It helps to make remote method calls to objects which are residing in


different appdomain. These Appdomain can be located in a different
geographical location or different networks.

Create a interface -- Implement the object by creating MarshalbyRef --


Host your server object using
Remoting"RegisterWellKnownServiceType" -- Create the client to call
the service"Activator.GetObject".

Client and server can be only in .NET language , complicated, Faster


than other remoting technologies, pick and choose Channel and
formatter ( customization)

Webservice is a technology by which you can expose your business


functionality on HTTP using SOAP XML format.
specify windows , passport , forms and pass credentials through the
client proxy object
Helps to search and discover your webserbvice from the UDDI
directory
It’s a meta data which shows what are the methods , properties ,
datatypes exposed by a service
It’s a XML protocol which is defined how your service and client
communicate.
Webservice(Cross language , only Http) , Remoting ( only .NET
platform , Any protocol)

SOA is nothing but desigining your system in self contained services


which communicate via standard messages thus making your services
loosely coupled. Services -- Self contained , Orchestrate , Industry
Standard messages , Reliable , Aynshcrounous message , Cross plat
form describe and discover

It was to satisfy SOA principles of WS-* specification.


WCF = Webservices + remoting + COM plus + MSMQ
Address - where is it hosted , Binding - how is the protocol , Contract -
what is the interfcae

Service contract - Service name , Operation contract - Your methods


and functions , data contract - Custom data type , data member -
property and functions of your data contract
System.ServiceModel
Webservices = WCF - ( remoting( multiple protocols) + COM plus
( transactions) + MSMQ(queueing))

IIS , Self hosting or WAS server


By suing the SVC file we can host our service on IIS
Create object of Service host , provide Address ( Uri) , Binding
( Wshttpbinding) , Contract ( Interface) and open the host.

Http go for IIS ( we getready made features like always running ,


process recycling,security,ssl etc), For other protocols go for self
hosting

BasicHttp ( Like webservice plain text) , WsHttp ( Like basic with


encryption) , TcpBinding ( To use TCP protocol for services ) ,
NetNamesPipe ( With in the same machine ) , MSMQ ( WCF
integration with Queuing mechanism)
basic is plain text while Wshtpp is encrypted
use SSL on webservices

In Web.config <system.diagnostics> specify WCF trace source objects


like System.ServiceModel , message logging etc. , then use the
Svtraceviewer tool to see the mesagges
1 . Operation contract define TransactionFlow , 2. In Web.config file
make your Binding as transaction flow as true 3. In client side call the
services in one transaction scope with rollback and committ.
Transport , message and transport + message
SSL , Specify in config file https in address tage , Specify security
mode and install SSL in your WCF services

[ServiceContract]
interface ICalculator
{
[OperationContract(Name="AddIntegers")]
int Add(int a,int b)

[OperationContract(Name="AddDouble")]
double Add(double a,double b)
}

Per call , persesion and single instance


Single , Multiple , Rentrant

Helps to expose your WCF service via simple HTTP get and post

It’s a OR mapper technology ,2 important use 1 - BO , DAL and


Mapping , 2 - General Queries which can fired on any data store.
It’s a Business object which has mapping with the data store.

It’s the data connection layer to load the entity object with data
Entity set for 1 to many and entity ref for 1 to 1

insertonsubit , deleteonsubmit , submitchanges


Using the function attribute

PLINQ executes two linq queries parallely


By using the transaction object of data context class
Database markup language
WPF is for creating windows application , the user interfaces can be
represented using XAML and it uses directx internally.

It’s a plugin which runs inside the browser. It can run on cross
platform and cross browser.

Stack panel ( one above another ),Canvas ( we specify left and top),
Grid ( If you want layouting using table structure , rows and columns)

One way ( UI to BO), two way( UI <-> BO) and one time( BO to UI).
One time binding - reports , Transaction screens two way , Pure input
screen one way.

By using WCF services.


Because silverlight is a plugin which is a downsized version .NET
framework and it does not have system.data
WCF service should have client access policy and cross domain , from
silverlight you need to call the data asynchrounously

You can not call System.data directly from silverlight , so you need to
call the WCF service and WCF service will do the necessary data
operations

So pick your best pattern corelate it with your project and speak
about it. Share global fdata
Design patterns are tried and tested solutions for design problems in
our project.
Creational , Structural and Bheviorial

Centralizes creation of object in a class and passing back a interface


reference to the client. Main use is decoupling( UI - BO - DAL).(Creates
an instance of several derived classes )
Abstract Factory groups Factory patterns.
Audit trail , differences of objects , cancel and revert
Helps to create one instance of the object.
Create a class with private constructor and define your object as static
and expose it

Its technology specifc and not a generalized solution

DI helps to inject depedent objects in to a class. DI injection can be


implemented by Unity app block / Windsor castle

These are GUI architectural pattern with only one intention of


seprating the UI Logic , state and synchronization in to a separate
class.

Hit come to UI first , from there he calls presenter clas , presenter call
the model and present then send updates via a interface to the UI. UI
--> I --> P - M

Sepearetes Action , View and Data by using controller class. We have


template MVC template which helps to automate the same. In odld
asp.net we will httphandler which was tedious

First hit to the UI , First hit to the controller/MVP presenter takes care
of logic , controller takes care of logic as well as statmanagement

If you have complicated UI code , MVC is mostly used for ASP.NET ,


MVVM is used for Silvetrlight and WPF becaiuse of rich command
objects, MVP is not used currently because of less automation
UML is a modelling language which helps us to document and design
our software application.
Its helps us to document "What" of the system from user point of
view.
Use cases are task having scenarios and Actor executing those
scenarios

Step 1 :- We identified the task which where nothing but our use
cases , Step 2 :- For every use case we wrote down main scenario /
alternate scenario and actors responsible

Primary actors are the users who are the active participants and they
initiate the use case, while secondary actors are those who only
passively participate in the use case.
Company Template in word document
By Extend and include

We has already gathered the requirement using use cases and also
relationships where between them using the include and extend, we
use these use cases and identified nouns ( classes) and verbs ( they
became our methods and functions) , relation ship between classes
where identified by extend and include of use cases. Later for
complex scenario we use Sequence diagram / Collobaration. We also
had a over all architecture diagram which depicted hardware ,
components and logical grouping by using Component , Deployment
and package.
Class diagrams shows the static structure of project. They help us
visualize the classes and relationships between them

Its denoted with square divided in to 3 section , top section has class
name , middle section has properties and last section has operation /
function / methods

(+) Public , (-)Private , (#) protected , internal


by multiplicty (1-*)

Composition - life time of dependent objects are same , Aggregation :-


Life time of dependent objects are not same and they can exist
without each other. Composition is shown by filled diamond while
aggregation is shown by empty diamond.
Empty traingle arrow key.

{} - Abstract classes , <<>> - Interfaces

Object diagrams over a period of time.


The objects in rectangle on the top side -- message by arrows and
object life time vertical rectangles.

Synch by dark arrow and asynch by thin arrow key


By small rectangle in a big rectangle

Inside Square bracket


By two rectangles with condition and branching arrows from the
same.
It shows the same information as sequence diagram but the emphsais
is more on messages than life time of the objects
Activity diagrams depicts complex flow of a system
Shows by dark bar , Swimlanes for partitioning , Diamond is for
conditions

Agile is a principle which means accept changes


Used SCRUM

Accept changes , Interaction with customer , people , working code


Scrum is a methodology to implement agile

Customer Prepare Product back log -- priortizes them -- development


team breaks them in to sprint -- every srpint has daily stand up
meet( Today , yesterday,problems) -- Every week retrospective -- After
sprint give chance of changing

Water fall - requirement is fixed , Agile -- If requirements will change


or evolve.( Time to market)
Mostly automation and the process

I was involved in all phases of SDLC cycle.Requirement( use cases ,


activity) - Design(Class , ER diagrams , Sequence / Collboaration)
-coding / unit testing (NUNIT)- SIT - UAT - go live(junior ( coding)
helped out ,poc( proof of concept) , pm / archotect) - end to end.

The applicaton was a integrator between indian chemical companies


and EICA to provide certifications for Indian chemical companies as
per EICA standards

It was a tiered architecture , UI / BO and DAL. With UI in ASPX pages ,


BO in normal .NET classes and data access layer helps to fire SQL
queries on SQL Server. We had used singleton pattern and factory
patterns in the project.

We followed normal SDLC model. In requirement we wrote the use


cases , design we created classes and DB diagrams , finally we coded
and unitested and went live.
I do understand HLD but most of the times we have created a overall
index of LLD and then expanded in to details. The use of HLD is mostly
to verify before investing in LLD that are we in the right direction , to
take approval from stake holders.

HLD has 5 section

Overall all architecture diagram ( Deployment , Component diagram ,


package diagram)
Overall Road map ( 3 tier , MVC , MVP MVVM)
technology
Unit testing
Load test startergy

POC :- Proof of concept

LLD
Overall detail architecture diagram
Class diagrams ,
Object diagrams ,
Sequence / Collaboration ,
DB design
In depth test stratergy
Psedu-code
Practice for students
Create a simple windows screen , which has
supplier name , supplier code , supplier date ,
button calculate payment date , supplier date + 1
month
Create a simple project with page1.aspx and
page2.aspx , create a simple buttong and in the
button click redirect from page1.aspx to
page2.aspx in the button click event
dev
dev

dev

dev
declare @count1 int
set @count1= dbo.getfunctioncount()
print(@count1)
It’s a internal ATM management system in
ASP.NET which has various functionalities
creating Contracts , Customer report , hand bills ,
Scheduling etc.
JSP and servlets
Struts 1.x/2 (MVC)
Spring (MVC)
Java Server Faces (rich faces)
Hibernate (ORM)
JPA (ORM)
EJB (persistance)
JAXB ( parsing XML)
JDOM (parsing xml)
Java Fx
SCM tools
Apache ant
Maven
Svn repository
CVS repository
Database
Oracle
Sybase
PostgreSQL
MySQL
Ms sql
Application servers:
IBM Web sphere
Jboss
Web logic
Unit testing:
JUNIT
test ng
Sproing unit
Cache solutions:
JBoss cache
EHCache
OS cache
PDF library:
itext
Reporting:
Jasper
BIRT
Actuate
Profilers:
JMeter
Infra red
// Step 4 :- Create dataset object and load it from Dataadapter
DataSet objdataset = new DataSet();
objDataadapter.Fill(objdataset);

// Step5 : use it
foreach (DataRow objrow in objdataset.Tables[0].Rows)
{

}
// step 6 Close it
obj.Close();
}

private void LoadDatareader()


{
string strCon = "Data Source=QUESTPON-SRIZE2;Initial
Catalog=Sales1;Integrated Security=True";
// Step 1 - Create connection and Open
SqlConnection obj = new SqlConnection(strCon);
obj.Open();
// Step 2 :- Create the command object with SQL query
SqlCommand objCommand = new SqlCommand("insert into customer
values('1003','xxxw')", obj);
// Step 3 :- Get the SQL reader object
//SqlDataReader objreader = objCommand.ExecuteReader();
objCommand.ExecuteNonQuery();
// Stp4 :- use it
//while (objreader.Read())
//{
// Response.Write(objreader["CustomerName"].ToString());
//}
// step 5 Close it
obj.Close();
}
}
}

You might also like