Tuesday, June 14, 2011

What is AJAX?

What is AJAX?

AJAX, or Asynchronous JavaScript and XML, is a fancy way to use JavaScript and XML to communicate with a web server without refreshing the web page.

Why use AJAX?
There are a couple of reasons to use AJAX :
 The first is that it is very light weight: instead of sending all of the form information to the server and getting all of the rendered HTML back, simply send the data the server needs to process and get back only what the client needs to process. Light weight means fast.
 The second reason to use AJAX is because (as the logo in the link above makes clear) AJAX is cool.

Even though AJAX is a client side technology that uses JavaScript, the client-server interaction is very important.

Monday, June 13, 2011

Types of Controls in asp.net

There are 8 types of controls in ASP.NET 3.5 and they are
1. Standard
2. Data
3. Validation
4. Navigation
5. Login
6. WebParts
7. AJAX Extensions
8. HTML

1. Standard Controls
◘ Label
◘ TextBox
◘ Button
◘ LinkButton
◘ ImageButton
◘ Hyerlink
◘ DropDownList
◘ ListBox
◘ CheckBox
◘ CheckBoxList
◘ RadioButton
◘ RadioButtonList
◘ Image
◘ ImageMap
◘ Table
◘ BulletList
◘ Literal
◘ HiddenField
◘ Calendar
◘ AdRotator
◘ FileUpload
◘ Wizard
◘ Xml
◘ Multiview
◘ Panel
◘ PlaceHolder
◘ View
◘ Substitution
2.Data Controls
◘ GridView
◘ ListView
◘ DataPager
◘ DetailsView
◘ FormView
◘ DataList
◘ Repeater
◘ SqlDataSource
◘ LinqDataSource
◘ AccessDataSource
◘ ObjectDataSource
◘ XmlDataSource
◘ SiteMapDataSource
◘ ListView
◘  DataPager
◘ LinqDataSource

3.Validation Controls
◘ RequiredFieldValidator
◘ RangeValidator
◘ RegularExp.Validator
◘ ComapreValidator
◘ CustomValidator
◘ ValidationSummary
 
4.Navigation Controls
◘ SiteMapPath
◘ Menu
◘ TreeView
5.Login Controls
◘ Login
◘ LoginView
◘ PasswordRecovery
◘ LoginStatus
◘ LoginName
◘ CreateUserWizard
◘ ChangePassword

7. AJAX Extensions
◘ ScriptManager control◘ UpdatePanel control
◘ UpdateProgress control
◘ Timer control



 

WCF Interview Questions


            
            
                  What are the different platforms where we can host WCF service                   ?
                                WCF Services can be hosted on following platforms
                  1. WAS(Windows Activation Service)
                  2. Self Hosting
                  3. IIS

                  Advantage of using a Remote WebService ?                                When there is a need of using a webservice and only when the
                  same set of data needs to be accessed by multiple people, or
                  when a user needs to be able to access the same set of data
                  from multiple computers. This Remote Web Service is very much
                  useful.

                  Description about WCF?                               WCF (Window Communication Foundation) is a solution for
                  developers to work in distributing environment. WCF mainly for
                  make communication between applications. Before WCF, the
                  technologies to make communication between applications were
                  ASMX, .NET remoting, and COM+. WCF provides a common platform
                  for all .NET communication.
                  WCF is a framework for developing, configuring, exposing, and
                  hosting services. All service providers were agree on SOAP
                  concept for making communication between application before
                  WCF. The idea of WCF is a combination of SOAP and web service.
                  There are two categories of classes in WCF.
                  . Service model classes handle configuration and validation.
                  . Channel layer classes handle things such as communication
                  and data transformation.
                  WCF services expose functionality through one or more
                  endpoints. Clients communicate with the service's endpoint. In
                  configuring an end points there are three components require.
                  . Address
                  . Binding
                  . Contract
                  These three components are interrelated.
                  An address mean an URL.
                  Binding tells the WCF runtime how your endpoint communicates.
                  Contracts mean it gives the information of working endpoints.
                  With the help of XML-based config information we can configure
                  an end point, programmatically using methods/properties, or
                  with both XML config files and some coding. WCF includes
                  multiple usability avenues. For example, we can use WCF out of
                  the box with little or no coding or elect to build custom
                  implementations for all aspects of your service.
                  In making communication channels plays an important role, the
                  WCF runtime detects the binding for creating the channels. The
                  main task of channel are receiving and transforming data. Data
                  goes in one end of the channel, the channel operates on the
                  data, and new data is dumped out the other end of the channel.
                  What is Metadata Exchange(MEX) endpoint
                  Author: Blessy Baby          Posted Date: 10/02/2011   
                  Category: WCF     Points: 15
                  Metadata describes the information how to communicate with the
                  service.cleint can request metdata for learning about the
                  endpoint and message format.The service does not expose MEX
                  enpoint, nobody can know the details of service.For knowing
                  address, binding and contract for the service, service should
                  expose the mex endpoint. This can be exposed in code or
                  configuration
                  What is ABCs in WCF
                  Author: Blessy Baby          Posted Date: 10/02/2011   
                  Category: WCF     Points: 15
                  A- Address: this is the location or endpoint to which messages
                  send by the clint
                  B- Binding: This defindes the channel to communicate with the
                  address eg: basichttpbinding
                  C- Contact: It defines waht functionality or feature providd
                  by this endpoint
                  what are the difference between webservice and WCF service
                  Author: Blessy Baby          Posted Date: 10/02/2011   
                  Category: WCF     Points: 15
                  Web service can access only by the protocol http, but WCf can
                  access any protocol and any transport type. WCF is flexible.
                  Same wcf services can access using differnt endpoints.
                
 What are the 4 security features of WCF?                 
                  1) Authentication
                  2) Authorization
                  3) Integrity
                  4) Confidentiality
                  What is WAS?
                  Author: Jean Paul          Posted Date: 24/12/2010   
                  Category: WCF     Points: 15
                  WAS is Windows Process Activation Service.
                  It is a process activation mechanism implemented in Windows
                  2008. It can be used to host WCF servuces.

                  What are the 3 ways to host WCF services?              
                  1. Windows Service
                  2. IIS Hosting
                  3. Windows Activation Services (WAS)

                  What is DataContract and ServiceContract?Explain                                 Data represented by creating DataContract which expose the
                  data which will be transefered /consumend from the serive
                  to its clients.
                  **Operations which is the functions provided by this
                  service.
                  To write an operation on WCF,you have to write it as an
                  interface,This interface contains the "Signature" of the
                  methods tagged by ServiceContract attribute,and all methods
                  signature will be impelemtned on this interface tagged with
                  OperationContract attribute.
                  and to implement these serivce contract you have to create
                  a class which implement the interface and the actual
                  implementation will be on that class.

                  Code Below show How to create a Service Contract:
                  [ServiceContract]
                  Public Interface IEmpOperations
                  {
                  [OperationContract]
                  Decimal Get EmpSal(int EmpId);
                  }
                  Class MyEmp: IEmpOperations
                  {
                  Decimal Get EmpSal()
                  {
                  // Implementation of this method.
                  }
                  }
              

     What is meant by EndPoint in WCF? 

                           It's an Interface, it paves a way on how the client should
                  communicate with the service.
                  It has three points, they are;
                  1) Address - defines where the service resides
                  2) Binding - defines how to communicate
                  3) Contract - defines what the service does
                  What are the various ways of hosting a WCF Service?
                  Author: Alwyn Duraisingh.M          Posted Date: 28/09/2010   
                  Category: WCF     Points: 10
                  There are three ways available through which we can host the
                  WCF Service, They are;
                  1) Using Internet Information Server(IIS)
                  2) Self hosting
                  3) Windows Activation Service (WAS)
                  what are the advantages of WCF service over Web Service?
                  Author: Alwyn Duraisingh.M          Posted Date: 28/09/2010   
                  Category: WCF     Points: 10
                  1) WCF service supports both the HTTP and TCP Protocol
                  2) The reliability is more
                  3) It has a greater flexibility.

                  What is the utility name to test WCF services?                              WcfTestClient.exe
                  It resides in the folder
                  drive:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE

                  What is the application utility name to view logs in WCF?               
                  eventvwr.exe

                  What is service and client in perspective of data          
                  A service is a unit of functionality exposed to the world.
                  The client of a service is merely the party consuming the
                  service
.
                  What is endpoint in WCF?                
                  Every service must have Address that defines where the service
                  resides, Contract that defines what the service does and a
                  Binding that defines how to communicate with the service. In
                  WCF the relationship between Address, Contract and Binding is
                  called Endpoint.
                  The Endpoint is the fusion of Address, Contract and Binding.
                 
What is Transport and Message Reliability?              
                  Transport reliability (such as the one offered by TCP) offers
                  point-to-point guaranteed delivery at the network packet
                  level, as well as guarantees the order of the packets.
                  Transport reliability is not resilient to dropping network
                  connections and a variety of other communication problems.
                  Message reliability deals with reliability at the message
                  level independent of how many packets are required to deliver
                  the message. Message reliability provides for end-to-end
                  guaranteed delivery and order of messages, regardless of how
                  many intermediaries are involved, and how many network hops
                  are required to deliver the message from the client to the
                  service.

                  Explain transactions in WCF?        
                  Transactions in WCF allow several components to concurrently
                  participate in an operation. Transactions are a group of
                  operations that are atomic, consistent, isolated and durable.
                  WCF has features that allow distributed transactions.
                  Application config file can be used for setting transaction
                  timeouts.

                  What are the Advantage of WCF? 
                  Advantages:-
                  ------------
                  1. WCF is interoperable with other services when compared to
                  .Net Remoting,where the client and service have to be .Net.
                  2. WCF services provide better reliability and security in
                  compared to ASMX web services.
                  3. In WCF, there is no need to make much change in code for
                  implementing the security model and changing the binding.
                  Small changes in the configuration will make your
requirements.
                  4. WCF has integrated logging mechanism, changing the
                  configuration file settings will provide this functionality.
                  In other technology developer has to write the code.


                  Whether webservices support data reader?                                 No

                  Which contract is used to documented the view for error
                  occurred in the service to client in wcf? 
                               Fault Contract is used to documented the view for error
                  occurred in the service to client in wcf

                  Which namespace is used to access WCF service?                               System.ServiceModel

                  What is UDDI?                 
                  UDDI stands for Universal Description, Discovery and
                  Integration.
                  It is a platform independent XML based registry that made the
                  process of finding web services easier.

                  What is a SOA Service?              
                  SOA is Service Oriented Architecture. SOA service is the
                  encapsulation of a high level business concept. A SOA service
                  is composed of three parts.
                  1. A service class implementing the service to be provided.
                  2. An environment to host the service.
                  3. One or more endpoints to which clients will connect.

                  Which format is used When sending and retrieving a DataSet
                  from an XML Web service? 
             
                  DiffGram format

                  What is a Messaging Protocol in webservice?        
                  The format of messages exchanged between Web Services clients
                  and Web Services should be vendor neutral and should not carry
                  details about the technology used to implement the service.
                  Also, the message format should allow for extensions and
                  different bindings to specific transport protocols. SOAP and
                  ebXML Transport are specifications which fulfill these
                  requirements. We expect that the W3C XML Protocol Working
                  Group defines a successor standard

                  Can you give an example of when it would be appropriate to use
                  a web service as opposed to a non-serviced .NET component? 
               
                  o Communicating through a Firewall When building a distributed
                  application with 100s/1000s of users spread over multiple
                  locations, there is always the problem of communicating
                  between client and server because of firewalls and proxy
                  servers. Exposing your middle tier components as Web Services
                  and invoking the directly from a Windows UI is a very valid
                  option.
                  o Application Integration When integrating applications
                  written in various languages and running on disparate systems.
                  Or even applications running on the same platform that have
                  been written by separate vendors.
                  o Business-to-Business Integration This is an enabler for B2B
                  intergtation which allows one to expose vital business
                  processes to authorized supplier and customers. An example
                  would be exposing electronic ordering and invoicing, allowing
                  customers to send you purchase orders and suppliers to send
                  you invoices electronically.
                  o Software Reuse This takes place at multiple levels. Code
                  Reuse at the Source code level or binary componet-based
                  resuse. The limiting factor here is that you can reuse the
                  code but not the data behind it. Webservice overcome this
                  limitation. A scenario could be when you are building an app
                  that aggregates the functionality of serveral other
                  Applicatons. Each of these functions could be performed by
                  individual apps, but there is value in perhaps combining the
                  the multiple apps to present a unifiend view in a Portal or
                  Intranet.
                  o When not to use Web Services: Single machine Applicatons
                  When the apps are running on the same machine and need to
                  communicate with each other use a native API. You also have
                  the options of using component technologies such as COM or
                  .NET Componets as there is very little overhead.
                  o Homogeneous Applications on a LAN If you have Win32 or
                  Winforms apps that want to communicate to their server
                  counterpart. It is much more efficient to use DCOM in the case
                  of Win32 apps and .NET Remoting in the case of .NET Apps.