You are on page 1of 310

ADO.NET Difference FAQs-1 1. What are the differences between DataReader and DataAdapter? S.

No 1 2 3 4 DataReader Works in Connected Mode Can have only one record at a time Is ForwardOnly and Readonly Faster DataAdapter Works in Disconnected Mode Can have more than 1 records Can navigate front and back and editable Slower

2. What are the differences between DataSet and DataReader? S.No 1 DataSet The data store whose records have to be manipulated can be disconnected. You have the provision to cache data fetched from data store when using dataset. Dataset objects have XML Support. A single dataset object can contain collection of datatable objects wherein each datatable object refers to a table in the datastore. Hence you can manipulate on multiple tables using a dataset. Using dataset, you can read the records fetched in any order. Performance wise, dataset is slow because it has multiple tables which in turn include multiple rows, columns and constraints. DataReader You can read data from datareader only if the connection to data store exists. Caching of data is not possible.

3 4

XML Support is not provided by datareader. Datareader can read records fetched by a command object containing a single query. If you have to fetch data from multiple tables, then datareader is not advantageous when compared to dataset. While reading records, you can iterate only in forward direction. Datareader gives high performance and records can be fetched faster when compared to dataset.

5 6

3. What is the difference between DataSet.Copy() and DataSet.Clone()? S.No 1 DataSet.Copy() DataSet.Copy() copies both the structure and data DataSet.Clone() DataSet.Clone() copies the structure of the DataSet, including all DataTable schemas, relations,

and constraints and it does not copy any data 4. What are the differences between RecordSet and DataSet? S.No 1 RecordSet RecordSet provides data of one row at an instant RecordSet always needs an Open connection to read the data from data sources RecordSet is able to load the structure and data of only one table at a time RecordSet does not support constraints of Databases DataSet DataSet is a data structure which represents the complete table data at the same time DataSet needs connection only for retrieving the data. After retrieve the data connection is not necessary DataSet has the capability to store the structure and data of multiple tables at a time DataSet enforces data integrity by using Constraints

5. What are the differences between ADO and ADO.Net? S.No 1 2 3 4 5 6 ADO It is a COM based library. Classic ADO requires active connection with the data store. Locking feature is available. Data is stored in binary format. XML integration is not possible. It uses the object named Recordset to reference data from the data store. Using Classic ADO, you can obtain information from one table or set of tables through join. You cannot fetch records from multiple tables independently. Firewall might prevent execution of Classic ADO. Classic ADO architecture includes client side cursor and server side cursor. ADO.Net It is a CLR based library. ADO.NET architecture works while the data store is disconnected. Locking feature is not available. Data is stored in XML. XML integration is possible. It uses Dataset Object for data access and representation. Dataset object of ADO.NET includes collection of DataTables wherein each DataTable will contain records fetched from a particular table. Hence multiple table records are maintained independently. ADO.NET has firewall proof and its execution will never be interrupted. ADO.NET architecture doesn't include such cursors.

8 9

10

You cannot send multiple transactions using a single connection instance.

You can send multiple transactions using a single connection instance.

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/adonet-difference-faqs-1.html ADO.Net Difference FAQs-2 1.Difference between Typed DataSet and Untyped DataSet S.No 1 Typed DataSet It provides additional methods, properties and events and thus it makes it easier to use. They have .xsd file (Xml Schema definition) file associated with them and do error checking regarding their schema at design time using the .xsd definitions. We will get advantage of intelliSense in VS. NET. Performance is slower in case of strongly typed dataset. In complex environment, strongly typed dataset's are difficult to administer. Untyped DataSet It is not as easy to use as strongly typed dataset. They do not do error checking at the design time as they are filled at run time when the code executes.

3 4 5

We cannot get an advantage of intelliSense. Performance is faster in case of Untyped dataset. Untyped datasets are easy to administer.

Typed DataSets use explicit names and DataTypes for their members. ex: northwindDataSet.Products.ProductNameColumn.Caption = "pnames"; UnTyped DataSets use table and column collections for their members ex: ds.Tables["emp"].Columns["eno"].ReadOnly=true; 2.Difference between DataView and DataTable S.No 1 DataView Read-only i.e., DataView can be used to select the data. DataTable Read/Write i.e., Datatable can be used to edit or select or delete or insert a data.

Is a reference to an existing DataTable. Cannot be populated from scratch; must be instantiated with a reference to an existing DataTable. Data is a reference to an existing DataTable, and does not consume space. Can sort or filter rows without modifying the underlying data. Rows and columns can be hidden and revealed repeatedly.

Can be created empty and then populated

Data takes storage space.

Can add/edit/delete rows, columns, and data, and all changes are persistent.

5 6

Can return a DataTable version Can be cloned of the view A live reference to a DataTable; any changes in the DataTable data is immediately reflected in the view. Is source data; does not contain references

Supports calculated columns, Does not support calculated which are columns with a value columns calculated on the fly by combining or manipulating other columns. Can hide or show selected columns No row or column hiding

3.Difference between Connected and Disconnected Environment S.No 1 Connected Environment Disconnected Environment

Connected Environment needs Disconnected Environment does a constantly connection of user not need any connection. to data source while performing any operation. Only one operation can be performed at a time in connection Environment. DataReader is used in Connection Environment. It is slower in speed. Multiple operations can be performed. DataSet is used in it. Disconnected Environment has a good speed.

3 4

We get updated data in it.

There is a problem of dirty read.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/adonet-difference-faqs-2.html ADO.NET Difference FAQs-3 1.Difference between ExecuteNonQuery() and ExecuteScalar() methods in ADO.NET S.No 1 ExecuteNonQuery() ExecuteScalar()

It will work with Action Queries It will work with Non-Action Queries only that contain aggregate functions. (Create,Alter,Drop,Insert,Updat e,Delete). It returns the count of rows It returns the first row and first effected by the Query. column value of the query result. Return type is int Return type is object.

2 3 4

Return value is optional and Return value is compulsory and can be assigned to an integer should be assigned to a variable of variable. required type.

Example-1 for ExecuteNonQuery Method -Insert: SqlCommand cmd = new SqlCommand("Insert Into SampleTable Values('1','2')",con); //con is the connection object con.Open(); cmd.ExecuteNonQuery(); //The SQL Insert Statement gets executed Example-2 for ExecuteNonQuery Method - Update: public void UpdateEmployeeEmail() { SqlConnection conn = new SqlConnection(connString)) String sqlQuery = "UPDATE Employee SET empemail='umar.ali@xyz.com' WHERE empid=5; SqlCommand cmd = new SqlCommand(sqlQuery, conn); try { conn.Open(); cmd.ExecuteNonQuery(); } catch (Exception ex) { Console.WriteLine(ex.Message); } finally {

conn.Close(); } return count; } Example-1 for ExecuteScalar Method: This returns only one value that is first column value of the first row in the executed query public int getSomeProdId() { int count=0; SqlConnection conn = new SqlConnection(connString)) String sqlQuery = "SELECT COUNT(*) FROM dbo.region"; SqlCommand cmd = new SqlCommand(sqlQuery, conn); try { conn.Open(); //Since return type is System.Object, a typecast is must count = (Int32)cmd.ExecuteScalar(); } catch (Exception ex) { Console.WriteLine(ex.Message); } finally { conn.Close(); } return count; } Example-2 for ExecuteScalar Method: This returns one value only, no recordsets. cmd.CommandText = "Select Name, DOB, from Emp where ID=1"; Dim strName As string = cmd.ExecuteScalar.ToString 2.Difference between ExecuteNonQuery() and ExecuteReader() methods in ADO.NET S.No 1 ExecuteNonQuery() ExecuteReader()

It will work with Action Queries It will work with Action and Nononly Action Queries (Select) (Create,Alter,Drop,Insert,Updat e,Delete).

2 3 4

It returns the count of rows It returns the collection of rows effected by the Query. selected by the Query. Return type is int Return type is DataReader.

Return value is optional and Return value is compulsory and can be assigned to an integer should be assigned to an another variable. object DataReader.

Example-1 for ExecuteNonQuery Method -Insert: SqlCommand cmd = new SqlCommand("Insert Into SampleTable Values('1','2')",con); //con is the connection object con.Open(); cmd.ExecuteNonQuery(); //The SQL Insert Statement gets executed Example-2 for ExecuteNonQuery Method - Update: public void UpdateEmployeeEmail() { SqlConnection conn = new SqlConnection(connString)) String sqlQuery = "UPDATE Employee SET empemail='umar.ali@xyz.com' WHERE empid=5; SqlCommand cmd = new SqlCommand(sqlQuery, conn); try { conn.Open(); cmd.ExecuteNonQuery(); } catch (Exception ex) { Console.WriteLine(ex.Message); } finally { conn.Close(); } return count; } Example for ExecuteReader Method: Here, ExecuteReader is used to get set of records by specified query, namely, "select * from emp" SqlConnection con = new SqlConnection(constr); //constructor can be connection of string. SqlCommand cmd = new SqlCommand ("select * from emp", con); con.Open(); SqlDataReader dr = cmd. ExecuteReader (CommandBehavior. CloseConnection); //Implicitly closes the connection because CommandBehavior. CloseConnection was specified.

while(dr.Read()) { Console.WriteLine (dr.GetString(0)); } dr.Close(); Reference: http://onlydifferencefaqs.blogspot.in/2012/08/adonet-difference-faqs-3.html

AJAX Difference FAQs-1 1.Difference between AJAX and jQuery S.No 1 AJAX jQuery

AJAX is a powerful tool which JQuery is a light weight language cannot use HTML since it is a that focuses the interaction in the simple tool and it can not HTML elements. reload the page after it is once loaded. AJAX is a combination of JQuery cannot provide a new several technologies such as functionality by combining with CSS, HTML, DOM and many other technologies. more. In combination with these technologies, AJAX provides new functionalities. AJAX should be accessed in a JQuery can be accessed through proper procedure to retrieve front-end therefore JQuery does data from the server. not require understanding of the complete procedure to setup a page. Heavy usage of AJAX often leads to the server overload due to more number of connections created. There is no chance for overload of server while using JQuery since there is no such heavy usage in JQuery.

2.Difference between AJAX and JavaScript S.No 1 AJAX AJAX allows the coder send request data asynchronously in order load new data without changing the web page. JavaScript JavaScript is a client side scripting language that allows the creation of dynamic web pages by providing a new level of interactivity.

2 3

AJAX supports the server side JavaScript provides support to the scripting Language. client side scripting language. AJAX can load the web page JavaScript cannot load the pages after it is been loaded for the after it is once loaded. first time. AJAX does not install Trojan in JavaScript can install Trojan in the the computer. computer.

3.Difference between AJAX and PHP S.No AJAX PHP

AJAX is an Asynchronous JavaScript XML that has a group of web technologies which are interrelated.

PHP is a Hypertext processor that is a general scripting language which produces dynamic web pages.

AJAX is not a stand alone PHP is a stand alone technology. technology. AJAX is a group of technology. AJAX needs a specific platform PHP can run on any platform and and operating system to run. operating system. AJAX is difficult to develop on PHP is easy to develop on static static pages. pages. AJAX will only run if the PHP is highly vulnerable and does browser supports JavaScript or not require much support. XMLHttpRequest.

3 4 5

4.Difference between AJAX and DHTML S.No 1 AJAX DHTML

AJAX does not have the DHTML makes a Button glow or feature of making the button pressed when the cursor is moved glow when the cursor is moved over it. over it. AJAX can load a single link DHTML loads a fresh new page to instead of loading the whole load a link. new page. AJAX saves the loading time. DHTML consumes more time than AJAX takes in loading the page.

3 4

AJAX permits the browser to DHTML does change the element request certain elements which on the screen depending on the reduces the strain on the request from the user. internet.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/ajax-difference-faqs-1.html

ASP.NET Difference FAQs


1. What are the differences between Inline code and Code Behind Code? S.No 1 2 Inline code Its within .aspx file Dynamically compiled Code Behind Code Its in a external class file Compiled prior to deployment and linked with .aspx file

2. What are the differences between Global.asax and Web.Config? S.No 1 2 3 4 global.asax It is a class file There can be only one for an application Can have Application and Session events Need to be recompiled when changes are made web.config It is an XML file There can be many if under different sub-folders Cannot have Application and Session events No need to compile when changes are made

3. What are the Differences between Server.Transfer and Response.Redirect? S.No 1 Server.Transfer The navigation happens on the server-side ,so client history is not updated Data can be persist across the pages using Context.Item collection No Round-trips Has Good encapsulation Response.Redirect The navigation happens on the client-side ,so client history is updated Context.Items loses the persistence

3 4

Makes a Round-trip No

4. What is the difference between a custom control and a user control? S.No 1 2 3 User Control Is a file with the .ascx extension Can be only used with the application Language dependent Custom Control Is a file with the .dll extension Can be used in any number of applications They are language independent, a control created in c# can be used in vb.net Can be added to Visual studio Toolbox

Cannot be added to Visual studio

Toolbox 5 Inherits from Server controls and easy to create Generally used for static content We have to develop from scratch , so comparatively difficult Used when dynamic content is required Application Application does not have expire policy Application require explicit locking Application variables exist as long as the application is alive

5. What is the difference between Caching and Application? S.No 1 2 3 Caching Cache have expire policy Cache does not require explicit locking Cache has the Property of timeout, which allows us to control the duration of the Objects so cached Output can be cached in 4 ways, 5 Page Output Caching Page Partial Caching DataSource Caching Data Caching It is accessible to both page level and application level to all the users

Application does not have options as like Cache object

It is accessible to page level to all the users

6. What is the difference between web farm and web garden? S.No 1 Web farm A web application running on multiple servers is called a web farm. Web garden A web application running on a single server that has multiple CPUs is called a web garden.The benefit of using this is, if one server crashes then other will work instantly. Web Farm is implemented using techniques like Net Work Load Balancing.

For Web Garden, we have to use in Machine.Config file.

Summary: Web garden and web farms are asp.net applications that serve the purpose when the user base of a web site increases considerably. For Web garden/Web Farm configurations, we have to set sessionState mode to

StateServer/SQLServer in the web.config file. 7. What is the difference between Application and Session Events? S.No 1 Application Event Application events are used to initialize objects and data that we do want to make available to all the current sessions of our web application Session Event Session events are used to initialize data that we want to keep throughout individual sessions, but that we do not want to share between sessions

8. What is the difference between Session Cookies and Persistent Cookies? S.No 1 Session Cookies Session Cookies do not have expiration date Persistent Cookies Persistent Cookies have an expiration date. The expiration date indicates to the browser that it should write the cookie to the clients hard drive HTML Controls HTML Controls can trigger only page-level events on server (postback) Data is not maintained in an HTML control. Data must be saved and restored using page-level scripts HTML controls have HTML attributes only

9. What are the differences between Server Controls and HTML Controls? S.No 1 Server Controls Server Controls can trigger control-specific events on the server Data entered in a server control is maintained across requests. Server controls retain state The Microsoft .NET Framework provides a set of properties for each server control. Properties allows us to change the server controls appearance and behavior within server-side code Server controls automatically detect browser and adapt display as appropriate

We must detect browser in code or write for least common denominator

10.What are the differences between ViewState and Hidden fields? S.No 1 2 3 ViewState This is used for pages that will postback to itself This is built in structure for maintaining state of a page Security is more as data is hashed, compressed and Hidden fields This is used for pages that will postback to itself or to another page This is not an inbuilt structure Security is less when compared to ViewState

encoded 11.What is the difference between SQL Cache Notification and SQL Cache Invalidation? S.No 1 SQL Cache Notification Using SQL Cache Notification, we can generate notifications when the data of a database on which a cached item depends changes SQL Cache Invalidation Using SQL Cache Invalidation, we can make a cached item invalid that depends on the data stored in a SQL server database, when the data in the SQL server database is changed

12.What is the difference between absolute time expiration and sliding time expiration? S.No 1 Absolute time expiration In absolute time expiration, a cached item expires after the expiration time specifies for it, irrespective of how often it is accessed Sliding time expiration In sliding time expiration, the time for which the item is cached is each time incremented by its expiration time if it is accessed before completion of its expiration time

13.What is the difference between adding items into cache through Add() method and Insert() method? S.No 1 Cache.Add() Cache.Add() method also returns an object representing the item we have added in the cache ,besides adding the item in the cache It is not possible to replace an existing item in the cache using the Cache.Add() method Cache.Insert() Cache.Insert() method adds only the item in the cache

We can replace an existing item in the cache using the Cache.Insert() method

14.What is the difference between page-level caching and fragment caching? S.No 1 Page-level caching In Page-level caching, we cache a whole page Fragment caching In Fragment caching, we cache parts of the web page such as a user control added to the web page

15.What is the difference between Label control and Literal control? S.No 1 Label control Final HTML code of a Label control has an HTML tag Literal control Final HTML code of a Literal control contains only text, which is not surrounded by any HTML tag

16.What is the difference between HyperLink control and LinkButton control?

S.No 1

HyperLink control A HyperLink control do not have Click and Command events

LinkButton control A LinkButton control have Click and Command events, which can be handled in the code behind file of the web page

17.What is the difference between an HtmlInputCheckBox control and an HtmlInputRadioButton control? S.No 1 HtmlInputCheckBox control We can select more than one HtmlInputCheckBox control from a group of HtmlInputCheckBox controls HtmlInputRadioButton control We can select only a single HtmlInputRadioButton control from a group of HtmlInputRadioButton controls

18.How a content page differs from a master page? S.No 1 Content page A content page does not have complete HTML source code Master page A master page has complete HTML source code inside its source file

19.How will you differentiate a submaster page from a top-level master page? S.No 1 Submaster page Like a content page, a submaster page also does not have complete HTML source code Top-level master page Top-level master page has complete HTML source code inside its source file

20.What is the difference between a page theme control and a global theme? S.No 1 Page theme A page theme is stored inside a subfolder of the App_Themes folder of a web application It can be applied to individual web pages of the web application Global theme A global theme is stored inside the Themes folder on a web server It can be applied to all the web sites on the web server

21.What is the difference between a default skin and a named skin? S.No 1 2 Default skin A default skin does not have a SkinId attribute It is automatically applied to all the controls of the same type present on a web page Named skin A named skin has a SkinId attribute It is applied to a control explicitly by setting the SkinId property of the control from the Properties window

22.Differentiate Globalization and Localization S.No Globalization Localization

Globalization is the process of identifying the specific portion of a web application that needs to be different for different languages and isolating that portion from the core of the web application example: a)consider this tag in Web.Config file. It would cause the dates to be displayed in French for the web page of the folder where this Web.Config file is located. b) CultureInfo d=new CultureInfo("de-DE"); Response.Write(DateTime.Now.T oString("D",d); It would display date in long format using German culture

Localization is the process of configuring a web application to be supported for a specific language or locale

example: we have 2 resource files: a)default.aspx.fr-FR.resx b)default.aspx.en-US.resx Using appropriate coding in the .aspx.cs files of a web page, the strings written in these resource files can be used to change the text of the strings dynamically.

23.What are the differences between web.config and machine.config? S.No 1 web.config This is automatically created when we create an ASP.Net web application project This is also called application level configuration file We can have more than one web.config file This file inherits setting from the machine.config machine.config This is automatically installed when we install Visual Studio. Net This is also called machine level configuration file Only one machine.config file exists on a server This file is at the highest level in the configuration hierarchy

2 3 4

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/aspnet-difference-faqsdoc.html

ASP.NET Difference FAQs-2


Difference between Web site and Web application S.No 1 Web site Can mix vb and c# page in single website. Web application We can't include c# and vb page in single web application.

2 3 4

Can not establish dependencies. Edit individual files after deployment. Right choice when one developer will responsible for creating and managing entire website. i.e.,In web site development, decoupling is not possible.

We can set up dependencies between multiple projects. Can not edit individual files after deployment without recompiling. Right choice for enterprise environments where multiple developers work unitedly for creating,testing and deployment. i.e.,In Web application, different different groups work on various components independently like one group work on domain layer, other work on UI layer. Web application is more difficult to create than a Web site

Web site is easier to create than Web application

Difference between Local storage and cookies S.No 1 2 3 Local storage Good to store large amount of data, up to 4MB Easy to work with the JavaScript Local storage data is not sent to the server on every request (HTTP header) as it is purely at the client side No way to specify the time out period as the Cookies have Cookies Good for small amount of data, up to 4KB Difficult to work with JavaScript All data is transferred to and from server, so bandwidth is consumed on every request Can specify timeout period so that cookies data are removed from browser

Difference between Session and Cache S.No Session 1 2 Ssession retains state per user Cache Cache is used for retaining state for application scoped items.

Items put into a session Items in the cache can expire (will will stay there, until the be removed from cache) after a session ends specified amount of time. And also there is no guaranty that objects will not be removed before their expiration times as ASP.NET remove

items from cache when the amount of available memory gets small. This process is called as Scavenging. 3 The session state can This is not the case with the cache. be kept external (state server, SQL server) and shared between several instances of our web app (for load balancing).

Difference between Datalist and Repeater S.No Datalist 1 Repeater

Datalist supports multiple Repeater doesn't support multiple columns displaying and columns display,no repeat columns using repeat columns property property Datalist supports styles for formating templates data[headerstyle,...] Datalist rendering output[html content]will be slow compare with repeater. Repeater does not provide styles

Repeater performanace is better than Datalist

Summary: If the requirement can achieve using repeater and datalist,choose repeater for better performance Reference: http://onlydifferencefaqs.blogspot.in/2012/07/aspnet-difference-faqs-2.html

ASP.Net Difference FAQs-3


1.Difference between ASP.NET and PHP S.No 1 ASP.NET Technology Availability: ASP.NET was launched by Microsoft in the year 2002. 2 Database: ASP.Net uses MS-SQL for PHP Technology Availability: PHP was launched by Rasmus Lerdorf in the year 1995. Database: For point of database connectivity

connecting database but MSSQL can not be availed free from Microsoft.

PHP uses MySQL for the purpose of database connectivitybecasue its highly flexiblilty nature. Another important fact is that it will incurextra expenditure because MySQL can be accessed for free. Cost: Linux can be used for running PHP programs and Linux is free operating system. Therefore,the cost of developing a website in PHP language is remarkably low

Cost: We need to install Internet Information Server (IIS)on a Windows server platformif you want to run ASP.Net program. As Windows server platform is not a free product,the cost of production is bounded to be increased. Run Time : It has been observed that ASP.Net code runs slower than PHP code. This is because ASP.Net utilizes server space while running

Run Time: Whereas inbuilt memory space is used by PHP while running.

Coding Simplicity: ASP.Net codes are somewhat complicated and a web developer needs to work hard to get the hang of it

Coding Simplicity: PHP codes are very simple and a programmer does not have to make a diligent effort because it is comparatively easier than other types of programming languages. Platform Connectivity Issue: PHP has a unique advantage in this issue. Its codes can be linked with different types of platforms such as Windows, Linux and UNIX.

Platform Connectivity Issue : ASP.NET codes are usually run on Windows platforms but if you install ASP-Apache in the server than it can run on Linux platform as well.

Cost of Tools : There is no such free tools are available for ASP.Net.

Cost of Tools : PHP codes are available for free in various forums and blogs as it is a open source software. Furthermore, some useful tools that can be used in PHP are also available for free Language Support : The codes that are used in PHP

The syntax of ASP.Net is more or less similar to that of Visual basic syntax and this is all but

simple.

are very much similar to that of C+ + language and its syntax resembles the syntax used in C and C++. Therefore, if you have a fair knowledge in C++ or C, you will not face any difficulty while coding PHP language. Security : Though PHP can offer enough measures for ensuring data security

Security : ASP. Net is reputed for creating sophisticated techniques to ensure the safety of confidential data.This is the reason why government organizations opt for ASP.Net.

2.Difference between ASP and ASP.NET S.No 1 2 ASP ASP is a request response model. ASP code is an interpreted language that is interpreted by the script engine. HTML and the coding logic are mixed in ASP. To develop and debug ASP application, there are very limited tools. ASP has limited support to Object Oriented Programming principles. Session management and application state management is very limited in ASP. Error handling system is poor in ASP. ASP does not offer any in-built support for the XML. ASP.NET ASP.NET is a programming model that is event driven. ASP.NET is a compiled CLR code that will be executed on the Server. The code and design logic is separated in ASP.NET. ASP.NET application can be developed and debugged using various tools including the leading Visual Studio .NET tool. ASP.NET is a complete Object Oriented Programming language. ASP.NET extends complete support for session management and application state management. ASP.NET offers complete error handling and exception handling services. In ASP.NET, data exchange is easily performed using XML support.

3 4

Data source support is not fully distributed in ASP.

Data source support is fully distributed in ASP.NET.

3.Difference between ASP.NET and VB.NET S.No 1 ASP.NET ASP.NET is web technology that is used in building web applications and websites. ASP.NET is a server side technology that is language independent. Any .NET languages such as C#, VB.NET can be used to develop web applications through ASP.NET. ASP.NET is included within the .NET framework. For example, ASP.NET contains the text boxes and the controls that can be dragged and dropped into a web form. 4 5 ASP.NET contains server controls. ASP.NET can support all .NET languages. VB.NET VB.NET is a language that is used in writing programs that are utilizing the ASP.NET framework. VB.NET is a .NET programming language. VB.NET is used to create ASP.NET web applications or windows applications using Visual Studio Windows Forms Designer or mobile applications or console applications or applications for variety of other purposes. VB.NET is not part of .NET framework. For example, VB.NET is the code that is written on various events of text boxes and controls to make them function as per the requirement. VB.NET does not include server controls. VB.NET can support only scripting languages.

4.Difference between Java and .NET S.No 1 2 Java JAVA is developed by Sun Microsystem JAVA is a programming language In JAVA, JVM(Java Virtual Machine) execute the code and convert source code to byte code. .NET .NET is developed by Microsoft. .NET is a framework that supports many programming languages like C#,ASP,VB. In .NET CLR(common language Runtime) execute the code with two phase compilation.

4 5

JAVA can run on any operating system But in JAVA it depends upon the programmer to destroy the garbage memory.

.NET can run only on windows/IIS. Although .NET support both explicit and implicit garbage collection,especially,in .NET the garbage collector destroy the garbage value in an efficient manner as compared to JAVA. ADO .NET is use for database connection in .NET. .net has a standard development IDE i.e. Microsoft Visual Studio Both windows and web applications can developed by .net but it will be more better to go for windows application with .NET . you can also go for web application with .NET but it will only hosted on windows server.

6 7 8

JDBC is used for database connection in JAVA For java many third party IDEs are available. But web application in java run on any operating system.

9 10

Exception Handling in Java is Exception Handling in .NET is harder than .NET simpler than JAVA. JAVA uses bootclasspath for completely trusted codes. Java is less secure than .NET while providing security .NET uses GAC(Global Assembly Cache) and keep trusted assemblies. JAVA and .NET both have similar security goals. But .NET is more secure because of its simple and clean designs. .Net due to disconnected data access through ADO.Net has high level of performance against Java JDBC Due to Microsoft Visual Studio, development is faster. Microsoft Visual Studio installation requires higher configuration system. .Net is the platform itself for a multitude of languages. One can use C, C++ and VB to program upon .net. These programs interact

11

12

Java JDBC which requires multiple round trips to data base. Hence, performance is lesser than .NET Development is comparatively slower. Java applications development can be done on even less configuration computer system. Java can only communicate with java programs

13 14

15

with each other using common methods. these common methods are defined by .Net, and are used by the programs to communicate with each other without worry about that language the program was written in. the machine running the program/s will need the .Net platform to be installed.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-3.html

ASP.NET Difference FAQs-4


1.Difference between HTTP and HTTPS S.No 1 2 3 4 5 6 7 HTTP URL begins with http://" in case of HTTP HTTP is unsecured HTTP uses port 80 for communication HTTP operates at Application Layer No encryption is there in HTTP No certificates required in HTTP Most internet forums will probably fall into this category. Because these are open discussion forums, secured access is generally not required HTTPS URL begins with https:// in case of HTTPS. HTTPS is secured. HTTPS uses port 443 for communication. HTTPS operates at Transport Layer. HTTPS uses encryption. certificates required in HTTPS. HTTPS should be used in Banking Websites, Payment Gateway, Shopping Websites, Login Pages, Emails (Gmail offers HTTPS by default in Chrome browser) and Corporate Sector Websites. For example: PayPal: https://www.paypal.com Google AdSense: https://www.google.com/adsense/

2.Difference between GET and POST methods S.No 1 GET Post Mechanism: GET request is sent via URL. POST Post Mechanism: Post request is sent via HTTP request body or we can say internally. Form Default Method: We have to specify POST method within form tag like Security: Since Post request encapsulated name pair values in HTTP request body, so that we can submit sensitive data through POST method. Length: POST request has no major limitation.

Form Default Method: GET request is the default method.

Security: Since GET request is sent via URL, so that we can not use this method for sensitive data.

Length: GET request has a limitation on its length. The good practice is never allow more than 255 characters.

Caching or Bookmarking: GET request will be better for caching and bookmarking.

Caching or Bookmarking: POST request is not better for caching and bookmarking. SEO: POST request is not SEO friendly. Data Type: POST request has no restriction. Best Example: LOGIN is the best example for POST request.

SEO: GET request is SEO friendly.

Data Type: GET request always submits data as TEXT.

Best Example: SEARCH is the best example for GET request.

HTTP Request Message Format: 1 GET /path/file.html? SearchText=Interview_Questio n HTTP/1.0 2 From: umarali1981@gmail.com 3 User-Agent: HTTPTool/1.0 4 [blank line here]

HTTP Request Message Format: 1 POST /path/script.cgi HTTP/1.0 2 From: umarali1981@gmail.com 3 User-Agent: HTTPTool/1.0 4 Content-Type: application/xwww-form-urlencoded 5 Content-Length: 8 6 7 Code=132

Some comments on the limit on QueryString / GET / URL parameters Length: 1. 255 bytes length is fine, because some older browser may not support more than that. 2. Opera supports ~4050 characters. 3. IE 4.0+ supports exactly 2083 characters. 4. Netscape 3 -> 4.78 support up to 8192 characters. 5. There is no limit on the number of parameters on a URL, but only on the length. 6. The number of characters will be significantly reduced if we have special characters like spaces that need to be URLEncoded (e.g. converted to the '%20'). 7. If we are closer to the length limit better use POST method instead of GET method. 3.Difference between User Controls and Master Pages S.No 1 2 3 4 User Controls Its extension is .ascx. Code file: .ascx.cs or .ascx.vb A page can have more than one User Controls. It does not contain Contentplaceholder and this makes it somewhat difficult in providing proper layout and alignment for large designs. Suitable for small designs(Ex: logout button on every .aspx page.) Register Tag is added when we drag and drop a user control onto the .aspx page. Can be attached dynamically using LoadControl method.PreInit event is not Master Pages Its extension is .Master. code file: .master.cs or .master.vb extension Only one master page can be assigned to a web page It contains ContentPlaceHolder.

More suitable for large designs(ex: defining the complete layout of .aspx page) MasterPageFile attribute is added in the Page directive of the .aspx page when a Master Page is referenced in .aspx page. Can be referenced using Web.Config file also or dynamically by writing code in PreInit event.

mandatory in their case for dynamic attachment.

4.Difference between Build and Rebuild S.No 1 Build A build compiles only the files and projects that have changed. Build does not updates the xml-documentation files Rebuild A rebuild rebuilds all projects and files in the solution irrelevant of whether they have changed or not. Rebuild updates the xmldocumentation files

Note: Sometimes,rebuild is necessary to make the build successful. Because, Rebuild cleans Solution to delete any intermediate and output files, leaving only the project and component files, from which new instances of the intermediate and output files can then be built. 5.Difference between generic handler and http handler S.No 1 Generic Handler Generic handler has a handler which can be accessed by url with .ashx extension Typical example of generic handler are creating thumbnails of images Http Handler http handler is required to be configured in web.config against extension in web.config.It does not have any extension For http handler, page handler which serves .aspx extension request and give response.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-4.html

ASP.Net Difference FAQs-5


1.Difference between ViewState and SessionState S.No 1 2 ViewState View state is maintained in page level only. View state of one page is not visible in another page.i.e., SessionState Session state is maintained in session level. Session state value is available in all pages within a user session.i.e.,

when user requests another page previous page data will be no longer available. 3 4 View state information stored in client only. View state persist the values of particular page in the client (browser) when post back operation done. View state used to persist page-instance-specific data.

The data will be no longer available if user close the browser or session timeout occurs. Session state information stored in server. Session state persist the data of particular user in the server. This data available till user close the browser or session time completes. Session state used to persist the user-specific data on the server side.

2.Difference between ViewState and ControlState S.No 1 2 ViewState ViewState can be disabled ViewState is implemented by using EnableViewState property of a control to true. ControlState Control State cannot be disabled. Control State works even when EnableViewState is off. To use Control State (for example in a custom control) we have to override OnInit method,call RegisterRequiresControlState method in OnInit method and then override the SaveControlState and LoadControlState methods. Control State is used for small data only. eg: maintain clicked page number in a GridView even when EnableViewState is off

ViewState is used to maintain page-level state for large data

3.Difference between SessionState and Cookies S.No 1 SessionState Session can store any type of data because the value is of datatype of "object" These are stored at Server side Session are secured because Cookies Cookies can store only "string" datatype They are stored at Client side Cookie is non-secure since stored

2 3

it is stored in binary format/encrypted form and it gets decrypted at server 4 Session is independent for every client i.e individual for every client

in text format at client side

Cookies may or may not be individual for every client

There is no limitation on size or Due to cookies network traffic will number of sessions to be used increase.Size of cookie is limited to in an application 40 and number of cookies to be used is restricted to 20. For all conditions/situations we can use sessions We cannot disable the sessions.Sessions can be used without cookies also(by disabling cookies) The disadvantage of session is that it is a burden/overhead on server Sessions are called as NonPersistent cookies because its life time can be set manually Only in few situations we can use cookies because of no security We can disable cookies

6 7

Since the value is string there is no security We have persistent and nonpersistent cookies

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-5.html

ASP.NET Difference FAQs-6


1.Difference between DataGrid and GridView S.No 1 DataGrid Sorting: In DataGrid code requires to handle the SortCommand event and rebind grid required. Paging: In DataGrid requires code to handle the PageIndexChanged event and rebind grid required. Data binding: Like GridView DataGrid cannot bind with new datasource control in ASP.NET 2.0. GridView Sorting: In case of GridView no additional code required.

Paging: In case of GridView no additional code required. It also supports customized appearance. Data binding: GridView can bind with new datasource control

Updating data: DataGrid requires extensive code to update operation on data Events: In DataGrid less events supported as compared to GridView.

Updating data: GridView requires little code. Code like exceptions handling for database part. Events: GridView supports events fired before and after database updates.

2.Difference between ListView and GridView S.No 1 ListView Data Grouping: In-built support for this functionality is provided. Provide Flexible Layout: Inbuilt support for this functionality is provided. Insert: In-built support for this functionality is provided. GridView Data Grouping: To provide this functionality, we need to write custom code. Provide Flexible Layout: To provide this functionality, we need to write custom code Insert: To provide this functionality, we need to write custom code

3.Difference between DataList and GridView S.No 1 DataList Paging: To provide this functionality, we need to write custom code. Provide Flexible Layout: Inbuilt support for this functionality is provided. Update,Delete: To provide this functionality, we need to write custom code Data Grouping: In-built support for this functionality is provided. Sorting:To provide this functionality, we need to write GridView Paging: In-built support for this functionality is provided. Provide Flexible Layout: To provide this functionality, we need to write custom code Update,Delete: In-built support for this functionality is provided. Data Grouping: To provide this functionality, we need to write custom code. Sorting:In-built support for this functionality is provided.

custom code. 4.Difference between Repeater and ListView S.No 1 Repeater Paging: To provide this functionality, we need to write custom code. Data Grouping: To provide this functionality, we need to write custom code. Insert: To provide this functionality, we need to write custom code Update,Delete: To provide this functionality, we need to write custom code Sorting:To provide this functionality, we need to write custom code. ListView Paging: In-built support for this functionality is provided. Data Grouping: In-built support for this functionality is provided. Insert: In-built support for this functionality is provided. Update,Delete: In-built support for this functionality is provided. Sorting:In-built support for this functionality is provided.

5.Difference between Repeater and DataList S.No 1 2 Repeater Repeater is template driven Repeater cannot automatically generates columns from the data source Row selection is not supported by Repeater Editing of contents is not supported by Repeater Arranging data items horizontally or vertically is not supported by Repeater DataList DataList is rendered as Table. DataList can automatically generates columns from the data source Row selection is supported by DataList Editing of contents is supported by DataList We can arrange data items horizontally or vertically in DataList

3 4 5

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-6.html

ASP.NET Difference FAQs-7


1.Difference between trace and debug in .NET S.No 1 Trace Debug

This class works only when This class works only when your your application build defines application build defines the the symbol TRACE. symbol DEBUG. For tracing, you have to use For tracing, you have to use Trace.WriteLine statements. Debug.WriteLine statements. Trace class is generally used You generally use debug classes at to trace the execution during the time of development of deployment of the application. application. Trace class works in both Debug class works only in debug debug mode as well as release mode. mode. Performance analysis can be Performance analysis cannot be done using Trace class. done using Debug class. Trace runs in a thread that is Debug runs in the same thread in different from the Main Thread. which your code executes. Trace is used during Testing Debug is used during Debugging Phase and Optimization Phase Phase of different releases.

2 3

5 6 7

2.Difference between ASP and ASPX S.No 1 2 3 ASP ASPX

The .asp is the file extension of The .aspx is the file extension of the classic ASP page. ASP.NET page. ASP stands for Active Server ASPX is the acronym of Active Pages. Server Pages Extended. The .asp file runs under the The .aspx file runs in a separate process space of inetinfo.exe, worker process called as which is an IIS process space. aspnet_wp.exe. The .asp file can execute only in platforms of Microsoft technology. It cannot run in non-Microsoft platforms like Apache Web Server. The .aspx file can run on any platforms, be it Microsoft or not. Hence .aspx file can be executed in Apache Web Server as well.

The .asp file can be coded in The .aspx file can be coded using only two languages namely any .NET language including VBScript and Javascript. Both VB.NET, C#. Both VB.NET and C#

these languages are client side are Server Side Languages. languages. 6 In .asp file, the executable code can be included outside a function scope where in the function is located inside the script block marked as runat=server. In .aspx file, the executable code cannot be included outside a function scope where in the function is located inside the script block marked as runat=server.

In .asp file, a function can be In .aspx file, a function cannot be defined inside server side defined inside server side script script tags. tags. In .asp file, all the directives will be placed in the pages first line using <%@Page Language= Jscript %> tag. In .aspx, the language directive must be enclosed within page directive as <%@Page Language= VB %>

3.Difference between thread and process S.No 1 Thread Process

Threads share the address Processes have their own address. space of the process that created it. Threads have direct access to Processes have their own copy of the data segment of its the data segment of the parent process process. Threads can communicate with threads of its process Threads have overhead directly Processes must use interprocess other communication to communicate with sibling processes. no Processes overhead have considerable

4 5 6

almost

New threads are easily created New processes require duplication of the parent process. Threads can exercise Processes can considerable control over control over threads of the same process child processes only exercise

Changes to the main thread Changes to the parent process (cancellation, priority change, does not etc.) may affect the behavior of affect child processes. the other threads of the process

Another good reference: http://www.differencebetween.net/miscellaneous/difference-between-thread-and-process/ 4.Difference between ASPX and ASCX S.No 1 ASPX ASP.NET Page uses extension .aspx For eg: Default.aspx ASCX the User Control uses the extension .ascx For eg: WebUserControl.ascx.

ASP.NET Page begin with a User Control begin with a Control Page Directive. Directive. For eg: For eg: <%@ Page Language="C#" <%@ Control Language="C#" AutoEventWireup="true" AutoEventWireup="true" CodeFile="Default.aspx.cs" CodeFile="WebUserControl.ascx.c Inherits="_Default" %> s" Inherits="WebUserControl" %> Usercontrol code can be used We can not use webforms in in webforms usercontrol. ASP.NET Page can be viewed User Control cannot be viewed directly in the Browser. directly in the browser. User Controls are added to WebPages and we view them by requesting a web page in our browser ASP.NET page has HTML, User Control does not have a Body or Form element. HTML, Body or Form element.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-7.html

ASP.NET Difference FAQs-8


1.Difference between HTML Controls and ASP.NET Standard Controls S.No 1 2 HTML Controls ASP.NET Standard Controls

All HTML Controls run at Client All ASP.NET Controls run at Server side side Can be made to run at Server Cant be made to run at Client side side by adding runat=server rather equivalent HTML code is attribute generated on Rendering Rendering is NOT Required Execution is FAST Rendering is Required Execution is SLOW

3 4

5 6 7

Dont contain any class for the Contains Separate class for each Controls Controls Dont support Object Oriented Supports Object Programming features Programming Features Dont provide MANAGEMENT Oriented

STATE Provides STATE MANAGEMENT

2.Difference between Response.Redirect and Server.Transfer S.No 1 2 Response.Redirect Used to redirect to webpage in any website Server.Transfer any Used to redirect to any webpage in current website only

Can be used to pass the Cant be used to pass the required required values from Source values from Source Page to Target Page to Target Page while Page while redirecting redirecting Execution is Slow Execution is Fast

3 4 5

Target page address appears Target page address doesnt within the address bar appears within the address bar Refreshing of the page doesnt Refreshing of the page causes cause any error error

3.Difference between ASP.NET and ASP.NET MVC S.No 1 2 ASP.NET ASP.NET MVC &

You need .NET framework to You need .NET framework install ASP.NET. ASP.NET to Install MVC.

Supports Code behind page Supports both Code behind page coding & Inline coding coding & Inline coding but, we should not use code behind as a practice because view should not perform any logic. Pages are called Pages Pages are called Views

3 4

There is a Life cycle for every There is tailored lifecycle of the page. page. By default you won't see the events when you create the Views but, you can add the Page Load event by in a script server tag. Again its not a good practice We use Viewstate concept There is no Viewstate for view. extensively There is no state of the controls. But state of the entire page can be maintained by a feature

ModelBinders 6 Every Page is inherited from Every Page is inherited from System.Web.UI.ViewPage System.Web.Mvc.ViewPage. View page is inherited from System.Web.UI.Page. You don't have the strongly You can create the Strongly typed typed pages Views using generics. It means, you can pass the object (Model) to the view page from the controller. Has lot of inbuilt Controls that We cannot use the ASP.NET support RAD. controls because they don't support the ViewState and Postback. We have inbuilt methods called HTML Helper methods. These methods just create the required HTML in the response stream. You can create the user controls. 9 Has the limited control over the Since we have no controls and are HTML being generated by writing HTML we have control over various controls. the markup. Logic is not completely Logic is modularized in methods modularized in pages. called Action methods of the controller. Difficult to test the UI Logic MVC is designed to unit test using unit tests. every part of the application. It strongly supports the TDD approach. Doesn't support clean or search engine friendly URL's . ASP.NET 4 has the routing module or else we need to use URL rewrites. Support clean or search engine friendly URL's You can design to support the REST based resources in application

10

11

12

13

Code behind supports only one Web request finally will reach aspect of separation of the controller. Requests never concerns. reach Views. Web user cannot identify a specific view on the server. Web requests are reached directly to the intended page. Web users can identify the pages on the server. Web request finally will reach the controller. Requests never reach Views. Web user cannot identify a specific view on the server.

14

15

If you rename the web pages You don't need to change the URL, the URL is changed even if you change the Controller and the View. URLS are determined by the You have to define the URL folder structure of the pages formats which are called Routes. Framework will try to match the URL with all the defined routes in an order. Framework will hand over the request to the corresponding route Handler. Query string are used as small URLS formats drive the inputs to inputs to the pages the requests. You can also have querystrings Related Pages are separated Related Views are written under by folder controller. And for each controller we need to create a folder for all its views. We have ASP.NET AJAX Framework and AJAX server side controls to support AJAX page development MVC has some AJAX features but internally it uses the ASP.NET AJAX script libraries. So we have to manually include the libraries in the project. No support of AJAX Server side controls. There are no file extensions for MVC. If deployed in IIS7 Internally it will use the MVC UrlRoutingModule to route the request to the MVC framework.

16

17

18

19

20

File extensions in IIS are mapped to ASP.NET isapi dll and in web.config they are mapped to corresponding file HTTPHandlers.

21

All the Page requests are Each Route has the option to use a handled by PageFactory default Route handler or custom Handler. handler. So all the page requests are handled by Route handles. It's difficult to modify the It's designed to modify or replace internal behavior of the core the internal components. It ASP.NET components. supports the Plug-in structure Example: - ASPX Pages are used to render the HTML. You can configure to not to use ASP.NET pages and use different view engines. There are many view engines available in market or you can

22

create your own view engine. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-8.html

Difference Between HttpHandler and HttpModule


Difference between HttpHandler and HttpModule S.No 1 HttpHandler Meaning: An ASP.NET HTTP handler is the process (frequently referred to as the "endpoint") that runs in response to a request made to an ASP.NET Web application. The most common handler is an ASP.NET page handler that processes .aspx files. When users request an .aspx file, the request is processed by the page through the page handler. We can create our own HTTP handlers that render custom output to the browser.In order to create a Custom HTTP Handler,we need to Implement IHttpHandler interface(synchronous handler) or Implement IHttpAsyncHandler(asynchrono us handler). 2 RSS feeds: To create an RSS feed for a Web site, we can create a handler that emits RSS-formatted XML. We can then bind a file name extension such as .rss to the custom handler. When users send a request to your site that ends in .rss, ASP.NET calls our handler to process the request. Image server: If we want a Web application to serve images in a variety of sizes, we can write a custom handler to HttpModule Meaning: An HTTP module is an assembly that is called on every request that is made to our application. HTTP modules are called as part of the ASP.NET request pipeline and have access to life-cycle events throughout the request. HTTP modules examine incoming and outgoing requests and take action based on the request.

When to use HTTP modules: Security: Because we can examine incoming requests, an HTTP module can perform custom authentication or other security checks before the requested page, XML Web service, or handler is called. In Internet Information Services (IIS) 7.0 running in Integrated mode, we can extend forms authentication to all content types in an application. Statistics and logging: Because

resize images and then send them to the user as the handlers response.

HTTP modules are called on every request, we can gather request statistics and log information in a centralized module, instead of in individual pages. Custom headers or footers: Because we can modify the outgoing response, we can insert content such as custom header information into every page or XML Web service response.

How to develop an ASP.NET How to develop a Http Module: handler: All we need is implementing All we need is implementing System.Web.IHttpModule interface. IHttpHandler interface public class MyHttpModule : public class MyHandler IHttpModule :IHttpHandler { { public void Dispose() public bool IsReusable { { get { return false; } } } public void Init(HttpApplication public void context) ProcessRequest(HttpContext { context) //here we have to define handler for { events such as BeginRequest ,PreRequestHandlerExecute } ,EndRequest,AuthorizeRequest } and .... } // you need to define event handlers here }

Number of HTTP handler Number of HTTP module called: called: Whereas more than one HTTP During the processing of an modules may be called. http request, only one HTTP handler will be called. Processing Sequence: Processing Sequence:

In the asp.net request pipe line In the asp.net request pipe line, ,http handler comes after http http Module comes first.

Module and it is the end point objects in ASP.NET pipeline. 6 What it does actually? HTTP Handler actually processes the request and produces the response 7 What it does actually? HTTP module can work on request before and on the response after HTTP Handler

HTTP Handler implement Http Module implements following Methods and following Methods and Properties: Properties: Process Request: This method is called when processing asp.net requests. Here you can perform all the things related to processing request. IsReusable: This property is to determine whether same instance of HTTP Handler can be used to fulfill another request of same type. InIt: This method is used for implementing events of HTTP Modules in HTTPApplication object. Dispose: This method is used perform cleanup before Garbage Collector destroy everything.

Summary: If we need to create a request handler, for example we may want our own code to handle all .jpg image file requests like: http://mysite.com/filename.jpg, then we need to use HttpHandlers for this purpose.

Summary: If we want to modify a certain request, like we may want to perform some custom logic behind the scenes whenever user requests pages like mysite.com/default.aspx, we need to use HttpModules. We can create multiple HttpModules to filter any request.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-httphandler-and.html

ASP.NET Difference FAQs-9


1.Difference between .NET Application Development and Traditional Application Development S.No 1 .NET Application Development Using .NET Framework, your program will be compiled into an intermediate language representation called MSIL Traditional Application Development Your program will be compiled into an assembly language code that is very specific to the platform in which you are running your

(Microsoft Language). 2

Intermediate application.

MSIL code will not contain any Assembly language code will API calls specific to any contain API calls specific to the platform. current application platform. This MSIL code is then This assembly language code is converted into machine code then converted into machine code. at runtime using CLR (Common Language Runtime). Optimization is done at runtime Optimization is done by the by CLR. compiler itself at compile time. The compiler used in this The compiler is not static. It process is static meaning that performs both compilation as well it checks only for syntax and as optimization. the necessary semantics. Libraries used by your program Libraries used by your program are are linked even before linked only after generating the generating MSIL, but it is machine code. linked in an un-compiled form. This will be compiled by the compiler and it will be used by the CLR while executing the program. The program will not directly call APIs of the operating system. Instead CLR will act as a mediator. CLR will call API's of operating system and the result of execution will be returned to program. Now the program is ready for execution by the operating system. The program will directly call APIs of the operating system.

4 5

Automatic memory No automatic memory management and garbage management or garbage collection. collection is done by CLR. .NET Framework Class Library No object oriented principles are provides object oriented incorporated. libraries.

2.Difference between CSS and Themes S.No 1 2 CSS Applies to all HTML Controls Themes Applies to all the server controls

Is applied on the Client Side in Is applied on the server rather than the Browser in the browser

We can apply multiple style But we cannot apply multiple sheets to a single page themes to a single page. Only one theme we can apply for a single page. The CSS supports cascading But themes cascading does not support

4 5

The CSS cannot override the But any property values defined in property values defined for a a theme, the theme property control. overrides the property values declaratively set on a control, unless we explicitly apply by using the StyleSheetTheme property. Cannot be Applied through the Can be Applied configuration files Configuration Files. through

6 7

Can be used directly via a All theme and Skin files should be reference to the css file placed in a special Asp.net folder location called the App_Themes in order for the themes to work and behave normally. Do not require any resource like Skin files other Each theme should be associated with at least one Skin file.

8 9

In case of CSS you can define But a theme can define multiple only style properties properties of a control not just style properties such as we can specify the graphics property for a control, template layout of a GridView control etc.

3.Difference between Postback and Callback S.No 1 Postback A Postback occurs when the data (the whole page) on the page is posted from the client to the server..ie the data is posted-back to the server, and thus the page is refreshed. Callback A callback is also a special kind of postback, but it is just a quick round-trip to the server to get a small set of data(normally), and thus the page is not refreshed, unlike with the postback.

With Asp.Net, the ViewState is With Asp.Net, the ViewState is not refreshed when a postback is refreshed when a callback is invoked. invoked.

A postback occurs when a request is sent from the client to the server for the same page as the one the user is currently viewing. When a postback occurs, the entire page is refreshed and you can see the typical progression on the progress bar at the bottom of the browser.

A callback, generally used with AJAX, occurs when a request is sent from the client to the server for which the page is not refreshed, only a part of it is updated without any flickering occurring on the browser.

4.Difference between Session.Clear() and Session.Abandon() S.No 1 Session.Clear() Session.Clear() just removes all values (content) from the Object. The session with the same key is still alive.It is just like giving value null to this session. Use Session.Clear(), if we want user to remain in the same session and we don not want user to relogin or reset all his session specific data. Session.Abandon() Session.Abandon() destroys the session and the Session_End event is triggered and in the next request, Session_Start will be fired.

So, if we use Session.Abandon(), we wil lose that specific session and we will get a new session key. We could use it for example when the user logs out.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-9.html

Difference between ASP.Net 2.0 and ASP.Net 3.5


Difference between ASP.Net 2.0 and ASP.Net 3.5 SNo 1 Feature New Features ASP.Net 2.0 ASP.Net 2.0 includes the following as new features, 1. Master Pages 2. Profiles 3. GridView Control ASP.Net 3.5 ASP.Net 3.5 includes the following as new features, 1. 2. 3. 4. ListView Control DataPager Control Nested Master Pages LinqDataSource Control

Multi-targeting

ASP.Net 2.0 does not support Multi-Targeting environment.

ASP.Net 3.5 supports multitargeting. It means that we choose from a drop-down list whether to have Visual Studio 2008 build applications against the ASP.NET 2.0, 3.0, or 3.5

frameworks. 3 AJAX Support There is no in-built support for AJAX in ASP.Net 2.0. Instead, it has to be downloaded and installed. It does not support Siverlight. It does not provide Javascript debugging. It does not support LINQ. In ASP.Net 3.5, AJAX is integrated into the .NET Framework, thereby making the process of building intuitive cool user interfaces easier. It supports Siverlight. It provides Javascript debugging. It Supports Language Integrated Query (LINQ).

4 5 6

Siverlight Support Javascript Debugging LINQ Support

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/difference-between-aspnet-20-andaspnet.html

ASP.NET Difference FAQs-10


1.Difference between Invoke() and BeginInvoke() S.No 1 Invoke() Delegate.Invoke: Executes synchronously, the same thread. 2 Control.Invoke: BeginInvoke() Delegate.BeginInvoke: on Executes asynchronously, on a threadpool thread. Control.BeginInvoke:

Executes on the UI thread, but Executes on the UI thread, and calling thread waits for calling thread doesnt wait for completion before continuing. completion. 2.Difference between Build and Release S.No 1 Build Release

BUILD is still running in testing RELEASE is no longer with testing that is released to testers for and release to Customers/Clients. testing BUILD occur more frequently RELEASE occur less frequently. of

2 3

BUILD is process of converting RELEASE is a process source code in to executable delivering the project to client code (.exe)

3.Difference between Windows forms and Web forms S.No 1 Windows forms Web forms

They do not need a web They need a web browser as well browser or web server to as a web server(on the server execute. machine only). They execute through their They execute through the dll of the respective exe files web application which is then processed by IIS and the .net framework. They run on the same machine They run on a remote server and they are displayed on. are displayed remotely on the clients Their single instance exists Every time they are submitted, their until we close them or dispose new instance is created. them through coding Used for developing games, Used in web site development. inventory management, system utiltites etc. They run under Code Access They use role based security Security.

4.Difference between Master Page and Content Page in ASP.NET S.No 1 Master Page Content Page

Files with .Master extension. Files with .aspx extension. Introduced in ASP.NET 2.0. Example: Example: Code file: .aspx.cs or .aspx.vb code file: .master.cs or .master.cs extension These have a control known as the Content Placeholder which reserves a storage location in which we can place the contents of a .aspx page. The common part for the .aspx pages will be outside the Content Placeholder two Content Placeholders are by default, but we can increase or decrease the Content Placeholders as per our needs. These do not have any Content Placeholder control which makes it somewhat difficult in providing proper layout and alignment for large designs.

MasterPageFile attribute is Register Tag is added when we added in the Page directive of drag and drop a user control onto the .aspx page when a Master the .aspx page. Page is referenced in .aspx page. The .aspx page that uses the Master page i known as Content Page. Can be referenced using Web.Config file also or dynamically by writing code in PreInit event. Can be attached dynamically using Load Control method. PreInit event is not mandatory in their case for dynamic attachment.

More suitable for large Suitable for small designs(Ex:1) designs(ex: defining the logout button on every .aspx page. complete layout of .aspx page)

Sample Code For Master Page <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder> </head> <body> <form id="form1" runat="server"> <div> <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </form> </body> </html> Sample Code For Content Page <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

</asp:Content> Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-10.html

ASP.Net Difference FAQs-11


1.Difference between XML Serialization and Binary Serialization S.No 1 2 3 XML Serialization Binary Serialization (SOAP)

No need of Serializable Need Serializable attribute attribute on the class Only public serialized members are All members are serialized unless specified as NonSerializable

Class should have default No need of default constructor or public constructor and class public access itself should have public access. Namespace: System.XML.Serialization Outputfile is XML Namespace: System.Runtime.Serialization.Form atteres.Binary (.Soap) Outputfile is Binary or XML for SOAP formatter

5 6

XMLSerializer need type of No need to specify type of object to object to be serialized or be serialized or deserialized. deserialized Support only Binaryformatter support binary IDesrializationCallback events. Soap formatter supports interface. No support for binary only IDeserializationCallback events. interface

2.Difference between CurrentCulture and CurrentUICulture S.No 1 CurrentCulture CurrentCulture property affects how the .NET Framework handles regional options (dates, currencies, sorting, formatting, etc.) for the current user.i.e., it provides cultural context for formatting and parsing (for ex. to parse dates or numbers) A date is often written like '10/30/2000' by Americans, but '30/10/2000' by Irish people, and 30.10.2000 CurrentUICulture CurrentUICulture property determines which satellite assembly is used when loading resources and reflects the UI language for the current user.i.e., it provides the cultural context for localization, i.e. translation of resources.

by Germans etc. 2 CurrentCulture does not CurrentUICulture supports neutral support neutral cultures (i.e. cultures (i.e. "en", "fr" ...) "en", "fr" ...). It is always a specific culture (i.e. "en-GB", "de-AT", "pt-BR")

Example for CurrentCulture - To parse the date in asp.net: using System.Threading; using System.Globalization; DateTime dt; // this is a British English date format string dateStr = "31/10/2001"; // parse it with British English culture Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB"); bool parseOk = DateTime.TryParse(dateStr, out dt); // parseOk: true -- dt: {31/10/2001 00:00:00} Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); parseOk = DateTime.TryParse(dateStr, out dt); // parseOk: false-- dt: {1/1/0001 12:00:00 AM} ... Example for CurrentUICulture - To get the resources in asp.net: using System.Threading; using System.Globalization; string culture = "en"; Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture); string hello = (string)HttpContext.GetGlobalResourceObject("myClassKey", "myResourceKey"); // and now French string culture = "fr"; Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture); string hello = (string)HttpContext.GetGlobalResourceObject("myClassKey", "myResourceKey"); ... 3.Difference between Forms Authentication and Windows Authentication S.No 1 Forms Authentication Forms authentication enables us to identify users with a custom database, such as an ASP.NET membership database. Alternatively, we can implement our own custom database. Once authenticated, Windows Authentication Windows authentication enables us to identify users without creating a custom page. Credentials are stored in the Web servers local user database or an Active Directory domain. Once identified, we can use the users credentials to

we can reference the roles the gain access to resources that are user is in to restrict access to protected by Windows portions of our Web site. authorization. 2 Form authentication is Windows authentication is best preferable for the applications suited for the application which is which have diversified users meant for a corporate users from several places. In case of form authentication, User lists for windows lists are there in 'credential' authentication are found in element of web.config file. 'authorization' element There is no such classification There are four different kinds of available in Forms Windows authentication options authentication. available that can be configured in IIS 1)Integrated Windows authentication 2) Basic and basic with SSL authentication 3) Digest authentication 4) Client Certificate authentication

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-11.html

Difference Between CTS and CLS


Difference between CTS and CLS S.No 1 CTS Abbreviation: CLS Abbreviation:

CTS stands for Common Type CLS stands for Common Language System Specification 2 It describes how types are declared, used and managed in the runtime and facilitates cross-language integration, type safety, and high performance code execution. The types defined by the CTS are broadly classified into value types and reference types. Value types are those which themselves contain data/methods/resources represented by the type - like Meaning: It is a specification that defines the rules to support language integration in such a way that programs written in any language, yet can interoperate with one another, taking full advantage of inheritance, polymorphism, exceptions, and other features. These rules and the specification are documented in the ECMA proposed standard document.

an integer variable is a value type. Reference types are those which refer to value types and a pointer or a reference is an example of such a type. All types derive from 'System.Object' base type. 3 Power of CTS: Power of CLS:

CTS is a superset of the CLS is a subset of the CTS which CLS,i.e.,all .NET languages all .NET languages are expected to will not support all the types in support. the CTS. 4 Example: Integer datatype in VB and int datatype in C++ are not compatible, so the interfacing between them is very complicated. In order that two different languages can communicate, Integer in VB6 and int in C++ will convert to System.int32 which is datatype of CTS. (or) In c#, we will declare int i; In vb, we will declare dim i as integer Basically Microsoft will convert all this data types to the generic data types. So, if we write code in different languages that will convert into language independent code. This is called Common type system(CTS). Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-cts-and-cls.html Example: A class written in C# can inherit from a class written in VB. So we can say that using this specification (CLSCompliant attribute) in our programs (written in any language), the type is forced to conform to the rules of CLS and programs can interoperate with one another, taking full advantage of polymorphism, inheritance and other features.

Difference between OLEDB Provider and SqlClient


S.No 1 OLEDB Provider SqlClient

OLEDB Provider is slower than The SqlClient data provider is faster than the Oracle provider, and SqlClient data provider even more faster than accessing database through the OLEDB layer. Reason for being faster is, it access the native library which generally gives us a better performance and it has also got a lot of support from SQL Server team online.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-oledb-providerand.html

Difference between Two Tier and Three tier Architecture


S.No 1 2 Two-tier Architecture Client -Server Architecture Client will hit request directly to server and client will get response directly from server Three -tier Architecture Web -based application Here in between client and server middle ware will be there, if client hits a request it will go to the middle ware and middle ware will send to server and vice versa. 3-tier means 1) Design layer 2) Business layer or Logic layer 3) Data layer

2-tier means 1) Design layer 2) Data layer

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-two-tier-andthree.html

Difference between Pre-Render and Render events in ASP.NET page execution


S.No 1 Pre-Render This event is used for modifying server controls just before sending them to client. Render This event is used to put the HTML output to the response stream

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-pre-render-and.html

Difference between Response.TransmitFile and Response.WriteFile


S.No 1 Response.TransmitFile It sends the file to the client without loading it to the Application memory on the server. It is the ideal for if the file size being download is large. Response.WriteFile It loads the file being download to the servers memory before sending it to the client. If the file size is large, the ASPNET worker process might be get restarted.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-betweenresponsetransmitfile.html

Difference between Layer and Tier


Difference between Layer and Tier S.No 1 Layer It refers to the separation of the logic (i.e the code and design) that is developed for an application in different files. Tier It refers to the physical location of the Layer files.

Example: In an ASP.NET web site, we create GUI web forms, business logic , data access logic, database all in one computer. In this case, we have 4 layers and 1 Tier. if the GUI Web Forms,business logic, data access logic and database are all in different computers, we have 4 layers and 4 Tiers. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-layer-and-tier.html

Difference between Response.Write and Response.Output.Write


Difference between Response.Write and Response.Output.Write S.No 1 Response.Write Response.Output.Write

Response.Write does not allow Response.Output.Write allows us us to write a more formatted to write a more formatted output. output. As per ASP.NET 3.5, Response.Write has 4 overloads Response.Output.Write has 17 overloads.

Example-1: To write integer,double, boolean values using Response.Write, we are provided with one overloaded version:-> Response.Write(object obj);

To do the same thing using Response.Output.Write, we are provided with separate overloaded versions : ex:1) Response.Output.Write(int s); 2) Response.Output.Write(double s); 3) Response.Output.Write(bool b); Example-2: Response.Output.Write("hello {0}", "asp.net"); //It is Ok But, Response.Write("hello {0}","asp.net"); //It is wrong Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-responsewriteand.html

Difference between Response.Write() and Response.WriteFile()


Difference between Response.Write() and Response.WriteFile() S.No 1 Response.Write() It writes information to the Http Response and can be used to display strings in the output. Example: Response.Write("welcome"); Response.WriteFile() It writes the specified file directly to an HTTP response output stream. Example: Response.WriteFile("demo.txt");

Response: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-responsewriteand_23.html

ASP.Net Difference FAQs-12


1.Difference between .NET 1.1 and 2.0 S.No 1 .NET 1.1 Support for application: No Generics: No SQL cache dependency: No Master pages: No Membership and roles: No 64 .NET 2.0 bit Support for 64 bit application: Yes Generics: Yes SQL cache dependency: Yes Master pages: Yes Membership and roles: Yes

2 3 4 5

2.Difference between .NET 2.0 and 3.0 S.No 1 2 3 4 .NET 2.0 WCF: No WPF: No WWF: No WCS ( card space) : No .NET 3.0 WCF: Yes WPF: Yes WWF: Yes WCS ( card space) : Yes

3.Difference between .NET 3.0 and 3.5 S.No 1 2 3 4 5 .NET 3.0 LINQ : No Ajax inbuilt: No ADO Entity framework: No ADO data services: No Multi targeting: No .NET 3.5 LINQ : Yes Ajax inbuilt: Yes ADO Entity framework: Yes ADO data services: Yes Multi targeting: Yes

4.Difference between .NET 3.5 and 4.0 S.No 1 2 3 4 5 6 .NET 3.5 MEF : No Parallel computing: No DLR dynamic: No Code contract : No Language runtime: No Lazy initialization: No .NET 4.0 MEF : Yes Parallel computing: Yes DLR dynamic: Yes Code contract : Yes Language runtime: Yes Lazy initialization: Yes

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-12.html

Difference between lock and Monitor.Enter()


Difference between lock and Monitor.Enter() S.No 1 lock lock keyword basically provides a shortcut to Enter method of Monitor class. Monitor.Enter() Monitor is used to provide thread synchronization.It means till the Thread in which the method is being used finishes its task, no other thread can access the object.

Example: lock (object) { } It is compiled into Monitor.Enter(object); try { //code } finally { Monitor.Exit(object); } Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-lock-andmonitorenter.html

Difference between Encoding and Encryption


Difference between Encoding and Encryption S.No 1 Encoding Purpose: The purpose of encoding is to transform data so that it can be properly (and safely) consumed by a different type of system. For maintaining data usability i.e.,to ensure that it is able to Encryption Purpose: The purpose of encryption is to transform data in order to keep it secret from others.

Used for: For maintaining data confidentiality

be properly consumed.

i.e., to ensure the data cannot be consumed by anyone other than the intended recipient(s). Data Retrieval Mechanism: Original data can be obtained if we know the key and encryption algorithm used. Algorithms Used: AES, Blowfish, RSA Example: Sending someone a secret letter that only they should be able to read, or securely sending a password over the Internet.

Data Retrieval Mechanism: No key and can be easily reversed provided we know what algorithm was used in encoding. Algorithms Used: ASCII, Unicode, URL Encoding, Base64 Example: Binary data being sent over email, or viewing special characters on a web page.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-encoding-and.html

DataReader vs DataSet vs DataAdapter


Difference between DataReader,DataSet and DataAdapter S.No 1 2 DataReader Database Connecting Mode: Connected mode Data Navigation: Unidirectional i.e., Forward Only Read / Write: Only Read operation can be carried out. Data Handling: Handles Database table Storage Capacity : No storage Accessibility : Can access one table at a time DataSet / DataAdapter Database Connecting Mode: Disconnected mode Data Navigation: Bidirectional i.e., data can navigate back and forth Read / Write: Both Read and Write operations are possible Data Handling: Handles text file, XML file and Database table Storage Capacity : Temporary Storage Capacity i.e., in-memory cache of data Accessibility : Can access multiple table at a time

Speed: Much faster than DataSet

Speed: Less faster than data reader

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-betweendatareaderdataset.html

DataTable vs DataSet
Difference between DataTable and DataSet S.No 1 DataTable Meaning: A DataTable is an in-memory representation of a single database table which has collection of rows and columns. Number of rows retrieved at a time: DataTable fetches only one TableRow at a time Provision of DataRelation Objects: As DataTable is a single database table, so there is no DataRelation object in it. Enforcing Data Integrity: In DataTable, there is no UniqueConstraint and ForeignKeyConstraint objects available. DataSource can be Serialized or Not: In DataTable, DataSource cannot be serialized. DataSet Meaning: A DataSet is an in-memory representation of a database-like structure which has collection of DataTables. Number of rows retrieved at a time: DataSet can fetch multiple TableRows at a time Provision of DataRelation Objects: In DataSet, DataTable objects can be related to each other with DataRelation objects. Enforcing Data Integrity: In DataSet, data integrity is enforced by using the UniqueConstraint and ForeignKeyConstraint objects. DataSource can be Serialized or Not: DataSet is serialized DataSource .That is why web services can always returns DataSet as the result but not the DataTables.

Example for DataTable: sqldataadapter da = new SqlDataAdater("select * from Employee", con); DataTable dt = new DataTable();

da.Fill(dt); datagridview1.DataSource = dt; Example for DataTable: sqldataadapter da= new SqlDataAdater("select * from Employee", con); DataSet ds = new DataSet(); da.Fill(ds); datagridview1.DataSource = ds.table[0]; Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-datatable-anddataset.html

Difference between div and table


Difference between div and table S.No 1 Div Purpose: To display block of HTML and data Layout / Type: DIV is floating type and can divide our webpage into multiple divisions..So,Divs are more flexible--as they do not strict to tabular layouts. Search Engine Friendly: Div is better for SEO Loading Time: The loading time of DIV based website is faster than Table based website. Website Alignment: In DIV,we can control the website alignment by CSS which is comparatively easier than table Table Purpose: To display Text and in fewer cases images as well. Layout / Type: Table is Fixed type and consists of table rows(tr), table data(td),table header(th). .So,tables are strict for those layouts which are more tabular. Search Engine Friendly: Table is not Search engine friendly Loading Time: The loading time of table based website is not faster than DIV based website. Website Alignment: Table does not make use of CSS, hence website alignment is comparatively difficult

3 4

Website Changes: Website Changes: In Div, designers can make a In table, designers cannot make a single change to the CSS and single change as like DIV it will modify the entire website. Does CSS Knowledge required ?For Div based layout, we should have knowledge about CSS. Otherwise, we cannot control Does CSS Knowledge required ? Table based website does not require CSS Knowledge in oder to control the website errors

the Div based website errors. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-div-and-table.html

RegisterClientScriptBlock vs RegisterStartupScript
Difference between Page.RegisterClientScriptBlock and Page.RegisterStartupScript S.No 1 Page.RegisterClientScriptBlock RegisterClientScriptBlock places the script at the top of the page right after the starting 'form' tag . The code cannot access any of the form's elements because, at that time, the elements have not been instantiated yet. RegisterClientScriptBlock is meant for functions that should be "available" to the page. For this they are rendered at the start of the HTML file. In this case the page content will be blocked. Page.RegisterStartupScript RegisterStartupScript places the script at bottom of page right before the ending 'form' tag. The code can access any of the form's elements because, at that time, the elements have been instantiated. RegisterStartupScript is meant for commands that should execute on page load (at the client), so that page needs to be available for the script. This script is rendered at the end of the HTML file. In this case the content of the page will be diplayed first and then script will run.

Example for RegisterStartupScript: if (!Page.IsStartupScriptRegistered("CH")) Page.RegisterStartupScript("CH", "script goes here"); Example for RegisterClientScriptBlock: if (!Page.IsClientScriptBlockRegistered("CH")) Page.RegisterClientScriptBlock("CH", "script goes here"); Note: The choice of which method to use really depends on the "order" in which we want our script to be run by the browser when rendering the page. Take an example of a javascript function that populates a Textbox using a javascript function when a page is loaded. If we use the RegisterClientScriptBlock method, the

javascript function will give an error. This is because our script is placed at the top of the page when it was loaded (when the textbox was not even created). So how can it find the textbox and populate the values. So in this case RegisterStartupscript should be used. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-betweenpageregisterclientsc.html

UniqueID vs ClientID
Difference between UniqueID and ClientID S.No 1 UniqueID Meaning: UniqueID is also a uniquely identifiable ID for a control but only used by ASP.Net page framework to identify the control. i.e., UniqueID = HTML's name attribute 2 Delimiter used: It uses $ to include parent controls (container) ID to make it unique. Delimiter used: It uses _ to include parent controls (container) ID to make it unique. ClientID Meaning: ClientID is a unique ID string that is rendered to the client to identify the control in the output HTML. i.e., ClientID = HTML's id attribute

For example, For example, ct100_ContentPlaceHolder1_txtLo ct100$ContentPlaceHolder1$tx gin. tLogin 3 UniqueID Generation: Similar to ClientID, UniqueID is also generated by appending the parent container's(parent control) ID with the original control id but with $ delimiter ClientID Generation: The client id for control will be generated by appending the parent container's(parent control) ID with the original control id with "_" as delimeter. In our example, ContentPlaceHolder1 is the ContentPlaceHolder ID of the master page which is the parent container for txtLogin. How to get CientID of a control ? For example, use txtLogin.ClientID for ct100_ContentPlaceHolder1_txtLo gin.

How to get UniqueID of a control ? For example, use txtLogin.UniqueID for ct100$ContentPlaceHolder1$tx tLogin

Where to use ? The unique id is used by the ASP.NET framework to identify the control when the page is posted back to the server. i.e., UniqueID is used for server-side

Where to use ? The client id can be used to identify the control in client side scripting like javascript. i.e., ClientID is used for client-side

Note: ClientID = HTML's id attribute and so when doing getElementById, we should always give the ClientId. Instead, if we give UniqueID i.e., getElementById(Element's name), FireFox will fail. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-uniqueid-andclientid.html

PlaceHolder vs ContentPlaceHolder
Difference between PlaceHolder and ContentPlaceHolder S.No 1 PlaceHolder A PlaceHolder control is used as a container for any controls we wish to add and can be used on any page. ContentPlaceHolder A ContentPlaceHolder is used to hold content from Content Pages and can only be used on a Master Page.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-placeholder-and.html

Panel vs PlaceHolder
Difference between Panel and PlaceHolder S.No 1 Panel What tag rendered in output ? Panel will render Div tags in the brower Does it provide Styling Attributes ? Panel have the styling capabilites, so we can set the cssclass or style properties such as background-color, forecolor etc.. PlaceHolder What tag rendered in output ? PlaceHolder will not render any tags Does it provide Styling Attributes ? Placeholder does not have any style attributes associated. We can not set cssclass or forecolor etc...

Automatic Width Adjustment: Panel cannot adjust width automatically if controls are added in it. Memory Size: Panel is heavy in memory size as compare to PlaceHolder When to use ? If we want to use it to separate controls visually, then we have to use Panel control.

Automatic Width Adjustment: PlaceHolder can adjust width automatically if controls are added in it. Memory Size:PlaceHolder is light in memory size as compare to Panel. When to use ? If we just want a container, without all the Display properties, then we have to use PlaceHolder control.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-panel-andplaceholder.html

Difference between URL and URI


Difference between a URL and a URI S.No 1 2 URL URL stands for Uniform Resource Locator URL is a subset of URI that specifies where an identified resource is available and the mechanism for retrieving it.Meachanism actually means one of the potocol schemes (e.g., http, ftp, file, mailto) provided by URI. URI URI stands for Uniform Resource Identifier A URI is a superset of URL that identifies a resource either by location (URL), or a name(URN), or both (URL and URN).

Examples for URL: http:/www.dotnetfunda.com/users/login.aspx Here, http is the protocol, dotnetfunda.com is the domain name, users is the folder name, login.aspx is the filename http://dotnetfunda.com/articles/default.aspx Here http is the protocol, dotnetfunda.com is the domain name, articles is the folder name and default.aspx is the file name Examples for URI: www.dotnetfunda.com /some/page.html

Summary: 1. 2. 3. 4. 5. 6. 7. A URI is either a URL or a URN. Every URL is a URI. Every URN is a URI. A URN is never a URL. A URL is never a URN. Every URI is not a URL If the URL describes both the location and name of a resource, the term to use is URI. Since this is generally the case most of us encounter everyday, URI is the correct term.

Here, URI --> A Uniform Resource Identifier(URI) is used to identify something on the World Wide Web. URN --> Uniform Resource Name (URN), a type of URI, basically states what something is, but do not have information on how to access it. URL --> Uniform Resource Locator (URL), a type of URI, contains the location of something and tell the client program (usually a browser) how to access it. Simply put, a URN is the name of something and the URL is the name and address. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-url-and-uri.html

ASP Session vs ASP.NET Session


Difference between ASP Session and ASP.NET Session S.No 1 ASP Session Session type support: As ASP only supports InProc Session, so it cannot span across multiple servers. Process dependency: In ASP, the session is Process dependent i.e., ASP session state is dependent on IIS process very heavily. So if IIS restarts ASP session variables are also recycled. Cookie dependency: In ASP, the session is Cookie dependent i.e., ASP session ASP.NET Session Session type support: ASP.NET supports both InProc and OutProc (StateServer and SQLServer) Sessions.Hence, it can span across multiple servers. Process dependency: In Asp.Net, the session is Process independent i.e., ASP.NET session can be independent of the hosting environment thus ASP.NET session can maintained even if IIS reboots.

Cookie dependency: As ASP.NET supports Cookieless session, so the session in ASP.NET

only functions when browser supports cookies.

is Cookie independent.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-asp-session-and.html

Authentication vs Authorization
Difference between Authentication and Authorization in ASP.NET S.No 1 Authentication Meaning: Authentication is the process of verifying the identity of a user. Example: Suppose, we have 2 types of users ( normal and admins ) to a website. When the user tries to access the website, we ask them to log in. This is authentication part. Types of Authentication: Windows Authentication Forms Authentication Passport Authentication Whent it takes place ? Authentication always precedes to Authorization,event if our application lets anonymous users connect and use the application,it still authenticates them as anonymous. Authorization Meaning: Authorization is process of checking whether the user has access rights to the system. Example: Once we know the user is valid, then we determine to which pages the user has access to. Normal users should not be able to access admin pages. This is authorization part. Types of Authorization: ACL authorization (also known as file authorization) URL authorization Whent it takes place ? Authorization takes place after Authentication

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-authenticationand.html

EnableViewState vs ViewStateMode
Difference between EnableViewState and ViewStateMode properties S.No 1 EnableViewState EnableViewState exists from a long time ViewStateMode Property Introduction: ViewStateMode property is

introduced in ASP.NET 4 2 Available Values: EnableViewState property only accepts true or false values Default Value: True What EnableViewState does ? To enable ViewState at Page level How to use ? Using EnableViewState property we can have one of these 2 options. i. We can turn off view state altogether by setting its value to false in web.config file,or ii.Enable viewstate for the entire page and then turn it off on a control-by-control basis. Available Values: ViewStateMode property can have a value of - Enabled, Disabled and inherit. Default Value: Inherit What ViewStateMode does ? To enable ViewState at Control level How to use ? Steps involved to disable view state for a page and to enable it for a specific control on the page, i. Set the EnableViewState property of the page and the control to true, ii. Set the ViewStateMode property of the page to Disabled, and iii. Set the ViewStateMode property of the control to Enabled.

3 4

Summary: 1. If EnableViewState is to True, only then the ViewStateMode settings are applied. 2. In other words, if EnableViewState is set to False, ViewStateMode setting is not respected 3. Therefore, we have to use ViewStateMode property in conjunction with EnableViewState. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-enableviewstateand.html

Grid Layout vs Form Layout


Difference between Grid Layout and Form Layout S.No 1 Grid Layout In Grid layout, controls are displayed in the grid format. Grid layout can be used for Microsoft Windowsstyle Flow Layout In Flow layout, controls are arranged in the order in which they are created. Flow layout can be used for document-style applications, in

applications, in which controls are not mixed with large amounts of text. 3 When we create controls with GridLayout, Visual Studio adds style attributes to each control that set the position of the control In Grid layout, if we look in to the HTML code created by absolute positioning we can notice only lots of DIV tags.So,pages using grid layout will not always display correctly in non-Microsoft browsers.

which text and controls are intermingled. When we create controls with FlowLayout, Visual Studio omits the style attribute.

In Flow layout ,we can see more of using HTML table to position elements which is compatible with wide range of browsers.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-grid-layout-andform.html

Difference between Synchronous and Asynchronous HTTP Handlers


Difference between Synchronous and Asynchronous HTTP Handlers S.No 1 Synchronous HTTP Handlers Asynchronous HTTP Handlers Meaning: A synchronous handler does not return until it finishes processing the HTTP request for which it is called. Which Interface to implement? IHttpHandler interface has to be implemented in oder to create a synchronous handler. Whent to use? Synchronous handlers are useful when we must start an application process that might not be lengthy and the user has to wait until it finishes before receiving a response from the server. Meaning: An asynchronous handler runs a process independently of sending a response to the user. Which Interface to implement: IHttpAsyncHandler interface has to be implemented in order to create an asynchronous handler. When to use? Asynchronous handlers are useful when we must start an application process that might be lengthy and the user does not have to wait until it finishes before receiving a response from the server.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-synchronousand.html

Difference between Asynchronous and Synchronous Postback


Difference between Asynchronous and Synchronous Postback S.No 1 Asynchronous Postback Asynchronous postback renders only the required part of the page Asynchronous postback executes only one postback at a time, that is, if we have two buttons doing asynchronous postback, the actions will be performed one by one. Asynchronous postback only modifies the update panel that raises the postback. Synchronous Postback Synchronous postback renders the entire page for any postback. Synchronous postback executes all the actions at once.

Synchronous postback modifies the entire page.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-asynchronousand.html

Server.Transfer vs Cross-page Posting


Difference Between Server.Transfer and Cross-page Posting S.No 1 Server.Transfer Cross-page Posting

URL changes or not: URL changes or not: In Server.Transfer, the URL In cross page posting, the form is does not change . submitted to a different page, thereby it changes the url. Is it Client-based / Serverbased operation ? Server.Transfer method is a server-based operation. IsCrossPagePostBack property available or not: There is no such property available in Server.Transfer method. Is it Client-based / Server-based operation ? Cross-page postback is a clientbased transfer. IsCrossPagePostBack property available or not: It is easy to determine whether the page was invoked from a crosspage posting or a Server.Transfer operation, by checking the property named IsCrossPagePostBack of the Page class.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-servertransferand.html

RDF vs OData vs GData


Difference between RDF, OData and GData RDF OData GData

Abbreviation: Abbreviation: Abbreviation: RDF stands for Resource OData stands for Open GData stands for Google Description Framework Data Protocol Data Protocol Meaning: RDF is a framework which follows W3C technology for representing information in the Web. The design of RDF is intended to meet the following goals: i.having a simple data model ii.having formal semantics and provable inference iii.using an extensible URI-based vocabulary iv.using an XML-based syntax v.supporting use of XML schema datatypes vi.allowing anyone to make statements about any resource It is used in Mozilla to integrate and aggregate Internet resources. Mozilla RDF was originally used to support the Aurora/Sidebar user interface and SmartBrowsing metadata services. It's main use in Mozilla now is as a common data model and API for use in XUL-based applications Meaning: The Open Data Protocol (OData) is an open web protocol for querying and updating data. The protocol allows for a consumer to query a datasource over the HTTP protocol and get the result back in formats like Atom, JSON or plain XML, including pagination, ordering or filtering of the data. Many of the building blocks that make up OData are standardized via Atom and AtomPub. The OData specification is available under the Microsoft Open Specification Promise (OSP). Microsoft has released an OData software development kit (SDK) consisting of libraries for .NET, PHP, Java, JavaScript, webOS, and the iPhone. Meaning: Gdata provides a simple protocol for reading and writing data on the Internet, designed by Google. GData combines common XML-based syndication formats (Atom and RSS) with a feedpublishing system based on the Atom Publishing Protocol, plus some extensions for handling queries. It relies on XML or JSON as a data format. Google provides GData client libraries for Java, JavaScript, .NET, PHP, Python, and Objective-C.

Logical Model: Graph/EAV.Technology grounding (esp OWL ) in Description Logic.[12, 13]. Open World Assumption [27]

Logical Model: Graph/EAV. AtomPub and EDM grounding in entity relationship modelling [11]. Closed World Assumption[28] view (?) but with OpenTypes and Dynamic Properties[29]

Logical Model: Unclear/Mixed whatever google logical Model is behind services, but transcoded and exposed as AtomPub/JSON. Data relations and graphs not controllable by API eg cannot define a link between data elements that doesnt already exist. GData is primarily a client API. Physical model: Google applications and services publishing data in AtomPub/JSON format, with Google Data Namespace[58] element.

Physical model: Not mandated, but probably backed by a triple store and serialised over Http to RDF/XML, Json,TTL, N3 or other format. RDBMS backing or proxying possible.

Physical model: Not mandated, but probably backed by existing RDBMS persistence [4 "Abstract Data Model"], or more precisely a nontriple store. (I have no evidence to support this, but the gist of docs and examples suggests it as a typical use case) and serialised over Http with Atom/JSON according to Entity Data Model (EDM) [6] and Conceptual Schema Definition Language (CSDL)[11] Intent: Data publishing and syndication : "There is a vast amount of data available today and data is now being collected and stored at a rate never seen before. Much, if not most, of this data however is locked into specific applications or formats and difficult to access or to integrate into new uses"

Intent: Data syndication and web level linking : "The goal of the W3C SWEO Linking Open Data community project is to extend the Web with a data commons by publishing various open data sets as RDF on the Web and by setting RDF links between data items from different data sources"

Intent: Google cloud data publishing [55] : "The Google Data Protocol provides a secure means for external developers to write new applications that let end users access and update the data stored by many Google products.External developers can use the Google Data Protocol directly, or they can use any of the supported programming languages provided by the client libraries"

Protocol,operations: http, content negotiation, RDF, REST-GET. Sparql 1.1 for update Openness/Extensibility: Any and all,create your own ontology/namespace/URI s with RDFS/OWL/SKOS/, large opensource tooling & community, multiple serialisation RDF/XML,JSON, N3, TTL,

Protocol,operations: Protocol,operations: http, content negotiation, http,REST (PUT/POST? AtomPub/JSON, REST- GET/PATCH/DELETE)[56] GET/PUT/POST/DELET E [9] Openness/Extensibility Openness/Extensibility: : Google applications and Any and all (with a services only. legacy Microsoft base), while reuse Microsoft classes and types,namespaces (EDM)[6] with Atom/JSON serialisation. Large microsoft tooling and integration with others following.[7,8] URI minting,dereferencing : Unclear whether concept URI and Location URI are distinguished in specification -values can certainly be Location URIs, and IDs can be URIs, but attribute properties arent dereferencible to Location URIs.Well specified URI conventions [21] Linking,matching, equivalence: Navigation properties link entity elements within a single OData materialisation -external linkage not possible. Dereferencable attribute properties not possible but proposed[10]. Namespace handling, vocabularies: Namespaces supported in EDM but unclear if possible to create and URI minting,dereferencing : Atom namespace. <link rel=self /> denotes URI of item. ETags also used for versioned updates. Google Data namespace for content Kinds.[59], no dereferencing.

URI minting,dereferencing : Create your own URIs and namespaces following guidelines (slash vs hash) [15,16] Subject, predicate and object URIs must be dereferencible, content negotiation expected. Separation of concept URI and location URI central.

Linking, matching, equivalence: External entities can inherently be directly linked by reference, and equivalence is possible with owl:sameAs, owl:seeAlso (and other equivalence assertions) Namespace handling, vocabularies: Declare namespaces as required when importing public or well known

Linking,matching, equivalence: URIS Not dereferencable, linkage outside of google not possible.

Namespace handling, vocabularies: AtomPub and Google Data namespace only.

ontologies/vocabularies, creating SPARQL queries, short hand URIs,create new as required for your own custom classes, instances.

use namespace,or if it can be backed with a custom class/property definition (ontology). $metadata seems to separate logically and physically type and service metadata from instance data ie oData doesnt eat its own dog food. Content negotiation: Client specifies or server fails, or default to Atom representation.[19]. Only XML serialisation for service metadata.[40]. New mime-types introduced. Content negotiation: Use alt query param (accept-header not used) [57]

Content negotiation: Client and server negotiate content to best determination.[17,18]

Query capability : Dereferencibility central principle to linked data, whether in document, local endpoint or federated. SPARQL [14] query language allows suitably equipped endpoints to service structured query requests and return serialised RDF, json, csv, html, Security, privacy, provenance: No additional specifications above that supplied in web/http architecture. CORS becoming popular as access filter method for cross-site syndication capability at client level. Server side access control. Standards for Provenance and privacy planned and under development[24]. W3C XG provenance group[25]

Query capability : Query capability : Proposed dereferencible Query URIs with special author,category,fields. $metadata path element allow type metadata to be retrieved [10]. Running a structured query against an OData service with something like SPARQL isnt possible. Security, privacy, provenance: No additional specifications above that mandated in http/atom/json.[23, 31] CORS use possible for cross site syndication. Dallas/Azure Datamarket for trusted commercial and premium public domain data.[26]

by

Security, privacy, provenance: Http wire protocols, but in addition authentication (OpenID) and authorization are required(OAuth). ClientLogin and AuthSub are deprecated. [60]. No provenance handling.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-rdf-odata-andgdata.html

Static vs Non-static Members


Difference between Static Members and Non-static Members in Asp.Net S.No 1 Static Members Non-static Members

How they are binded ? How they are binded ? These members are binded to These members are binded to the the class definition itself. object defined for the class. When they are loaded ? These members will be loaded into memory when ever the class has been loaded . When they are loaded ? These members will be loaded into memory every time a new object is defined for the class.

Where they are referenced ? Where they are referenced ? These members are These members are referenced referenced with the class name with object definition only. only.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-static-membersand.html

JQGrid vs FlexGrid vs DataTables


Difference between JQGrid,FlexGrid and DataTables (OR) Compare jQuery grid and table plugins

JQGrid Data format : JSON, XML Sorting: Server-side (SQL 'ORDER BY'). Multicolumn sorting supported. Pagination: JSON/XML (server-side) User/Auto resizing of

FlexGrid

DataTables

Data format : Data format : JSON, XML or existing Existing HTML data Sorting: Server-side Sorting: Client-side. Multicolumn sorting supported.

Pagination: Server-side

Pagination: Client-side resizing of

User/Auto resizing of User/Auto

columns: Both Supported. Users can choose to hide columns. Internationalization: Supported. JS file sizes (excluding jQuery) : 300kB (some of which can be discarded based on application) Advantages: Extensive API and documentation

columns: columns: User only. Users can Auto only choose to hide columns. Internationalization: Not supported. Internationalization: Supported.

JS file sizes (excluding JS file sizes (excluding jQuery) : jQuery) : 56kB 143kB

Advantages: Advantages: Versatile, can wrap Uses existing HTML around HTML or used structure to wrap around JSON/XML to populate grid Disadvantages: Disadvantages: Relatively little Requires all the relevant data documentation, most of to be marked up as HTML the functionality only works with JSON/XML option

Disadvantages: Requires processing on server-side

Summary: As with all applications, each variant is suitable for a different solution. The fact that there are over 50 table plugins for jQuery is testament to how people see the need for developing new alternatives. jQuery is a powerful tool, but its use must also be weighed together with how much data you use - while server-side sorting and searching is usually very powerful and fast, it's still a relatively expensive operation. Both jqGrid and DataTables have a lot of useful features (like grids withing grids, user-selectable rows and inline editing) with solid API documentation to support it. Flexgrid is good if you want something to work without too much hassles. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-jqgridflexigridand.html

Var vs IEnumerable
Difference between Var and IEnumerable S.No 1 Var When to use ? Use Var type when we want to make a "custom" type on the fly. IEnumerable When to use ? Use IEnumerable when we already know the type of query result.

Good for: Var is also good for remote collection.

Good for: IEnumerable is good for in-memory collection.

IEnumerable Example MyDataContext dc = new MyDataContext (); IEnumerable<Employee> list = dc.Employees.Where(p => p.Name.StartsWith("S")); list = list.Take<Employee>(10);

Generated SQL statements of above query will be :


SELECT [t0].[EmpID], [t0].[EmpName], [t0].[Salary] FROM [Employee] AS [t0] WHERE [t0].[EmpName] LIKE @p0

Notice that in this query "top 10" is missing since IEnumerable filters records on client side Var Example MyDataContext dc = new MyDataContext (); var list = dc.Employees.Where(p => p.Name.StartsWith("S")); list = list.Take<Employee>(10);

Generated SQL statements of above query will be :


SELECT TOP 10 [t0].[EmpID], [t0].[EmpName], [t0].[Salary] FROM [Employee] AS [t0] WHERE [t0].[EmpName] LIKE @p0

Notice that in this query "top 10" is exist since var is a IQueryable type that executes query in SQL server with all filters.

IEnumerable Type
IEnumerable is a forward only collection and is useful when we already know the type of query result. In below query the result will be a list of employee that can be mapped (type cast) to employee table.
IEnumerable<tblEmployee> lst =(from e in tblEmployee

where e.City=="Delhi" select e); Reference: http://onlydifferencefaqs.blogspot.in/2012/09/var-vs-ienumerable.html

URL Rewriting vs ASP.NET Routing


Differences between IIS URL Rewriting and ASP.NET Routing S.No 1 URL Rewriting URL rewriting consists of certain regular expression patterns that match an ASP.NET Routing Meaning: ASP.NET routing extracts specific values from the URL, based on a

incoming request URL and forward the request to a mapped URL instead. For example, one might create a URL rewriting rule that forwards an incoming request for http://www.example.com/Produ cts/Beverages to another URL of http://www.example.com/Produ cts/Show.aspx?id=5 2 Does it alter the request / incoming URL ? URL rewriting alters the request URL and forwards it to another URL. When URL Rewriting is right choice ? IIS URL rewriting is a generic URL manipulation mechanism that addresses a multitude of scenarios. In particular, it can be used by Web developers as well as Web server/site administrators to enable clean URLs for existing Web applications without modifying the application code. For what type of application(s) URL Rewriting can be used ? The IIS URL Rewrite module can be used with any type of Web application, which includes ASP.NET, PHP, ASP, and static files. Does it extensible and customizable ? The URL Rewrite module is not extensible in its current version. What tasks it can perform ? In addition to rewriting, the URL Rewrite module can perform HTTP redirection, issue custom status codes,

pattern. These extracted values can be used to determine the handler that will handle the request. We can also use these patterns to generate a URL that will map to a specific handler.

Does it alter the request / incoming URL ? ASP.NET routing is different. It does not alter the incoming URL. When ASP.NET Routing is right choice ? ASP.NET routing is a solution that is optimized for ASP.NET, thus it may be preferable for Web developers who design their ASP.NET applications from the ground up and want to have a clean URL structure.

For what type of application(s) ASP.NET Routing can be used ? ASP.NET routing can be used only with .NET Framework-based Web applications.

Does it extensible and customizable ? ASP.NET routing is fully extensible and customizable. What tasks it can perform ? ASP.NET routing does not perform these tasks.

and abort requests. 7 Application Area: The IIS URL Rewrite module can make rewriting decisions based on domain names, HTTP headers, and server variables. IIS pipeline mode or Integrated pipeline mode ? The IIS URL Rewrite module works the same way regardless of whether integrated or classic IIS pipeline mode is used for the application pool. Application Area: By default, ASP.NET routing works only with URL paths and with the HTTP-Method header.

IIS pipeline mode or Integrated pipeline mode ? For ASP.NET routing, it is preferable to use integrated pipeline mode. ASP.NET routing can work in classic mode, but in that case the application URLs must include file name extensions or the application must be configured to use "*" handler mapping in IIS.

Summary: IIS Rewiting & ASP.NET Routing: "Either IIS URL rewriting or ASP.NET routing can be used to implement URL manipulation scenarios for your Web application. " - By Ruslan Yakushev Main advantage of ASP.NET Routing: "It keeps the request-resource resolution logic within your application, so it's very easy to add application-dependent logic when you need, and it eliminates the need to maintain synchronization between your application and a separate configuration resource. Routing works great with traditional webforms." - By Rex M Reference: http://onlydifferencefaqs.blogspot.in/2012/09/url-rewriting-vs-aspnet-routing.html

Oracle vs WCF vs TopXml Adapters Difference between BizTalk Oracle Adapters (or) Compare and contrast between different BizTalk Oracle Adapters (or) Difference between Microsoft BizTalk Oracle Adapter ,Microsoft BizTalk WCF Adapter and TopXml Adapter for Databases Microsoft BizTalk Oracle Adapter Microsoft BizTalk WCF Adapter TopXml Adapter for Databases BizTalk Server support version: BizTalk Server 2004/2006 Access: Oracle Adapter for .NET (ODP.NET) Processing: Generation of BizTalk schemas based on SQL statements, Stored Procedures (in, out, return parameters), multiple tables

BizTalk Server support BizTalk Server version: support version: BizTalk Server 2006 BizTalk Server 2006 R2 Access: ODBC driver to connect to DB Processing: Supports PollingQuery and TableChangedEvent Access: Oracle Adapter for .NET (ODP.NET) Processing: Single Polling mechanism that provides the following features:

Generate strongly typed schema based on a SELECT statement Periodic polling of data source Specify Post-Poll statements to be Oracle alerts (send and executed after a polling receive) can send event asynchronous notifications based on some events. Poll and Post-Poll Uses DBMS_ALERTS statements executed in oracle package. a Transaction context Oracle Receiver can be Specify Transaction configured to receive alerts Isolation level and Oracle Sender can send alerts to data source. Poll, Post-Poll and transaction levels can Oracle Pipes allow interbe specified with process communications binding properties with Oracle sessions IDE Integration: Standard integration IDE Integration: IDE Integration: Enhanced integration at Redesigned and developed design time between in C#.NET that provides

BizTalk and Visual Studio that provide the following features: Standardized GUI for browsing, searching and retrieving LOB artificats Design-time enhancements for browsing stored procedures, functions and packages (categorized and hierarchical manner) Programming Interface: Standard XML schema messages Metadata is retrieved as XML messages Programming Interface: Exposes WCF Programming interfaces that provide WCF channel, WCF service model and web service model Exposes programming interfaces for retrieving metadata including search and browse capabilities

tight integration with BizTalk Adapter framework Generate schemas based on stored procedures and also Select, Insert, Update, Delete and InsertUpdate statements on tables and views

Programming Interface: Schema generation capabilities that allow importing database schema from the underlying data provides into the orchestrations. Uses Enterprise Instrumentation framework for tracing and logging Send Adapters are equipped with Exception handlers that allows you to specify Send Adapter behavior when a particular exception is raised Transactions: Supports Transactions and Transaction Isolation levels Additional Features: Supports various Data sources such as IBM DB2, SyBase, MySQL etc Extendable Data Providers

Transactions: Not Supported

Transactions: Supports WCF mode Transactions for Outbound and Inbound Additional Features: Supports IN, OUT, INOUT REFCURSORS with strongly typed and weakly typed variants Supports BLOB, CLOB, BFILE types in tables and stored procedures with streaming capabilities

Additional Features: Not Supported

Enhancing on top of ODP.NET, the WCFbased Oracle DB adapter supports RECORD type parameters in stored procedures/functions even though these types are not natively supported by ODP.NET (version 10.2.0.20) http://blogs.msdn.com/a ggbug.aspx? PostID=5755446 Support and Licensing: Depends on licensing agreement with Microsoft No additional pricing for the adapters Support and Licensing: Depends on licensing agreement with Microsoft No additional pricing for the adapters Support and Licensing: Additional pricing and licensing model Online Support

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-biztalkoracle.html LOB Adapter vs BizTalk Adapter Differences between the Windows Communication Foundation (WCF) Line-OfBusiness (LOB) Adapter Pack and the BizTalk Adapter Framework (OR) Difference between WCF LOB Adapter SDK and BizTalk Server Adapter Framework S.No 1 WCF LOB Adapter SDK BizTalk Server Adapter Framework

API: API: .NET 3.0 Assembly, provides COM, provides basic support for help classes for metadata adapter operations. processing, connection management, and messaging . Exposed as WCF binding; Adapter exposure: available to any application Exposed only to BizTalk Server; not that can consume a WCF reusable by other applications. binding including BizTalk Server 2006 R2 (using the

WCF adapter). 3 Tools : Tools : Adapter Code Generation N/A Wizard, metadata browser for Visual Studio 2005. Extensibility : Yes (as WCF extension) Extensibility : channel No

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-wcf-lob-adapter-sdkand.html Value Cross vs ID Cross Referencing Difference between Value and ID Cross references in BizTalk Server (OR) Difference between Value Cross Referencing and ID Cross Referencing in BizTalk Server S.No 1 Value Cross Referencing Whether it can be modified during runtime: These cannot me modified during run-time. ID Cross Referencing Whether it can be modified during runtime: These may be set at run-time. Set Common ID functoid is used for this.

Where it occurs ? Where it occurs ? This occurs between app This occurs between appinstance types. types. Where it occurs normally ? This cross-referencing commonly occurs between enumeration fields. Caching Mechanism is used or not: This uses caching mechanism. After any changes in database, we have to restart the corresponding host instances to see the changes. Where it occurs normally ? This cross-referencing commonly occurs between entity unique identifiers. Caching Mechanism is used or not: In this, we will hit the database for every call.

What kind of mapping is What kind of mapping is used ? used ? Its a one-to-one mapping. Its a many-to-one mapping. Mapping Direction Unidirectional or Bidirectional ? The mapping is gauranteed in only one direction. Value Cross Referencing behaviour while using Reverse Mapping: When you want to use them for the reverse mapping for a value which is mapped to multiple inputs, the first value stored in the xref tables is fetched. Following mapping is allowed or not? Apple Fruit Banana Fruit Grape Fruit The above mapping is allowed. So in this case , the reverse mapping may not give the expected output. What functoids need to be used in the maps ? We have to use the GetCommonValue & GetApplicationValue functoids in the maps Mapping Direction Unidirectional or Bidirectional ? The mapping is gauranteed in both directions. ID Cross Referencing behaviour while using Reverse Mapping: Reverse mapping is always in synch with the initial mapping.

Following mapping is allowed or not? Apple Fruit Banana Fruit Grape Fruit The above mapping is not allowed allowed and are restricted by constraints on the Id cross reference tables. What functoids need to be used in the maps ? We have to use the GetCommonId & GetApplicationId functoids in the maps

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-value-and-idcross.html

CSharp Difference FAQs-1 1.Difference between C# 3.5 and C# 4.0 S.No 1 C# 3.5 C# 3.5 does not support dynamic programming. The dynamic keyword is not recognized in C# 3.5. C# 4.0 C# 4.0 supports dynamic programming through dynamic objects. In C# 4.0, dynamic keyword is associated with objects to represent them as dynamic objects. C# 4.0 allows creation of dynamic variables.

3 4

Dynamic variables cannot be created in C# 3.5.

In C# 3.5, method parameters In C# 4.0, the method parameters cannot be specified with can be specified with default values default values. C# 3.5 does not using optional parameters. support optional parameters. In C# 3.5, method parameters have to be specified in the same order as in method declaration in the method call. C# 3.5 does not provide named parameters. In C# 3.5, usage of ref keyword is mandatory while executing methods which are supplied by the COM interfaces. The COM objects indexed properties are not recognized in C# 3.5. Co-variance and contravariance are not supported in Generics of C# 3.5. C# 4.0 provides named parameters to represent the values of method parameters without following the order of declaration.

In C# 4.0, usage of ref keyword is optional while executing methods which are supplied by the COM interfaces. The COM objects indexed properties are recognized in C# 4.0. C# 4.0 enhances Generics by introducing co-variance and contravariance.

2.Difference between C# and VB.NET S.No 1 C# In C#, variables are declared using declarators. VB.NET In VB.NET, the variables are declared using keywords such as private, protected, friend, public, static, shared and Dim.

In C#, an object can only be created using new. In C#, void is specified as the return type when a method does not return a value. In C#, no keyword is required to indicate an overloaded method. The current object is referred using this pointer in C#. Non virtual call cannot be made in C#. Compound data type is declared in C# using class, struct and interface. In C#, constructors are used to initialize an object. Object cleanup can be explicitly done by destructor in C#. In C#, an object is subject to asynchronous modification using volatile keyword.

In VB.NET, an object can be created using new and CreateObject(). In VB.NET, Sub is used in method declaration to indicate that the method does not return any value. In VB.NET, Overloads keyword is used to indicate an overloaded method. The current object is referred as me in VB.NET. To make a non-virtual call to the current objects virtual method, MyClass is used in VB.NET. Compound data type is declared in VB.NET using Structure. In VB.NET, Sub New() is used to initialize the newly created object. Object cleanup can be done by using Finalize method in VB.NET. In VB.NET, an object cannot be modified in an asynchronous way.

5 6

8 9

10

11

In C#, all the variables have to In VB.NET, variables can be forced be declared before being used. for explicit declaration using Option Explicit. In C#, default property is defined by using indexers. In C#, base class can be referred using the keyword base. Abstract class of C# can only be inherited and not instantiated. Sealed keyword of C# is used to denote that a class cannot be inherited. In VB.NET, default property is defined using Default. In VB.NET, base class can be referred using the keyword MyBase. MustInherit keyword of VB.NET is used to denote that a class can only be inherited and not instantiated. NotInheritable keyword of VB.NET denotes that the class cannot involve in inheritance.

12 13

14

15

16 17

Division can be performed in C# using / operator. Remainder of division can be retrieved using mod operator of C#. C# does not have exponentiation operator. C# has Bitwise operators namely &,| and ^. Object reference variables can be compared using == operator in C#. The short ciruit operators in C# are && (Boolean AND) and || (Boolean OR).

Division can be performed in VB.NET using \ operator. Remainder of division can be retrieved using %. In VB.NET, exponentiation can be performed using ^ operator. Bitwise operators in VB.NET are And, Or, Xor. Object reference variables can be compared using Is operator in VB.NET. The short circuit operators in VB.NET are AndAlso (Boolean AND) and OrElse (Boolean OR).

18 19 20

21

3.Difference between C# and C++ S.No 1 C# C# is a high level language that is component oriented. C++ C++ is a low level and indeed platform neutral programming language.

When compiled, C# code is When compiled, C++ code is converted into Intermediate converted into assembly language language code. This code. intermediate language code is converted into executable code through the process called Just-In-Time compilation. In C#, memory management is automatically handled by garbage collector. In C# Switch Statement, the test variable can be a string. In C# switch statement, when break statement is not given, the fall through will not happen to the next case statement if the current case statement has any code. In addition to for, while and do..while, C# has another flow In C++, the memory that is allocated in the heap dynamically has to be explicitly deleted. In C++ Switch Statement, the test variable cannot be a string. In C++ switch statement, when break statement is not given, the fall through will happen to the next case statement even if the current case statement has any code. C++ does not contain for each statement.

4 5

control statement called for each. 7 C# struts can contain only value types. The struts is sealed and it cannot have a default no-argument constructor. In C#, delegates, events and properties can also be specified as class members. C++ struts behave like classes except that the default access is public instead of private.

In C++, only variables, constructors, functions, operator overloads and destructors can be class members. Delegates, events and properties cannot be specified as class members. In C++, the end of the class definition has a closing brace followed by a semicolon.

In C#, the end of the class definition has a closing brace alone.

10

The access modifiers in C# are The access modifiers in C++ are public, private, protected, public, private, protected. C++ internal and protected internal. does not have internal and protected internal access modifiers. C# has finally block in exception handling mechanism. The code statements in the finally block will be executed once irrespective of exception occurrence. The exception in C# can only throw a class that is derived from the System.Exception class. C# does not have the concept of function pointers. C# has a similar concept called Delegates. C++ does not have finally block in exception handling mechanism.

11

12

The exception in C++ can throw any class.

13

C++ has the concept of function pointers.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/csharp-difference-faqs-1.html

Object vs Var vs Dynamic Keywords Difference between Object, Var and Dynamic Keywords Object Introduction: Object keyword is introduced in C# 1.0 Data Storage: Can able to store any kind of value, because object is the base class of all type in .net framework. Var Dynamic is

Introduction: Introduction: Var keyword is introduced Dynamic keyword in C# 3.0 introduced in C# 4.0 Data Storage: Can able to store any type of value but it require to initialize at the time of declaration. http://2.bp.blogspot.com/f4R_nVJyN7Q/TjKtHKB0 NNI/AAAAAAAACcE/vZm riKOlC5Y/s1600/var+iniali ze+error.JPG Type Safety: It's compiler safe i.e compiler has all information about the stored value, so that it doesn't cause any issue at run-time. http://4.bp.blogspot.com/BXXEgzeJ8XE/TjKtWeI_J GI/AAAAAAAACcQ/iW6x h5sYPg4/s1600/var+com piler.JPG Supports as method argument type : Var type can not be passed as function argument and function can not return object type. This type of variable can work in the scope where it defined. http://4.bp.blogspot.com/dkV7VvttM34/TjKtbFDf0yI /AAAAAAAACcU/PnUFg5 KIDcE/s1600/var+passing +argument.JPG

Data Storage: Can able to store any type of the variable, similar to old VB language variable.

Type Safety: Compiler has little information about the type . http://1.bp.blogspot.com /O3j4Ud1rn9s/TjKtOoGs rbI/AAAAAAAACcI/Q1a 9HF2Hbok/s1600/object .JPG

Type Safety: Compiler doesn't have any information about the this type of variable. http://4.bp.blogspot.com/9B9snB1pPFg/TjKtRr435OI /AAAAAAAACcM/FnUjqaG FYI0/s1600/dynamic.JPG

Supports as method argument type : Object type can be passed as function argument and function also can return object type

Supports as method argument type : Dynamic type can be passed as function argument and function also can return object type

Need type casting on assignment :

Need type casting on Need type casting assignment : assignment :

on

Require to cast object variable to original type before using it. So this assigning to object type and converting to original type called as Boxing and Un-Boxing for value type and for the reference type its casting of types. It's actually increasing the overhead when we do this both operation. Allows to perform operation of given type once it get cast any user defined or primitive data type. Stored Value: Cause the problem at run time if the stored value is not get converted to underlying data type. http://2.bp.blogspot.com /AcTarSXqc08/TjKtgMQjiI/AAAAAAAACcY/ldRU TGHpTO4/s1600/Objec t+error.JPG As source in for each iteration: Not supported Application Area: Useful when doesn't have more information about the data type i.e., to hold objects as base class. Compilation Example: Object o = new Button(); o.Width doesnt compile

No need to cast because Casting is not require but compiler has all you need to know the information to perform property and methods operation. related to stored type

Stored Value: Doesn't cause problem because compiler has all info about stored value.

Stored Value: Cause problem if the wrong method or property accessed because all the information about stored value is get resolved only at run time http://2.bp.blogspot.com/Gk8fm_tIc98/TjKtjhCgnPI/A AAAAAAACcc/BZshBUrwC 90/s1600/dynamic+error.JP G

As source in for each As source in for each iteration: iteration: Supported Supported Application Area: Useful when getting result out of the linq queries. In 3.5 framework it introduce to support linq feature. Application Area: Useful when coding using reflection or dynamic language support or with the COM objects, because we require to write less amount of code. Compilation Example: dynamic o = new Button(); o.Width and even o.xyz() will compile where xyz is not a member

Compilation Example: var o = new Button(); o.Width will compile

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-object-varand.html

Identifier vs Keyword in C# Difference between Identifier and Keyword in C# S.No 1 Identifier Meaning: A C# identifier is a name given to a class, delegate, interface, method, namespace or variable. What it consists of ? Must be any combination of letters, numbers, and underscores. Upper case / Lower case / Both ? Allows both Uppercase and Lowercase. Whether Unicode characters are allowed or not ? Identifiers can begin with an allowed Unicode character or an underline. But,we need to use nonformatting Unicode characters in any part of an identifier. i.e., u0027format // error Unicode formatting character which is not allowed. Whether it can be used to name classes, methods, or variables ? The purpose of Identifier is to provide names to namespaces, classes, methods, variables, and interfaces. Keyword Meaning: Keywords are predefined reserved identifiers that have special meanings to the compiler. What it consists of ? Must be only letters.

Upper case / Lower case / Both ? Most of the keywords are Lowercase.But,only Namespaces, Types and Members have their first character in uppercase. Whether Unicode characters are allowed or not ? Unicode characters are not used in any C# keywords

Whether it can be used to name classes, methods, or variables ? We cannot use keywords for naming classes, methods, or variables.

Note: Keywords cannot be used as identifiers in your program unless they include the "at" sign (@) as a prefix. For example, @new would be a legal identifier; but, new is not, because it is a keyword. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/identifier-vs-keyword-in-c.html

null keyword vs DBNull class in C# Difference between null and System.DBNull.Value S.No 1 null Conceptual Difference: The keyword null represents an invalid reference. What is the purpose of null keyword ? NULL is used to check if a whole record is not found in the database. Is it a Value / Reference / Nullable type ? null is the default value of reference-type variables. Ordinary value types cannot be null. DBNull Conceptual Difference: The class System.DbNull represents a nonexistent value in a database field. What is the purpose of DBNull class ? DBNULL is used to check if a certain field in a database is null. Is it a Value / Reference / Nullable type ? DBNull does not match the type of a nullable value type, a reference type, or a value type, and therefore is not directly assignable. Please look at: Handle null, then DBNull to avoid InvalidCastException Reason: Of DBNull class only one instance can exist as it a singleton class. Sole instance is DBNull.Value. Handle null, then DBNull to avoid InvalidCastException: For instance, sometimes in code you will see items in a data row being used without checking for null first. When the underlying field is not null, this is OK, but if a null is available, the following code will not work: Example-1 Decimal amount = (Decimal)row["AmountValue"]; //returned value is DBNull Because DBNull is not the same type, an InvalidCastException occurs. Rather, a null check has to be performed. The safe alternative to this is the following: Example-2 Decimal amount = 0; If (!row.IsNull("AmountValue")) amount = (Decimal)row["AmountValue"];

If you want to set a row's value, you can do something like below. The row takes an instance of type object, and therefore can be assigned DBNull: Example-3 If (amountValue > 0) row["AmountValue"] = amountValue; Else row["AmountValue"] = DBNull.Value; The value property returns the actual instance of DBNull (a static property). Sometimes, a helper routine would be good to handle this conversion for you, reducing the amount to a total of one line instead of four. That may not seem like much, but a table with thirty columns will make this much coding a chore. Checking null and DBNull values How to check for null value ? 1. Create the variable. A variable must be declared before using it. The code below allocates memory and declares the variable for use. string myNullVar = null; The code uses the "null" value assignment for the new variable. 2. Check if the variable is null. The code below checks if the variable is null. If it is null, the code assigns it a color value. if(myNullVar == null) { myNullVar = "purple"; } 3.Check if the variable is not null. In some cases, you may wan to reassign the variable back to null. The following code checks if the variable is not null, and assigns it a null value. if(myNullVar != null) { myNullVar = null; } How to check for DBNull values ? 4. Declare a variable. Just like section 1, to check for DBNull, a variable needs to be declared. However, the variable is assigned the DBNull value. string myNullVar = System.DBNull; 5. Use the "Equals()" method from the string class to check for the DBNull value. The code below checks for this value and assigns myNullVar a color. if (myNullVar.Equals(System.DBNull.Value)) { myNullVar = "purple"; } 6.Evaluate if the variable is not null. Similar to section one, you may want to check if the variable is not null to reassign it back to DBNull. The "!" character evaluates to "not" in the following example. if(!myNullValue.Equals(System.DBNull.Value)) { myNullValue = System.DBNull;

} Note: However note that neither checking null of nor DBNull.value will work if the index is out of range. If we check for an index or a column that doesn't exist, it will throw an index out of range exception. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/null-keyword-vs-dbnull-class-inc.html C# generics vs C++ templates Difference between C# generics and C++ templates S.No 1 C# Generics Strongly / Loosely typed: C# Generic types are strong typed. Instantiated at Compile time / Runtime: C# Generic types are instantiated at the runtime. Whether it permits the type parameters to have default values ? C# Generic types do not permit the type parameters to have default values. Whether DLL can be created using C# Generics ? Libraries or DLLs can be created using C# Generics. C++ Templates Strongly / Loosely typed: C++ Templates are loosely typed. Instantiated at Compile time / Runtime: C++ templates are instantiated at the compile time. Whether it permits the type parameters to have default values ? C++ templates permit the type parameters to have default values. Whether DLL can be created using C++ Templates ? C++ templates are always expanded at compile time. Therefore, the C++ compiler must have access to all template types generally through header files and any types used to create the closed types from the template types at compile time. For this reason alone, it is impossible to package C++ templates into libraries or DLLs. The STL is a perfect example: notice that almost every bit of your favorite STL implementation exists in header files.

Whether it is possible to call arithmetic operators in a C# generic class ? C# generics do not provide the same amount of flexibility as C++ templates. For example, it is not possible to call arithmetic operators in a C# generic class, although it is possible to call user defined operators. Whether explicit specialization is supported by C# generics ? C# generics does not support explicit specialization; that is, a custom implementation of a template for a specific type. Whether partial specialization is supported by C# generics ? C# generics does not support partial specialization: a custom implementation for a subset of the type arguments. Whether type parameter can be used as the base class for the generic type ? C# does not allow the type parameter to be used as the base class for the generic type. Whether generic type parameter can itself be a generic ? In C#, a generic type parameter cannot itself be a generic, although constructed types can be used as generics. What type of code it allows ? C# requires code in a class to be written in such a way that it will work with any type that satisfies the constraints.C# disallows as allowed in C++ (Please look at example from R.H.S column); the only language constructs allowed are those that can be deduced

Whether it is possible to call arithmetic operators in a C++ template class ? With C++ template class, it is possible to call arithmetic operators.

Whether explicit specialization is supported by C++ templates ? C++ template support explicit specialization.

Whether partial specialization is supported by C++ templates ? C++ template support partial specialization.

Whether type parameter can be used as the base class for the template type ? C++ allows the type parameter to be used as the base class for the template type. Whether template type parameter can itself be a template? C++ does allow template parameters.

10

What type of code it allows ? C++ allows code that might not be valid for all type parameters in the template, which is then checked for the specific type used as the type parameter. For example, in C++ it is possible to write a function that uses the arithmetic operators + and - on objects of the type parameter,

from the constraints.

which will produce an error at the time of instantiation of the template with a type that does not support these operators. Which language supports templates ? Templates are a C++ only language feature. Whether it allows non-template parameters ? C++ allows non-type template parameters.

11

Which language supports generics? Generics can be supported by any .NET language that wishes to do so. Whether it allows nontemplate parameters ? C# does not allow non-type template parameters.

12

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/c-generics-vs-c-templates.html is vs as operators in C# Difference between is and as operators in C# S.No 1 Is operator Meaning: The is operator allows us to check whether an object is compatible with a specific type. Here the phrase "is compatible" means that an object is either of that type or is derived from that type. As opeator Meaning: The as operator is used to perform certain types of conversions between compatible reference types. i.e., The as operator is used to perform explicit type conversion of reference type.If the type being converted is compatible with the specified type,then that conversion is successful else as operator will return a null value. How it works ? i.Checks whether Object is compatible with given type ii. If yes, returns not null reference i.e same object iii. If no, returns null instead of raising an exception.

How it works ? i.Checks whether Object is compatible with given type ii. If yes, returns true iii. If no, returns false Remarks: An is expression evaluates to true if both of the following conditions are met: expression is not null. expression can be cast to type. That is, a cast expression of the form (type)(expression) will

complete without throwing an exception. For more information, see 7.6.6 Cast expressions. 3 When to use is operator ? The is-cast is only ideal if the casted variable will not be needed for further use. For what type of conversions,is operator can be used ? is operator only considers reference conversions, boxing conversions, and unboxing conversions. Syntax: expression is type Example: int k = 0; if (k is object) { Console.WriteLine("i is an object"); } When to use as operator ? If we need to use the casted variable, use the as-cast. For what type of conversions,as operator can be used ? as operator only performs reference conversions and boxing conversions.

5 6

Syntax: expression as type Example: object x = "I am here"; object y = 10; string s1 = x as string; // here conversion is compatible so,s1="I am Here" string s2 = y as string;// here conversion is imcompatible so,s2=null

Notes: 1.Syntax: expression as type is equivalent to: expression is type ? (type)expression : (type)null Example: Employee e = obj as Employee; is equivalent to: Employee e = obj is Employee ? (Employee)obj : (Employee)null; 2.Both is and as operators cannot be overloaded. 3.The is operator will never throw an exception. 4. A compile-time warning will be issued if the expression expression is type is known to always be true or always be false. 5. Both is and as operators cannot use user-defined conversions 6.The as cast is an efficient, elegant way to cast in the C# language. It promotes exception-neutral and less redundant code.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/is-vs-as-operators-in-c.html

Design Patterns - Difference Between FAQs 1. Difference between Factory Pattern and Abstract Factory Pattern S.No Factory Pattern 1 2 3 Create object through inheritance Produce only one product Implements code in the abstract creator that make use of the concrete type that sub class produces Abstract Factory Pattern Create object through composition Produce families of products Concrete factories implements factory method to create product

2.Difference between Abstract Factory Pattern And Builder Pattern S.No Builder Pattern 1 Abstract Factory Pattern

In Builder Pattern, there will Abstract Factory Pattern will be one Director class which return the instance directly. will instruct Builder class to build the different parts/properties of our object and finally retrieve the object. It will have reference to the created object. It does not keep the track of it's created object.

3.Difference between Builder Pattern And Composite Pattern S.No Builder Pattern 1 It is used to create group of objects of predefined types. Composite Pattern It creates Parent - Child relations between our objects.

4.Difference between MVC and MVP S.No MVP 1 MVC

MVP is a bit more complex to MVC is easier to implement implement than MVC .Also, it than MVP. has additional layer for view interfaces. The request is always received by the View and delegated to the presenter which in turn gets the data does the processing The presentation and view logic an be unit tested as the The request is received by the controller which in turn gets the required data and loads up the appropriate view The controller logic can be unit tested.

view is loosely coupled.

Note: We can unit test view if we are using Razor view engine. ASPX viewengine are not that easily unit testable MVC is best suitable for Web Programming.

MVP is best suitable for Windows Programming as the flow naturally tend towards this pattern.

5.Difference between Proxy Pattern and Observer Pattern S.No Proxy Pattern 1 The Proxy Pattern is used for wrapping a kind of special object with 1 or more other objects. Either because we don't always have the wrapped object or because it needs to be managed in a certain way that can be simplified via the proxy object(s). This is kind of a way to exchange the API of an existing class with a proxy class. We are not just talking events here, but whatever kind of functionality to define via the proxy object instead of the real object. Observer Pattern The Observer Pattern is used by a publisher object to notify subscriber objects with information. The publisher object does not know the subscribing objects except that the conform to a certain subscriber interface. This is a very flexible pattern for distributing events, since those that wants to listen on certain object has the power to do so without changing the code of the publishing object.

6. Difference between Singleton Pattern and static class S.No Singleton Pattern 1 2 Singleton pattern maintains single instance. A singleton can extend classes and implement interfaces. A singleton can be initialized lazily or asynchronously. static class We cannot create instance for static class. A static class cannot . Note: It can extend classes, but it does not inherit their instance members. A static class is generally initialized when it is first loaded, leading to potential class loader issues.

Singletons can be handled static class cannot be handled polymorphically without polymorphically. forcing their users to assume that there is only one

instance. 5 Singleton Class can have Static are always just shared value when Class object and have no instance but instantiated between server multiple references. and client, such a way if three client want to have a shared data between them Singleton can be used.Thats why singleton class can be used for state mangement in stateless scenarios like shopping cart scenario. We can pass singleton object We cannot pass parameter in as parameter static class Singleton provides flexibility and also provides sort of a mechanism to control object creation based on various requirements. They can be extended as well if need arises. In other words we are not always tied to a particular implementation. With Singleton we have the flexibility to make changes as when situation demands. Static classes once defined could not accomodate any future design changes as by design static classes are rigid and cannot be extended.

6 7

7.Difference between Strategy and Inversion of Control (IOC) S.No Strategy Pattern 1 The strategy pattern is useful when we want classes to depend on the interface rather than the implementation.And we can easily swap out behavior depending on which concrete implementation we provide. Inversion of Control (IOC) Pattern Inversion of Control/Dependency Injection (IoC/DI) comes into play when we want the concrete strategy implementation injected into a class. For example, we could use the DI Framework Ninject and configure it so that it will know which concrete strategy implementation to inject into a class in specific scenarios. Note: Strategy is just one of the ways that IOC is implemented

8.DIfference between IDictionary and Dictionary S.No IDictionary 1 2 IDictionary is just a contract, abstraction Dictionary Dictionary is concrete implementation.

It is recommended for Argument or Property is not example to expect as required for Dictionary. argument an IDictionary rather than concrete Dictionary, or to expose property of IDictionary rather than Dictionary, because this promotes loose coupling. Than we are able to change underlying objects in the future without affecting those who use your object.

9.Difference between Factory Pattern and Dependency Injection S.No Factory Pattern 1 Factory is used to create objects Dependency Injection(DI) DI is used to move the responsibility of creating an object outside the main code. Some of the well known framework available for DI are 1. Unity Application Block (Microsoft) 2. Ninject 3. StructureMap 4. Castle Windsor 5. Munq/Funq 6. Autofac 10.Difference between String.Clone() and String.Copy() method S.No String.Clone() 1 Returns a reference to this instance of String. i.e., it gives pointer value(ie Current memory Reference) String.Copy() Creates a new instance of String with the same value as a specified String. i.e., it creates an instance in Heap Memory and gives pointer value(ie New Memory Reference)

11.Difference between Strategy Pattern and Factory Pattern S.No Strategy Pattern 1 Strategy's sole intent to is to provide a mechanism to select different algorithm. We cannot use "strategy" to create objects of "factory". Factory Pattern Factory's sole purpose is to create objects . We can use "factory" to create objects of "strategy".

12.Difference between Proxy and Adaptor S.No Proxy Pattern 1 Proxy on the other hand represents a standin object for the real object. This is required when the real object is complex to create, is not available, or for authentication purpose. For e.g. web service proxy, proxy authentication server etc. Adaptor Pattern Adapter is used to adapt to incompatible interfaces. It's more directed from the client (those who consume the object) perspective. A client expects an interface to be of particular type and adapter plays a role in filling that gap.

It's more from making it easier Proxy can be categorized into for the client to adapt to other third party libraries within there own by adapting to it. Virtual Proxy Remote Proxy Protection Proxy 13.Difference between Decorator and Visitor S.No Decorator Pattern 1 2 Decorator may have just a single object to customize. Decorator does not require a traverser for successful implementation. Decorator pattern is a structural pattern that help us to add new function to an object in the run time , note that in the run time not design time . Visitor Pattern Visitor has a tree of objects to be worked upon. Visitor requires a traverser for successful implementation. Visitor pattern is Behavioral pattern that seperate the data structure from the operation (functionality ) that work on it , this mean we can add different operation on the same data structure

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/design-patterns-difference-

between-faqs.html Difference between MEF and DI / IOC Difference between MEF and DI / IOC S.No 1 MEF DI / IOC

Abbreviation: Abbreviation: MEF stands for Managed DI / IOC stands for Dependency Extensibility Framework Injection and Inversion Of Control Meaning: Managed Extensibility Framework (MEF) is a component of .NET Framework 4.0 for creating lightweight, extensible applications. It allows application developers to discover and use extensions with no configuration required. It also lets extension developers easily encapsulate code and avoid fragile hard dependencies. MEF not only allows extensions to be reused within applications, but across applications as well. MEF was introduced as a part of .NET 4.0 and Silverlight 4. Meaning: Dependency injection is a software design pattern that allows a choice of component to be made at runtime rather than compile time. This can be used, for example, as a simple way to load plugins dynamically or to choose mock objects in test environments vs. real objects in production environments. This software design pattern injects the dependent element (object or value etc) to the destination automatically by knowing the requirement of the destination.Inversion of Control usually refers to the "containers" while Dependency Injection refers to the actual pattern.DI is a form of IoC.Dependency injection is the main method to implement Inversion of Control.

Where it can be used ? Where it can be used ? MEF is useful for dynamic IOC is most useful with Static dependencies. dependencies Used for Known / Unknown parts: MEF is for discovery of unknown parts. Best choice for 3rd party controls or not: When working with/for 3rd party dlls , MEF is more the best choice. Used for Known / Unknown parts: IOC is for registration of known parts. Best choice for 3rd party controls or not: When working with/for 3rd party dlls , IOC is not the best choice.

Swapping DLLs at runtime Swapping DLLs at runtime possible or not: possible or not: If we have two dlls, taking a If we have two dlls, taking a

decision at runtime to swap the decision at runtime to swap the two two is possible using MEF. is not possible using IOC. 7 Plug-in versioning problem: Plug-in versioning problem: Plug-in versioning problem is Plug-in versioning problem is there not there in MEF in IOC

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-mef-and-diioc.html RUP vs SCRUM methodologies Difference between RUP and SCRUM methodologies S.No 1 RUP SCRUM

Cycle: Cycle: Formal Cycle is defined across Each sprint (iteration) is a complete 4 phases, but some workflows cycle. can be concurrent . Planning: Formal project plan, associated with multiple iterations, is used. The plan is end-date driven and also has intermediate milestones. Planning: No end-to-end project plan. Each next iteration plan is determined at the end of the current iteration (NOT end-date driven). Product Owner (Key Business User) determines when the project is done. Scope: Instead of scope, SCRUM uses a Project Backlog, which is reevaluated at the end of each iteration (sprint).

Scope: Scope is predefined ahead of the project start and documented in the Scope document. Scope can be revised during the project, as requirements are being clarified, but these revisions are subject to a strictly controlled procedure.

Artifacts: Artifacts: Vision/Scope Document, The only formal artifact is the Formal functional requirements operational software. package, system architecture document, development plan, test plan, test scripts, etc. Type of Project/Product: Type of Project/Product: Recommended for large, long- Recommended for quick term, enterprise-level projects enhancements and organizations

with complexity.

medium-to-high that are not dependent on a deadline.

Summary: Both methodologies are considered to be Agile and approach project activities in the iterative way. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-rup-andscrum.html Difference Between Flowchart and Data Flow Diagram Difference Between Flowchart and Data Flow Diagram (DFD) S.No 1 2 Flowchart Data Flow Diagram (DFD)

Flow chart presents steps to Data flow diagram presents the complete a process flow of data Flow chart does not have any Data flow diagram describes the input from or output to external path of data from external source source to internal store or vice versa. The timing and sequence of The processing of data is taking the process is aptly shown by place in a particular order or a flow chart several processes are taking simultaneously is not described by a data flow diagram. Flow chart shows how to make Data flow diagrams define the a system function. functionality of a system Flow charts are used designing a process in Data flow diagram are used to describe the path of data that will complete that process.

We have following types of We have following types of data flowcharts, flow diagrams, System flow chart Data flow chart Document flow chart Program flow chart Physical data flow diagrams Logical data flow diagrams

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-flowchartand-data.html

.NET Framework Difference FAQs-1 1. What is the difference between CCW and RCW? S.No 1 CCW Abbreviation: CCW stands for COM Callable Wrapper 2 Meaning: COM to .NET communication happens through CCW 3 Process involved for CCW: i)Create Assembly and compile with strong name. ii)Register Assembly using regasm iii)Register Assembly in GAC using gacutil /i iv)Use tlbexp to export Assembly as Type Library for COM. RCW Abbreviation: RCW stands for Runtime Callable Wrapper Meaning: .NET to COM Communication happens through RCW Process involved for RCW: i)Create Public Key Token file using sn.exe ii)Use tlbimp /keyfile: /out: iii)Register Imported Assembly in GAC using gacutil /i

2. What are the differences between DLL and EXE? S.No 1 2 3 4 DLL DLL stands for Dynamic Link Library DLL can not be used by End User. We can not run the DLL An ActiveX DLL runs in process server running in the same memory space as the client process. EXE EXE stands for Extensible Execute File EXE is used by End User like-Client We can run the EXE An ActiveX EXE is an out of process server which runs in it's own separate memory space.

If an unhandled error occurs it If an error occurs the client will cause the client process processes can continue to to stop operating. operate. DLL will run within an EXE DLL is an in-process file A DLL is visible to the system EXE can run independently EXE is an out-process file An EXE is visible to the

6 7 8

as a Win32 DLL but most likely without any entry points. The .NET runtime stores information about the contained assembly in its own header.

system as a regular Win32 executable. Its entry point refers to a small loader which initializes the .NET runtime and tells it to load and execute the assembly contained in the EXE.

3. What are the differences between Managed Code and Unmanaged Code? S.No 1 2 3 Managed Code It is executed under CLR It compiles to intermediate language It provides services like security, exception handling, garbage collection etc It can access both managed and unmanaged code Unmanaged Code It is not executed under CLR It compiles directly to machine code It does not provide security, exception handling, garbage collection etc It can access only unmanaged code

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/net-framework-difference-faqs1_11.html DOTNET Framework Difference FAQs-2 1.Difference between Finalize() and Dispose() methods in .NET S.No 1 2 Finalize() Dispose()

Finalize() belongs to the Object Dispose() belongs to the class. IDisposable interface It is automatically called by the Garbage Collection mechanism when the object goes out of the scope(usually at the end of the program) We have to manually write the code to implement it(User Code) ex: if we have emp class we have to inherit it from the IDisposable interface and write code. We may have to suppress the Finalize method using GC.SuppressFinalize() method. Faster method for instant disposal of the objects. Example: user interface Controls. Forms, SqlConnection class have built in implementaion of Dispose method.

It is slower method and not suitable for instant disposing of the objects. Example: class employee {

//This is the destructor of emp class ~employee() { } //This destructor is implicitly compiled to the Finalize method. } 4 It is non-deterministic function i.e., it is uncertain when Garbage Collector will call Finalize() method to reclaim memory. It is deterministic function as Dispose() method is explicitly called by the User Code.

2.Difference between Dispose and Destructor in .NET S.No 1 Dispose Unmanaged resources are removed by dispose method and it is called manually It is used to remove the unused resources from the memory. Destructor It is used to release unused managed resources and it is called automatically by the Garbage Collector It is used to de-allocate the allocated memory by the constructor method

3.Difference between Close() and Dispose() methods in .NET S.No 1 Close() When a Close() method is called,database connection will be temporarily closed and can be opened once again using Open() method. Dispose() Where as Dispose() method permanently close and removes connection object from memory and the resource no longer exists for any further processing. Note: However, calling Dispose does not remove the connection from the connection pool. Example: try {

string constring = "Server=(local);Database=my; User Id=sa; Password=sa"; SqlConnection sqlcon = new SqlConnection(constring); sqlcon.Open(); // here connection is open // some code here which will be execute } catch { // code will be execute when error occurred in try block } finally { sqlcon.Close(); // close the connection sqlcon.Dispose(); // desroy the connection object } Note: Only call the Close method on a Stream or a database connection if the object will be reused. Otherwise, use the Dispose method. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/dotnet-framework-differencefaqs-2.html DOTNET Framework Difference FAQs-3 1.Difference between Namespace and Assembly S.No 1 Namespace Assembly

Namespace is the logical Scope for a particular type is naming decided at design time defined at run time using Assembly. by the developer. Namespace contains set of Assembly contains code of the unique names. form MSIL ( Microsoft Intermediate Language) Classes available in your Logical units are physically program will be logically grouped together as assembly. grouped together under a namespace. Namespace can multiple assemblies. include An assembly can contain types belonging to different namespaces.

4 5

Namespace doesn't have any Assembly can be classified as classification. private assembly and public assembly. Private assembly is specific to a single application but shared/public assembly contains libraries which can be used by

multiple applications. 6 Namespaces mentioned Properties. have in to be Assemblies need not be explicitly Project- specified. They are automatically described in metadata and manifest files.

Namespaces can be nested. Such nesting is not permissible in For example: assemblies. namespace sampleApp1 { namespace SampleApp2 { class sampleClass { } } } Namespace is the one which you directly specify in your code. A simple example for namespace is shown below: namespace sampleNamespace { class sampleClass { public void displayMsg() { Console.WriteLine("In sampleClass"); } } } In this example, sampleNamespace is the namespace you have created and sampleClass is within the scope of this namespace. Creating an assembly on your own is not as simple as you create a namespace. If you want to package the code shown as an example for the namespace into an assembly, then you have to follow the steps shown below: " Generate a key file inside the same folder where you have placed the code by typing the following statement in the command prompt: sn -k sampleKey.key " Sign your code component with this key. Assume that your code component is named as sampleClass.cs. Now use the following command: csc sampleClass.cs /t:library /a.keyfile:sampleKey.key " Place your signed assembly inside GAC using AL Utility: AL /i: sampleClass.dll " Now create a code that accesses the code in your assembly: Using System; Using sampleNamespace; public class testClass { sampleClass obj = new sampleClass(); obj.displayMsg(); } " To test if your assembly got created and to test if the above code is working, compile the above

code using the following statement: csc testClass.cs /t:exe /r: " Now if you execute testClass.cs, you should get the following output: In sampleClass 2.Difference between System Exception and Application Exception S.No 1 2 System Exception CLR throws system exception Application Exception Application exception throws application

System exceptions are generic Application exceptions are not in nature generic. Each application exception has its own customized meaning Each system exception has a meaning. You can directly use them or you can derive new ones by inheriting System.Exception Application exceptions do not have a meaning for themselves. You have to explicitly derive from them and create your own custom exceptions specific to your application

Example for system exceptions Example for application exceptions include SqlException, include SharePointException, StackOverflowException CmsException

3.Difference between COM and .NET Component S.N o 1 2 3 4 COM Component Interface communication .NET Component based Object based communication Collector to manage

Reference count will be used Garbage to manage memory memory Binary Standard objects Objects are created coCreateInstance

Type Standard objects by Objects are created by normal new operator

5 6

Object info resides in Type Object info resides in assembly library files HRESULT will be returned Exceptions will be returned COM=HRESULT will be returned

4.Difference between Private Assembly and Public Assembly

S.N o 1 2

Private Assembly Private assembly can be used by only one application. Private assembly will be stored in the specific application's directory or sub-directory. There is no other name for private assembly.

Public Assembly Public assembly can be used by multiple applications. Public assembly is stored in GAC (Global Assembly Cache). Public assembly is also termed as shared assembly.

3 4 5 6

Strong name is not required for Strong name has to be created for private assembly. public assembly. Private assembly doesn't have Public assembly should any version constraint. enforce version constraint. By default, all assemblies you create are examples of private assembly. Only when you associate a strong name to it and store it in GAC, it becomes a public assembly. strictly

An example to public assembly is the actuate report classes which can be imported in the library and used by any application that prefers to implement actuate reports.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/dotnet-framework-differencefaqs-3.html Weak-named vs Strong-named .NET components Difference between Weak-named .NET components and Strong-named .NET components S.No 1 Weak-named .NET components Weak names are not guaranteed to be unique and thus cannot be shared without potentially causing conflicts. Weak-named .NET components must be individually copied to the /bin directories of the Web applications where they are used. .NET components with weak names can call unmanaged Strong-named .NET components Strong names are digitally signed and provide a public key that ensures there are no conflicts. Strong-named .NET components can be copied into the servers GAC

Furthermore, .NET components with strong names cannot call

code (such as COM components) and thus causes potential conflicts with dependencies.

unmanaged code (such as COM components) and thus avoid potential conflicts with dependencies.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-weaknamed-net.html Difference between STA and MTA Difference between STA and MTA S.No 1 2 STA STA stands for Single Threaded Apartment In STA,there may be multiple apartment.But only single thread can be executed in a apartment. In STA, if there is a need to communicate between threads we need a proxy, they can not do it directly. MTA applications execute slower than STA MTA MTA stands for Multi Threaded Apartment In MTA, only one apartment will be there and all threads will execute within that single apartment. In MTA, threads communicate directly to each other without a proxy. MTA applications typically execute faster than STA because there is less system overhead and can be optimized to eliminate system idle time. If the COM object can handle its own synchronization then the MTA model can be used

If the COM object cannot handle its own synchronization i.e not thread safe then the STA model can be used

Summary: An apartment is a logical container within a process for objects sharing the same thread access requirements. All objects in the same apartment can receive calls from any thread in the apartment. The .NET Framework does not use apartments, and managed objects are responsible for using all shared resources in a thread-safe manner themselves. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-sta-andmta.html

Assembly.CreateInstance() vs Activator.CreateInstance() Difference between Assembly.CreateInstance() and Activator.CreateInstance() S.No 1 Assembly.CreateInstance() Activator.CreateInstance()

Namespace: Namespace: Derives from Derives from System namespace. System.Reflection namespace. Meaning: Locates a type from this assembly and creates an instance of it using the system activator.In simple terms, Assembly.CreateInstance looks for a type in a particular assembly. Does it have overload method to create objects in other app domains, or on another server ? Assembly.CreateInstance Method does not have overload method to create objects in other app domains, or on another server using Remoting as like Activator.CreateInstance Method. Meaning: Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly and default constructor.In simple terms, Activator.CreateInstance can create an object of any type. Does it have overload method to create objects in other app domains, or on another server ? Activator.CreateInstance has overloads that Assembly.CreateInstance Method does not have;for instance, it can create objects in other app domains, or on another server using Remoting.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/assemblycreateinstance-vs.html

Informix vs IBM Data Server .NET Providers Difference between Informix .NET Provider and IBM Data Server .NET Provider S.No 1 2 3 Informix .NET Provider Protocol support: SQLI IBM Data Server .NET Provider Protocol support: DRDA

Informix server support: Informix server support: Any supported Informix version Informix v11.10 or later ONLY LOB (BLOB & CLOB) column LOB (BLOB & CLOB) column size limit: size limit: 4 TB 2 GB Support for .NET framework 3.0, 3.5: No Supports 1.1 and 2.0 frameworks. Limited VSAI windows application support. Support for LINQ (Entity Framework): No Silverlight and AJAX development support : No ASP.NET dynamic data support: No ADO.NET Entity Data Modeling (EDM) support: No Visual Studio Tools for Office (VSTO) development using EDM: No VSAI support for Visual Studio 2008, Web application development support, WPF and WWF enhancements: No VSAI Designers to create tables, procedures, Support for .NET framework 3.0, 3.5: Yes Supports 2.0, 3.0, and 3.5 frameworks. Support for LINQ (Entity Framework): Yes Silverlight and AJAX development support : Yes ASP.NET dynamic data support: Yes ADO.NET Entity Data Modeling (EDM) support: Yes Visual Studio Tools for Office (VSTO) development using EDM: Yes VSAI support for Visual Studio 2008, Web application development support, WPF and WWF enhancements: Yes VSAI Designers to create tables, procedures, functions and

10

11

functions and triggers, run procedures and functions: No

triggers, run procedures and functions: Yes

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-informixnet.html TFS vs SVN Difference between Subversion and Team Foundation Server 2010 (OR) Difference between TFS and SVN S.No 1 Subversion Team Foundation Server 2010

Check-Out : Get Latest : Download the latest version of Download the latest version of all all the files. the files. Update: Updates a file to the latest version. This does nothing if you already have the latest version or a newer version than what is found on the server. N/A Get Latest: Updates a file to the latest version. This does nothing if you already have the latest version or a newer version than what is found on the server. Check-Out: Communicate to TFS that you desire to edit a file or folder and set it to writeable within your local filesystem.

Commit: Check-In: Uploads any new changes to Uploads any new changes to files files you have edited to the you have edited to the Server. Server. Revision: The Unit of versioning. Each time you Check-in, that Checkin is given a unique Changeset ID. Changeset: The Unit of versioning. Each time you Check-in, that Check-in is given a unique Changeset ID.

Copy: Branch: A folder that contains a copy of A folder that contains a copy of the the Main source tree. Main source tree. Revert : Rollback: Used to undo changes from a Used to undo changes from a Changeset inside the Changeset inside the Repository.

Repository. 8 Diff : Used to analyze differences between the a file or folder found in your Workspace and that same file or folder found in the Repository. Blame: Downloads every version of a file and goes line-by-line creating an output file showing the changeset, date, and user who last edited each line of code. Log : Details a timeline of each Changeset and which user updated that particular file. N/A Compare : Used to analyze differences between the a file or folder found in your Workspace and that same file or folder found in the Repository. Annotate: Downloads every version of a file and goes line-by-line creating an output file showing the changeset, date, and user who last edited each line of code. History: Details a timeline of each Changeset and which user updated that particular file. Workspace: A container that maps your Working Folder found on your Local Machine to the Team Foundation Server Repository. Includes details like Name, Owner, and Computer.

10

11

Summary: 1. Both TFS and SVN uses the same name Add to place a File or Folder into the Repository. 2. Both TFS and SVN uses the same name Delete to mark a File or Folder as Deleted on the Server. The file is still there, but it will not be downloaded or uploaded at the next Get or Check-in command. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-teamfoundation.html GetChildren() vs GetDescendants() in Sitecore Differences between GetChildren() and GetDescendants() Methods in Sitecore S.No 1 GetChildren() How it can be accessed ? This method can be accessed as follows: itemObject.GetChildren(); GetDescendants() How it can be accessed ? This method can be accessed as follows: itemObject.Axes.GetDescendants() ;

Items returned by GetChildren(): Returns all the direct children of an item. i.e. All the items present at level 1 under the item. How to find all the Children using GetChildren() ? If we need all the children, we need to recursively call GetChildren() method, for all the items under a specific item. This surely gonna consume more time!

Items returned by GetDescendants(): Returns all the items under an item.

How to find all the Children using GetChildren() ? If we want all the children, then Call GetDescendants() method and we have them all and no recursive calls as like GetChildren(). So thats where this method seems good.

What is Sitecore ? Sitecore is a web content management system software company that provides enterprise website, intranet, portal and marketing automation software. The company was founded in 2001 and has offices in Australia, Denmark, Sweden, Canada, Germany, Japan, Netherlands, United Kingdom, and United States. Sitecore's software is built on Microsoft .NET 3.5/4.0. Content can be stored as XML or .NET objects and Sitecore CMS can leverage either Microsoft SQL Server or Oracle Database for its database storage, though MS SQL Server is the most popular.[citation needed] Sitecore also allows deployment via Microsoft Azure.[1] Reference: http://onlydifferencefaqs.blogspot.in/2012/09/getchildren-vs-getdescendantsin.html

DOTNET Programming Concepts Difference FAQs-1 1.Difference between hash table and arraylist S.No 1 2 3 Arraylist Array List is a List Hash table Hash Table is a map

Here, we can only add items to Here, we can add data with the key the list Retrieving data using Arraylist is slower than Hashtable because If we want to find something in a arraylist we have to go through each value in arraylist. Retrieving by key in Hashtable is faster than retrieving in Arraylist because If we want to find something in a hashtable we dont have to go through each value in hashtable, instead search for key values and is faster.

2.Difference between Hash Table and Arrays S.No 1 2 3 Hash Table Array

Hash table stores data as Array stores only value name,value pair. To access value from hash In array, to access value , we need table, we need to pass name. to pass index number. We can store different type of In array ,we can store only similar data in hash table, say type of data. int,string etc.

3.Difference between Dictionary and Hashtable S.No 1 2 Dictionary Dictionary is a generic type In Dictionary we need to specify the types of both the key and the corresponding value.The value represents the actual object stored and the key represents a means to identify a particular object. Hashtable Hashtable is not generic type. Hashtable is a collection of name/value pairs that are organised on the basis of hash code of the key being specified.

In Dictionary public static Hashtable is thread safe for use by members are type safe but any multiple reader threads and a single

instance members are not type writing thread. safe. 4 We cannot use Dictionary with We can use Hashtable withWeb Web Services The reason is no Services web service standard supports generic standard. Dictionary is aster than Hashtable It is slower than dictionary because to because boxing is not required. retrieve a value we must cast it as its actual type, because it will be returned via object reference.

4.Difference between array and stack S.No 1 2 Array An array can dimensional be Stack multi- Stack is strictly one-dimensional

An array allows direct access With a stack, only the 'top' element to any of its elements is directly accessible; to access other elements of a stack, we must go through them in order, until we get to the one we want

5.Difference between Stack and Heap S.No 1 2 3 Stack Heap

Memory will be allocated at the Memory will be allocated at the run compile time. time. Here the memory is allocated by Here the memory is allocated by the the compiler. user. Memory will be allocated only in Memory will be allocated in sequential sequential locations. locations and non- sequential locations. The memory will also be deleted The memory must be deleted explicitly by the compiler. by the user. There is lot of chance of memory There is no chance of memory wastage. wastage if the memory is handled perfectly.

4 5

6.Difference between Array and ArrayList S.No 1 2 3 Array They are fixed length. ArrayList They are resizable and variable length can

They are compiled strong type They are flexible and collection. accommodate any data types.

Because arrays are of fixed size In arraylist lots of boxing and unboxing and strong type collection are done there for its performance is performance is faster. slower. Array is namespace in the System ArrayList is in the System.Collections namespace. Ex:ArrayList a_list=new ArrayList();

4 5

Ex:Char[] vowel=new Char[];

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/dotnet-programming-conceptsdifference.html Dotnet Programming Concepts Difference FAQs-2 1.Difference between for and foreach loop S.No For loop 1 Foreach loop

In case of for the variable In case of Foreach the of the loop is always be int variable of the loop while be only. same as the type of values under the array. The For loop executes the statement or block of statements repeatedly until specified expression evaluates to false. The Foreach statement repeats a group of embedded statements for each element in an array or an object collection.

There is need to specify We do not need to specify the loop bounds(Minimum, the loop bounds minimum or Maximum). maximum. example: example: using sytem; using sytem; class class1 class class1 { { static void Main() static void Main() { { int j=0; int j=0; for(int i=0; i<=10;i++) int[] arr=new int[] { {0,3,5,2,55,34,643,42,23}; j=j+1; foreach(int i in arr)

} Console.ReadLine(); } } }

{ j=j+1; } Console.ReadLine(); }

2. Difference between Covariance and Contravariance S.No Covariance 1 Converting from a broader type to a specific type is called co-variance.If B is derived from A and B relates to A, then we can assign A to B. Like A=B. This is Covariance. Co-variance is guaranteed to work without any loss of information during conversion. So, most languages also provide facility for implicit conversion. Contravariance Converting from a more specific type to a broader type is called contra-variance. If B is derived from A and B relates to A, then we can assign B to A. Like B= A. This is Contravariance. Contra-variance on the other hand is not guaranteed to work without loss of data. As such an explicit cast is required.

e.g. Converting from cat or dog to animal is called contrae.g. Assuming dog and cat variance, because not all inherits from animal, when features (properties/methods) you convert from animal of cat or dog is present in type to dog or cat, it is animal. called co-variance.

Example: class Fruit { } class Mango : Fruit { } class Program {

delegate T Func(); delegate void Action(T a); static void Main(string[] args) { // Covariance Func mango = () => new Mango(); Func fruit = mango; // Contravariance Action fr = (frt) => { Console.WriteLine(frt); }; Action man = fr; } } 4 Note: 1. Co-variance and contra-variance is possible only with reference types; value types are invariant. 2. In .NET 4.0, the support for co-variance and contravariance has been extended to generic types. No now we can apply co-variance and contra-variance to Lists etc. (e.g. IEnumerable etc.) that implement a common interface. This was not possible with .NET versions 3.5 and earlier.

3.Difference between IList and IEnumerable S.No IList 1 IList is used to access an element in a specific position/index in a list. IList is useful when we want to Add or remove items from the list. IList can find out the no of elements in the collection without iterating the collection. IList does not support filtering. IEnumerable IEnumerable is a forward only collection, it can not move backward and between the items. IEnumerable does not support add or remove items from the list. Using IEnumerable we can find out the no of elements in the collection after iterating the collection. IEnumerable supports filtering.

4.Difference between IEnumerable and IQueryable S.No IEnumerable 1 IEnumerable exists in System.Collections Namespace. IEnumerable is best to query data from inmemory collections like List, Array etc. While query data from database, IEnumerable execute select query on server side, load data inmemory on client side and then filter data. IQueryable IQueryable exists in System.Linq Namespace. IQueryable is best to query data from out-memory (like remote database, service) collections. While query data from database, IEnumerable execute select query on server side with all filters.

IEnumerable is suitable for IQueryable is suitable for LINQ to Object and LINQ LINQ to SQL queries. to XML queries. IEnumerable does not supports custom query. IEnumerable does not support lazy loading. Hence not suitable for paging like scenarios. Extension methods supports by IEnumerable takes functional objects. IQueryable supports custom query using CreateQuery and Execute methods. IQueryable support lazy loading. Hence it is suitable for paging like scenarios. Extension methods supports by IEnumerable takes expression objects means

expression tree. 8 IEnumerable Example MyDataContext dc = new MyDataContext (); IEnumerable list = dc.loyees.Where(p => p.Name.StartsWith("S")); list = list.Take(10); Generated SQL statements of above query will be : SELECT [t0].[EmpID], [t0].[EmpName], [t0].[Salary] FROM [Employee] AS [t0] WHERE [t0].[EmpName] LIKE @p0 Note: In this query "top 10" is missing since IEnumerable filters records on client side

IQueryable Example MyDataContext dc = new MyDataContext (); IEnumerable list = dc.loyees.Where(p => p.Name.StartsWith("S")); list = list.Take(10); Generated SQL statements of above query will be : SELECT TOP 10 [t0].[EmpID], [t0].[EmpName], [t0]. [Salary] FROM [Employee] AS [t0] WHERE [t0].[EmpName] LIKE @p0 Note: In this query "top 10" is exist since IQueryable executes query in SQL server with all filters. 5.Difference between IEnumerable and IEnumerator S.No IEnumerable 1 IEnumerator

The IEnumerable interface IEnumerator provides two is a generic interface that abstract methods and a provides an abstraction for property to pull a particular

looping over elements. In addition to providing foreach support, it allows us to tap into the useful extension methods in the System.Linq namespace, opening up a lot of advanced functionality The IEnumerable interface contains an abstract member function called GetEnumerator() and return an interface IEnumerator on any success call. 2

element in a collection. And they are Reset(), MoveNext() and Current The signature of IEnumerator members is as follows: void Reset() : Sets the enumerator to its initial position, which is before the first element in the collection. bool MoveNext() : Advances the enumerator to the next element of the collection. object Current : Gets the current element in the collection

IEnumerable does not IEnumerator does remember remember the cursor state the cursor state i.e currently row which is iterating through IEnumerable is useful IEnumerator is useful when when we have only iterate we have to pass the iterator the value as parameter and has to remember the value

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/dotnet-programming-conceptsdifference.html DOTNET Programming Concepts Difference FAQs-3 1.Difference between directCast and ctype in .NET S.No 1 2 DirectCast ctype

DirectCast is generally used to Ctype is generally used to cast cast reference types. value types. When you perform DirectCast Exceptions are not thrown while on arguments that don't match using ctype. then it will throw InvalidCastException. If you use DirectCast, you cannot convert object of one type into another. Type of the object at runtime should be same as the type that is specified in DirectCast. Consider the following example: Dim sampleNum as Integer Ctype can cast object of one type into another if the conversion is valid. Consider the following example: Dim sampleNum as Integer Dim sampleString as String sampleNum = 100 sampleString = CType(sampleNum, String)

Dim sampleString as String This code is legal and the Integer sampleNum = 100 100 is now converted to a string. sampleString = DirectCast(sampleNum, String) This code will not work because the runtime type of sampleNum is Integer, which is different from the specified type String. 4 To perform DirectCast between two different classes, the classes should have a relationship between them. Performance of DirectCast is better than ctype. This is because no runtime helper routines of VB.NET are used for casting. To perform ctype between two different value types, no relationship between them is required. If the conversion is legal then it will be performed. Performance wise, ctype is slow when compared to DirectCast. This is because ctype casting requires execution of runtime helper routines of VB.NET.

DirectCast is portable across Ctype is specific to VB.NET and it many languages since it is not is not portable. very specific to VB.NET

2.Difference between Convert.ToString() and object.ToString() S.No 1 Convert.ToString() object.ToString()

Convert.ToString(object) does object.ToString() give run time error not give any error in case of if object value is null object value is null

Example: object obj=null; string str=obj.ToTsirng(); //it will give run time error string str1=Convert.ToString(obj); // it will run, not give any error 3.Difference between String.Equals(string1,string2) and string1.Equals(string2) S.No 1 String.Equals(string1,string2 ) string1.Equals(string2)

String.Equals(string1,string2) If any of strings value is null, will not throw any error if any of string1.Equals(string2) will throw strings value is null runtime error

Example: try { string str1 = null;

string str2 = "abc"; bool chk; chk = str1.Equals(str2); // will give runtime error chk = String.Equals(str1, str2); //will not give any error } catch (Exception ex) { MessageBox.Show(ex.Message); } 4.Difference between catch(Exception objex) and catch() block S.No 1 catch(Exception objex) catch() block

catch(Exception objEx) will catch() will catch all types of catch only .net compliance exception i.e., both non-compliance exceptions . and .net compliance exceptions

5.Difference between "Convert" class and "Parse()" method S.No 1 Convert Class The Convert class is used to convert any value from any data type to another data type. This class consist of different methods for making conversions. Example: 1) char ch = Convert.ToChar("x"); -> string to character 2) float f = Convert.ToSingle(45); -> int to float 3) int x = Convert.ToInt(4.5f); -> float to int Parse() method The Parse method is used to convert only one string value to any other data type. Every data type is consisting of parse() method.

Example: 1) int x = int.Parse("600"); -> string to int 2) char ch = char.Parse("dnf"); -> string to character

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/dotnet-programming-conceptsdifference_8.html Difference Between ref and out parameters Difference between Ref and Out parameters S.No 1 Ref Out

Ref parameters are both input Out parameters are only for output and output - a value is passed - a value is passed out of a method into a method and a new value is passed out

2 3

An argument passed to ref out argument does not have to be parameter must be initialized explicitly initialized. Ref parameter may be written Out parameter must be written to to before returning from before returning from method method Ref parameter may be Out parameter may not be referenced inside method referenced inside method before before being written to being written to

Example for ref parameter : class Program { static void M1(ref int i) { i = 1; i += 1; } static void Main(string[] args) { int j=0; //Assigned M1(ref j); Console.Write(j); Console.Read(); } } The output is same: 2, but we have to assign the variable before used otherwise we will get an error. Example for out parameter : class Program { static void M1(out int i) { i = 1; i += 1; } static void Main(string[] args) { int j; //Not assigned M1(out j); Console.Write(j); Console.Read(); } }

} The output is : 2 Summary: 1. Both are treated differently @ runtime but same in the compile time, so cant be overloaded. 2. Both are passed by references except ref requires that the variable to be initialized before passed. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-ref-andout.html Difference between Checked and Unchecked keywords in .NET Difference between Checked and Unchecked keywords in .NET S.No 1 Checked keyword The checked keyword is used to explicitly enable overflow checking for integral-type arithmetic operations and conversions. i.e., Checked Key word is used to enforce the compiler to check the buffer overflow while operating arithmetic operators. Unchecked keyword The unchecked keyword is used to suppress overflow-checking for integral-type arithmetic operations and conversions. i.e.,Unchecked Keyword is used to enforce the compiler to do not check that is there any buffer overflow or Not.

If there is any Buffer overflow If here any Buffer overflow is code will throw exception. occurred it will just truncate the value but not throw exception

Example for Checked keyword: static void Main(string[] args) { int _value1 = 1500056564; int _value2 = 1200046565; checked { // this Code will give exception BuferOverflow System.Console.WriteLine(_value1 * _value2); System.Console.Read(); } } Example for Unchecked keyword: static void Main(string[] args) { int _value1 = 1500056564;

int _value2 = 1200046565; unchecked { // This Code will Not Give Exception System.Console.WriteLine(_value1 * _value2); System.Console.Read(); } } Note: Both the Checked and Unchecked keywords control whether or not an exception will be thrown when an operation causes a number to overflow. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-checkedand.html Difference between Clone and CopyTo methods in .NET Difference between Clone and CopyTo methods in .NET S.No 1 Clone Clone method returns a new array containing all elements copied from the array on which clone method is called. CopyTo CopyTo method copies elements of the array into an existing array. Elements will be copied into a specific index and its increments.

The array size of the Array size of the destination array destination array need not be has to be declared before mentioned. triggering copyTo method. If the array size declared is smaller to fit in elements, the array size will automatically grow based on the number of elements that are getting copied. Array size should be large enough to fit both existing array elements and the elements to be copied. If the size is smaller than the actual number of elements, then you will get the following error while performing CopyTo: "Destination array was not long enough. Check destIndex and length, and the array's lower bounds."

Here is an example of Clone method: class sampleClass{ public static void Main() { int[] array1 = new int[] {10,20,30}; int[] array2 = array1.Clone() as int[]; for(int i=0;iConsole.Write(array2[i]+" "); } }

} Output of this code will be: 10 20 30 Here is an example of CopyTo method: class sampleClass{ public static void Main() { int[] array1 = new int[] {10,20,30}; int[] array2 = new int[array1.Length]; array1.CopyTo(array2,0); for(int i=0;iConsole.Write(array2[i]+" "); } } } Output of this code will be: 10 20 30 Note: Both the Clone and CopyTo methods belong to System.Array namespace. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-clone-andcopyto.html Difference between Int and Int32 Difference between Int and Int32 S.No 1 Int Int is a datatype which has following three types, Int16 Int32 Int64 Int32 Int32 is the alias of Int

Summary: Both int and int32 are same . So there is no real difference between them .To make it user friendly ,int32 is given alias name as int. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-int-andint32.html Difference between Constructor and Destructor in C# Difference between Constructor and Destructor in C# S.No 1 Constructor It is a special type of method which will be executed Destructor It will be executed automatically while destroying object

automatically while creating an object 2 Constructor name must be same as class name with out return type Syntax: public class_name() { } These are overloadable These are used to initialize the variables to open files or database connection etc The name of destructor must be same as class name with a ~(tilde) prefix and with out return type and with out access specifiers Syntax: ~class_name() { } These are not overloadable It is used to de-allocate the memory

4 5

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-constructorand.html Difference between Boxing and Unboxing in C# Difference between Boxing and Unboxing in C# S.No 1 Boxing Meaning: Boxing is the process of converting a value type to the reference type. Type of Conversion: Implicit Conversion Example: int i = 1; object obj = i; //boxing Unboxing Meaning: Unboxing is the process of converting a reference type to value type. Type of Conversion: Explicit Conversion Example: object obj = 123; i = (int)obj ; // unboxing

2 3

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-boxing-andunboxing.html Difference between Implicit Conversion and Explicit Conversion Difference between Implicit Conversion and Explicit Conversion S.No 1 Implicit Conversion Implicit Conversion perform automatically in VB.NET, that Explicit Conversion In some cases we have to perform conversions , that is the compiler

is the compiler is taking care of the conversion and therefore does not require any special syntax in the source code.

does not automatically convert a type to another . These type of conversion is called Explicit conversion . An explicit conversion uses a type conversion keyword, eg.CType ,CInt ,CStr etc., With these conversion keywords we have to perform the Explicit Conversion

Example for Implicit Conversion: Dim K As Integer Dim Q As Double ' ... K = 432 ' Integer widens to Double, so Option Strict can be On. Q=K In the above example, Visual Basic .NET implicitly converts the value of K to singleprecision floating point before assigning it to Q. Example for Explicit Conversion: Dim K As Integer Dim Q As Double ' ... K = 432 ' Integer widens to Double, so Option Strict can be On. Q=K Q = Math.Sqrt(Q) ' Q had been assigned the value 432 from K. K = CInt(Q) ' K now has the value 21 (rounded square root of 432). In the above example, the CInt keyword converts the value of Q back to an integer before it is assigned to K Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-implicitconversion.html

HTML Difference FAQs-1 1.Difference between HTML 4 and HTML 5 S.No 1 HTML 4 HTML 5

HTML 4 uses common HTML5 uses new structures such structures like headers , as drag, drop and much more footers HTML 4 cannot embed video HTML 5 can contain embedded or audio directly. HTML 4 video and audio without using flash makes use of flash player for it player HTML 4 has traditional APIs HTML 5 introduced many new which does not include canvas APIs which facilitate flexibility of and content editable APIs web pages In HTML 4, local storage is not In HTML 5, new tags and new possible and tags that can features like local storage are handle only one dimension are enhanced present HTML 4 cannot inaccurate syntax handle HTML 5 is capable of handling inaccurate syntax

2.Difference between HTML and DHTML S.No 1 2 3 4 HTML DHTML

HTML site work slowly upon DHTML sites works faster upon client-side technologies. client-side technologies HTML is static in nature DHTML is dynamic in nature

HTML files are saved with .htm DHTML files are saved with .dhtm extension extension HTML does not make use of DHTML uses events, methods and any methods for making it much more for providing dynamism dynamic. HTML content is for HTML pages always static HTML pages does not require DHTML requires processing from any processing from browser browser which changes its look and feel

3.Difference between HTML and XHTML S.No 1 HTML XHTML

HTML is an application of XHTML is an application of XML SGML

Attribute minimization and tags XHTML does omission is supported in HTML minimization of omitting tags

not support attributes and

In HTML, document row In DHTML, row headings will be in headings will remain in normal bold font In HTML, tbody portion will be DHTML does not contain tbody and in the dom tree shape and also tth element second selector should match the tth element HTML is not case sensitive XHTML is case sensitive

5 6

In HTML, document body In DHTML, html element is element is specified rather specified and document body than html element element does not replace it

4.Difference between HTML and PHP S.No 1 2 3 4 HTML PHP

In HTML the output remains For PHP, the output may not be the same as that of input same all the time In HTML, browser interpret the code cannot The output of PHP is HTML code which the browser can interpret PHP includes both PHP and HTML codes design dynamic

HTML does not involve PHP

HTML can create webpages PHP can that are only static webpages

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/html-difference-faqs-1.html Difference between HTML and XML 1.Difference between HTML and XML S.No 1 HTML Abbreviation: XML Abbreviation:

HTML stands for HyperText XML stands for eXtensible Markup Markup Language Language 2 Purpose: Purpose:

To display information and to To describe information and and to focus on how data looks. focus on what data is.

Tags: In HTML, tags are predefined

Tags: In XML,tags are user defined Rule on Attribute Values: Quotes required around attribute values Rule on Empty Tags: Slash required in empty tags Case sensitiveness: XML is case sensitive. Rule on End Tags: End tags required for well formed documents. In a well formed document, elements can be defined as single tag or a pair of tags and Reusability and Extensibility: Xml documents are reusable and extensible

Rule on Attribute Values: Quotes are not required for the values of attributes

Rule on Empty Tags: Slash not required

Case sensitiveness: HTML is case insensitive

Rule on End Tags: End tags are not always required.

Reusability Extensibility: Html document does not supports reusability and extensibility

Data Interchange: Not possible

Data Interchange: Possible Content Type:

10

Content Type:

Static.ie.,Content is not Dynamic.ie.,Content is changed changed every time when the every time when the page is page is reloaded reloaded Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-html-andxml.html

IIS vs ASP.NET Development Server


Difference between IIS and ASP.NET Development Server S.No 1 IIS Security Context : In Internet Information Server(IIS), it is typically IUSR_MachineName. ASP.NET Development Server Security Context : In ASPNET Development Server, it is determined by who has logged into our computer.

i.e., IIS by default runs under i.e., Development server only ASP.NET account. accepts authenticated requests on the local computer as it runs under the security context of currently authenticated user account. It means it doesnt run under less privileged ASPNET account. 2 Accessing Static Pages : In IIS, we can access static pages in a secure folder if we are not logged in. Accessing Static Pages : In ASP.NET Development Server, we can not access static pages in a secure folder if we are not logged in.

Serving Requests: Serving Requests: It will serve pages to another ASP.NET Development server can computer besides local only serve local requests. requests. Support for e-mail sending functionality or file download functionality: IIS provides support for e-mail sending functionality or file download functionality by using protocols SMTP and FTP. Support for e-mail sending functionality or file download functionality: ASP.NET Development Server does not have protocols like SMTP or FTP and hence it does not support e-mail sending functionality or file download functionality.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-iis-and-aspnet.html

IIS 5.0 vs IIS 6.0


Difference between IIS 5.0 and IIS 6.0 S.No 1 IIS 5.0 IIS 6.0

IIS 5.0 uses operating system IIS 6.0 uses both 32bit and 64 bit with 32 bit architecture. architecture.

2 3 4

IIS 5.0 has binary metebase configuration. IIS clustering provides cluster support in IIS 5.0. The platform used by IIS 5.0 is windows 2000.

IIS 6.0 has XML configuration. IIS 0.6 windows support the clusters. IIS 6.0 uses Windows Server 2003 family.

IIS vs Apache
Difference between IIS Web Server and Apache Tomcat Server

S.No 1

IIS Web Server

Apache Tomcat Server

IIS webserver is operating Apache webserver is operating system dependent. It runs in system independent. only windows environment. i.e., Apache can run on almost any OS including UNIX, Apples OS X, and on most Linux Distributions. IIS is developed by Microsoft. IIS server runs in user space and Kernal space. IIS is not Open Source. Apache is developed by Apache Foundation . Apache server runs in user space only. Apache webserver is open source. i.e., Apache is known to be open source because the source code is available for configuration as per our requirements, its a linux based product.

2 3 4

5 6

IIS is both webserver and application server. IIS has a dedicated staff to answer most problems.

Apache tomcat server is only webserver. Support for Apache comes from the community itself.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/iis-web-server-vs-apache-tomcatserver.html

JavaScript Difference FAQs-1 1.Difference between PHP and JavaScript S.No 1 PHP JavaScript

PHP runs on server and the JavaScript can handle only local major functionality of PHP is to tasks that are specific. produce the HTML code which will be read by browser. In PHP, code will be available In JavaScript the code can be only after the server interprets viewed even after the output is it. interpreted. PHP is embedded only with JavaScript can be combined with HTML and PHP cannot be HTML, XML and AJAX. combined with XML. PHP is used to produce web pages on the go, read and deploy databases, import the files available on the server, and gain files of data from further domains. JavaScript can import files of information available by mentioning the URL of the file in the address bar of the browser.

5 6

PHP does not execute within a JavaScript executes browsers window. browsers window.

within

PHP commonly uses MYSQL MYSQL is not commonly used by as a database. JavaScript.

2.Difference between JScript and JavaScript S.No 1 JScript JScript is Microsoft. released JavaScript by JavaScript is released by Netscape in partnership with Sun Microsystems is a newly formed

JScript is reverse engineered JavaScript from Javascript by Microsoft in language. order to have its own ECMAScript language.

Microsofts JScript is a JavaScript is a language language openly implemented independent of the Java language on the lines of Netscapes of Sun Microsystems. JavaScript. JScript is used for creating JavaScript is used for developing active and also online content client applications and server for WWW. applications.

All versions of JScript have Very few versions of JavaScript access to ActiveX objects. have access to ActiveX objects.

3.Difference between Java and JavaScript S.No 1 Java JavaScript

Java is termed as an Object JavaScript is a Scripting Language. Oriented Programming language. Java was originally created by Netscape,Inc. has developed the James Gosling belonging to JavaScript programming language. Sun Microsystems. Standalone applications and Standalone applications or applets applets are created by Java are not created by JavaScript. programming language. Java is known for the creation JavaScript code always needs a of applications that can run on browser for its execution. a browser but it does not always require a browser for program execution. Java code can survive on its JavaScript should be placed own as a stand alone Java through a HTML document for its Program. functioning. Java code should always be JavaScript code is always in text compiled. and it does not need compilation process.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/javascript-difference-faqs-1.html Difference between == and === in JavaScript Difference between == and === in JavaScript S.No 1 2 3 == == denotes equal to 0= =false // true === === denotes exactly equal including both value and type to

0= = =false // false, because they are of a different type

1= ="1" // true, auto type 1= = ="1" // false, because they are coercion of a different type

Summary:

JavaScript has both strict and type-converting equality comparison. For strict equality the objects being compared must have the same type and also the below characteristics: Two strings are strictly equal when they have the same sequence of characters, same length, and same characters in corresponding positions. Two numbers are strictly equal when they are numerically equal (have the same number value). NaN is not equal to anything, including NaN. Positive and negative zeros are equal to one another. Two Boolean operands are strictly equal if both are true or both are false. Two objects are strictly equal if they refer to the same Object. Null and Undefined types are == (but not ===). Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-and-injavascript.html Difference between "setTimeout" function and setInterval functions in Javascript Difference between "setTimeout" function and setInterval functions in Javascript S.No 1 SetTimeout function setTimeout is only execute the function after the defined time in milleseconds, its execute only one time. SetInterval function setInterval, will call the function in each time interval.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-settimeoutfunction.html Difference between undefined value and null value Difference between undefined value and null value S.No 1 undefined value Undefined value cannot be explicitly stated i.e., there is no keyword called undefined Typeof undefined variable or property returns undefined null value null value has keyword called null.

Type of null value returns object.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-undefinedvalue-and.html

Difference between onSubmit and onClick events in JavaScript Difference between onSubmit and onClick events in JavaScript S.No 1 2 onSubmit() Event Category: onSubmit() is a form event. When it occurs: This event occurs when we try to submit a form. When to use: We can put our form validation against this event type. onClick() Event Category: onClick() is a mouse event. When it occurs: This event occurs when a user clicks mouse left button. When to use: We can put our validation, warning etc against this event type.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-onsubmitand-onclick.html VBScript vs JavaScript Difference between VBScript and JavaScript S.No 1 VBScript Definition: VBScript is an Active Scripting language,which uses the Component Object Model to access elements of the environment within which it is running. Who developed ? VBScript is developed Microsoft. JavaScript Definition: JavaScript is an object-oriented scripting language used to enable programmatic access to objects within both the client application and other applications.

Who developed ? by JavaScript is developed Netscape.

by

Client-side / Server-side Client-side / Server-side scripting language: scripting language: It is both Client and server side It is client side scripting language. scripting language. Case sensitive or not: It is not case sensitive. Runs on which browser ? VBScript runs only on IE Case sensitive or not: It is case sensitive. Runs on which browser ? Javascript runs on any browser

4 5 6

Default scripting language or Default scripting language or

not: not: It is the not the deault scripting It is the default scripting language language.It must be specified for most web browsers. as the scripting language. 7 How to denote functions in VBScript ? It uses Function and End Function to denote functions. Same / Different Character used for different actions: It uses different characters for different actions.example: & for concatenation and + for addition. How to denote functions in JavaScript ? It uses curly braces to denote functions. Same / Different Character used for different actions: It uses the same character (+) for both addition and concatenation.

File Extension: File Extension: File extension for VBScript is File extension for JavaScript is .js. .vbs or .vba.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-vbscriptand.html

jQuery Difference FAQs-1 1.Difference between body.onload() function and document.ready() function used in jQuery S.No 1 body.onload() We can have only one onload function body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page. document.ready() We can have more than one document.ready() function in a page document.ready() function is called as soon as DOM is loaded

2.Difference between jquery.size() and jquery.length S.No 1 2 Summary: jquery.size() and jquery.length both returns the number of element found in the object. jquery.size() is slower than jquery.length as there is always an overhead in calling a function Reference: http://onlydifferencefaqs.blogspot.in/2012/08/jquery-difference-faqs-1.html $get vs $find in jQuery Difference between $get and $find in jQuery S.No 1 $get $find jquery.size() jquery.size() is slower than jquery.length size() is a method jquery.length jquery.length is faster than jquery.size() length is a property

Shortcut Method: Shortcut Method: $get is the shortcut method for $find is the shortcut method for document.getElementById. Sys.Application.findComponent(id, parent). Signature Signature of $get is $get(id, element) used: Signature used: Signature of $ind is $find(id, parent)

Suitable Controls: When we want to retrieve normal ASP.NET controls like textbox, checkbox, button etc we can use $get.

Suitable Controls: Controls which are extender controls cannot be retrieved through $get. So, Extender controls like ValidatorCalloutExtender, AutoCompleteExtender etc can be retrieved using $find.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-get-and-findin.html Difference between Json Array and Json Object Difference between Json Array and Json Object S.No 1 2 Json Array A JSONArray is an ordered sequence of values. Its external text form is a string wrapped in square brackets with commas separating the values. Json Object A JSONObject is an unordered collection of name/value pairs. Its external form is a string wrapped in curly braces with colons between the names and values, and commas between the values and names.

Example for Json Array [ ] {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"}, {"ircEvent": "PRIVMSG", "method": "deleteURI", "regex": "^delete.*"}, {"ircEvent": "PRIVMSG", "method": "randomURI", "regex": "^random.*"}

Example for Json Object {"bindings": [ {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"}, {"ircEvent": "PRIVMSG", "method": "deleteURI", "regex": "^delete.*"}, {"ircEvent": "PRIVMSG", "method": "randomURI", "regex": "^random.*"} ] }; Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-json-arrayand-json.html

jQuery.map() vs jQuery.each() Difference between jQuery .map and .each S.No 1 jQuery.map() Used as: The map method can be used as an iterator. What it returns ? Map function returns a new array Callback arguments used: map(arr, function(elem, index) {}); jQuery.each() Used as: The each method is meant to be used as an immutable iterator. What it returns ? Each function returns the original array. Callback arguments used: each(arr, function(index, elem) {});

Note: If we overuse the return value of the map function we can potentially waste a lot of memory. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/jquerymap-vs-jqueryeach.html jQuery.find() vs jQuery.filter() Difference between find() and filter() in jQuery S.No 1 jQuery.find() What it does ? Searches through all the child elements in the matched set. Description: Get the descendants of each element in the current set of matched elements, filtered by a selector. jQuery.filter() What it does ? Searches through all elements in the matched set Description: Reduce the set of matched elements to those that match the selector or pass the function's test.

Syntax: .find( selector ) selector: A string containing a selector expression to match elements against. .find( jQuery object ) jQuery object: A jQuery object to match elements against. .find( element ) element: An element to match elements against.

Syntax: .filter( selector ) selector: A string containing a selector expression to match the current set of elements against. .filter( function(index) ) function(index): A function used as a test for each element in the set. this is the current DOM element. .filter( element ) element: An element to match the current set of elements against. .filter( jQuery object ) jQuery object: An existing jQuery object to match the current set of elements against.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/differencebetween-find-and-filterin.html jQuery.append() vs jQuery.html() Difference between append() and html() in jQuery S.No 1 jQuery.append() .append() add some value with the existing one. jQuery.html() .html() do the same as like .append() but it removes the old value.

Here is an example given to understand the practical difference between .append() and .html(), <ul id="test"> <li>test</li> </ul> Now if .append() is used to add one <li>,as given below <script type="text/javascript>" jQuery("#test").append("<li>test1</li>"); </script> The output of this jQuery will be <ul id="test"> <li>test</li> <li>test1</li> </ul> Now if .html() is used to add one <li>,as provided below <script type="text/javascript>" jQuery("#test").html("<li>test1</li>"); </script> The output of this Script will be <ul id="test"> <li>test1</li> </ul> Here in this example .append() add one extra <li>, whether .html() removes the old one with new one. This is the main difference between .append() and .html() in Jquery

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/jqueryappend-vs-jqueryhtml.html JQuery.find() vs JQuery.children() Difference between find() and children() in jQuery

S.No 1

Jquery.find() What it does ? Search through the matched elements child, grandchild, great-grandchildany levels down.

Jquery.children() What it does ? Search through the matched elements child only (single level down).

Summary: Both find() and children() methods are used to filter the child of the matched elements, except the former is travels any level down, the latter is travels a single level down. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/jqueryfind-vs-jquerychildren.html string array vs numerical array sorting Difference between sorting string array and numerical array in jQuery S.No 1 jQuery.sort() for string array sort() method sorts the string array in alphabetical order. jQuery.sort() for numerical array sort() method does not sort the numerical array in proper order. This is because sort method sorts on the basis of the ASCII values .Hence,the numerical values are not sorted correctly with the sort() method i.e., it considers the ASCII value of the first numerical digit of all numerical values for sorting purposes. To sort numerical values correctly, we must define a comparison function with sort(). Note: Please look at the points below for comparison function process.

To sort string array, there is no need to define a comparison function with sort().But, it is better to have all uniform names. That is, they must begin with either uppercase or lowercase, but not mixed case.

If we define a comparison function, then a pair of values from the array will be repeatedly sent to the function until all elements of the array are processed. In the comparison function, we thus write a statement considering the pair of values passed to it so that the function returns any of the following three values: <0 or="or">0.

When the function returns value is less than(<) 0, the second value of the pair of array values sent to the function is larger than the first value and hence must be pushed down the sorting order. When the function returns value >0, the first value is larger than the second value, so it must be pushed down the sorting order. When the function returns value =0, it means there is no need to change the sort order since the two values are same. Example: jQuery.sort() for string array $(document).ready(function() { var list= [ "jQuery", "Dojo", "JavaScript", "Ajax"]; $('#alltech').html(list.join("")); list = list.sort(); $('#sorted').html(list.join("")); })

Results: List of Client side technologies jQuery Dojo JavaScript Ajax List of Client side technologies in sorted order Ajax Dojo JavaScript jQuery Example: jQuery.sort() for numerical array without using comparison function $(document).ready(function() { var list= [ 45, 32, 98, 24, 16, 9, 3]; $('#allnumber').html(list.join("")); list = list.sort(); $('#sorted').html(list.join("")); })

Results: Numbers in Array before sorting 45 32

98 24 16 9 3 Numbers in Array After sorting 16 24 3 32 45 9 98 Well, the numerical values are not sorted correctly with the sort() method because as mentioned earlier that it considers the ASCII value of the first numerical digit of all numerical values for sorting purposes. To sort numerical values correctly, we must define a comparison function with sort(). Example: jQuery.sort() for numerical array with comparison function $(document).ready(function() { var list= [ 45, 32, 98, 24, 16, 9, 3]; $('#allnumber').html(list.join("")); list = list.sort(function(a,b){ return a-b; }); $('#sorted').html(list.join("")); })

Results: Numbers in Array before sorting 45 32 98 24 16 9 3 Numbers in Array After sorting 3 9 16 24

32 45 98 Reference: http://onlydifferencefaqs.blogspot.in/2012/09/string-array-vs-numerical-arraysorting.html jQuery.live() vs jQuery.delegate() Difference between jQuery live() and delegate() S.No 1 jQuery.live() Whether it can be used with chaining or not ? live() cannot be used with chaining .So, the below thing cannot be done, $ (#foo).children(table).find(td ).live(click, function(){ blah blah... }); 2 Performance: Live() default context is document. so it bubble till document which cause the performance issue. But, in jQuery 1.4 , option is provided to define context for live other than document as given below, $(a, $(#mytable) [0]).live(click, function(){ blah blah... }); Note: Context is defining the search limit to bubble to top level of element. Summary: 1. Both live() and delegate() are used to attach event to current element and future elements which we append after DOM loaded e.g. we load some table rows using ajax. 2. By considering performance factor,so it is better to use delegate all the time instead of live() and bind(). jQuery.delegate() Whether it can be used with chaining or not ? delegate() can be used with chaining as provided below, $ (#foo).children(table).delegate(tr , click, function(){ blah blah... }); Performance: In delegate we can set context which cause less traverse $(#mytable).delegate(a,click, function(){ blah blah... });

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/jquerylive-vs-jquerydelegate.html clientX/Y vs pageX/Y in jQuery Difference between jQuery mouse event clientX/Y & pageX/Y S.No 1 ClientX/Y What is the function of this event ? It gives us x,y offset of the mouse click point relative to top left browser's view port regardless of the scrolling. For example, our browser window view port size 1024x820 px, the maximum value of clientX/clientY would be 1024 px/820 px irrespective of the document size. PageX/Y What is the function of this event ? It gives us x,y offset of the mouse click point relative to top left of the document regardless of the scrolling.

Example: $(document).click(function(e){ alert(e.clientX); alert(e.clientY); alert(e.pageX); alert(e.pageY); }); Reference: http://onlydifferencefaqs.blogspot.in/2012/09/clientxy-vs-pagexy-in-jquery.html mouseout() vs mouseleave() in jQuery Difference between mouseout and mouseleave in jQuery S.No 1 mouseout() Does it bubble the event ? By deault, in mouseout there is no event bubbling. mouseleave() Does it bubble the event ? In mouseleave the events bubble by default.

Example: Consider the following example,

1. When we point the cursor of the mouse over the red area where the div is and there is an attached event listener for mouseout of that div, something like divElement.onmouseout = doSomething;, where this is of course pseudo code, and 2. When we point the mouse over the a-tag yet again the mouseout of the div doesnt fire. Thats because of the event bubbling in JavaScript where if one element receives the event, in this case the a tag has the mouse over it, the event bubbles to the parent element and then to the parent of the parent and so forth to the document root. Why $.mouseout does not bubble the event ? In JQuery the mouseout doesnt bubble and there comes the problem with the schema from the image. If we have, $('div').mouseout(); and we point to the a-tag even it is inside the div, the mouseout event fires. Now this seems strange. Our mouse is over that element but jQuery says us that it is out! What is the solution for event bubbling to take place automatically ? OR Which event can be used to handle the above scenario ? OR Which event can replace the mouseout to handle the above scenario? This is easy and mouseleave helps us enter with the mouse over the a-tag and still the mouseleave event doesnt fire. But if we move the mouse outside the div and we point the body, now this seems normal. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/mouseout-vs-mouseleave-injquery.html

LINQ Difference FAQs-1


1.Difference between LINQ and SQL S.No 1 2 LINQ LINQ Stands for language integrated query. LINQ Statements are verified during compile time. To use LINQ we can depend upon our .Net Language syntaxes and also we can consume base class library functionalities. LINQ Statements can be debugged as they execute under framework environment. SQL . SQL SQL stands for Structured Query Language. SQL statements can be used in a application gets verified for their syntaxes only in the run time. To use SQL we need to be familiar with SQL syntaxes and also the pre-defined functions of SQL like MAX,MIN,LEN and SUBSTRING etc... As SQL statements execute on Database server debugging of the code is not possible.

2.Difference between LINQ to SQL and Entity Framework S.No 1 2 3 4 5 6 LINQ to SQL It only works with Sql server. Used for rapid application development. It does not support for complex type. It cannot generate db from model. Mapping type ( class to single table) We can query data using DataContext. Entity Framework It works with variety of db products. Cannot used for rapid application development. It provides support for complex type. It can generate db from model. Mapping type ( class to multiple tables) We can query data using esql,object services,entity client and linq to entities.

Another Good Reference: http://jinaldesai.net/linq-to-sql-vs-entity-framework/ (OR)

http://www.slideshare.net/jinaldesailive/linq-to-sql-vs-entity-framework-jinal-desai 3.Difference between LINQ and Stored Procedures S.No 1 LINQ As LINQ is part of .NET, we can use visual studios debugger to debug the queries Stored Procedures It is really very hard to debug the Stored Procedure

With LINQ everything gets With Stored Procedures, we need complied into single DLL hence to provide an additional script for deployment becomes easy. deployment LINQ is type safe, so queries errors are type checked at compile time.It is really good to encounter an error when compiling rather than runtime exception! LINQ supports multiple databases LINQ supports abstraction which allows framework to add additional improvements like multi threading. It is much simpler and easier to add this support through LINQ than Stored Procedures. LINQ queries need to compile before execution.Therefore, LINQ is slower than Stored Procedures. Stored Procedures are not type safe i.e., error can be caught only during runtime.

With Stored Procedures which need to be re-written for different databases. As Stored Procedures does not support abstaction , so it is difficult to add additional impovements like multi threading

Stored Procedures are ster thn LINQ because they are precompiled i.e., Stored Procedures have a predictable execution plan.Therefore, if a stored procedure is being executed for the second time, the database gets the cached execution plan to execute the stored procedure.

4.Difference between LINQ to SQL and LINQ to Objects S.No 1 LINQ to SQL LINQ to SQL needs a Data Context object. The Data Context object is the bridge LINQ to Objects LINQ to Objects does not need any intermediate LINQ provider or API.

between LINQ and the database. 2 3 LINQ to SQL returns data of type IQueryable LINQ to SQL is translated to SQL by way of Expression Trees, which allow them to be evaluated as a single unit and translated to the appropriate and optimal SQL statements. LINQ to SQL is translated to SQL calls and executed on the specified database LINQ to Objects returns data of type IEnumerable. LINQ to Objects does not need to be translated.

LINQ to Objects is executed in the local machine memory.

5.Difference between LINQ to SQL and LINQ to Entities S.No 1 2 3 4 5 6 7 8 LINQ to SQL Does not support Conceptual Data Model Does not support Storage Schema Does not support Mapping Schema Does not support New Data Access Provider Does not support Non-SQL Server Database Support Supports Direct Database Connection LINQ to Entities Supports Conceptual Data Model Supports Storage Schema Supports Mapping Schema Supports New Data Access Provider Supports Non-SQL Server Database Support Does not support Direct Database Connection

Does not support Multiple-table Supports Multiple-table Inheritance Inheritance Does not support Single Entity from Multiple Tables Supports Single Entity from Multiple Tables

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/linq-difference-faqs-1.html

Linq difference faqs-2


1.Difference between LINQ to SQL and ADO.NET S.No 1 LINQ to SQL Used for data handling with SQL Server databases only. Uses the extension methods of System.Linq.Queryable class. Introduced in .net Framework 3.0 DataContext is used for Database connectivity. Syntax and coding is somewhat complex. ADO.NET Used for data handling with any database: SQL Server/Access/Oracle/Excel etc. Does not use the extension methods of System.Linq.Queryable class. It is there since the .net Framework 1.0 SqlConnection/OleDbConnection are used for database connectivity Easier syntax and coding.

3 4 5

Note: Both LINQ TO SQL and ADO.NET have connected / disconnected modes of data handling 2.Difference between LINQ and nHibernate S.No 1 2 LINQ LINQ is not an open-source LINQ is an incomplete ORM tool as it needs additional extensions. LINQ is primarily a querying language LINQ is much more useful in small applications where there is no massive dependence on databases. With LINQ, database already exists and the relationships and some programming will be dependent on how the database is defined. nHibernate nHibernate is an open source. nHibernate is an ORM tool

3 4

nHibernate has a limited querying language. nHibernate is much more useful in largel applications where there is massive dependence on databases. With nHibernate, database does not already exist and it needs to be defined .

3.Difference between LINQ and Entity Framework S.No 1 2 3 4 LINQ Used for Rapid Application Development Works with objects in database Mainly woks with SQL Server ".dbml" is created while using LINQ to SQL Entity Framework Used for Enterprise Development Works with Conceptual model of database Works with all data sources ".EDMX" is created while using Entity Framework

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/linq-difference-faqs-2.html

LINQ Difference FAQs-3


1.Difference between First() and Single() extension methods in LINQ S.No 1 First() There is at least one result, an exception is thrown if no result is returned. Single() There is exactly 1 result, no more, no less, an exception is thrown if no result is returned.

2.Difference between FirstOrDefault() and SingleOrDefault() extension method in LINQ S.No 1 FirstOrDefault() It gets the first item that matches a given criteria. SingleOrDefault() If we specify this extension method that means we are specifically saying that there can be only one value that matches the criteria. If there are more then 1 value that matches the criteria, throw an exception.

3.Difference between Count() and LongCount() extension methods in LINQ S.No 1 Count() Count() has a lesser range than LongCount() long.MinValue = -2,147,483,648 long.MaxValue = 2,147,483,647 LongCount() LongCount() has a greater range than Count(). long.MinValue = -9223372036854775808 long.MaxValue = 9223372036854775807

Its DotNet Framework type is System.Int32

Its DotNet Framework type is System.Int64

Example for Count(): public static long display() { var tempval = (from h in objDB.tbl_mvc_login select h).Count (); return tempval; } Example for LongCount(): public static long display() { var tempval = (from h in objDB.tbl_mvc_login select h).LongCount (); return tempval; } Summary: They both does the same thing .If we want to count something which is quite big then we have to use LongCount() extension method otherwise we can use Count(). Reference: http://onlydifferencefaqs.blogspot.in/2012/08/linq-difference-faqs-3.html

Difference between findall() and where() in LINQ


Difference between findall() and where() in LINQ S.No 1 findall() where()

FindAll() is a function on the Where() works on any type that List type i.e., it can only be implements IEnumerable used on List instances (or instances of classes that inherit from it, of course). It is not a LINQ extension method like Where().So,if our collection is IEnumerable type, then we cannot use FindAll() as it's a function of List. The FindAll method of the List class actually constructs a new list object, and adds results to it. The Where extension method for IEnumerable will simply iterate over an existing list and yield an enumeration of the matching

results without creating or adding anything (other than the enumerator itself.) 3 As findall() creates a list before creating query, hence it is slower than Where() Where is much faster than FindAll. No matter how big the list is, Where takes exactly the same amount of time because Where() just creates a query, It doesn't actually do anything

Suppose we have a class Person : public class Person { public string FirstName { get; set; } public string LastName { get; set; } } Now, create an object of person class : Person person = new Person(); Take a List of person class : List lstPerson = new List(); Now, assign values to this class and add it to list : person.FirstName = "FirstName1"; person.LastName = "LastName1"; lstPerson.Add(person); person.FirstName = "FirstName2"; person.LastName = "LastName2"; lstPerson.Add(person); Now, we want to find all the records where FirstName = "FirstName1". To do this, we have two options : FindAll() and Where() FindAll() : List result = lstPerson.FindAll(delegate(Person per) { return per.FirstName == "Firstname1"; }); Where() : List result = lstPerson.Where((Person per) => per.FirstName == "FirstName1").ToList(); Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-findall-and-wherein.html

Difference between Skip() and SkipWhile() extension methods in LINQ


Difference between Skip() and SkipWhile() extension methods in LINQ S.No 1 Skip() Skip() will take an integer argument and skips the top n numbers from the given IEnumerable SkipWhile() SkipWhile() continues to skip the elements as long as the input condition is true. Once condition turns false it will return all remaining elements.

2.Signature of Skip (): public static IEnumerable Skip( this IEnumerable source, int count); 3.Example: int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; var firstNumbersLessThan6 = numbers.Skip(3); In this example, the Skip method will skip the first 3 items from the collection and return the remaining items as an IEnumerable collection. So the output of this example will be 3, 9, 8, 6, 7, 2 and 0. 2a.Signature of SkipWhile (): public static IEnumerable SkipWhile( this IEnumerable source, =unc predicate); 2b.Another signature for overriding: public static IEnumerable SkipWhile( this IEnumerable source, Func predicate); 3a.Example I: int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7 }; var remaining = numbers.SkipWhile(n => n < 9); In this example the SkipWhile operator will skip the items from the starting position until the conditions fails. Once the condition has failed then it will return the remaining items as an IEnumerable collection. So the output for this example is 9, 8, 6 and 7. 3b.Example II: int[] numbers = { 5, 4, 1, 3, 9, 8, 2, 0 }; var indexed = numbers.SkipWhile((n, index) => n > index); In this example the SkipWhile method will skip the items greater than their positions.

So in this example the output is 1, 3, 9, 8, 2 and 0. Because the position of the 1 is 2 so here the condition fails. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-skip-andskipwhile.html

Take() vs TakeWhile()
Differences between Take() and TakeWhile() extension methods in LINQ S.No 1 Take() Meaning: The Take (int...) method of System.Linq.Queryable class returns the portion of a source i.e. an IEnumerable collection of a source with the first n number of items from the source. Signature of Take (): http://www.csharpcorner.com/UploadFile/d bd951/how-to-usetaketakewhile-andskipskipwhile-inlinq/Images/Linq1.gif TakeWhile() Meaning: The TakeWhile (Func...) will return elements starting from the beginning of an IEnumerable collection until it satisfies the condition specified. If the condition is false then it will return the collection immediately. Signature of TakeWhile (): http://www.csharpcorner.com/UploadFile/dbd95 1/how-to-use-taketakewhile-andskipskipwhile-inlinq/Images/Linq2.gif Another signature for overriding the method: http://www.csharpcorner.com/UploadFile/dbd95 1/how-to-use-taketakewhile-andskipskipwhile-inlinq/Images/Linq3.gif

Example for Take() extension method: int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; var firstNumbersLessThan6 = numbers.Take(5); In the above example the Take method returns an IEnumerable collection with only the first 5 items as we have specified in the Take argument. I.e. it will return 5, 4, 1, 3 and 9 only. Examples for TakeWhile() extension method:

Example I: int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; var firstNumbersLessThan6 = numbers.TakeWhile(n => n < 9); In the above example the TakeWhile will return the collection of items when the condition fails. i.e. if the control reaches the item 9 then the condition fails here so it will return the items from 5 to 3 [5, 4, 1, 3]. Quick Note: Even though the collection has the items which are less than 9 such as 8,6,7,2,and 0 but it returned only 5,4,1 and 3. The point here is the TakeWhile won't consider the items which are the item which makes the condition fail. Example II: String colection = { "one", "two", "three", "four", "five" }; var strings = collection.TakeWhile(n => n.Length < 4); In this example, the TakeWhile will return the string collection having a length of 4 characters i.e. it will return only the "one" and "two" because the length of the "three" is 5 so it fails there. Example III: String colection = { "one", "two", "three", "four", "five" }; var strings = collection.TakeWhile((s, index)=> s.Length > index ); In this example the TakeWhile will return the items starting from the beginning of the array until a string length is greater than it's position in the collection. So this example will return "one" and "two". Because the "three" has the length of 5 and its position [index] is 2. Since 2 is less than 5 the condition fails at "three". Reference: http://onlydifferencefaqs.blogspot.in/2012/09/take-vs-takewhile.html LINQ vs SQL Keywords Difference between LINQ and SQL Keywords C# LINQ let Count(), Sum(), Skip() VB LINQ Let Aggregate Skip ANSI SQL AS COUNT, SUM, with no group n/a

SkipWhile() Take() TakeWhile() orderby group Distinct()

Skip While Take Take While Order By Group By Distinct

n/a n/a n/a ORDER BY GROUP BY DISTINCT

Note: Select ,From,Where,Join and Into keywords have the same name in C# LINQ,VB LINQ and ANSI SQL. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/linq-vs-sql-keywords.html

Difference between ViewData,ViewBag and TempData in MVC 3.0 Difference between ViewData,ViewBag and TempData in MVC 3.0 ViewData ViewData is a dictionary of objects that are accessible using strings as keys ViewBag ViewBag uses the dynamic feature that was added in to C# 4.0 It allows an object to dynamically have properties added to it. We can say ViewBag=ViewData + dynamic wrapper around the ViewData dictionary. TempData Temp data use during the current and subsequent request only means it is use when you are sure that next request will be redirecting to next view.

Example for ViewData: ViewData[JustLearn]=Just Learn on http://www.asp.net/ is rock!! Example for ViewBag: ViewBag.JustLearn =Just Learn on http://www.asp.net/ is rock!! Example for TempData: TempData[JustLearn]=Just Learn on http://www.asp.net/ is rock!! Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-betweenviewdataviewbag-and.html MVC 2 vs MVC 3 in ASP.NET Difference between MVC 2 and MVC 3 in ASP.NET S.No 1 MVC 2 MVC 3

View Engines: View Engines: MVC 2 uses only Web Forms The view engines used in the view engine (.aspx). ASP.NET MVC 3 Framework are the Razor View Engine (.cshtml or .vbhtml) and the Web Forms view engine (.aspx). Chart, WebGrid, WebImage, Chart, WebGrid, WebMail Controls: WebMail Controls: Not Available Available Objects available for sharing data between View and Controller: TempData, ViewData Web Forms view WebImage,

Objects available for sharing data between View and Controller: TempData, ViewData ,ViewBag

engine Razor View Engine syntax:

syntax: <%=Html code %> 5 6 Support for jQuery: Good Support for Injection: Good

@Html code Support for jQuery: Better for Dependency

Dependency Support Injection: Better

Support of Layouts: Only Master Page (.master)

Support of Layouts: Both Master Page (.master) and Layout Page (_Layout.cshtml)

Note: Master pages are the same if we are using the .aspx view engine. If we are using Razor, then it's the Layout page. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-mvc-2-andmvc-3-in.html Grails 2.0 vs ASP.NET MVC 4.0 Difference between Grails 2.0 and ASP.NET MVC 4 S.No 1 Grails 2.0 Meaning: Grails is an open source web application framework which uses the Groovy programming language (which is in turn based on the Java platform). It is intended to be a highproductivity framework by following the "coding by convention" paradigm, providing a stand-alone development environment and hiding much of the configuration detail from the developer. ASP.NET MVC 4.0 Meaning: The ASP.NET MVC Framework is a web application framework that implements the model-viewcontroller (MVC) pattern. Based on ASP.NET, it allows software developers to build a Web application as a composition of three roles: Model, View and Controller. A model represents the state of a particular aspect of the application. A controller handles interactions and updates the model to reflect a change in state of the application, and then passes information to the view. A view accepts necessary information from the controller and renders a user interface to display that. Community Support: Yes. MVC 4 may be built on .NET

Community Support: No. Grails is built on Groovy

which is a dynamic language that compiles into byte-code that runs on the Java virtual machine. Unfortunately, the number of Groovy developers in the world are far outnumbered by the number of C, C++, VB, C#, and Java developers. 3 Cost of Development: Yes. Grails is much cheaper to develop and deploy. It is conceivable that the cost of development and deployment is free since it can be done with open source tools and platforms.

VB or .NET C#. The usage of C# seems to be growing versus VB according to indeed.com job trends. Therefore, in the comparison with Grails, this comparison is focused on MVC 4 .NET C#. The C# open source community is very large. It is not quite the size of Java or C/C++, but it is global. Cost of Development: No. The cost of development is basically free if Visual Studio 2011 Express is considered sufficient (Note: In this case Visual Studio Professional is used). The cost of deployment is likely more than zero...it depends on the amount of data that is required to be stored and the number of users that would be connecting. OS knowledge required or not ? No. The .NET framework is affected by system updates to the Windows operating system. While it is possible to separate the .NET specific updates from the rest of the operating system updates, that is a hassle. Also, due to the success of the .NET framework for Microsoft over past ten years, it has become more intertwined with the operating system. As a result, it is not always clear where .NET begins and and the operating system ends. Therefore, at the very least, ASP.NET MVC 4 requires Windows operating system knowledge and research for each patch deployment...that is an ongoing cost that is arguably greater than that of maintaining a JVM.

OS knowledge required or not ? Yes. Since Grails runs in a JVM, there is little to no relationship between the JVM and the operating system.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/grails-20-vs-aspnet-mvc-40.html

Spring vs ASP.NET MVC Difference between Spring and ASP.NET MVC S.No 1 Spring Meaning: The Spring Framework is an open source application framework and Inversion of Control container for the Java platform. ASP.NET MVC Meaning: The ASP.NET MVC Framework is a web application framework that implements the model-viewcontroller (MVC) pattern. Based on ASP.NET, it allows software developers to build a Web application as a composition of three roles: Model, View and Controller. A model represents the state of a particular aspect of the application. A controller handles interactions and updates the model to reflect a change in state of the application, and then passes information to the view. A view accepts necessary information from the controller and renders a user interface to display that. 2 3 4 5 Global Preference: 12% Official Website: www.springsource.org License: Apache License,GPL2 Development Principles: Convention over configuration Design pattern: Dependency injection Operating system: Cross-platform Programming language: Java Database: MSSQL Global Preference: 67% Official Website: http://asp.net/mvc License: Proprietary Development Principles: Convention over configuration,Testdriven development Design pattern: Active-Record,Model-ViewController,Dependency injection Operating system: Windows Programming language: C#, JavaScript,VB.NET,F# Database: MSSQL

7 8 9

MySQL PostgreSQL Oracle SQLite IBM DB2 JDBC Compatible MongoDB Microsoft SQL Server 2005 Teradata Cassandra 10 Template language: JSP JSTL HTML5 Velocity Target audience: Enterprise Difficulty level: Intermediate Advanced Programming paradigm: Aspect-oriented programming Scripting language support: Groovy JavaScript PHP Ruby Object-Relational Mapping: Hibernate, iBatis, more Testing Framework(s): Mock objects, unit tests DB Migration Framework(s): N/A Security Framework(s): Spring Security (formerly Acegi) Form Validation Framework(s): Commons validator, Bean Validation

MySQL Oracle SQLite PostgreSQL IBM DB2

Template language: RazorEngine ASPX

11 12

Target audience: Enterprise,SMB Difficulty level: Beginner Intermediate Advanced Programming paradigm: Object-oriented Scripting language support: JavaScript

13 14

15 16

Object-Relational Mapping: ORM-independent Testing Framework(s): Unit tests, Functional Tests, Integration Tests DB Migration Framework(s): Entity Framework Security Framework(s): ASP.NET Forms Authentication (Default), Pluggable Form Validation Framework(s): Yes (client-side via plugins)

17 18

19

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/spring-vs-aspnet-mvc.html

Ruby on Rails vs ASP.NET MVC Difference between Ruby on Rails and ASP.NET MVC S.No 1 Ruby on Rails Meaning: Ruby on Rails, often shortened to Rails, is an open source full-stack web application framework for the Ruby programming language. Rails is a full-stack framework, meaning that it gives the web developer the ability to gather information from the web server, talk to or query the database, and render templates out of the box. As a result, Rails features a routing system that is independent of the web server. Ruby on Rails emphasize the use of well-known software engineering patterns and principles, as Active record pattern, Convention over Configuration, Don't Repeat Yourself and Model-ViewController. Note: Ruby on Rails is not to be confused with Ruby, which is a general-purpose programming language, on which Ruby on Rails runs. Ruby itself existed for more than 10 years before the first release of Ruby on Rails. Global Preference: 25% Official Website: http://rubyonrails.org License: MIT License Design pattern: Active-Record,Model-ViewController Operating system: ASP.NET MVC Meaning: The ASP.NET MVC Framework is a web application framework that implements the model-viewcontroller (MVC) pattern. Based on ASP.NET, it allows software developers to build a Web application as a composition of three roles: Model, View and Controller. A model represents the state of a particular aspect of the application. A controller handles interactions and updates the model to reflect a change in state of the application, and then passes information to the view. A view accepts necessary information from the controller and renders a user interface to display that.

2 3 4 6

Global Preference: 67% Official Website: http://asp.net/mvc License: Proprietary Design pattern: Active-Record,Model-ViewController,Dependency injection Operating system:

Linux Mac OS X Windows QNX 8 9 Programming language: Ruby Database: MSSQL MongoDB MySQL PostgreSQL Drizzle Oracle Redis SQLite Template language: ERB HAML Erubis Radius Target audience: Enterprise Web Development Difficulty level: Beginner

Windows

Programming language: C#, JavaScript,VB.NET,F# Database: MSSQL MySQL Oracle SQLite PostgreSQL IBM DB2

10

Template language: RazorEngine ASPX

11

Target audience: Enterprise,SMB Difficulty level: Beginner Intermediate Advanced API: Good Scripting language support: JavaScript

12

13 14

API: Basic Scripting language support: Ruby JavaScript coffeescript Object-Relational Mapping: ActiveRecord Security Framework(s): Plug-in

15 16

Object-Relational Mapping: ORM-independent Security Framework(s): ASP.NET Forms Authentication (Default), Pluggable

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/ruby-on-rails-vs-aspnet-mvc.html

OOPs Difference FAQs-1 1. What are the differences between TypeOf() and GetType()? S.No 1 2 TypeOf() Its an operator Can't be overloaded GetType() Its a method Has lot of overloads

2. What are the differences between const and readonly? S.No 1 2 3 4 const It cannot be static It is evaluated at design time It is initialized at declaration It must be of integral type or enumeration readonly It can be instance level or static It is evaluated at run time It is initialized at declaration or in constructor In addition, it can have complex types with new keyword and enumerations are not allowed

3. What are the Differences between Abstract Class and Interface? S.No 1 Abstract Class Default Implementation: In Abstract Class we can provide default implementation. Inheritance/Implementation: A class can inherit only one abstract class When to use ? We go for Abstract classes on such situations where we need to give common functionality for group of related classes Default Implementation Pros/Cons: If we add a new method, then we can provide a default implementation and so no need to make any change to existing work Constants type support: Static and Instance constants are possible Interface Default Implementation: Interface has only signature, we cannot provide implementation in interface. Inheritance/Implementation: A Class can implement any number of Interfaces When to use ? We go for Interface on such situations where we need to give common functionality for group of un-related classes Default Implementation Pros/Cons: If we add a new method, then we need to change all the existing work

Constants type support: Only Static constants are possible

Support for Automatic Properties: Abstract class can have automatic properties. Access Modifiers (public, private, protected, internal, protected internal): Abstract Class can have access modifiers for subs, functions, properties

Support for Automatic Properties: Interface cannot have automatic properties. We need to implement all the properties defined in interface into all its implementors. Access Modifiers (public, private, protected, internal, protected internal): Interface does not have access modifiers for subs, functions, properties. Everything defined inside the interface is assumed public modifier Purpose: Interface suits to implement peripheral requirements. i.e. both person and vehicle class can implement IRun interface.

Purpose: Abstract Class suits to implement core requirements that is shared among common type of objects. i.e. Person abstract class can be inherited by Manager, Supervisor, Clerk, Administrator Support for Data Fields: Abstract class can have data fields.

Support for Data Fields: Interface cannot contain data fields. However in .NET we can have abstract properties in interface. However just like methods we need to implement those abstract properties inside the implementor class. Performance: Interfaces require more time to find the actual method in the corresponding classes. Hence it is slower than abstract class. Class It is reference type It is stored on heap It supports inheritance It is suitable for complex data structures where inheritance, overriding is required or we need to create objects example: DataSet,ArrayList can handle large data.

10

Performance: An abstract class is fast

4. What are the differences between Structure and Class? S.No 1 2 3 4 Structure It is value type It is stored on stack It does not support inheritance It is suitable for small data structure usually where inheritance, overriding is not required example: int a=100;

5 6 7

'this' pointer it will not work in structure. Structure cannot be declared as private or protected. Structure contains only data member

'this' pointer will work only in class. Class can be declared public as well as private. Class contains both data member and member function

8 9 10 11 12 13 14 15 16 17

Default access specifier for structure is public Structure does not require constructor Structures are not destroyed using GC. Faster in access. Supports only interface inheritance. They do not have destructors They do no have explicit parameterless constructors We cannot put sealed /abstract modifiers before the structures. Easier memory management examples: int, short,long,DateTime, Point (predefined)

Default access specifier for class is private Class requires constructor Objects created from classes are terminated using Garbage collector. Not faster in access than structure. Supports both implemenation and interface inheritance. Classes have destructors They can have explicit parameterless constructors Sealed/abstract modifers can be put before classes. Comparitively Difficult memory management examples: SqlConnection,DataView(predefined classes)

5. What are the differences between property and indexer? S.No 1 2 3 4 Property Identified by its name. Accessed through a simple name or a member access. Can be a static or an instance member. A get accessor of a property has no parameters. Indexer Identified by its signature. Accessed through an element access. Must be an instance member. A get accessor of an indexer has the same formal parameter list as the indexer.

A set accessor of a property contains the implicit value parameter.

A set accessor of an indexer has the same formal parameter list as the indexer, in addition to the value parameter. Overriding We need to provide different implementation than base class Has same signature Otherwise called Run-time Polymorphism

6. What are the differences between overloading and overriding? S.No 1 Overloading Same name in same / derived class but with different / type of parameter Has different signature Otherwise called Compile-time Polymorphism

2 3

7. What are the differences between Value Types and Reference Types? S.No 1 2 Value Types It is stored on stack It can be accessed directly Reference Types It is stored on heap It can be accessed through references.Reference type variable will hold object reference. Lifetime of reference type is managed by .net framework Examples: All arrays, String, Class types, Delegate Reference type variables can hold null values.

Life time of value type is determined by lifetime of variable that contain them Examples: All numeric data type, Boolean, char, Date, Structure, enumerations Value types do not accept null value. Value types can be made to accept null values by using null coalescence operator. Value types cannot be inherited. Value types other than structure cannot implement interfaces. Boxing is performed to convert value type to an object and unboxing is performed to convert an object into a value type. Value type is inherited from System.ValueType namespace which is inherited from System.Object.

6 7 8

Reference types can be inherited. Class and Interface of Reference types can implement interfaces. You can directly assign a reference type to an object and an object to a reference type without boxing and unboxing. Reference type is inherited from System.Object directly.

10

When one value type variable is assigned to another, both value type variables will contain same data but independent copy. Changing value of one value type variable will not impact value of the other value type variable. CLR (Common Language Runtime) does not perform memory management of value types. Value types are primitive data types.

When one reference type variable is assigned to another, both reference type variables will be referencing to the same object. If one reference type changes value of the object then the other reference type variable will also point to the modified object. Memory management of reference types is automatically done by CLR.

11

12

Reference types are not primitive in nature. Reference types deal with objects.

Note: Object is not any kind of type. You can create object of structure as well as Class Are not type: Namespaces, Modules, Events, properties, procedures, variables, constants, & fields. Reference: http://onlydifferencefaqs.blogspot.in/2012/07/oops-difference-faqs-1.html OOPs Difference FAQs-2 Difference between Events and Delegates S.No 1 2 3 Events Event can be used in an interface definition Event can only be invoked from the class that declares it Event comes with its pair of accessors i.e Add and Remove. An event is always assigned and unassigned with a += and -= operator. Delegates Delegate cannot be used in an interface definition Delegates can be invoked from child classes and clients. There is no pair of accessors concept in delegates.

Event has a restrictive signature Delegates do not have restrictive and must always be of the form signature as like events Event (object source, EventArgs args)

Difference between Class and Object

S.No 1 2 3

Class It is a datatype that contains the programming logic. Class is visible in the source code and resides in hard disk. Class is like a template or blueprint of the object. It implements reusability,encapsulation, inheritance Example:Button is a class with properties like Text,BackColor, events like click, methods like Focus We can create subclasses

Object It is a chunk of memory that implements the class logic. Object is in the RAM and not visible in source code. It is the real world implementation of the class. Each object has its own copy of data. Example: Button1, Button2 are the objects of Button class.

We cannot create sub-objects

Difference between Private and Static Constructor S.No Static constructor Private constructor 1 A static constructor is called before the first instance is created. i.e. global initializer. Static constructor will be called first time when the class is referenced.Static constructor is used to initialize static members of the class. Private constructor is called after the instance of the class is created. Static members will not be initialized either by private or public constructor.

The static constructor will only be The private constructor will be executed once. executed each time it is called.

Difference between properties and methods S.No 1 2 Properties Properties are used to represent data Properties are created by using getter and setter i.e., get{} and set{} Methods Methods are used to performs actions Methods create like public void method1(parameter list here)

Difference between Singleton Pattern and static class S.No Singleton Pattern Singleton pattern maintains single instance. 2 A singleton can extend classes and implement interfaces. static class We cannot create instance for static class. A static class cannot . Note: It can extend classes, but it does not inherit their instance members. A static class is generally initialized when it is first loaded, leading to potential class loader issues. static class cannot be handled polymorphically.

A singleton can be initialized lazily or asynchronously. Singletons can be handled polymorphically without forcing their users to assume that there is only one instance.

Singleton Class can have value Static are always just shared and when Class object instantiated have no instance but multiple between server and client, such a references. way if three client want to have a shared data between them Singleton can be used.Thats why singleton class can be used for state mangement in stateless scenarios like shopping cart scenario. We can pass singleton object as parameter Singleton provides flexibility and also provides sort of a mechanism to control object creation based on various requirements. They can be extended as well if need arises. In other words we are not always tied to a particular implementation. With Singleton we have the flexibility to make changes as when situation demands. We cannot pass parameter in static class Static classes once defined could not accomodate any future design changes as by design static classes are rigid and cannot be extended.

6 7

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/oops-difference-faqs-2_11.html

OOPs Difference FAQs-3 1.Difference between Abstraction and Encapsulation S.No 1 2 Abstraction Encapsulation

Abstraction solves the problem Encapsulation solves the problem in the design level. in the implementation level. Abstraction is used for hiding Encapsulation means hiding the the unwanted data and giving code and data into a single unit to relevant data. protect the data from outside world. Abstraction allows us to focus Encapsulation means hiding the on what the object does internal details or mechanism of instead of how it does it how an object does something. Abstraction- Outer layout, used in terms of design. For Example:Outer Look of a Mobile Phone, like it has a display screen and keypad buttons to dial a number. Encapsulation- Inner layout, used in terms of implementation. For Example:Inner Implementation detail of a Mobile Phone, how keypad button and Display Screen are connected with each other using circuits

2.Difference between Composition and Aggregation S.No 1 Composition Defines a strongly-coupled relationship between two entities, where the one entity is part of another, and both need each other for their existence. Aggregation Defines a weakly-coupled relationship between two entities, where one entity could be part of another, but either can exist without the other, independantly.

2 3 4 5

e.g. Human body and the e.g.School and teacher. Heart. Composition implies real Aggregation does not necessarily ownership of its components own any of its aggregates. Composition has a stronger Aggregation has weaker or looser bond of its components. bonds with its aggregates. Composition has components Aggregation has aggregates that that exist at the inner level. live at the outer level.

3.Difference between Private Class and Sealed Class S.No 1 Private Class Sealed Class

A Private class can only be A Sealed class can be accessed by

accessed by the class it is defined any class.Private Constructor of a and contain within - it is Private Class = Sealed Class. completely inaccessible to outside classes. 2 In private Class,we can create a In Sealed class we can not create a constructor and therefore we can constructor of that class, so no create an instance of that class. instance of that class is possible. The main use of Private class is The sealed classes are mainly used to to create a user-defined type, prevent inheritance features of object which we want to be accessible to oriented programming. that class only.

Note: Private class(i.e private constructor) is also used to implement singleton classes(pattern). Singleton means "A single-instance object, and it simplify complex code. Singletons have a static property that we must access to get the object reference." Example for Private Class: public class A { private class B { } B b = new B(); } public class C { A.B b = new A.B(); // ERROR } Example for Sealed Class: public sealed class A { } public class B : A //ERROR { } 4.Difference between Static Class and Sealed Class S.No 1 2 3 Static Class Sealed Class

We can neither create their We can create their instances, but instances, nor inherit them cannot inherit them They can have static members They can contain static as well as only. nonstatic members. Static classes are used when a The sealed classes are mainly

class provides functionality that used to prevent inheritance is not specific to any unique features of object oriented instance. programming. Example for Static Class: static class Program { } Example for Sealed Class: sealed class demo { } class abc:demo { --Wrong } 5.Difference between Virtual method and Abstract method S.No 1 Virtual method Abstract method be the

Overriding : Overriding : Virtual method may or may not An abstract method should override by inherited class. overriden by inherited class. i.e.,Virtual method provide the i.e.,Abstract method forces derived class with the option of derived class to override it. overriding it. Virtual = = Overridable abstract == MustOverride

Implementation: Virtual method implementation.

has

Implementation: an Abstract method does not provide an implementation. Necessity to Implement: Abstract methods in a class contain no method body, and are implicitly virtual

Necessity to Implement: Virtual methods allow subclasses to provide their own implementation of that method using the override keyword Scope : Virtual methods members only. Instancing : scope

Scope : to Abstract method's scope to members and classes Instancing :

Virtual methods - Not applicable, as we can't create instance for members, it is possible only with classes.

Abstract method - directly NO, but other way,Yes.We can create an instance of a class that derives from an abstract class. And we can declare a type Abstract class and instantiate that as a derived class.

Example: public abstract class Test { public abstract void A(); // Abstract method

public virtual void B() { Console.WriteLine("Test.B"); } // Virtual Method } public class InheritedTest : Test { public override void A() { Console.WriteLine("InheritedTest.A"); } //Method B implementation is optional public override void B() { Console.WriteLine("InheritedTest.B"); } } 6.Difference between Class and Static Class S.No 1 2 3 Class Class has Instance Members Static Class Static class does not have Instance Members

In Class, Constructor has Access In Static Class, Constructor does not Specifier. have Access Specifier. In Class Constructor, initiation is In Static Class ,Constructor will be done every time when an object called only one time is created for the class In Class, Class members can be In Static Class, members can be accessed through class object. accessed through its Class name only

7.Difference between Method Overloading and Method overriding in C# S.No 1 Method Overloading Method Overriding

Method Overloading is passing Method Overriding is redifining parent same message for different class function to the child class functionality Method Overloading is between Method Overriding is between the the same function name with the same method. different signature Method Overloading does not Method Overriding checks the return check for the return type. type. Method Overloading takes place Method Overriding takes place in the same class. between parent and child classes Method binding Overloading is static Method Overriding binding. is a dynamic

3 4 5

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/oops-difference-faqs-3.html OOPs Difference FAQs-4 1.Difference between String and StringBuilder S.No 1 2 String StringBuilder

String class belongs to the StringBuilder class belongs to the namespace System. namespace System.Text. String class is immutable. Immutable means that the string cannot be changed. Consider the following example: class sampleClass { public static void Main() { string sampleStr = "Hai"; sampleStr = "Hello"; Console.WriteLine(sampleStr); } } Output of this code will be: Hello In this example, you have created a string called sampleStr. You have initially assigned the value "Hai". And StringBuilder class is mutable. Consider the following example: class sampleClass { public static void Main() { StringBuilder sampleSB = new StringBuilder("Hai",10); sampleSB = new StringBuilder("Hello"); Console.WriteLine(sampleSB); } } Output of this code will be: Hello In this example, you are doing the same thing. But the string "Hai" will be overwritten as "Hello" and no new strings will be created in the memory.

then you try to overwrite its value with "Hello". You get the overwritten value as output. But the problem lies in the number of strings that get created in memory. When you create the string as "Hai", this string gets created in the memory. When you try to change the value to "Hello", instead of overwriting the existing "Hai" string it will create a new string in the memory and assign this new string "Hello" to sampleStr. 3 You can directly assign a string to string class instance. For example, String sampleStr = "Hai" is valid. You cannot directly assign a string to StringBuilder instance. For example, StringBuilder sampleSB = "Hai" will lead to the following error: "cannot implicitly convert type 'string' to 'System.Text.StringBuilder' " You can assign a string to StringBuilder using the following statement: StringBuilder sampleSB = new StringBuilder("Hai"); String concatenation is done using Append method. Here is an example: class sampleClass { public static void Main() { StringBuilder sampleSB = new StringBuilder("Hello!"); sampleSB.Append("Good Day!"); Console.WriteLine(sampleSB); } } Output of this code will be: Hello! Good Day!

String concatenation is done using + operator. Here is an example: class sampleClass { public static void Main() { string sampleStr = "Hello!"; sampleStr += " Good Day!"; Console.WriteLine(sampleStr); } } Output of this code will be: Hello! Good Day! Here you have used += operator to perform both concatenation and assignment using single operator. You can also use + and = separately as shown below: sampleStr = sampleStr + " Good Day!";

During string concatenation, During string concatenation, additional memory will be additional memory will be allocated allocated. if and only if the string buffer's capacity is reached. During string concatenation, additional memory will be allocated if and only if the string buffer's capacity is reached. You cannot set a limit (specifying how many strings can be concatenated) to a string object using string class. If the number of concatenations to be done is random or not known, then it is recommended to use stringBuilder You can set a limit to StringBuilder using the member called capacity which will by default have the value 16. You can override it to any number. The maximum value acceptable is equivalent to MaxValue of Int32. If you feel that you do not want to reserve 16 as the capacity then you can very well redefine it. However the capacity will dynamically grow based on the number of strings that you append. Here is an example demonstrating the usage of capacity: class sampleClass { public static void Main() { StringBuilder sampleSB = new StringBuilder(); Console.WriteLine( sampleSB.Capacity); sampleSB.Capacity = 1; Console.WriteLine( sampleSB.Capacity); sampleSB.Append("str1"); sampleSB.Append("str2"); Console.WriteLine( sampleSB.Capacity); } } Output of this code will be: 16 1 8

2.Difference between Delegate and Interface S.No 1 Delegate Interface both

Delegates can only be Interface can include methods. Here is an example: properties and methods.

delegate sampleDelegate();

void Here is an example for an interface: interface ItestInterface { int paraml { get; set; } void sampleMethod(); }

Delegate can be applied to When a class implements an only one method at a time interface, it can implement all the methods associated with it You can use a delegate that is You can use an interface only visible in your scope when your class or struct implements it Within a class, you can implement the same delegate any number of times. Assume that either sampleClass1 or sampleClass2 of Examplel includes a method called sampleMethod2( ) with the same signature as that of delegate, then the same delegate can be used to access both sampleMethod() as well as sampleMethod2( ) Within a class, you can implement an interface method only once. In Example2, interface ITestInterface has a method called sampleMethod(). When sampleClass1 implements ITestInterface it implements sampleMethod() only once. If not, then it will end up in error.

Delegate can implement any When an interface method is method that shares the same implemented, same method name signature as that of the and signature has to be overridden delegate Delegate is mainly used for Interfaces are not used for handling handling events events You need not bother about the other methods available in the class.You are concerned about only the method that matches delegate signature. To access a method using delegate, you need not require any access to the instance of the class where the method is defined When a class implements an interface, though the class requires only one method it has to implement all the methods of the interface To access the method, you need an instance of the class which implements the interface or you need an interface reference pointing to the method implemented by the class

6 7

You can access anonymous You cannot access anonymous methods using delegates methods.Only named methods declared in interface can be

accessed class. 10 When you call a method using a delegate, all the method pointers associated with the delegate will be scanned through before the method execution. This is not a direct method call as you assume. It has a considerable performance overhead.

by

the

implementing

When you are calling a method using interface reference, you are directly accessing the method of the class that implements the interface. This is a direct method call and it doesn't have any overhead.

11

Delegates can wrap methods Accessing sealed types is not of sealed classes.Sealed permissible in interface. classes are those which cannot be inherited. Delegates can wrap any method matching its signature irrespective of which ever class the method belongs to Class can implement any number of interfaces and it should override only the methods belonging to those interfaces

12

13

Delegates can wrap static This provision is not available with methods. Examplel discussed interfaces . above has used the delegate to wrap a static method called sampleMethod() Delegate cannot involve in Interface can inherit other inheritance. interfaces. When a class implements that interface, it has to implement all the methods belonging to the interface and its inherited interfaces as well. Here is an example of an interface inheriting from other interfaces: interface IInterface: IInterface,1 IInterface2 { void sampleMethod1(); void sampleMethod2(); s}

14

Example1: Using Delegate delegate void sampleDelegate( ); class sampleClass1{ static void sampleMethod( ) { Console.WriteLine(Executing sampleMethod of sampleClass1); } }

class sampleClass2 { static void Main( ) { sampleDelegate dele1 = new sampleDelegate(sampleClass1.sampleMethod); dele1(); } } Example2: Using Interface interface ITestInterface{ void sampleMethod( ); } class sampleClass1 : ITestInterface { void sampleMethod( ) { Console.WriteLine(Executing sampleMethod of sampleClass1); } } class sampleClass2 { static void Main( ) { sampleClass1 obj1 = new sampleClass1( ); obj1.sampleMethod( ); } } 3.Difference between Virtual and Abstract keywords in .NET

S.No 1

Virtual If you feel that the derived class may or may not override the base class method, then you will define the base class method as virtual. Consider the following example: namespace Application1 { public class virtualClass { public virtual void virtualMethod(){ Console.WriteLine("Virtual Method.."); } } public class derivedClass:virtualClass{ public override void virtualMethod(){ Console.WriteLine("Overridden .."); } } public class testClass { public static void Main() { virtualClass obj = new

Abstract But if you want to enforce that derived class must override the base class method then you will define the base class method as abstract. namespace Application1 { public abstract class abstractClass { public abstract void abstractMethod(); } public class derivedClass:abstractClass{ public override void abstractMethod(){ Console.WriteLine("Overridden.."); } } public class testClass { public static void Main() { derivedClass obj = new derivedClass(); obj.abstractMethod(); } }

virtualClass(); } obj.virtualMethod(); Output of this derivedClass dObj = new Overridden.. derivedClass(); dObj.virtualMethod(); } } } Output of this code will be: Virtual Method.. Overridden.. 2 Virtual methods need not be compulsorily overridden. In the above example if the derived class does not override the method virtualMethod, then again the code will work.

code

will

be:

Abstract methods should compulsorily be overridden by the derived class. In the above example, if the derivedClass does not override abstractMethod, then during compilation you will get the following error: 'Application1.derivedClass' does not implement inherited abstract member 'Application1.abstractClass.abstrac tMethod()' If you want to define a method as abstract in the base class then the base class should also be marked as abstract. Consider the following example: namespace Application1 { public class abstractClass { public abstract void abstractMethod(); } } In this example, abstractClass has an abstract method. Hence the class in itself has to be marked abstract. But it is not done in the above example. Therefore during compilation, you will end up in the following error: 'Application1.abstractClass.abstrac tMethod()' is abstract but it is contained in nonabstract class 'Application1.abstractClass' Abstract methods have only the signature. It cannot have method body. However the abstract class can include non-abstract methods

To define a base class method to be virtual, you need not include any new definition for the base class. In the earlier example, you can see that the class virtualClass just includes an access modifier followed by the class name. No other additional modifiers are required.

Virtual method can have a method body. In the earlier example, virtualMethod of virtualClass has method

definition like any of the other and these methods can have methods that you define and it method body defined. Consider the is perfectly legal. following example: namespace Application1 { public abstract class abstractClass { public abstract void abstractMethod(){ Console.WriteLine("Abstract method.."); } } } Here you are trying to include method body for an abstract method. This is not permissible. Hence during compilation you will end up in the following error: "'Application1.abstractClass.abstra ctMethod()' cannot declare a body because it is marked abstract" 5 Class containing virtual method can be instantiated. Here is an example: namespace Application1 { public class virtualClass { public virtual void virtualMethod(){ Console.WriteLine("Virtual Method.."); } } Public class testClass { public static void Main() { virtualClass obj = new virtualClass(); obj.virtualMethod(); } } } Output of this code will be: Virtual Method Class containing abstract method cannot be instantiated. It can only be inherited. Consider the following example: namespace Application1 { public abstract class abstractClass { public abstract void abstractMethod(); } public class testClass { public static void Main() { abstractClass obj = new abstractClass(); } } } Here you are trying to create an instance of abstract class. This is not possible. Hence during compilation you will end up in the following error: "cannot create an instance of the abstract class or interface Application1.abstractClass"

Not just methods, virtual Apart from class and method, the modifier can also be used with modifer abstract can be associated properties. with properties, events and indexers.

There is a restriction when using virtual modifer. You cannot use this modifer along with static or abstract or override modifiers.

Abstract modifiers also have a restriction. They cannot be used along with static or virtual or override modifiers.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/oops-difference-faqs-4.html Functions vs Methods Difference between Functions and Methods S.No 1 2 3 Functions Functions do not have any reference variables All data that is passed to a function is explicitly passed It does not have access controlling i.e.,Function(other than static functions) declares and defines anywhere in the code Function applies to both object oriented and non-object oriented language(procedural language.eg. C, Scripting language eg; JavaScript etc) Methods Methods are called by reference variables It is implicitly passed the object for which it was called It has access controlling i.e.,Method should declare and define in the class only

Method is only applicable to object oriented programming language like C++, C#, Java etc

Summary: A function is just a part of code that executes code and can return something. A method is, in OOP, a function that is bound to a class. As in C# there are no stand-alone functions, every function in C# is a method Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-functionsand-methods.html Difference between Class and Module Difference between Class and Module S.No 1 Class Meaning: A class is a plan which is used to construct objects (instances of the class). Module Meaning: A module is a loose grouping construct used to group functions and procedures.

Instance Creation: Instances can be created from a class in the form of objects Scope of Class Members: The scope of the members of a class is only for the lifetime of the object Effect on Compilation: Class is compiled into a dll Starting Point of Project: Class explicitly need to mention a starting point of the

Instance Creation: Instances cannot be created from a module in the form of objects Scope of Module Members: The scope of the members of a module exist for the life of the program. Effect on Compilation: Module is compiled into an exe. Starting Point of Project: Module implicitly can be the main starting point in a project through

4 5

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-class-andmodule.html Difference between Method Parameters and Method Arguments Difference between Method Parameters and Method Arguments S.No 1 Method Parameters Method parameters get their actual values from the arguments that are specified when the method is invoked. i.e.,"parameters" refer to names Method Arguments Method arguments are itself having a value. i.e.,"arguments" refer to values bound to those names.

Example: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Sample { class Program { public static void Main() { int N1 = 10; int N2 = 20; //N1 and N2 are method arguments int Total = Sum(N1, N2); Console.WriteLine(Total); }

//FNum and SNum are method parameters public static int Sum(int FNum, int SNum) { int Sum = FNum + SNum; return Sum; } } } Note: The arguments must be compatible with the parameter type but the argument name used in the calling code does not have to be the same as the parameter named defined in the method which is clear in the above example Where, FNum and SNum are method parameters, and N1 and N2 are method arguments. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-methodparameters.html

Sharepoint Difference FAQs-1 1.Difference between .NET and Sharepoint S.No 1 .NET Functionality Creation: Sharepoint Functionality Creation:

Code need to be written even Lots of pre-defined web parts and to achieve simple functionality elements available.No need to write the code. 2 Coding Effort: Coding Effort:

Takes time to create the code Very less time required and test 3 Skilled Professionals: Skilled professionals required to create functionality 4 License Requirement: Skilled Professionals: are Even novice professionals can do the so easily License Requirement:

Not required at the time of Free versions available, but in case deployment of solution of extensive requirements License is required 2.Difference between Site Template and Site Definition S.No 1 Site Templates Site template approach for SharePoint Site Creation is easier, and just requires the use of the Web interface and occasionally Microsoft FrontPage. Content can be saved with site template Site Definitions Site Definitions are the foundations on which all sites and user templates are built. Site Definition is collection ox XML and .aspx file. Site Definitions are predefined components needs to be included when a site was created in SharePoint server. Site Definition contains information of Web Part , Lists, Features and navigation bars to be included in the site disk, better

2 3

Files are in content database, Files are on less efficient. performance.

Not easily extensible (users Highly customizable and extensible are limited by what UI offers) (XML and .NET code is much more flexible than UI) Can only provide one web Can provide multiple webs

3.Difference between SharePoint 2010 and MOSS 2007 S.No 1 SharePoint 2010 Look and feel: MOSS 2007 Look and feel:

In SP 2010 look and feel In MOSS 2007 there is no ribbon perspective there will be a ribbon where we can have a look and feel like Office 2010 2 Deployment of Web parts : Deployment of Web parts :

In SharePoint 2010 deploying In MOSS 2007 you need to drag custom web part is pretty the dll either to bin or GAC simple i.e. just right click on the solution and click Deploy 3 Silverlight Application: Silverlight Application:

In SP 2010 we can create a In MOSS 2007 we have to create a Silverlight application directly web part to host Silverlight from Visual Studio 2010 application 4 Shared Database & Service Shared Database Application: Application: In SP 2010 there is no SSP but there is a concept of Service Application like BCS as one service application, Excel Services as another service application, User Profile as separate service application. General idea is that you have an application for each service, rather than one application with lots of service crammed into it Own database rather than shared database in SP 2010 5 & Service

In MOSS 2007 we have SSP where we can work around with BI,Search Settings, User Profile Import, Excel Services, Info path In Database also we use to have separate area for SSP stuff

Easy exports/imports Easy exports/imports between between the forms : the forms : In SP 2010 we can update In MOSS 2007 through we can just existing information read the information and we can't update the existing services

Improvement Deployment :

in Improvement in Deployment :

In MOSS 2007 there is no such In SP 2010 we can Deploy option through Farm based and solution based solution in SP 2010 7 Alerts: Alerts:

In SP 2010 alerts were sent In MOSS 2007 alerts were sent only through emails and send only through emails. alerts to mobile device as SMS message. A New property delivery channel is introduced to indicate, whether the alerts is delivered as Email or an SMS message. 8 Improvements of events : Improvements of events :

New events for list creation No List and web events in MOSS and web creation 2007 9 Getting Items from the list : Getting Items from the list :

In SP 2010 through object In MOSS 2007 we can fetch only model we can fetch multiple list through object model data by LINQ query and object model 10 Rating : Rating :

In SP 2010 we can have rating In MOSS 2007 we should install column by default the feature that is available in codeplex to have rating 11 Key Word Suggestions : Key Word Suggestions :

In SP 2010 we can have In MOSS 2007 we dont have any keyword suggestions keyword suggestions 12 Taxonomy : Taxonomy :

In SP 2010 we can create In MOSS 2007 we dont have Taxonomy by using Managed taxonomy Metadata service 13 Other Features : Other Features :

In SP 2010 we have Power In MOSS 2007 we dont have Shell Scripting, JavaScript Power Shell Scripting, JavaScript object model, Chart Web Parts object model, Chart Web Parts

14

Running stsadm command :

Running stsadm command :

In SP 2010 we have to go 14 In MOSS 2007 we have to go 12 hive path to run stsadm hive path to run stsadm command command Reference: http://onlydifferencefaqs.blogspot.in/2012/08/sharepoint-difference-faqs-1.html SharePoint 2010 vs SharePoint 2013 Difference between SharePoint 2010 and SharePoint 2013 S.No 1 Sharepoint 2010 What is SharePoint 2010 -It is a previous or I should say current version of SharePoint that was released in year 2010. Sharepoint 2013 What is SharePoint 2013 (Preview) A new version of Microsoft famous Collaboration portal called SharePoint. The version adds few new exciting features such as Social Feed,SharePoint Apps and cross-site publishing. Development Changes In SharePoint 2013 Microsoft Introduced a new Cloud App Model for designing Apps for SharePoint. Apps for SharePoint are selfcontained pieces of functionality that extend the capabilities of a SharePoint website. You can use HTML, CSS, JavaScript and protocols like the Open Data protocol (OData), and OAuth to communicate with SharePoint using Apps. Tools SharePoint 2013 has Introduced new Tools for App development. Visual Studio 2012 now lets you develop apps for SharePoint and apps for Office. In addition a new web-based tools called Napa Office 365 Development Tools

Development Changes SharePoint 2010 Introduced Sandbox solutions to help developers deploy code that did not effect the whole farm. In SharePoint 2010 you could use Server Object model and Client Object model (.Net Managed, ECMASCRIPT and silverlight) to extract data from SharePoint. In SharePoint 2010 developers were also developing Farm solutions as they did with the previous SharePoint 2007 version.

were introduced for developing apps. No more Sandbox solutions. SharePoint 2013 sandboxed solutions are deprecated. So all we got is the New App model and the Old SharePoint Farm solutions.

Social and Collaboration features -SharePoint 2010 had very few social capabilities. My sites Tags and Tag profile pages Notes

Social and Collaboration features Microsoft in SharePoint 2013 Introduced new Social capabilities for better collaboration in the company.New Features added are Interactive feed Community Site Follow people Follow Sites

Search SharePoint 2010 had Introduced Integrated FAST search as an Enterprise search. In addition to this buildin SharePoint search is still widely used in companies.

Search -SharePoint 2013 includes several enhancements, custom content processing with the Content Enrichment web service, and a new framework for presenting search result types. Some of the features added are Consolidated Search Results Rich Results Framework keyword query language (KQL) enhancements

Enterprise Content Management (ECM) -SharePoint 2010 on the other hand had Introduced Managed metadata and taxonomy as a part of new ECM benefits for SP 2010. This version did not had Managed Navigation and Cross-site Publishing. SharePoint designer was a

Enterprise Content Management (ECM) SharePoint 2013 added some of the best capabilities of an ECM software. The newly added stuff is Design Manager Managed Navigation Cross-site Publishing

primary tool to modify Master pages instead of the new Design Manager.

EDiscovery

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-sharepoint2010-and.html Apps vs Farm Solutions Difference between Apps and Farm Solutions in SharePoint 2013 S.No 1 Apps What are apps An app for SharePoint is a small, easy-to-use, standalone app that solves a specific end-user or business need. Where does it run The code for an app runs in different places, depending on where your app is hosted.They never run in the context of SharePoint Server, but they will run in the context of the browser or in the context of the hosted platform. SharePoint-hosted apps Provider-hosted and autohosted apps In the cloud Apps that have a mix of components in SharePoint and in the cloud Farm Solutions What are Farm solutions - Farm solutions are pieces of functionality that extend the capabilities of a SharePoint website. They are Installed to the solution store of a farm by a farm administrator. Where does it run They are Installed to the solution store of a farm by a farm administrator. They run from the sharepoint server.

How Does It run - When you deploy a SharePoint-hosted app, SharePoint creates a new website called the app web. You can think of it as a dynamically created safe

How Does It run when you deploy a Farm solution, It gets deployed to one or more web apps (any existing or new one). You can use it in any site collection of the web app where

space for your app. Besides you deployed it. allowing you to store pages, lists, and libraries, the app web is also an isolated endpoint that your app can securely call client side by using JavaScript. 4 Authentication options - Authentication options - The Before you can call SharePoint components in the solution can, APIs from your app, you need and usually do, run in full trust to authenticate to SharePoint. Which authentication mechanism you use depends upon where the code of your app is running. * Inside SharePoint: You have to use HTML and JavaScript, and authentication is already taken care for you. * In the cloud: You have two choices: Use client-side code along with the cross-domain library. User server-side code along with OAuth. *REST APIs Resource Allocation - Resource Allocation No Site collection administrators resource usage restrictions are and tenant administrators can placed on them monitor apps and change the resources allocated to them. What Can be Created as What Can be Created as Farm Apps soltuion - You can deploy almost all the components as Farm solution. Custom Web Parts (remote pages that contain custom Web Parts) Event receivers and Feature receivers(remote event receivers) Custom field (column) types () Custom web services built on the SharePoint Service Application Framework Application pages

Cannot be created as Apps Apps cannot call SharePoint server side code Apps cannot access SharePoint components that are not on the same site Apps cannot communicate with each other Custom site definitions Custom themes Custom action groups and custom action hiding User controls (.ascx files) Delegate controls

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-apps-andfarm.html Difference between Asynchronous Event Handler and Synchronous Event Handler in Sharepoint Difference between Asynchronous Event Handler and Synchronous Event Handler in Sharepoint S.No 1 Asynchronous Event Handler(AEH) When it fires: AEH will fire after the event is completed. Event Cancellation: It is not possible to cancel the event from AEH. Synchronous Event Handler(SEH) When it fires: SEH will work before the event is completed Event Cancellation: SEH are mostly used to stop the event from completion in order to validate few things. It means we can cancel the event using SEH Method Names Identification: SEH methods has their method names ending with -ing. e.g. ItemAdding, ItemUpdating are SEH methods

Method Names Identification: AEH method names will end with -ed. e.g.ItemAdded, ItemUpdated are AEH methods.

To add/modify list fields To add/modify list fields values: values: Possible Not Possible as it fires after the completion of event.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-betweenasynchronous-event.html onPremise vs Online Difference between SharePoint onPremise and SharePoint Online in Sharepoint 2010 Features Sharepoint OnPremise Composites Developer Dashboard SharePoint Timer Jobs Business Data Integration with the Office Client Business Connectivity Services Profile Page Yes Yes Yes Sharepoint Online Composites No No No

Yes

No

Content Records Center Audit Opening and Downloading Word Automation Services Yes Yes

Content No No

Yes SharePoint Insights

No SharePoint Insights No

Business Intelligence Center

Yes

Chart Web Parts Data Connection Library PerformancePoint Services Dashboards Decomposition Tree Excel Services and PowerPivot for SharePoint

Yes Yes Yes

No No No

Yes Yes Yes

No No No

SharePoint Search Advanced Content Processing Tunable Relevance with Multiple Rank Profiles Business Intelligence Indexing Connector Yes

SharePoint Search No

Yes

No

Yes

No

SharePoint 2010 Yes Search Connector Framework Contextual Search Deep Refinement Federated Search Query Suggestions, "Did You Mean? and Related Queries Relevancy Tuning Yes Yes Yes Yes

No

No No No No

Yes

No

Rich Web Indexing Enterprise Scale Search Windows 7 Search Similar Results Thumbnails and Previews Visual Best Bets

Yes Yes Yes Yes Yes Yes

No No No No No No

SharePoint Sites SharePoint Sites Web Analytics Public Website Office Web Apps integration Secure Store Service Yes Yes Yes Yes No Yes (One per site owner) Yes (Preconfigured) Yes (Per owner) site

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-sharepointonpremise_11.html Sandboxed vs Farm Solutions Difference between Sandboxed and Farm Solutions in Sharepoint 2010 S.No 1 Farm Solution Sandboxed Solution

Where assemblies are kept ? Where assemblies are kept ? Any assemblies associated with a Assemblies are placed in the solution are extracted, kept in GAC or in the Bin directory of a memory, and executed within a SharePoint web application. special worker process called Assemblies placed in the GAC SPUCWorkerProcess.exe. This are fully trusted,whereas isolates assemblies placed in the bin the execution of sandboxed directoryof a web application solutions from the Operations of can be partially trusted. the underlying web process. Assembly execution takes place in the web Server

process (w3wp.exe). 2 Who has authority to install and deploy solutions ? Solutions must be installed and deployed by a farm administrator. Is there any limitation on Sharepoint classes and objects when developing Farm Solution ? There are no limitations on which SharePoint classes and objects can be used in farm solution Assemblies. Throttling of server resources can be done or not ? Solutions will use however many server resources are necessary. Who has authority to install and deploy solutions ? Solutions can be installed and deployed by a site administrator . Is there any limitation on Sharepoint classes and objects when developing Farm Solution ? Developers must leverage a subset of the SharePoint API when developing sandboxed Solutions. Throttling of server resources can be done or not ? Farm administrators have the ability to throttle the server resources used by a given solution.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-sandboxedand-farm.html

Silverlight difference faqs-1 1.Difference between ASP.NET and Silverlight S.No 1 ASP.NET ASP.NET is Microsoft's technology for developing dynamic web application using .NET languages like VB.NET or C#. The code is executed on the web server and the results are sent to the users browser. This is comparable to the way a web site would be done with the PHP language. ASP.NET uses AJAX to improve performance in the browser by making post backs and calls between the browser and server asynchronously. ASP.NET AJAX uses new builtin types and controls and JavaScript. Asp.net is not platform independent. Silverlight Silverlight is Microsoft technology for developing Rich Internet Applications. It is a browser plug-in that allows code from .NET languages to be run in the users browsers making it easier to develop graphically rich applications without having to constantly go back and forth between the browser and the server. This is comparable to Adobe's Flash technology. Unlike ASP.NET, the bulk of Silverlight processing occurs on the client machine thus decreasing server resource utilization and improving the Web experience on the client. There is no concept of Post back in Silverlight. Silverlight is delivered as a crossplatform and cross-browser plug-in that exposes a programming framework and features that are a subset of the .NET Framework and Windows Presentation Foundation (WPF). Silverlight is a client-side framework geared at providing a rich user experience and/or other capabilities such as video streaming. In Silverlight most processing happens from the client side. Silverlight is a free plug-in that encompasses a subset of functionality from the .NET Framework and WPF.Silverlight runs in the browser as a "sandbox" - a secure zone installed into the

ASP.NET is a server framework for building dynamic web applications. In Asp.net most processing happens from the server side.

Both ASP.NET and ASP.NET AJAX are heavily dependent upon the ASP.NET page event life cycle, are tightly coupled to the server.

browser that accommodates Silverlight functionality while completely protecting the host platform from any possibly adverse actions performed by Silverlight 6 7 Asp.net can be hosted in IIS. ASP.NET is Microsoft's competitor to JSP/JSF and the successor to classic ASP Silverlight can be hosted in IIS & Apache. Silverlight is Microsoft's competitor to Adobe Flash and Flex. Basically, a standalone runtime running inside a browser allowing animation, real-time 2D and vector rendering, etc

2.Difference between WPF and Silverlight

S.No 1 2

WPF WPF is mainly used for creating desktop applications. WPF extends support for advanced features of Windows OS. Few among those features are: 3D, complete documentation support and hardware acceleration. WPF includes extensive collection of data binding properties.

Silverlight Silverlight is prominent for creating web based applications. The advanced features of Windows OS namely 3D, complete documentation support and hardware acceleration are not supported in Silverlight. Silverlight does not support many data binding properties that are supported by WPF. Few properties that are not supported by Silverlight are ElementName, RelativeSource, UpdateSourceTrigger The x:type is not available in Silverlight.

In WPF, the custom markup extensions are supported through the markup extension support x:type. In WPF, the items that are added to the control named TabControl will be wrapped automatically within the TabItem. WPF provides routed commands and all its controls

In Silverlight, the items that are added to the control named TabControl will not be wrapped automatically within the TabItem. Silverlight does not provide routed commands or Command property.

are linked to commands using the property called Command.

Silverlight provides only an interface called ICommand. The developers have to create classes that implement this interface and the custom behavior has to be defined within the class. Silverlight does not offer input binding support.

WPF offers input binding support.

3.Difference between HTML 5 and Silverlight S.No 1 HTML 5 Silverlight

HTML5 needs to integrate On the other hand, Silverlight can CSS3 and JavaScript to add its be programmed without getting effects to web pages. error prone due to usage of a statically typed .Net language. It is easier to program in Silver light. While HTML5 is more resource Silverlight has a disadvantage in friendly. This is the primary that it consumes a lot of hardware reason which Apple has given resources of our device for not including support for technologies other than HTML5. When HTML5 will be fully standardized it is likely to get better support from all the newer versions of different browsers. HTML5 uses multiple codecs to run videos on the browsers that are not considered in the Apples bloc. HTML5 video quality is not that crisp as other competitors and its lack of ability to provide video content of various quality levels on various bandwidths to the user is also a hindrance in getting the message across to low data rate users. On the other hand, newer browsers would have to be compatible with older versions of Silverlight in order to get the proper functioning. Silver light always needs a plug-in for any case and would not even run on iPhone and iPad. Silverlight offers good video quality and also provide video content of various quality levels on various bandwidths to the user.

HTML5 pages, when designed, Silver light works just like a plug-in. should be compatible with all We can simply add the functionality the browsers. to for any browser. While HTML5 being more tilted Silverlight application is not easy to

towards open source is a relatively easy target of stealing code. The divisions of JavaScript and HTML are clearly marked so it is easy to view and understand the code. 8 At present HTML5 doesnt provide direct support for these devices. However there are some difficult ways to get around this in HTML5. HTML5, like its predecessors facilitates search engines to crawl through its content and get maximum exposure for the website.Therefore,HTML5 is suitable for online business websites or those sites which require traffic through search engines.

decode

Silverlight supports microphone and web cam and thus renders a number of rich interactive applications. Silverlight is not popular in the SEO community. At present the content of Silverlight is not indexed by search engines.Therefore,Silverlight is not suitable for online business websites or those sites which require traffic through search engines.

4.Difference between Flash and Silverlight S.No 1 Flash The animation model is frame based. Silverlight Animation - Silverlight supports the WPF animation model, which is not only time based instead of frame based, but lets you define the start and end conditions and it will figure out how to get there for you. No need to deal with matrixes like in flash. Also no need to calculate positions on various frames. It just works.

Flash stores its shapes using Silverlight uses XAML. XAML is binary shape records.In order text based and can be output using to write shape definitions, you a simple XML object. will need to either license a 3rd party Flash file format SDK, or build your own. It is not too difficult, but it does require a bit of a learning curve. The debugging with flash is harder than Silverlight. Dealing with fonts is fairly complex with flash. The debugging with Silverlight is simpler than with flash. Silverlight lets you embed true type font information directly into your

3 4

projects, and download that information with the downloader object. 5 Only Action Script can be used as programming tool in Flash. Rich set of development languages are available for Silverlight. Developer can use JavaScript as well as managed code VB.Net, C# for Silverlight development XAML is declarative while ActionScript is imperative. Using imperative languages to build UIs goes back to the early days of DOS and Windows, when developers had to manage all of the API nuances when interacting with graphical panes. Web Services support for Silverlight Streaming Additional Support for mobile devices with desktop and desktop browsers:Silverlight is supported by Windows mobile device as part of a new service that the NBL have built. Silverlight applications and media streaming can be run on a mobile phone so Silverlight even at this stage is about more than just the desktop browser and desktop market. Silverlight may be seen soon on the Symbian OS too. Silverlight does not require video codec to run industry standard videos like .WMV Silverlight supports scalable video formats from HD to mobile. Silverlight supports Hardwareassisted editing and encoding solutions. Silverlight has XAML based presentation layer for SEO.

ActionScript is an imperative language, which brings itself the pitfalls of imperative languages when compared with declarative languages.

7 8

There is not any such service provided by Flash Flash is not spread as across the vast majority of both desktops and mobiles platforms, as compared to Silverlight. Flash requires Flash Lite preinstalled on mobile devices.

Flash requires video codec to run .WMV videos. Flash does not support scalable video formats from HD to mobile Flash does not support Hardware-assisted editing and encoding solutions. Flash does not have XAML based presentation layer for SEO.

10

11

12

13

Flash does not provide End-toend server and application platform. Media server licensing is costlier than Silverlight. Flash does not support Scalable full screen video. This limitation doesnt exist with Flash.

Silverlight provides End-to-end server and application platform. Media server licensing is cheaper than flash. Silverlight supports Scalable full screen video. Silverlight is missing Linux support, so people using Linux machine cannot run it on their machines and will have to stick to Windows and MAC OS Silverlight will add to the use of the WMV file format.Using the WMV video format essentially makes Silverlight useless for the vast majority of video websites such as YouTube. It cannot play .avi and .mov file.

14 15 16

17

Flash Video turned Flash into a mechanism for delivering media with far more potential than any other solution that is .flv, no doubt Flash has also limitation to play other video file. For that Flash required codex for that player installed on Client machine. Even flash is also lacking this area. Flash can read data source in terms of XML or text from some URL and can use it. Same thing silverlight also can read. Flash has rich set of control library.

18

Silverlight has no support for binding to models,binding to data, or even connecting to network resources to obtain data.

19

Silverlight doesn't even have support for things that should be considered a stock part of any library such as buttons, checkboxes, list boxes, list views, grids,etc. Probably in future release may Microsoft support it. Once the accessibility features are provided with Silverlight versions, any existing test tools that support driving UI through Accessibility will be fully enabled to automate Silverlight applications Cannot do sound processing.

20

Flash test tools are already in place.

21

With some media file sound processing can possible.

22 23

Flash allows creating XML Socket object. Can do that.

Socket programming is not possible. Per pixel bitmap editing, bitmap filters (convolution, color matrix, etc),bitmap effects (drop shadow, blur,glow) cannot be done. Webcam and Microphone support are not provided by Silverlight Built in file upload/download support is not available. Silverlight is new in market and required time to get acceptance in market.

24 25 26

Flash supports it. Inbuilt Upload/download support is there. Flash has a long history that spans more than ten years, and already got acceptance in market and being the most successful browser plug- in ,it is installed on over 90 percent of the worlds web browsers Size of flash component is smaller. Flash ships in single component that is .swf.Images/video/sounds also incorporated in single .swf package.

27 28

Size of Silverlight component is larger. It has found in practical implementation of image animation, at some extent flickering occurs on image.

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/silverlight-difference-faqs-1.html Silverlight Difference FAQs-2 1.Difference between Custom Control and User Control in Silverlight S.No 1 2 3 4 5 6 Custom Control User Control

A loosely coupled control w.r.t A tightly coupled control w.r.t code code and UI and UI Derives from Control Defines UI in ResourceDictionary UI can be skinable Has Dynamic layout Derives from UserControl the Defines UI as a normal XAML Child controls can skinable only Has static layout

UI can be changed in different UI is fixed and can't have different

project 7 8 9 10 Has full toolbox support Defines a single control More flexible

look in every project Can't be added to the toolbox Defines a set of controls Not much flexible like Custom Control

Requires in depth knowledge Does not require depth knowledge of Silverlight UI Model of UI Model

2.Difference between DataContext and ItemsSource property in Silverlight S.No 1 2 DataContext property ItemSource property

DataContext expects an object ItemsSource expects IEnumerable type type objects DataContext is a dependency ItemsSource is defined by the property is exposed by ItemsControl class. All the FrameworkElement base class descendants of FrameworkElement can utilize the DataContext property and set an object to its value. Note: But we can only set a type of IEnumerable(or instance of class that derives from).

DataContext does not generate template, it only used to hold common data for other controls to bind. DataContext is mainly used to hold common data that other child want to share. Thus it can be inherited by other child elements without problem.

In terms of ItemsSource property, it is mainly used to generate template regardless of you set it in XAML or in the code behind. But for ItemsSource, it is not used to share data in the visual tree. It is only valid for the element that defined. There is still one thing to be noted is that the child element can override the DataContext of the perent DataContext no mater directly or indirectly.

Example(s): Suppose we have a Person Class which has a property Name. Now in Xaml we can say like:

If you run this code in the ListBox you will get to see values depending on List object. But if we change the ItemsSource to DataContext then you will be not able to see anything because DataContext doesn't generate templates in any cases. If you set datacontext still you have to set the ItemsSource property like this: Summary: In a word, if we have several child elements that will share a common data source, we can set DataContext property for the parent elements. And we use ItemsSource for ItemsSource in most cased to generate template. Like: 3.Difference between Silverlight and Flex S.No 1 Silverlight Execution Mechanism: Flex Execution Mechanism: for iterative

Power of Native execution of Slow execution CLR instead of Flash's Action executions Script Interpretator 2 Editing facility: Editing facility:

Expression Blend is really cool Flex Builder is not that much good and more advanced editor then editor when compare with Flex Builder Expression Blend 3 Multilanguages Support: Multilanguages Support:

Power of other languages, No generics, No other languages, provides Generics and Linq etc No linq. 4 Threading Asynchronous Tasks: Available 5 Form layouting and binding: Binding in Silverlight is way more cumbersome.Binding requires component naming and does not support instance expressions like flex does, though two way binding is good in silverlight but you have to write long codes for multiple bindings for one math expression. 6 Where primarily used: and Threading Tasks: Unavailable Form layouting and binding: Better in Adobe Flex.The most easy way to create new components, you can have mxml derive from any control and extend them with extensive binding. and Asynchronous

Where primarily used:

Silverlight is used for extremely We use flex for data applications, rich graphics and animation those are simple form processing applications 7 Search Engine Friendly: XAML is Friendly 8 Search Search Engine Friendly:

Engine MXML markup language is not Search Engine Friendly Client / Server Technology:

Client / Server Technology:

Silverlight can be developed Flex is a client based application for a server or client tool environment. 9 Release Date: Before it was called Silverlight, it was known as Windows Presentation Foundation/Everywhere (WPF/E) and was first released in 2007. Silverlight 2 became available in October 2008. Silverlight 3 was released in July 2009. 10 Language Differences: Alternatively, Microsoft Silverlight uses the XAML language as a placeholder for media files, shapes and images. It works with all .NET languages and JavaScript for interactive and component features. Completed code is compiled with the .NET assemblies and compressed into a ZIP file. 11 Data Transfer: No such format for data transfer. Will have to stick to SOAP and REST web services(for now). 12 Debugging: Debugging using Visual Studio is very easy. Release Date: Adobe Flex was originally released in 2004 by Macromedia. The third version (Flex Builder 3) became available in 2008.

Language Differences: Adobe Flex uses MXML markup language and actionscript to build layout/graphic user interfaces. To create components, it works with ActionScript (the object oriented Flash language). After the code is completed, it needs to be compiled by the Flex Application Server.

Data Transfer: Data transfer via the proprietary AMF using WebORB, Fluorine, etc is faster than traditional web services. Debugging: Debugging is a bit of a hassle.

13

Webservice Access: Accessing web services is very easy. Just add a reference to the WebService in Visual Studio and lookup reference.cs for the good stuff

Webservice Access: Accessing web services requires manual creation of ActionScript proxy classes. We can automate this by using FlexTense though. Component Size: Size of the compiled SWF file is smaller than that of the uncompressed Silverlight component.

14

Componenet Size: Size of the Silverlight component is larger.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/silverlight-difference-faqs-2.html AJAX vs Silverlight Difference between AJAX and Silverlight S.No 1 AJAX Meaning: Ajax (also AJAX, an acronym for Asynchronous JavaScript and XML) is a group of interrelated web development techniques used on the clientside to create asynchronous web applications. With Ajax, web applications can send data to, and retrieve data from, a server asynchronously (in the background) without interfering with the display and behavior of the existing page. Data can be retrieved using the XMLHttpRequest object. Silverlight Meaning: Microsoft Silverlight is an application framework for writing and running rich Internet applications, with features and purposes similar to those of Adobe Flash. The run-time environment for Silverlight is available as a plugin for web browsers running under Microsoft Windows and Mac OS X. While early versions of Silverlight focused on streaming media, current versions support multimedia, graphics and animation, and give developers support for CLI languages and development tools. Silverlight is also one of the two application development platforms for Windows Phone, but Silverlight enabled web pages cannot run on Internet Explorer for Windows Phone as there is no plugin. Technologied Involved: Silverlight 1 is purely AJAX and JavaScript based. All the code has to be written in JavaScript and

Technologied Involved: In the article that coined the term Ajax,Jesse James Garrett explained that the following

technologies are incorporated: HTML (or XHTML) and CSS for presentation The Document Object Model (DOM) for dynamic display of and interaction with data XML for the interchange of data, and XSLT for its manipulation The XMLHttpRequest object for asynchronous communication JavaScript to bring these technologies together 3 When was AJAX coined / developed ? Nobody invented AJAX. But,the computer scientist Jess James Garret first coined the term "Ajax" in 2005. Note: The key technology: XMLHttpRequest used in AJAX was developed by Microsoft for its Internet Explorer 5.0 for Windows as an ActiveX object in 1999. AJAX mainly relies on what technology / framework? Ajax relies on the XMLHttpRequest object.Using it, Ajax typically retrieves data from servers and can do so asynchronously. This means Ajax can retrieve data without disrupting the behaviors and displays of existing WebPages.

XAML. With version 2, the programming logic can be written in any .NET language, including some derivatives of common dynamic programming languages like IronRuby and IronPython .

When was Silverlight coined / developed ? Microsoft released its first version of Silverlight in 2007.

Silverlight mainly relies on what technology / framework ? Unlike Ajax, which relies on the XMLHttpRequest object, Silverlight relies on the .NET framework. This framework provides the common language runtime (CLR) run-time environment, enabling Silverlight for running code and providing services that simplify the developmental process. Specifically, Silverlight's .NET framework and CLR environment allow developers to execute the same compiled code on servers as well as clients. What is the main purpose of Silverlight?

What is the main purpose of AJAX ?

Developers typically use Ajax for creating interactive website features that end-users can access through Web browsers.

In comparison, developers typically use Silverlight for creating imageand video-based social media content that end-users can stream -- or download in real-time. Developers can also extend the functionality or richness of their Ajax features by using Silverlight, but not vice-versa. Whether Silverlight needs to be installed in the system? Silverlight plugin needs to be installed in our system for better browsing experience.

Whether AJAX needs to be installed in .NET ? From ASP.Net 3.5 onwards, AJAX has been integrated into the .NET Framework. Hence, there is no need to install in .NET. When to use AJAX ? Ajax can be used to make web applications perform better (if used in right manner) and to provide better user experience than conventional websites by avoiding full page refreshes. Development Benefits: Ajax provides developers with access to JavaScript libraries, such as MootTools and jQuery. These libraries help developers create sleek and highly interactive website applications without having to pay for integrated development environments (IDEs). However, despite being lower in cost, Ajax is not easier to use than Silverlight. Whether AJAX provides Cross-platform support ? Ajax is a cross-platform technique that can be used on wide range of different operating systems, computer architectures.

When to use Silverlight ? Silverlight can be used when we need rich UI (like adobe flex) and do not have heavy server dependency.

Development Benefits: Silverlight improves work-flow by separating the visual, userinterface aspects of website development from the back-end, business-logic aspects of development.

Whether Silverlight provides Cross-platform support ? Silverlight is not fully platform independent tool. It only supports Windows OS, Linux OS using Moonlight and Mac OS.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/ajax-vs-silverlight.html

Difference between SQL Server 2008 and SQL Server 2012 Difference between SQL Server 2008 and SQL Server 2012 S.No 1 SQL Server 2008 Maximum number of concurrent connections: The Maximum number of concurrent connections to SQL Server 2008 is 32767. Precision used for spatial calculations: The SQL Server 2008 uses 27 bit bit precision for spatial calculations. TRY_CONVERT() and FORMAT() functions: TRY_CONVERT() and FORMAT() functions are not available in SQL Server 2008 ORDER BY Clause with OFFSET / FETCH options: ORDER BY Clause does not have OFFSET / FETCH options as in SQL Server 2012 SQL Server 2012 Maximum number of concurrent connections: SQL server 2012 has unlimited concurrent connections. Precision used for spatial calculations: The SQL Server 2012 uses 48 bit precision for spatial calculations TRY_CONVERT() and FORMAT() functions: TRY_CONVERT() and FORMAT() functions are newly included in SQL Server 2012 ORDER BY Clause with OFFSET / FETCH options: ORDER BY Clause now have OFFSET / FETCH options to use paging to show required rows per page in applications and allow the user to scroll through each page of results rather than download the entire set In the sample query below, SQL Server would return 10 records beginning with record 11. The OFFSET command provides a starting point for the SELECT statement in terms of paging, and the FETCH command provides how many records to return at a time. SELECT BusinessEntityID, FirstName, LastName FROM Person.Person ORDER BY BusinessEntityID OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY;

Code Name: SQL Server 2008 is code named as Katmai. In SQL Server 2008, audit is an Enterprise-only feature. Only available in Enterprise, Evaluation, and Developer Edition.

Code Name: SQL Server 2012 is code named as Denali In SQL Server 2012,support for server auditing is expanded to include all editions of SQL Server.

Sequence Object: Sequence is not available in SQL Server 2008

Sequence Object: Sequence is included in SQL Server 2012.Sequence is a user defined object that generates a sequence of a number. Here is an example using Sequence. /****** Create Sequence Object ******/ CREATE SEQUENCE MySequence START WITH 1 INCREMENT BY 1; /****** Create Temp Table ******/ DECLARE @Person TABLE ( ID int NOT NULL PRIMARY KEY, FullName nvarchar(100) NOT NULL ); /****** Insert Some Data ******/ INSERT @Person (ID, FullName) VALUES (NEXT VALUE FOR MySequence, 'Umar Ali'), (NEXT VALUE FOR MySequence, 'John Peter'), (NEXT VALUE FOR MySequence, 'Mohamed Iqbal'); /****** Show the Data ******/ SELECT * FROM @Person; The results would look like this: ID FullName 1 Umar Ali 2 John Peter 3 Mohamed Iqbal

Full Text Search Capability: The Full Text Search in SQL Server 2008 does not allow us to search and index data stored in extended properties or metadata.

Full Text Search Capability: The Full Text Search in SQL Server 2012 has been enhanced by allowing us to search and index data stored in extended properties or metadata. Consider a PDF document that has "properties" filled in like Name, Type, Folder path, Size, Date Created, etc. In the newest release of SQL Server, this data could be indexes and searched along with the data in the document itself. The data does have to be exposed to work, but it's possible now. BISM Model: Analysis Services will include a new BI Semantic Model (BISM). BISM is a 3-layer model that includes: Data Model Business Logic Data Access BISM will enhance Microsoft's front end analysis experiencing including Excel, Reporting Services and SharePoint Insights. Microsoft has said that BISM is not a replacement for the current BI Models but more of an alternative model. In simple terms, BISM is a relation model that includes BI artifact such as KPIs and hierarchies.

BISM Model: Analysis Services in SQL Server does not have BI Semantic Model (BISM) concept.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-sql-server2008-and.html

SQL Server Difference FAQs-1 1. What are the Differences between TRUNCATE and Delete? S.No 1 2 3 4 5 Truncate Truncate is faster Removes all rows from a table Is DDL Command Resets identity of the table Removes the data by deallocating the data pages and logs the deallocation. Cannot be rolled back Delete Delete is comparatively slower Can remove specific rows with Where clause Is DML Command Does not reset identity of the table Removes one row at a time and records an entry in the transaction log for each deleted row. Can be rolled back

2. What are the differences between Primary key and Unique key? S.No 1 2 Primary Key Creates Clustered index Null values are not allowed Unique Key Creates Non-Clustered index Allows only one null value

3. What are the Differences between Clustered Indexes and Non-Clustered Indexes? S.No 1 2 3 4 Clustered Indexes It reorders the physical storage of records in the table There can be only one Clustered index per table The leaf nodes contain data To create clustered index Sql server required more memory because the leaf pages in the tree structure will maintain actual data . By using clustered index retrieving data is more faster,when we compare with non-clustered index. Non-Clustered Indexes It sorts and maintain a separate storage We can have 249 non-clustered indexes in a table The leaf node contains pointer to data To create non-clustered index Sql server requires less memory because the leaf pages will contain pointers to actual data By using non-clustered index retrieving data is slower than clustered index.

4. What are the differences between Stored Procedures and User Defined Functions?

S.No 1 2 3

Stored Procedures Stored Procedure cannot be used in a Select statement Stored procedure supports Deferred Name Resolution Stored Procedures are generally used for performing Business Logic Stored Procedure need not return a value Stored Procedures can return any datatype Stored Procedures can accept more number of input parameters than User Defined Functions. Stored Procedures can have upto 21000 input parameters Stored Procedures can use Temporary Tables Stored Procedures can execute Dynamic SQL Stored Procedure supports error handling

User Defined Functions User Defined Function can be used in a Select statement User Defined Function does not support Deferred Name Resolution User Defined Functions are generally used for Computations User Defined Functions should return a value User Defined Functions cannot return Image User Defined Functions accept lesser number of input parameters than Stored Procedures. UDF can have upto 1023 input parameters

4 5 6

7 8 9

Temporary Tables cannot be used in a User Defined Function User Defined Functions cannot execute Dynamic SQL User Defined Function does not support error handling. RAISEERROR or @@ERROR are not allowed in UDFs Non-deterministic functions cannot be used in User Defined Functions (UDFs). For example, GETDATE() cannot be used in User Defined Functions(UDFs)

10

Non-deterministic functions can be used in Stored Procedures.

5. What are the differences between Where and Having clauses? S.No 1 2 3 4 Where clause It applies to individual rows It selects rows before grouping It cannot contain aggregate functions It can be used in select, delete Having clause It applies to a group as a whole It selects rows after grouping It can contain aggregate functions It is used only in select clause

,insert etc. 6. What are the differences between Union and UnionAll? S.No 1 2 3 4 5 6 Union This is used to eliminate duplicate rows This selects only distinct rows It can be used to combine any number of queries It cannot contain aggregate functions Union is slower than UnionAll Output is in sorted order Example : SELECT Col FROM @Table1 UNION SELECT Col FROM @Table2 Result: 1 2 3 5 UnionAll It will not eliminate duplicate rows It selects all the values It can be used to combine maximum of 2 queries It can contain aggregate functions UnionAll is faster than Union Output is not in sorted order Example : SELECT Col FROM @Table1 UNION ALL SELECT Col FROM @Table2 Result: 1 2 3 2 5

7. What is the difference between normal Select statement and a Cursor? S.No 1 Select statement Cursor

Select statements are used for Cursors are used for row-level table-level processing processing

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/sql-server-difference-faqs1_11.html SQL Server Difference FAQs-2 1. What are the differences between Instead of Triggers and After Triggers? S.No 1 Instead of Triggers Each table or view can have one After Triggers A table can have several AFTER

INSTEAD OF trigger for each triggering action (UPDATE, DELETE, and INSERT) 2 INSTEAD OF triggers fire in place of the triggering action and before constraints are processed.

triggers for each triggering action.

AFTER triggers fire after the triggering action (INSERT, UPDATE, or DELETE) and after any constraints are processed.

2. What are the differences between Views and User-Defined Functions? S.No 1 2 Views Views cannot accept parameters. Output of the Views cannot be directly used in the SELECT clause. User-Defined Functions User-Defined Functions can accept parameters. Output of the User-Defined Functions can be directly used in the SELECT clause.

3. What are the differences between Triggers and Stored Procedures? S.No 1 2 3 4 Triggers Triggers cannot return a value We cannot pass parameters in Triggers We can write a Stored procedure within a Trigger Triggers are implicitly fired whenever insert, update or delete operations take place on table Stored Procedures Stored Procedures may return a value We can pass parameter in Stored Procedures We cannot write a Trigger within a Stored Procedure Stored Procedures need to be explicitly called by the programmer

5 6

Triggers can only be implemented Stored procedures can be written for on Tables or Views the Database We cannot schedule a trigger. Stored procedures can be scheduled through a job to execute on a predefined time We can use the Print commands inside the stored procedure for debugging purpose We can call a stored procedure from front end (.asp files, .aspx files, .ascx files etc.)

We cannot use the print command inside a trigger. We cannot call a trigger from these files.

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/sql-server-difference-faqs-2.html

SQL Server Difference FAQs-3 1.Difference between Identity and Sequence in SQL Server 2012 S.No 1 2 Identity Dependant on table. Identity is a property in a table. Example : CREATE TABLE Table test_Identity ( [ID] int Identity (1,1), [Product Name] varchar(50) ) Sequence Independent from table. Sequence is an object. Example : CREATE SEQUENCE [dbo]. [Sequence_ID] AS [int] START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 1000 NO CYCLE NO CACHE 3 If we need a new ID from an identity column we need to insert and then get new ID. Example : Insert into [test_Identity] Values (SQL Server) GO SELECT @@IDENTITY AS Identity OR Select SCOPE_IDENTITY() AS Identity 4 We cannot perform a cycle in identity column. Meaning, we In the sequence, we can simply add one property to make it a In the sequence, we do not need to insert new ID, we can view the new ID directly. Example : SELECT NEXT VALUE FOR dbo.[Sequence_ID]

cannot restart the counter after a particular interval.

cycle. Example : ALTER SEQUENCE [dbo]. [Sequence_ID] CYCLE;

We cannot cache Identity column property.

Sequence can be easily cached by just setting cache property of sequence. It also improves the performance. Example : ALTER SEQUENCE [dbo]. [Sequence_ID] CACHE 3;

We cannot remove the identity column from the table directly.

The sequence is not table dependent so we can easily remove it Example : Create table dbo.[test_Sequence] ( [ID] int, [Product Name] varchar(50) ) GO First Insert With Sequence object INSERT INTO dbo.test_Sequence ([ID],[Product Name]) VALUES (NEXT VALUE FOR [Ticket] , MICROSOFT SQL SERVER 2008) GO Second Insert without Sequence INSERT INTO dbo.test_Sequence

([ID],[Product Name]) VALUES (2 , MICROSOFT SQL SERVER 2012) 7 We cannot define the maximum value in identity column it is based on the data type limit. Here we can set up its maximum value. Example : ALTER SEQUENCE [dbo]. [Sequence_ID] MAXVALUE 2000; 8 We can reseed it but cannot change the step size. Example : DBCC CHECKIDENT (test_Identity, RESEED, 4) We can reseed as well as change the step size. Example : ALTER SEQUENCE [dbo]. [Sequence_ID] RESTART WITH 7 INCREMENT BY 2; 9 We cannot generate range from identity. We can generate a range of sequence values from a sequence object with the help of sp_sequence_get_range.

2.Difference between Temp table and Table variable S.No 1 Temp table A Temp table is easy to create and back up data. Temp table result can be used by multiple users. Temp table will be stored in the tempdb. It will make network traffic. When we have large data in the temp table then it has to work across the database. A Performance issue will exist. Table variable But the table variable involves the effort when we usually create the normal tables. But the table variable can be used by the current user only. But a table variable will store in the physical memory for some of the data, then later when the size increases it will be moved to the tempdb.

2 3

Temp table can do all the DDL operations. It allows creating the indexes, dropping, altering, etc.., Temp table can be used for the current session or global. So that a multiple user session can utilize the results in the table. Temp variable cannot use the transactions. When we do the DML operations with the temp table then it can be rollback or commit the transactions. Functions cannot use the temp variable. More over we cannot do the DML operation in the functions . The stored procedure will do the recompilation (can't use same execution plan) when we use the temp variable for every sub sequent calls.

Whereas table variable won't allow doing the DDL operations. But the table variable allows us to create the clustered index only. But the table variable can be used up to that program. (Stored procedure)

But we cannot do it for table variable.

But the function allows us to use the table variable. But using the table variable we can do that. Whereas the table variable won't do like that.

Another Good Reference: http://sqljunkieshare.com/2011/11/05/difference-between-temporary-tables-and-tablevariables/ 3.Difference between RAISERROR and THROW statements S.No 1 RAISERROR Statement If a msg_id is passed to RAISERROR, the ID must be defined in sys.messages. The msg_str parameter can contain printf formatting styles. The severity parameter specifies the severity of the exception. THROW Statement The error_number parameter does not have to be defined in sys.messages. The message parameter does not accept printf style formatting. There is no severity parameter. The exception severity is always set to 16.

2 3

4.Difference between Local temporary table and Global temporary table

S.No 1 2

Local temporary table Denoted by # symbol. Valid for the current connection only. They are cleared as soon as the current connection closes. Cannot be shared between multiple users.

Global temporary table Denoted by ## symbol. Available to all the connections once created. They are deleted when all users referencing the table disconnect from SQL Server . Can be shared between multiple users.

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/sql-server-difference-faqs-3.html SQL Server Difference FAQs-4 1.Difference between Correlated subquery and Nested subquery S.No 1 Correlated subquery Correlated subquery runs once for each row selected by the outer query. It contains a reference to a value from the row selected by the outer query. Correlated subquery follows down to top approach i.e., main query is executed first(even though parenthesis are present) and then child query. We can also say: in a Correlated subquery,Inner query condition is used in the outer query 4 Example: select e1.empname, e1.basicsal, e1.deptno from emp e1 where e1.basicsal = (select max(basicsal) from emp e2 where e2.deptno = e1.deptno) Example: select empname, basicsal, deptno from emp where (deptno, basicsal) in (select deptno, max(basicsal) from emp group by deptno) Nested subquery Nested subquery runs only once for the entire nesting (outer) query. It does not contain any reference to the outer query row.

Nested subquery follows top-down approach i.e., child query is executed first and then parent . We can also say:In a subquery Outer query condition is used in the the inner query.

2.Difference between Weak Entity Set and Strong Entity Set S.No 1 Weak Entity Set Strong Entity Set

An entity set which does not An entity set which does have a possess sufficient attributes to primary key is called a strong entity form a primary key is known as set. a weak entity set. Member of a weak entity set is a subordinate entity. Example: Specific Person,Company,Event,Plant Member of a strong entity set is a dominant entity. Example: Set of all Persons,Companies,Trees,Holiday s

2 3

3.Difference between char and varchar data types in Sql Server S.No 1 2 Char Fixed length memory storage CHAR takes up 1 byte per character Use Char when the data entries in a column are expected to be the same size like phone number Ex: Declare test Char(100); test="Test" Then "test" occupies 100 bytes first four bytes with values and rest with blank data Varchar Variable length memory storage(Changeable) VARCHAR takes up 1 byte per character, + 2 bytes to hold length information Use Varchar when the data entries in a column are expected to vary considerably in size like address Ex: Declare test VarChar(100); test="Test" Then "test" occupies only 4+2=6 bytes. first four bytes for value and other two bytes for variable length information.

4.Difference between Sql Server 2005 and Sql Server 2008 S.No 1 2 Sql Server 2005 XML datatype is introduced. Cannot encrypt the entire database. Sql Server 2008 XML datatype is used. Can encrypt the entire database introduced in 2008.

3 4 5 6 7

Datetime is used for both date and time. No table datatype is included. SSIS is started using. CMS is not available. PBM is not available

Date and time are seperately used for date and time Table datatype introduced. SSIS avails in this version. Central Management Server(CMS) is Introduced. Policy based management(PBM) server is Introduced.

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/sql-server-difference-faqs-4.html SQL Server Difference FAQs- 5 1.Difference between Database Mail and SQL Mail S.No 1 Database Mail Based on SMTP (Simple Mail Transfer Protocol). Introduced in Sql Server 2005. No need to install Outlook. More secure than Sql mail. SQL Mail Based on MAPI (Messaging Application Programming Interface). Used prior versions of Sql Server 2005. Require Outlook to be installed. Less secure than Database mail.

2 3 4

2.Difference between Azure Table storage and SQL Azure S.No 1 Azure Table storage It is built on top of the Azure Storage platform. SQL Azure It is an SQL Server that has been configured to be hosted on top of the Windows Azure in a high availability mode. It comprises standard SQL Tables with indexes and referential integrity.

It comprises flexible or schema-less entities. No referential integrity between the tables, and no custom indexes. It can scale massive amounts of data due to the partition key.

It may not scale as far as Azure Table storage.

Can be thought as single spreadsheet.

Look familiar to any .Net developer who has used Sql server 2008 prior.

3.Difference between DBMS and RDBMS S.No 1 2 DBMS Stands for DataBase Management System In dbms no relationship concept It supports Single User only It treats Data as Files internally It supports 3 rules of E.F.CODD out off 12 rules It requires low Software and Hardware Requirements. DBMS is used for simpler business applications DBMS does not impose any constraints or security with regard to data manipulation In DBMS Normalization process will not be present RDBMS Stands for Relational DataBase Management System It is used to establish the relationship concept between two database objects, i.e, tables It supports multiple users It treats data as Tables internally It supports minimum 6 rules of E.F.CODD It requires High software and hardware requirements. RDBMS is used for more complex applications. RDBMS defines the integrity constraint for the purpose of holding ACID PROPERTY In RDBMS, normalization process will be present to check the database table consistency

3 4 5 6 7 8

10

There is no enforcement to use Although the foreign key concept is foreign key concept supported by both DBMS and compulsorily in DBMS RDBMS but its only RDBMS that enforces the rules FoxPro, IMS are Examples SQL Server, Oracle are examples

11

4.Difference between SQL Server 2000 and SQL Server 2005 S.No 1 2 SQL Server 2000 Query Analyser and Enterprise manager are separate. No XML datatype is used. SQL Server 2005 Both are combined as SSMS(Sql Server management Studio). .XML datatype is introduced.

3 4 5 6 7 8 9

We can create maximum of 65,535 databases. Exception Handling mechanism is not available There is no Varchar(Max) data type is not available DDL Triggers is not available DataBase Mirroring facility is not available RowNumber function for paging is not available Table fragmentation facility is not available Full Text Search facility is not available

We can create 2(pow(20))-1 databases. Exception Handling mechanism is available Varchar(Max) data type is introduced. DDL Triggers is introduced DataBase Mirroring facility is introduced RowNumber function for paging is introduced Table fragmentation facility is introduced Full Text Search facility is introduced

10

11 12

Bulk Copy Update facility is not Bulk Copy Update facility is available introduced Data Encryption concept is not introduced Cannot compress the tables and indexes. No varchar(max) or varbinary(max) is available. Data Transformation Services(DTS) is used as ETL tool .Cannot encrypt the entire database Can Compress tables and indexes. (Introduced in 2005 SP2) Varchar(max) and varbinary(max) is used. SQL Server Integration Services(SSIS) is started using from this SQL Server version and which is used as ETL tool

13 14 15

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/sql-server-difference-faqs-5.html

SQL Server Difference FAQs-6 1.Difference between SQL Server and PostgreSQL S.No 1 2 SQL Server INSERT t VALUES () BULK INSERT and BCP PostgreSQL This syntax is not allowed. Allows: INSERT INTO t VALUES () uses COPY instead (which has the functionality of both BCP and BULK INSERT) pgAdmin Boolean type (accepts values true and false) Has sequencers (like Oracle) default schema is PostgreSQL Default listening on 5432 datatype: text key is not clustered by default (and it is enforced by a constraint and not an an index!) Domains user: postgres NATURAL and USING joins SELECT * FROM t LIMIT 10 Query plan read from left to right Estimate Query Plan: F7

3 4 5 6 7 8 9

Management Studio Bit type IDENITTY default schema is dbo Default Listening on 1433 datatype: varchar(max) Key is clustered by default

10 11 12 13 14 15

User Defined Data Types user: sa No such thing SELECT TOP 10 * FROM t Query plans read from right to left Estimate Query Plan: CTRL+L

2.Difference between Cross Join and Full Outer Join S.No 1 2 Cross Join No join conditions are specified. Results in pairs of rows. Full Outer Join A combination of both left and right outer joins. Results in every row from both of the tables , at least once.

Results in Cartesian product of two tables.

Assigns NULL for unmatched fields.

3.Difference between SQL Server and Oracle

S.No 1

SQL Server SQL History: IBM introduced structured Query Language (SQL) as the language to interface with its prototype relational database management system; System R. Oracle Corporation introduced the first commercially available SQL relational database management system in 1979. Today, SQL has become an industry standard, and Oracle Corporation clearly leads the world in RDBMS technology. SQL is used for all types of DB activities by all type of users. The basic SQL commands can be learned in a few hours and even the most advanced commands can be mastered in a few days.

Oracle Oracle History: Oracle Corp is the leading supplier for S/w products, headquartered in Redwood shores, California, USA. It was founded by Larry Ellison, Bob Miner and Ed Oates in 1977. Now they have 43,000 Employees in 150 countries. Oracle first commercial RDBMS was built in 1979, and it is the first to support the SQL. Oracle is the first S/w company to develop and deploy 100 % Internet-enabled enterprise Software.

SQL (Structure Query Language):

Oracle (RDBMS):

Oracle is fastest and easiest way to When a user wants to get create applications in MS windows. some information from any DB It provides the ability to store and file, he can issue a query. access data. Whether you are Structured query language experienced or new to windows in (SQL), pronounced Sequel, is programming, Oracle provides you the set of commands that all with the complete set of tools to programs and users must use simplify rapid application to access data within the development. The Oracle refers to Oracle. SQL is a high the method used to create the performance fault tolerant data graphical user inter face. There is base management system. no need to write numerous lines of The database is mostly code to describe the appearance maintained by SQL language, and location of inter face elements. which is conceded as the heart

of the RDBMS. 3 SQL Technology: SQL is divided into four parts: Oracle Technology:

Oracle DB structure is divided into two parts, one is called Physical structure (these files define the DDL (Data Definition Language): Create, Alter, Drop, operating system that make up the DB, each Oracle DB is made by Rename, Truncate. three types of files, data-files, redo logs file-controls file) and the other DML (Data Manipulate Language): Select, Update and is called Logical structure (these files define the logical areas of Delete, Insert, Into. storage like schema, table spaces, DCL (Data Control Language): segments and extents). Grant, Revoke TCL (Transaction Control Language): Commit, Rollback. 4 Advantages: Provides easy access to all data. Flexibility in data molding. Reduced data storage and redundancy. Provides a high-level manipulation language. SQL can save data in common PC file formats that can be imported into other application (like Ms-Excel). SQL is not case sensitive. It can enter one or more lines. Tabs and indents can be used to make code more readable. Can be used by a range of users. It is a nonprocedural language (English-like language). 5 Differences: Advantages: Data consistency Integration of data Easy file generation Increased security Easy updating of records No wastage of time Enforcement of standards Controlled data redundancy Reduce the total expenditures Searching of particular data is easy Dispose of heavy files and register work The work of three persons is reduced to one Instant intimation of modification of information

Differences:

SQL is a tool for all DB like DBMS, RDBMS, TSQL, and SQL Plus. SQL maintains different RDBMS. SQL is combination of different commands and functions that why, SQL is worked for Oracle DB as a command prompt shell (SQL is the command prompt shell, where we can communicate with any DB).

Oracle Corp is the worlds leading supplier of S/w products. Oracle is the platform, where we develop and implement different DB designs and software. Oracle is the combination of different S/w products, where they work together for designing DB. Oracle works with different front and back end products/tools (like SQL).

4.Difference between View and Stored Procedure S.No 1 2 3 4 5 View Does not accepts parameters Can be used as a building block in large query. Can contain only one single Select query. Cannot perform modification to any table. Can be used (sometimes) as the target for Insert, update, delete queries. Stored Procedure Accept parameters Cannot be used as a building block in large query. Can contain several statement like if, else, loop etc. Can perform modification to one or several tables. Cannot be used as the target for Insert, update, delete queries.

5.Difference between IN and EXISTS S.No 1 IN Returns true if specified value matches any value in the sub query or a list. The sub query will run first and then only outer query. IN is slower than EXISTS. The IN is used in the widely For Static variables for eg: select EXISTS Return true if sub query contain any rows. The Outer query will ran first and then only sub query. Exists is faster than IN.The Outer query will run first and then only inner query.So it will reduce the

2 3

name from table where ID in (Select ID from table2). 4 Example: SELECT id, [Name] FROM dbo.tablea WHERE id IN (SELECT id FROM dbo.tableb)

over head. The Exists is useful mostly in IF conditional statements. Example: SELECT id, [Name] FROM dbo.tablea AS a WHERE EXISTS (SELECT id2 FROM dbo.tableb WHERE id2 = a.id)

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/sql-server-difference-faqs-6.html SQL Server Difference FAQs-7 1.Difference between Checkpoint and Lazy Writer S.No 1 2 CheckPoint Flush dirty pages to Disk Flush only Data pages to disk Lazy Writer Flush dirty pages to disk Check for available memory and removed Buffer pool (execution plan/compile plan/ Data pages /Memory objects) Occurs depending upon memory pressure and resource availability It is lazy, Sql server manages by its own. Monitor the memory pressure and try maintain the available free memory. No role in recovery

3 4

Default, Occurs approximately every 1 minute Can be managed with sp_confige -recovery interval option Does not check the memory pressure Crash recovery process will be fast to read log as data file is updated. Occurs for any DDL statement Occurs before Backup/Detach command Depends upon the

7 8 9

Occurs per requirement Occurs per requirement Works on Least recent used pages

configuration setting, we can control. 10 11 12 For simple recovery it flush the tlog file after 70% full. Can manually /Forcefully run command Checkpoint Very Less performance impact

and removed unused plans first, no user control. No effect on recovery model. No command for Lazy Writer No performance impact

2.Difference between Mirroring and Log Shipping S.No 1 2 3 Mirroring Principle can have single mirror Generally good to have 10 DBs for one server No data loss and can be used as high availability like Clustering Read log read and transfer the committed transaction through endpoints. Only committed transaction PAGE repair is possible if principle database page gets corrupt Mirrored DB can only be accessed using snapshot DB Principle and Mirror server should have same edition Require FULL recovery model Requires Sql Server 2005 SP1 or higher Enterprise or Developer Editions Log Shipping Multiple stand by servers can be possible. No limit May be some data loss as per schedule. And secondary server takes some manual work and time to be primary Transfer the log back up and restored at standby server. Committed as well as uncommitted and whole log backup restores. N/A

5 6

7 8

Secondary server can be reporting server (read-only) Primary and secondary server should be compatible server for restore. Require FULL or Bulk-Logged recovery model Enterprise edition for Sql Server 2000 and even Standard edition for 2005 can works

9 10

11

Immediate data moved Can control the flow of data by depending on SEND and WAIT scheduling jobs queue As Immediate data moves, user error reflects at mirrored DB As delay in data transfer can avoided user error.

12

3.Difference between Change Track and Change Data Capture CDC in SQL Server 2008 S.No 1 Change Track It is about fact: It captures only the fact as the tracking table has changed. It does NOT capture the data. Therefore, change tracking is more limited in the historical questions it can answer compared to change data capture. However, for those applications that do not require the historical information, there is far less storage overhead because of the changed data not being captured Storage: Internal tables are placed on the same filegroup as the parent entity. You could use the sys.internal_tables catalog view to show all the internal tables and parent entities. For example: select name, object_name(parent_id) as parent_object from sys.internal_tables Change Data Capture It is about the Data: Change data capture provides historical change information for a user table by capturing both the fact that DML changes were made and the actual data that was changed.

Storage: When change data capture is enabled for a database, a few things are added to the database, including a new schema (called cdc), some metadata tables, and a trigger to capture Data Definition Language (DDL) events. The two function names are, respectively, fn_cdc_get_all_changes_ and fn_cdc_get_net_changes_, with the capture instance name appended. Note that (like the change tracking feature) this functionality requires the table to have a primary key or other unique index. Prevents Log truncation. Forces full logging of some bulk operations.

Supported on Simple recovery model also. It is recommended that you

use snapshot isolation when change tracking is enabled. Snapshot isolation itself can add significant workload overhead and requires much more careful management of tempdb.

One major point to note here is that once change data capture is enabled, the transaction log behaves just as it does with transactional replicationthe log cannot be truncated until the log reader has processed it. This means a checkpoint operation, even in SIMPLE recovery mode, will not truncate the log unless it has already been processed by the log reader. Change Data Capture (CDC) uses the asynchronous process that reads the transaction log.

It uses synchronous tracking mechanism. once a database is enabled for change tracking, a version number is instituted, which allows ordering of operations Change Tracking has minimal impact on the system. It uses TempDB heavily DDL Restriction: There are restrictions on the DDL that can be performed on a table being tracked. The most notable restriction is that the primary key cannot be altered in any way. The other restriction worth calling out here is that an ALTER TABLE SWITCH will fail if either table involved has change tracking enabled. SQL Agent not needed

It has almost nil impact as it asynchronous mechanism reads from the transaction log. It uses transaction log. No such DDL restriction

6 7

t requires SQL Agent to be running. SQL Agent Job & Transaction Replication: Two SQL Agent jobs may be created: the capture job and the cleanup job. I say "may be created" because the capture job is the same as the one used for harvesting transactions in transactional replication. If transactional replication is

already configured, then only the cleanup job will be created and the existing log reader job will also be used as the capture job 9 Permission required to enable: SYSADMIN Permission required to enable: DBOwner

4.Difference between Index Rebuild and Index Reorganize in SQL Server 2005 S.No 1 Index Rebuild Index Rebuild drops the existing Index and Recreates the index from scratch. Rebuild the Index when an index is over 30% fragmented. Rebuilding takes more server resources and uses locks unless you use the ONLINE option available in 2005 Enterprise and Development editions. T-SQL for Rebuilding all Indexes of a particular table. USE AdventureWorks; GO ALTER INDEX ALL ON HumanResources.Employee REBUILD GO Index Reorganize Index Reorganize physically reorganizes the leaf nodes of the index. Reorganize the Index when an index is between 10% and 30% fragmented. Always prefer to do Reorganize the Index.

T-SQL for Reorganize all Indexes of a particular table. USE AdventureWorks; GO ALTER INDEX ALL ON HumanResources.Employee REORGANIZE GO

Note: If fragmentation is below 10%, no action required. 5.Difference between User -defined SP and System-defined SP S.No 1 User-defined SP Once we create User defined SP in one database i.e available to only that database directly.i.e we cannot call it from some other DBs directly System-defined SP System defined sp are available in master DB.These sps can be directly called from any DB

UDSP will be used to fulfill the user requirements

SDSP will be used for managing sql server

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/sql-server-difference-faqs-7.html SQL Server Difference FAQs-8 1.Difference between Constraints and Triggers S.No 1 Constraints Once we define some constraint in a table they will be stored along with table definition Constraints will do memory location to table comparison. In the order of precedence first Constraints will be fired Performance wise Constraints will not give best performance because memory location to table comparison is slower than table to table comparison. Constraints cannot start a chain reaction as like triggers for instance each delete, update action etc. can trigger off another function Triggers It will be stored as separate object

Triggers will do table to table comparison.For this triggers will use magic tables(inserted,deleted). In the order of precedence only after Constraints is fired,then only Triggers will be fired Performance wise triggers will give best performance because table to table comparison is faster than memory location to table comparison. Triggers are used to carry out tasks which cant be done using constraints. For eg:-A change in the "sal" column of a table should change the "tax" column in another table.This cant be done using constraints.It has to be done using triggers.Thats where the importance of triggers lie. Trigger is used for table Trigger is a user defined business rule for which user is responsible for logic for business rule

6 7

Constraint is used for column Constraints are predefined business rules in which all the organizations follow this constraints without any modification. Constraints are used to maintain the integrity and

Triggers are basically stored procedures which automatically

atomicity of database .In other words it can be said they are used to prevent invalid data entry . the main 5 constraints are NOT NULL,PRIMARY KEY,FOREIGN KEY,UNIQUE KEY and CHECK

fired when any insert,update or delete is issued on table

2.Difference between Cast and Convert in SQL Server S.No 1 2 Cast Cast is ANSII Standard Cast cannot be used for Formatting Purposes. Convert Convert is Specific to SQL SERVER Convert can be used for Formatting Purposes.For example Select convert (varchar, datetime, 101)

3 4

Cast cannot convert a datetime Convert can be used to convert a to specific format datetime to specific format Usage of CAST: USE Sample GO SELECT SUBSTRING(Name, 1, 30) AS ProductName, ListPrice FROM Production.Product WHERE CAST(ListPrice AS int) LIKE '3%'; GO Usage of CONVERT: USE Sample GO SELECT SUBSTRING(Name, 1, 30) AS ProductName, ListPrice FROM Production.Product WHERE CAST(int, ListPrice) LIKE '3%'; GO

3.Difference between CUBE and ROLLUP S.No 1 CUBE It is an additional switch to GROUP BY clause. It can be applied to all aggregation functions to return cross tabular result sets. Produces all possible combinations of subtotals specified in GROUP BY clause ROLLUP It is an extension to GROUP BY clause. Its used to extract statistical and summarized information from result sets. It creates groupings and then applies aggregation functions on them. Produces only some possible subtotal combinations

and a Grand Total.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/sql-server-difference-faqs-8.html Sql Server Difference FAQs-9 1.Difference between VARCHAR and NVARCHAR in SQL Server S.No 1 Varchar[(n)] Basic Definition: Non-Unicode Variable Length character data type. Example: DECLARE @FirstName AS VARCHAR(50) = UMAR SELECT @FirstName NVarchar[(n)] Basic Definition: UNicode Variable Length character data type. It can store both nonUnicode and Unicode (i.e. Japanese, Korean etc) characters. Example: DECLARE @FirstName AS NVARCHAR(50)= UMAR SELECT @FirstName No. of Bytes required for each character: It takes 2 bytes per Unicode/NonUnicode character. Example: DECLARE @FirstName AS NVARCHAR(50)= UMAR SELECT @FirstName AS FirstName,DATALENGTH(@FirstN ame) AS Length Result: FirstName Length UMAR 8 Optional Parameter n range: Optional Parameter n value can be from 1 to 4000.Can store maximum 4000 Unicode/Non-Unicode characters If Optional Parameter n is not specified in the variable declaration or column definition:

No. of Bytes required for each character: It takes 1 byte per character Example: DECLARE @FirstName AS VARCHAR(50) = UMAR SELECT @FirstName AS FirstName,DATALENGTH(@Fi rstName) AS Length Result: FirstName Length UMAR 4

Optional Parameter n range: Optional Parameter n value can be from 1 to 8000.Can store maximum 8000 NonUnicode characters.

If Optional Parameter n is not specified in the variable declaration or column definition:

If Optional parameter value n is not If Optional parameter value is specified in the variable declaration not specified in the variable or column definition then it is declaration or column definition considered as 2 then it is considered as 1. Example: Example: DECLARE @firstName DECLARE @firstName NVARCHAR =UMAR VARCHAR =UMAR SELECT @firstName SELECT @firstName FirstName,DATALENGTH(@firstNa FirstName,DATALENGTH(@fir me) Length stName) Length Result: Result: FirstName Length FirstName Length U2 U1 5 If Optional Parameter n is not specified in while using CAST/CONVERT functions: When this optional parameter n is not specified while using the CAST/CONVERT functions, then it is considered as 30. If Optional Parameter n is not specified in while using CAST/CONVERT functions: When this optional parameter n is not specified while using the CAST CONVERT functions, then it is considered as 30.

Example: Example: DECLARE @firstName DECLARE @firstName NVARCHAR(35) =UMAR ASIA VARCHAR(35) =UMAR ASIA INDIA TAMIL NADU CUDDALORE INDIA TAMIL NADU SELECT CAST(@firstName AS CUDDALORE NVARCHAR) SELECT CAST(@firstName FirstName,DATALENGTH(CAST( AS VARCHAR) @firstName AS NVARCHAR)) FirstName,DATALENGTH(CAS Length T(@firstName AS VARCHAR)) Length Result: FirstName Length Result: UMAR ASIA INDIA TAMIL NADU FirstName Length CUD 60 UMAR ASIA INDIA TAMIL NADU CUD 30 7 Which one to use? If we know that data to be stored in the column or variable doesnt have any Unicode characters. Which one to use? If we know that data to be stored in the column or variable can have Unicode characters.

Storage Size: Takes no. of bytes equal to the no. of Characters entered plus two bytes extra for defining offset.

Storage Size: Takes no. of bytes equal to twice the no. of Characters entered plus two bytes extra for defining offset.

2.Difference between SQL Server and MySQL S.No 1 SQL Server Current Date and Time: SELECT GETDATE() MySQL Current Date and Time: SELECT NOW() Optionally: Use CURDATE() for the date only. 2 Limiting Results: SELECT TOP 10 * FROM table WHERE id = 1 3 Date Field Default Value: DATETIME DEFAULT GETDATE() Limiting Results: SELECT * FROM table WHERE id = 1 LIMIT 10 Date Field Default Value: DATETIME fields cannot have a default value, i.e. "GETDATE()" We must use your INSERT statement to specify CURDATE() for the field. Optionally: Use datatype TIMESTAMP DEFAULT CURRENT_TIMESTAMP 4 Character Length: LEN() Character Length: CHARACTER_LENGTH() Aliases: CHAR_LENGTH(), LENGTH() Character Replace: REPLACE() works case sensitively Trim Functions: TRIM()

Character Replace: REPLACE() works case insensitively

Trim Functions: LTRIM() and RTRIM()

String Concatenation: CONCATENATION USING + (Does not automatically cast operands to compatible types)

String Concatenation: CONCAT(string, string), which accepts two or more arguments. (Automatically casts values into types which can be concatenated) Auto Increment Field Definition: tablename_id INTEGER AUTO_INCREMENT PRIMARY KEY Get a List of Tables: SHOW TABLES Get Table Properties: DESCRIBE tablename Get Database Version: SELECT VERSION() Recordset Paging: Add to end of SQL: "LIMIT " & ((intCurrentPage1)*intRecsPerPage) & ", " & intRecsPerPage LIMIT: The first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1). Get ID of Newest Inserted Record: Two step process: 1. Execute your statement: objConn.Execute("INSERT INTO...") 2. Set objRS = objConn.Execute("SELECT LAST_INSERT_ID() AS ID") Get a Random Record: SELECT * FROM Users ORDER BY RAND() LIMIT 1

Auto Increment Field Definition: tablename_id INT IDENTITY PRIMARY KEY

Get a List of Tables: SP_TABLES

10

Get Table Properties: HELP tablename

11

Get Database Version: SELECT @@VERSION

12

Recordset Paging: Recordset paging done by client side-ADO (very involved)

13

Get ID of Newest Inserted Record: SET NOCOUNT ON; INSERT INTO...; SELECT id=@@IDENTITY; SET NOCOUNT OFF;

14

Get a Random Record: SELECT TOP 1 * FROM Users ORDER BY NEWID()

15

Generate a Unique GUID: SELECT NEWID()

Generate a Unique GUID: SELECT UUID() Licensing: MySQL is available for free since MySQL is an open source. View Support: MySQL offers only updateable views. XML Support: MySQL does not support XML. Security: MySQL provides only table level security. Certiication for Security: MySQL does not offer any certification for security. Support for Triggers: Earlier versionsof MySQL does not support triggers. Only MySQL 5.0 supports triggers. Support for UDF: User defined functions are not supported in MySQL. Support for Cursors: Cursor feature is not available in MySQL. Support for SPs and Joins: Stored procedures and full join facility are offered in SQL Server. Support for Import/Export Functions: Import and Export functions have very limited support in MySQL. Support for Transaction: Transaction support is very much limited in MySQL.

16

Licensing: SQL Server is not an open source and payment has to be made to use SQL Server. View Support: SQL Server offers indexed views which are much more powerful, performance wise. XML Support: SQL Server supports XML. Security: SQL Server provides column level security. Certiication for Security: SQL Server has C2 compliant certification. Database security is verified by third party. Support for Triggers: SQL Server provides triggers.

17

18 19

20

21

22

Support for UDF: User defined functions are supported in SQL Server. Support for Cursors: Cursor feature is available in SQL Server. Support for SPs and Joins: Stored procedures and full join facility is not offered in MySQL. Support for Import/Export Functions: Import and export are extensively supported in MySQL. Support for Transaction: Transaction support is extensively and fully offered in SQL Server.

23

24

25

26

27

Support for Replication: Replication support is extensively and fully offered in SQL Server. Support for auto tuning: Auto tuning is supported in SQL Server. Support for job scheduling and profiling: Job scheduling and profiling are available in SQL Server. Support for online backup and clustering: Online backup support and clustering support is extensive and complete in SQL Server. Support for Log shipping and SAN: Log Shipping and Storage Area Network support is available in SQL Server. Support for OLAP Services, Data Reporting and Data Mining: OLAP Services, Data Reporting and Data Mining are supported in SQL Server.

Support for Replication: Replication support is very much limited in MySQL. Support for auto tuning: Auto tuning is not supported in MySQL. Support for job scheduling and profiling: Job scheduling and profiling are not available in MySQL. Support for online backup and clustering: Online backup support and clustering support is limited in MySQL. Support for Log shipping and SAN: Log Shipping and Storage Area Network support is not available in MySQL. Support for OLAP Services, Data Reporting and Data Mining: OLAP Services, Data Reporting and Data Mining are not supported in MySQL.

28

29

30

31

32

3.Difference between SET QUOTED_IDENTIFIER ON and SET QUOTED_IDENTIFIER OFF in SQL Server S.No 1 SET QUOTED_IDENTIFIER ON Characters Enclosed within double quotes: is treated as Identifier 2 Try using Characters Enclosed within double quotes as identifier: Works Example: Below statement to SET QUOTED_IDENTIFIER OFF Characters Enclosed within double quotes: is treated as Literal Try using Characters Enclosed within double quotes as identifier: Fails Example: Below statement to

create a table with table name Table succeeds. SET QUOTED_IDENTIFIER ON GO CREATE TABLE dbo.Table (id int,Function VARCHAR(20)) GO

create a table with table name Table Fails. SET QUOTED_IDENTIFIER OFF GO CREATE TABLE dbo.Table (id int,Function VARCHAR(20)) GO Error Message: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near Table. Try using Characters Enclosed within double quotes as Literal: Works Example: Below Statement Works. SET QUOTED_IDENTIFIER OFF GO SELECT UMAR

Try using Characters Enclosed within double quotes as Literal: Fails Example: Below statement fails. SET QUOTED_IDENTIFIER ON GO SELECT BIRADAR Error Message: Msg 207, Level 16, State 1, Line 1 Invalid column name UMAR.

Characters Enclosed within single quotes: is treated as Literal Example: SET QUOTED_IDENTIFIER ON GO SELECT UMAR

Characters Enclosed within single quotes: is treated as Literal Example: SET QUOTED_IDENTIFIER ON GO SELECT UMAR

How to find all the objects which are created with SET QUTOED_IDENTIFIER ON/OFF: Below Statement can be used to find all the objects created with SET QUTOED_IDENTIFIER setting as ON: SELECT OBJECT_NAME (object_id) FROM sys.sql_modules WHERE

How to find all the objects which are created with SET QUTOED_IDENTIFIER ON/OFF: Below Statement can be used to find all the objects created with SET QUTOED_IDENTIFIER setting as OFF: SELECT OBJECT_NAME (object_id) FROM sys.sql_modules WHERE uses_quoted_identifier = 0

uses_quoted_identifier = 1 4.Difference between DateTime and DateTime2 DataType S.No 1 2 DateTime Min Value: 1753-01-01 00:00:00 Max Value: 9999-12-31 23:59:59.997 3 Storage Size: 8 Bytes DateTime2[(n)] Min Value: 0001-01-01 00:00:00 Max Value: 9999-12-31 23:59:59.9999999 Storage Size: 6 to 8 bytes Note: Parameter n is optional and if it is not specified then fractional seconds precision is 7 digit and it can be from 0 to 7 digit. For fractional seconds precision <3 6="6" bytes="bytes" font="font" takes="takes"> For fractional seconds precision 3 or 4 it will take 7 bytes For fractional seconds precision >4 it will take 8 bytes 4 Usage: Declare @now datetime 5 Current Date and Time function: GetDate() It returns DB Current Date and Time of DateTime Data Type Example: SELECT GETDATE() Result: 2011-09-16 13:23:18.767 6 +/- days: WORKS Example: DECLARE @nowDateTime DATETIME = GETDATE() Usage: Declare @now datetime2(7) Current Date and Time function: SYSDATETIME()- It returns DB Current Date and Time of DateTime2 Data Type Example: SELECT SYSDATETIME() Result: 2011-09-16 13:23:18.7676720 +/- days: FAILS Need to use only DateAdd function Example: DECLARE @nowDateTime2 DATETIME2=

SELECT @nowDateTime + 1 Result: 2011-09-17 13:44:31.247

SYSDATETIME() SELECT @nowDateTime2+1 Result: Msg 206, Level 16, State 2, Line 2 Operand type clash: datetime2 is incompatible with int Compliance: Is an ANSI/ISO compliant

Compliance: Is not an ANSI/ISO compliant

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/sql-server-difference-faqs-9.html Difference Between Crystal Reports and SSRS Difference Between Crystal Reports and SSRS (OR) Difference Between Crystal Reports and SQL Server Reporting Services S.No 1 Crystal Reports Ease of hosting reports: SSRS Ease of hosting reports:

Using the URL technology in In SSRS, in order to host reports RS we can host reports more we need to make a UI for the easily than in crystal report . same. 2 Supporting platforms: Supporting platforms:

Crystal Reports can run on SSRS can run only on windows windows, IBM and sun environment. 3 Client tools: Client tools:

In crystal Reports, we have In reporting services we have Report designer. Business intelligence ( BI ) and development studio. 4 Caching: Caching:

This achieved in Crystal In SSRS,it is stored as snapshots Reports by using cache server. in Reportserver database. 5 Export formats: Export formats:

In Crystal Reports we have In SSRS, we have all the formats HTML,PDF,Excel,XML,Word , above it also gives capability to PDF , RTF , CSV, text files. extend custom reporting formats.

Data sources: Crystal Reports support more data sources which incudes ADO, COM, Database excel Access, Exchange, NT, Xbase, JDBC, File system and Paradox.

Data sources: SSRS only supports Microsoft and oracle data sources,namely,SQL Server, Oracle, ODBC, OLEDB and we can also extend additional data sources which does not exists in crystal reports. Version issues:

Version issues:

One of the main issues faced SSRS comes with SQL Server in crystal reports is it have minimizing the version issue. different versions which makes it difficult to use 8 Web server support: Web server support:

Crystal Reports can run on IIS SSRS works only with IIS 5.0 and 5/6, Apache, lotus etc above. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-crystalreports-and.html Sql Server Difference FAQs-10 1.Difference between OLTP and OLAP S.No 1 OLTP Abbreviation: OLAP Abbreviation:

OLTP stands for Online OLAP stands for Online analytical transactional processing . processing . 2 Meaning: OLTP is designed to efficiently process high volumes of transactions, instantly recording business events (such as a sales invoice payment) and reflecting changes as they occur. 3 Used in: Meaning: OLAP is designed for analysis and decision support, allowing exploration of often hidden relationships in large amounts of data by providing unlimited views of multiple relationships at any cross-section of defined business dimensions. Used in: -

ERP, TX system, Client Server Data warehouse application Architecture, Desktop MOLAP, ROLAP, HOLAP application

Data Provision: Current data

Data Provision: Current and historical data Database Type of Database Transactions: Long database transactions

Type of Transactions:

Short database transactions 6 Type of update/insert/delete: Online update/insert/delete 7 Normalization/Denomalizatio n: Type of update/insert/delete: Batch update/insert/delete Normalization/Denomalization:

Denormalization is promoted Normalization is promoted (1st (Dimension and Fact design). normal form, second normal form and third normal form). 8 Volume of Transactions: High volume of transactions 9 Transaction Needed: Transaction necessary 10 Volume of Transactions: Low volume of transactions

Recovery Transaction Recovery Needed: recovery Transaction is necessary recovery is not

Amount of Requirement: Less Index

Index Amount of Index Requirement: More Index

11

Amount of Requirement: More Joins Model: Adopts an relationship(ER) model

Join Amount of Join Requirement: Less Joins Model: entity Adopts star, snowflake or fact constellation model and a subjectoriented database design Orientation:

12

13

Orientation:

Customer-oriented, used for Market-oriented, used for data data analysis and querying by analysis by knowledge clerks, clients and IT workers( managers, executives, professionals analysis) 14 Source: Source:

Daily transactions. 15 Motive:

OLTP Motive:

Faster insert, updates, deletes Faster analysis and search by and improve data quality by combining tables. reducing redundancy. 16 SQL complexity: Simple and Medium. 2.Difference between DTS and SSIS S.No 1 2 DTS SSIS Sql Server SQL complexity: Highly complex due to analysis and forecasting.

DTS stands for Data SSIS stands for Transformation Services Integration Services

DTS is a set of objects using SSIS is an ETL tool provided by an ETS tool to extract, Microsoft to extra data from transform, and load information different sources. to or from a database DTS was originally part of the SSIS is a component of the Microsoft SQL Server 2000 Microsoft SQL Server 2005 Uses Activex Script No Deployment available wizard Uses Scripting Language is Deployment wizard is available

3 4 5 6 7 8 9 10

Limited Set of Transformation Huge of Transformations available available Does not Functionality support BI Completely supports end to end process of BI Multi Tasks run parallely It is managed by CLR through SSIS can develop through Business Intelligence Development Studio (BIDS, nothing but new version of VS IDE)

Single Task at a time It is Unmanaged script DTS can develop Enterprise manager

11 12

We can deploy only at local It can be deployed using multiple server server using BIDS Designer contains Single Pane SSIS designer contains 4 design panes:

a) Control Flow b) Data Flow c) Event Handlers & d) Package Explorer. 13 14 No Event Hander No Solution Explorer Event Handler Available Solution Explorer is available, with packages, connections and Data Source Views (DSV)

15

Connection and other values It can be controlled dynamically are static, not controlled at using configuration runtime.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/sql-server-difference-faqs10.html Difference between Count(*) and Count(column_name) in SQL Server Difference between Count(*) and Count(column_name) in SQL Server S.No 1 Count(*) Will count all the rows in the specified table Count(column_name) Returns the number of rows which have a value (NULL values will not be counted)

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-countand.html Difference between Check Constraint and Rule Difference between Check Constraint and Rule S.No 1 Check Constraint Check constraint is associated with columns in a Table. So these cannot be re-used. Rule Rules are defined with in a database and can be applied to any number of columns

Example for Constraint: alter table Emp add constraint ck_op Check (Salary between 15000 and 45000) Example for Rule (Creation & Binding): Creating Rule: CREATE RULE SAL_RANGE as @Sal > 15000 and @Sal > 45000 Binding Rule to a Column: SP_BINDRULE 'SAL_RANGE','Emp.Salary'

Summary: The major difference between rule and Check is re usability Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-checkconstraint-and.html Difference between MSDE and SQL Server 2000 Difference between MSDE and SQL Server 2000 S.No 1 MSDE Size: In MSDE database size limited to 2GB. 2 Performance: Performance of MSDE degrades when maximum number of concurrent operations greater then or equal to 8. Performance degradation is implemented with the help of SQL SERVER 2000 workload governor. 3 OLAP and Data warehousing: MSDE does not provide OLAP and Data warehousing capabilities 4 Mail: MSDE does not have support facility for SQL mail. 5 Administrative Tools: MSDE doesn't have its own administrative tools. There are many third party tools, which provide administrative capability GUI. SQL Server 2000 Size: In SQL Server database size limited to 1,048,516 TB1(1 Billion GB). Performance: In SQL SERVER 2000, possible number of concurrent connections are 32,767.

OLAP and Data warehousing: MSDE provides OLAP and Data warehousing capabilities

Mail: MSDE supports facility for SQL mail. Administrative Tools: SQL Server have administrative tools such as enterprise manager, Query analyzer or Profiler.

Note: MSDE(Microsoft Desktop Engine) is a cut down version of the SQL SERVER database and free, redistributable software. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-msde-and-

sql-server_23.html Difference between MSDE and SQL Server Express 2005 Difference between MSDE and SQL Server Express 2005 S.No 1 MSDE MSDE (Micosoft Data Engine) is a cut down version of SQL Server 2000 MSDE maximum database size is 2GB In terms of programming language support MSDE has only TSQL MSDE had and was controlled through the Workload governer There was no XCOPY support for MSDE MSDE has DTS MSDE does not have reporting services MSDE does not have native XML support SQL Server Express 2005 SQL SERVER Express edition is a cut down version of SQL SERVER 2005 and the next evolution of MSDE SQL SERVER Express has around 4GB. SQLSERVER Express has TSQL and .NET. SQL SERVER Express does not have connection limitation SQL SERVER Express has it. DTS is not present in SQL SERVER express SQL SERVER Express has reporting services SQL SERVER Express has native XML support

2 3

4 5 6 7 8

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-msde-andsql-server.html Difference between STUFF and REPLACE in SQL Server Difference between STUFF and REPLACE in SQL Server S.No 1 STUFF STUFF is used to replace the part of string with some other string. Syntax: STUFF (stringexpression, start, length, replacementcharacters) Example: REPLACE REPLACE is used to replace all the occurances of the given pattern in a string. Syntax: REPLACE ( string_expression , string_pattern , string_replacement ) Example:

SELECT STUFF('Umar's Blog select Replace('Umar','U','A') is USEFUL',8,4,'DATABASE') Output: Amar Output: Umar's DATABASE is USEFUL Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-stuff-andreplace-in.html Difference between rdl and rdlc Difference between rdl and rdlc S.No 1 2 3 4 5 6 rdl It stands for Report Definition Language Created by Sql server with reporting services Runs on server side Requires values for all elements such as query text Takes less time to produce large data in reports As runs in server license of the reporting services not needed rdlc It stands for Report Definition Language, Client Side Created by Visual studio Runs on client side Does not require to have values for all elements such as query text Takes more time to produce large data in reports As runs in local license of the reporting services not needed

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-rdl-andrdlc.html Difference between Windows Authentication and SQL Server Authentication in SQL Server Difference between Windows Authentication and SQL Server Authentication in SQL Server S.No 1 Windows Authentication Windows Authentication is trusted because the user name and password are checked with the Active Directory Single User can only login SQL Server Authentication SQL Server authentication is untrusted , since SQL Server is the only verifier participating in the transaction Multi user can login

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-betweenwindows.html

Difference between SQL Server 2008 R2 and SQL Server 2012 Difference between SQL Server 2008 R2 and SQL Server 2012 (OR) Difference between SQL Server 10.5 and SQL Server 11.0 S.No 1 2 SQL Server 2008 R2 SQL Server 2008 R2 is codenamed as Kilimanjaro In SQL Server 2008 R2 , rebooting is requisite for OS patching , hence server down time is high SQL Server 2008 R2 does not have this feature of availability groups, hence fast recovery is not possible. SQL Server 2012 SQL Server 2012 is codenamed as Denali In SQL Server 2012, server down time is reduced by 50% , hence OS patching is not rebooting n times. In SQL Server 2012, high availability and disaster recovery factor has been introduced which duplicates the data and rapidly recovers the loss.

SQL Server 2008 R2 is slow In SQL Server 2012, the compared to SQL Server 2012. performance is 10 times faster than the predecessor. However buffer rate is less because there is no data redundancy in SQL Server 2008 R2 Data visualization is not supported in SQL Server 2008 R2 Spatial features are not supported more in SQL Server 2008 R2. Instead a traditional way for geographical elements have been set in SQL Server 2008 R2. Buffer rate is high in SQL Server 2012 because of data compression. Data visualization tool is available in SQL Server 2012.This allows snapshots of data. Support for persistent computed columns and extra geographical approach is possible with spatial features in SQL Server 2012.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-sql-server2008-r2.html

Difference between a table scan and an index scan in SQL Server Database Difference between a table scan and an index scan in SQL Server Database

S.No 1

Table Scan Here, row by row scanning is done to get the data. In case, there are huge number of data in a table, it becomes an overhead.

Index Scan Here in the first, index is created in the table. It then uses the index to get to the data that we wanted. It increases the performance.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-table-scanand-index.html Difference between SQL and T-SQL in SQL Server Difference between SQL and T-SQL in SQL Server S.No 1 2 SQL SQL stands for Structured Query Language ANSI/ISO(American National Standards Institute) standard database query language Set of queries submitted individually to the server. It is developed by IBM. T-SQL T-SQL stands for Transact SQL This is implementing in SQL SERVER. T-SQL can have one or more queries. It is a batch program, and submit to the server in a single shot. We can run all the programs at any time. T-Sql is implemetation of SQL in Microsoft SQL Server.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-sql-and-t-sqlin-sql_24.html SET vs SELECT in SQL Server Difference between SET and SELECT in SQL Server S.No 1 SET Is it ANSI Standard ? SET is ANSI Standard for value assignment to variables. Variable Assignment: SET can be used to assign value to one variable at a time. DECLARE @i INT, @j INT, SELECT Is it ANSI Standard ? SELECT is Non-ANSI Standard for value assignment to variables. Variable Assignment: SELECT can be used to assign values to multiple variables in a single SELECT statement. The below query using SELECT is

@k INT SET @i = 10,@j = 20,@k = 30 It gives error: Msg 102, Level 15, State 1, Line 5 Incorrect syntax near ,.

valid: 1 2 3 4 5 DECLARE @i INT, @j INT, @k INT SELECT @i = 10,@j = 20,@k = 30 Output: Command(s) completed successfully. The below query using SET is not valid: 1 2 3 4 5

Behaviour of SET when query returns more then one value: When assigning from a query that returns more than one value, SET will fail with an error. The below query using set will fail: 1 2 3 DECLARE @i INT SET @i = (SELECT n FROM (VALUES (10),(20),(30)) AS List(n)) Error: Msg 512, Level 16, State 1, Line 5 Subquery returned more than 1 value. This is not permitted when the subquery follows =, ! =, <, <= , >, >= or when the subquery is used as an expression.

Behaviour of SELECT when query returns more then one value: When assigning from a query that returns more than one value, SELECT will assign the last value returned by the query and hide the fact that the query returned more than one row. The below query using select will execute successfully: 1 2 3 4 5 DECLARE @i INT SELECT @i = n FROM (VALUES (10),(20),(30)) AS List(n) SELECT @i Output: 30 (1 row(s) affected)

Behaviour of SET when query does not return any rows: If the variable is initially assigned a value following is the behavior of variable assignment for SET, Assigns null if the query does not return any rows. The output of the below statement will be NULL 1 2 3 4 5 6 7 DECLARE @i INT SET @i = 1 SET @i = (SELECT n FROM (VALUES (10),(20),(30)) AS List(n) WHERE 1=2) SELECT @i Output:

Behaviour of SELECT when query does not return any rows: If the variable is initially assigned a value following is the behavior of variable assignment for SELECT, Retains the initially assigned value and does not assign null if the query does not return any rows. The output of the below statement will be 1 1 2 3 4 5 6 7 DECLARE @i INT SET @i = 1 SELECT @i = n FROM (VALUES (10),(20),(30)) AS List(n) WHERE 1=2 SELECT @i Output: 1

NULL (1 row(s) affected) (1 row(s) affected) 5 Performance: Set does not provide better performance over select when used for assigning values to multiple variables at the same time. Assigning values to multiple variables using SET: 1 2 3 4 5 6 7 DECLARE @i INT, @j INT, @k INT Performance: Select has better performance over set when used for assigning values to multiple variables at the same time. Assigning values to multiple variables using Select: 1 2 3 4 5 DECLARE @i INT, @j INT, @k INT SELECT @i = 10,@j = 20,@k = 30

SET @i = 10 SET @j = 20 SET @k = 30 6 When to use ? When to use ? Following are few scenarios for Using SELECT is efficient and using SET flexible in the following few cases. 1. If we are required to assign a single value directly to variable and no query is involved to fetch value. 2. NULL assignments are expected (NULL returned in result set) 3. Standards are meant to be follow for any planned migration 4. Non scalar results are expected and are required to be handled 1. Multiple variables are being populated by assigning values directly 2. Multiple variables are being populated by single source (table , view) 3. Less coding for assigning multiple variables 4. Use this if we need to get @@ROWCOUNT and @ERROR for last statement executed

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-set-andselect-in.html Group By vs Order By in SQL Server Difference between Group By and Order By in SQL Server

S.No 1

Group By Meaning: Group By performs grouping operation i.e., it provides a way to sub-total SQL Query results,or perform some other aggregate functions (GROUPING SETS, CUBE, ROLLUP, WITH CUBE, or WITH ROLLUP) on them. Used for: Controlling the presentation of the rows for the results of the SELECT statement. Change in order of columns: Order of columns make no difference in the GROUP BY Clause. For Example, GROUP BY A, B, C and GROUP BY C,A,B Both returns the same results.

Order By Meaning: Order By performs sorting operation i.e., it provides a way to sort SQL Query results like ascending or descending . It does not affect what shows up in the result set,only what order it is displayed. Used for: Controlling the presentation of the columns for the results of the SELECT statement. Change in order of columns: Order of Columns makes difference in ORDER BY Clause. For Example, ORDER BY A, B, C and ORDER BY C,A,B Both returns the same number of Records. But Row order will be different. Allowed in Create View Statement or not: ORDER BY clause is not allowed in the CREATE VIEW statement. Execution Sequence: The ORDER BY clause is always placed after the GROUP BY clause in the SELECT statement. Impact on performance: As we now that Order By sorts the data either in ascending order or in descending order as specified in the query. So here Sorting the data is an overhead.

Allowed in Create View Statement or not: GROUP BY clause can be used in the CREATE VIEW statement to sort data. Execution Sequence: The GROUP BY clause is always placed before the ORDER BY clause in the SELECT statement. Impact on performance: As we know that Group By clubs all the similar rows and display only the distinct data. So here clubbing and displaying distinct data is an overhead.

Example-1 for Group By: select * from employee group by emp_name. this gives the output data in the group of the emp_name. Example-2 for Group By: SELECT department, sum(salary) FROM tblEmployee GROUP BY department; will give us salary totals by department, whereas the sum statement by itself would just give us the grand total of all salaries in tblEmployee. Example-3 for Group By: Group By helps us to display any aggregate of any column based on a field what has repeated names. use AdventureWorksDW2008R2 go select Title,SUM(BaseRate) as Rate from dbo.DimEmployee group by Title

Title 1 2 3 4 5 6 7 8 9 The Accountant Accounts Manager Accounts Payable Specialist Accounts Receivable Specialist Application Specialist Assistant to the Chief Financial Officer Benefits Specialist Buyer Chief Executive Officer

Rate 52.88 34.74 38 57 109.62 13.46 16.59 164.42 125.5 120.19 33.65 76.92

10 Chief Financial Officer 11 Control Specialist 12 Database Administrator

Example-1 for Order By: select * from employee order by emp_name desc,emp_no asc; this query gives the output in the ascending order of the emp_no and descending order of the emp_name. Example-2 for Order By: SELECT * FROM tblEmployee ORDER BY lastname; will give us all tblEmployee data, in order of last name. If we want the results in descending (reversed) order, simply add DESC to the end of the clause: ORDER BY lastname DESC; Example-3 for Order By: Order By clause helps us to display any table based on the values present on that particular column. use AdventureWorksDW2008R2 go select FirstName,Title from dbo.DimEmployee order by FirstName

First Name 1 2 3 4 5 6 7 8 9 A. Scott Alan

Title The Master Scheduler Scheduling Assistant

Alejandro Production Technician - WC40 Alex Alice Amy Andreas Andrew Andrew Production Technician - WC45 Production Technician - WC50 European Sales Manager Quality Assurance Technician Production Supervisor -WC10 Production Technician - WC45

10 Andy 11 Angela 12 Anibal Summary:

Production Technician - WC30 Production Technician - WC50 Production Technician - WC20

1. All non-aggregate columns selected must be listed in the GROUP BY clause. 2. Integers cannot be used in the GROUP BY to represent columns after the SELECT keyword, similar to using the ORDER BY clause. 3. The GROUP BY clause is generally not necessary unless using aggregate functions. 4. If we GROUP, the results are not necessarily sorted; although in many cases they may come out in an intuitive order, that's not guaranteed by the GROUP clause. If we want our groups sorted, always use an explicity ORDER BY after the GROUP BY. Dave Costa 5. Processing of "group by" or "order by" clause often requires creation of Temporary tables to process the results of the query. Which depending of the result set can be very expensive. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-group-byand-order.html Database vs Schema Difference between Database and Schema S.No 1 Database Database is a collection of organized data Schema Database schema describes the structure and organization of data in a database system

The database holds the Schema contains Databases and records, fields and cells of data describes how these database fields and cells are structured and organized and what types of relationships are mapped between these entities

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-databaseand-schema.html

Control Flow vs Data Flow in SSIS Difference between Control Flow and Data Flow in SSIS S.No 1 2 Control Flow Data Flow

The smallest unit in Control The smallest unit in Data Flow is Flow is called task. called component. In Control Flow , tasks require completion (success, failure or completion) before moving to next task. In Data Flow , one component will not wait for other component to finish, all of them will work together in processing and managing data in streaming way.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-control-flowand.html TIMESTAMP vs UNIQUEIDENTIFIER Difference between TIMESTAMP and UNIQUEIDENTIFIER in SQL Server S.No 1 2 Timestamp UniqueIdentifier

Size of TIMESTAMP value is 8 Size of UNIQUEIDENTIFIER is 16 bytes. bytes. TIMESTAMP is not based on UNIQUEIDENTIFIER value is system date or time. based on the computer's MAC addresses and system date time. The purpose to TIMESTAMP is The purpose of to track the operation in tables UNIQUEIDENTIFIER is to have a on the database level. unique value assigned to a row (maybe as primary key). It remains unique in any system in the world.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-timestampand.html COALESCE vs NULLIF in SQL Server Difference between COALESCE and NULLIF in SQL Server S.No 1 COALESCE NULLIF function works as if

This function works same as if This

else statement and it takes multiple arguments and it checks Null values for each if first argument is null then it considers the second value, if the both first and second arguments are nulls then it considers third argument. 2

statement and it takes two arguments and compares the 2 argument, if both are same then returns Null else returns the first argument.

Syntax: Syntax: COALESCE(argument1, NULLIF(argument1, argument2) argument2, argument3[, argument4, argument6, argument7]) It Accepts N Parameters, It It Accepts 2 Parameters, if both are returns first Not Null Values not equal then it will return first value. For Example:SELECT For Example:COALESCE(NULL,2,NULL,3) SELECT NULLIF(1,2) Output :- 2 Output :- 1 First argument can be NULL, but both argument can not NULL value First argument can be NULL, First argument can not be NULL but both argument can not input NULL value If Both argument are equal, If Both argument are equal, then it then it will return first value. will return NULL value. For Example:SELECT COALESCE(2,2) Output :- 2 For Example:SELECT NULLIF(2,2) Output :- NULL

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-coalesceand-nullif.html Star Schema vs Snowflake Schema Difference Between Star Schema and Snowflake Schema S.N o 1 2 Star Schema Data Structure: De-Normalized Data Structure Dimension: Category wise Dimension Table Snowflake Schema Data Structure: Normalized Data Structure

Dimension: Single Dimension table split into many pieces

Data dependency & Data dependency & redundancy: redundancy: Less data dependency and No More data dependency and redundancy redundancy Join: Join: No need to use complicated Complicated Join join Query Result: Query Results Faster Parent Table: No Parent Table DB Structure: Simple DB Structure Sample: http://blogmstechnology.blogspot.in/2010 /06/bi-dimensional-model-starschema.html Query Result: Some delay in Query Processing Parent Table: It may contain Parent Table DB Structure: Complicated DB Structure Sample: http://blogmstechnology.blogspot.in/2010/06/ bi-dimensional-model-snowflakeschema.html

5 6 7 8

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-star-schemaand.html Tabular Models vs PowerPivot Difference between Tabular Models and PowerPivot in SQL Server 2012 S.No 1 Tabular Models Scalability: i.No specified upper size limit ii.Partitions to process large volumes of data iii.Supports Direct Query and VertiPaq PowerPivot Scalability: i. 2 GB Excel file size limit (for uploading to SharePoint) ii. No partitioning iii. VertiPaq only

Manageability: Manageability: SSMS, AMO, ADOMD, XMLA, Excel / SharePoint Deployment Wizard, PowerShell, Integration Services Securability: Row level security and Securability: dynamic Excel workbook file security Deveolopment Tool: Excel

Deveolopment Tool: Visual Studio

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-tabularmodels-and.html ReportServer DB vs ReportServerTempDB Difference between ReportServer Database and ReportServerTempDB in SSRS S.No 1 ReportServer Database ReportServerTempDB

What it stores ? What it stores ? It Stores information about the It stores only the cached copy of report schema, report property, the report data. data sources, parameters, stores the folder hierarchy, report Execution log. How long it exists ? How long it exists ? It always exists until changes It expires based on Expiry settings. on the RDL Schema. How it helps ? How it helps ? It helps to access the It helps to improve the structure. performance of report execution as it is loading data from cache. Whether data will exist during / after service restart ? Data always exists during SSRS service restarts. Whether data will exist during / after service restart ? Services restarts will clear the Temp Data.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-betweenreportserver.html Derived vs Calculated Measure Difference between Derived Measure and Calculated Measure in SSAS S.No 1 Derived Measure Calculated Measure ? after

When it is calculated ? When it is calculated This is calculated before the This is Calculated aggregation are created . aggregations are created . Whether Derived Measure value is stored in Cube or not ? The values of this measure is

Whether Calculated Measure value is stored in Cube or not ? This values are not stored in the Cube .

stored in the Cube. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-derivedmeasure-and.html Merge vs Union All transformations Differences between Merge and Union All transformations in SSIS S.No 1 Merge Union All

Number of inputs allowed: Number of inputs allowed: Merge transformation can Union all can take more than two accept only two inputs. inputs. Data to be sorted or not before Merge transformation: Data has to be sorted before Merge Transformation. Data to be sorted or not before Union All transformation: Union all does not have any condition like Merge.

For illustration, please visit @ http://sqljoe.wordpress.com/2011/03/03/differences-between-merge-and-unionalltransformations-in-ssis/ Summary: Both of them essentially takes outputs from more than one sources and combines them into a single result set. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/differences-between-merge-andunion-all.html MOLAP vs ROLAP vs HOLAP Difference between MOLAP, ROLAP and HOLAP in SSAS MOLAP MOLAP stands for Multidimensional Online Analytical Processing The MOLAP storage mode causes the aggregations of the partition and a copy of its source data to be stored ROLAP HOLAP

ROLAP stands for HOLAP stands for Hybrid Relational Online Online Analytical Analytical Processing Processing The ROLAP storage mode causes the aggregations of the partition to be stored in indexed views in the relational database that The HOLAP storage mode combines attributes of both MOLAP and ROLAP. Like MOLAP, HOLAP causes the

in a multidimensional structure in Analysis Services when the partition is processed. This MOLAP structure is highly optimized to maximize query performance. The storage location can be on the computer where the partition is defined or on another computer running Analysis Services. Because a copy of the source data resides in the multidimensional structure, queries can be resolved without accessing the partitions source data. Query response times can be decreased substantially by using aggregations. The data in the partitions MOLAP structure is only as current as the most recent processing of the partition.

was specified in the aggregations of the partitions data source. partition to be stored in a multidimensional structure in an SQL Server Analysis Services instance. Unlike the MOLAP storage mode, ROLAP does not cause a copy of the source data to be stored in the Analysis Services data folders. Instead, when results cannot be derived from the query cache, the indexed views in the data source are accessed to answer queries. HOLAP does not cause a copy of the source data to be stored. For queries that access only summary data in the aggregations of a partition, HOLAP is the equivalent of MOLAP.

Query response is generally slower with ROLAP storage than with the MOLAP or HOLAP storage modes. Processing time is also typically slower with ROLAP. However, ROLAP enables users to view data in real time and can save storage space when you are working with large datasets that are infrequently queried, such as purely historical data.

Queries that access source datafor example, if you want to drill down to an atomic cube cell for which there is no aggregation data must retrieve data from the relational database and will not be as fast as they would be if the source data were stored in the MOLAP structure. With HOLAP storage mode, users will typically experience substantial differences in query times depending upon whether the query can be resolved from cache or aggregations versus from the source data itself. Pros HOLAP balances the disk space requirement, as it only stores the

Pros Provides maximum query performance, because all the

Pros Ability to view the data in near realtime. Since ROLAP does

required data (a copy of the detail data and calculated aggregate data) are stored in the OLAP server itself and there is no need to refer to the underlying relational database. All the calculations are pre-generated when the cube is processed and stored locally on the OLAP server hence even the complex calculations, as a part the query result, will be performed quickly. MOLAP uses compression to store the data on the OLAP server and so has less storage requirements than relational databases for same amount of data. MOLAP does not need to have a permanent connection to the underlying relational database (only at the time of processing) as it stores the detail and aggregate data in the OLAP server so the data can be viewed even when there is connection to the relational

not make another copy of data as in case of MOLAP, it has less storage requirements. This is very advantageous for large datasets which are queried infrequently such as historical data. In ROLAP mode, the detail data is stored on the underlying relational database, so there is no limitation on data size that ROLAP can support or limited by the data size of relational database. In nutshell, it can even handle huge volumes of data.

aggregate data on the OLAP server and the detail data remains in the relational database. So no duplicate copy of the detail data is maintained. Since HOLAP does not store detail data on the OLAP server, the cube and partitions would be smaller in size than MOLAP cubes and partitions. Performance is better than ROLAP as in HOLAP the summary data are stored on the OLAP server and queries can be satisfied from this summary data. HOLAP would be optimal in the scenario where query response is required and query results are based on aggregations on large volumes of data.

database. Cons With MOLAP mode, you need frequent processing to pull refreshed data after last processing resulting in drain on system resources. Latency; just after the processing if there is any changes in the relational database it will not be reflected on the OLAP server unless reprocessing is performed. MOLAP stores a copy of the relational data at OLAP server and so requires additional investment for storage. If the data volume is high, the cube processing can take longer, though you can use incremental processing to overcome this. Cons Compared to MOLAP or HOLAP the query response is generally slower because everything is stored on relational database and not locally on the OLAP server. A permanent connection to the underlying database must be maintained to view the cube data. Cons Query performance (response time) degrades if it has to drill through the detail data from relational data store, in this case HOLAP performs very much like ROLAP.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-molap-rolapand.html

Compact Edition vs Express Edition Difference Between SQL Server Compact Edition and SQL Server Express Edition S.No 1 SQL Server Compact Edition Privately embedded, application: Yes Non-admin option: Yes SQL Server Express Edition

installed, Privately installed, embedded, with the with the application: No installation Non-admin installation option: No Windows Mobile

Runs on Windows Mobile Runs on platform: platform: Yes No Runs in-process with application: Yes Runs as a service: No File format: Single File Data file storage network share: Yes Support for extensions: Yes on

Runs in-process with application: No Runs as a service: Yes File format: Multiple Files a Data file storage on a network share: No file Support for extensions: No different file

5 6 7

different

Procedural T-SQLSelect Procedural T-SQLSelect Case, If, Case, If, features: features: No Yes Remote Data Access (RDA): Yes Distributed transactions: No Remote Data Access (RDA): No Distributed transactions: Yes views,

10 11 12

Stored procedures, views, Stored procedures, triggers :No triggers : Yes

13 14

Role-based security: No Number of connections: 256

Role-based security: Yes concurrent

concurrent Number of connections: Unlimited

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-sql-servercompact.html ISNULL vs COALESCE Functions Differences Between ISNULL and COALESCE Functions in SQL Server S.N o 1 ISNULL Meaning: This function works like if condition which we use in other program languages. It takes only two arguments, if first argument is Null then it returns second and one more thing is that the second argument should be of same size that means if first argument has varchar(2) and second has varchar(4) then it truncates last characters. Syntax: ISNULL(argument1, argument2) COALESCE Meaning: This function works same as if else statement and it takes multiple arguments and it checks Null values for each if first argument is null then it considers the second value, if the both first and second arguments are nulls then it considers third argument.

Syntax: COALESCE(argument1, argument2, argument3[, argument4, argument6, argument7]) Creating Computed Columns: With COALESCE() we can not create non-persisted computed column, but only persisted column. Number of Parameters: Takes a variable number parameters.

Creating Computed Columns: With ISNULL() we can create both persisted & non-persisted computed columns. Number of Parameters: Takes only 2 parameters. Note: If we use more than two parameters with the ISNULL function then we must use nested ISNULL functions.

of

ANSI standard or not:

ANSI standard or not:

A proprietary T-SQL function. 6

ANSI SQL standard.

Returned Data Type: Returned Data Type: Data type returned is the data Data type returned is the type of the first parameter. expression with the highest data type precedence. If all expressions are non-nullable, the result is typed as non-nullable. Whether translating to CASE Whether translating to CASE Expression possible ? Expression possible ? No Can be translated to a CASE expression: For Example, COALESCE (exp_1, exp_2, exp_n) Can be translated to CASE WHEN exp_1 IS NOT NULL THEN exp_1 WHEN exp_2 IS NOT NULL THEN exp_2 ELSE exp_n END

What happens when parameters datatypes are not determined ? If the data types of both parameters are not determined, the data type returned is int. ISNULL(NULL, NULL) Returns int

What happens when parameters datatypes are not determined ? At least one of the NULL values must be a typed NULL. If the data types of all parameters are not determined, the COALESCE function will throw an error: COALESCE(NULL, NULL) Throws an error COALESCE(CAST(NULL AS INT), NULL) Returns int Truncating parameter value: COALESCE() does not have this restriction. Example: declare @test varchar(3) select coalesce(@test, 'ABCD') AS coalesceResult

Truncating parameter value: The ISNULL() function looks at the first value and the second parameter value is automatically limited to that length . Example:

declare @test varchar(3) select isnull(@test, 'ABCD') AS ISNULLResult Output: ISNULLResult ABC

Output: coalesceResult ABCD

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/differences-between-isnull-andcoalesce.html DML Triggers vs DDL Triggers Difference between DML Triggers and DDL Triggers S.No 1 DML Triggers DDL Triggers

Where it operates ? Where it operates ? Operates on INSERT, UPDATE Operates on CREATE, DROP and and DELETE. ALTER. Where it can be applied ? Applied on Tables and views. Whether it can be used as INSTEAD OF TRIGGERS ? Can be used as INSTEAD OF TRIGGERS. Whether Magic tables can be created ? Creates INSERTED and DELETED tables. Where it can be applied ? Applied on Databases and servers. Whether it can be used as INSTEAD OF TRIGGERS ? Cannot be used as INSTEAD OF TRIGGERS. Whether Magic tables can be created ? Cannot create INSERTED and DELETED tables.

2 3

When it runs ? When it runs ? DML triggers run either Before DDL triggers run only after a T-SQL or After a T-SQL statement is statement is completed . completed .

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-dml-triggersand-ddl.html Oracle vs SQL Server Indexes Difference between Oracle and SQL Server Indexes Type of index SQL Server Oracle 11g

2008 R2 B-tree indexes B+ tree indexes Function Based Indexes Hash cluster indexes B-Tree cluster indexes Bitmap Indexes Yes (Non- Yes (Default) clustered) Yes (CI) Yes (IOT)

Yes (Column has Yes to exist in table) No No No Yes Yes Yes

Here, CI - Clustered Indexes IOT - Index Organized Tables Note: Both SQL Server 2008 R2 and Oracle 11g supports Filtered Indexes Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-oracle-andsql.html DT_STR vs DT_WSTR data types Difference between DT_STR and DT_WSTR data types in SSIS S.No 1 DT_STR Definition: A null-terminated ANSI/MBCS character string with a maximum length of 8000 characters. (If a column value contains additional null terminators, the string will be truncated at the occurrence of the first null.) When DT_STR can be used ? When data is in ANSI code then SSIS package takes the data type as DT_STR. DT_WSTR Definition: A null-terminated Unicode character string with a maximum length of 4000 characters. (If a column value contains additional null terminators, the string will be truncated at the occurrence of the first null.) When DT_STR can be used ? When data is in Unicode then SSIS package takes the data type as DT_WSTR.

How DT_STR can be mapped How DT_STR can be mapped in

in SQL Server ? DT_STR data type in SSIS can be mapped to Char or VarChar data types in SQL Server.

SQL Server ? DT_WSTR data type in SSIS can be mapped to nChar or nVarChar or Sql_Variant or image data types in SQL Server.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-dtstr-anddtwstr.html

Full Load vs Incremental Load Difference between Full Load and Incremental Load S.No 1 Full Load Incremental Load

Truncates all rows and loads New records and updated ones are from scratch. loaded. Requires more time. Can easily be guaranteed. Requires less time. Difficult. ETL must new/updated rows. Retained. check for

2 3

Can be lost.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-full-loadand.html

UML Difference FAQs-1 1.Difference between Sequence diagram and Component diagram S.No 1 Sequence diagram Component diagram

A sequence diagram is an A component diagram represents interaction diagram which how the components are wired represents how the processes together to form a software system. operate with each other and their order of operation. Sequence diagram keeps track of the objects and classes involved and the sequence of messages exchanged between the objects which are required to carry out the functionality. A component diagram has a higher level of abstraction than a Class Diagram - usually a component is implemented by one or more classes at runtime.

Sequence diagrams are not Component diagrams are used to intended for showing complex illustrate complex systems,they are procedural logic. building blocks so a component can eventually encompass a large portion of a system. A sequence diagram is a Component diagram is a Structural Behavioral Modeling Diagram. Modeling Diagram

2.Difference between Sequence diagram and Activity diagram S.No 1 Sequence diagram Activity diagram

Sequence diagram models the Activity Diagram mainly represent sequential logic, ordering of process flows captured in system. messages with respect to time. Sequence diagram mainly represent interaction between different objects.It is time ordered means exact interactions between objects is represented step by step. Activity diagrams are good at showing the general sequence of actions for several objects and use cases.

Sequence diagram describes Activity diagram is not dynamic the behavior of several objects diagram and it is used to see the in a single use case. workflow of the software. Sequence diagram is lifeline of Activity diagram high-level the the object and it is dynamic business processes, including data modeling. flow, or to model the logic of complex logic within a system. Sequence diagrams describe Activity diagrams illustrate the interactions among classes in dynamic nature of a system by

terms of an exchange of messages over time. Sequence diagrams show a detailed flow for a specific use case or even just part of a specific use case. They are almost self explanatory; they show the calls between the different objects in their sequence and can show, at a detailed level, different calls to different objects.

modeling the flow of control from activity to activity. An activity represents an operation on some class in the system that results in a change in the state of the system. Typically, activity diagrams are used to model workflow or business processes and internal operation.

3.Difference between Sequence diagram and Collaboration diagram S.No 1 Sequence diagram Collaboration diagram

In Sequence diagrams we can In Collaboration Diagram we can show Synchronous as well as only show Synchronous messages. Asynchronous messages. Sequence Diagram shows Collaboration diagram shows how overall flow of System event/s objects interacts with each other or in a given use case. how intercommunication b/w objects for a give use case It is difficult to fine the It is easy to detect the responsibilities of objects in responsibilities of objects in sequence diagram. collaboration diagram by just counting the number of arrows coming into the object. Sequence Diagrams are less Collaboration Diagram are much spatial. spatial.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/uml-difference-faqs-1.html

WCF Difference FAQs-1 Difference between basicHttpBinding and wsHttpBinding Criteria Security support BasicHttpBinding This supports the old ASMX style, i.e. WS-BasicProfile 1.1. WsHttpBinding

This exposes web services using WS-* specifications. Compatibilit This is aimed for clients who do As its built using WS-* y not have .NET 3.0 installed and specifications, it it does not support wider ranges of supports wider ranges of clients. client Many of the clients like and it cannot be consumed by older Windows .NET version less than 3 version. 2000 still do not run .NET 3.0. So older version of .NET can consume this service. Soap SOAP 1.1 SOAP 1.2 and WS-Addressing version specification. Reliable messaging Not supported. In other words, if Supported as it supports WS-* a client fires two or three calls specifications. you really do not know if they will return back in the same order. By default, there is no security provided for messages when the client calls happen. In other words, data is sent as plain text. None Windows default authentication Basic Certificate As WsHttBinding supports WS-*, it has WS-Security enabled by default. So the data is not sent in plain text. None Transport Message Transport with message credentials

Default security options

Security options

Difference between Message and Transport level security in WCF Criteria Scenarios when we should be using one of them Transport Security When there are no intermediate systems in between this is the best methodology. If its an intranet type of solution this is most Message Security When there are intermediate systems like one more WCF service through which message is routed then message security is the way to go.

recommended methodology. Advantages Does not need any extra coding as protocol inherent security is used. Performance is better as we can use hardware accelerators to enhance performance. There is lot of interoperability support and communicating clients do not need to understand WS security as its built in the protocol itself. Disadvantages As its a protocol implemented security so it works only point to point. Needs application refactoring to implement security. Provides end to end security as its not dependent on protocol. Any intermediate hop in network does not affect the application. Supports wide set of security options as it is not dependent on protocol. We can also implement custom security.

As every message is encrypted As security is dependent on and signed there are performance protocol it has limited security issues. support and is bounded to the protocol security limitations. Does not support interoperability with old ASMX webservices Difference between Buffered transfer and Streamed transfer in WCF S.No 1 2 3 Buffered Transfer Target can process the message once it is completely received. Performance will be good when message size is small Native channel shape is IDuplexSessionChannel Streamed Transfer Target can start processing the data when it is partially received. Performance will be good when message size is larger(more than 64K) Native channels are IRequestChannel and IReplyChannel

Difference between WCF and Web Services

S.No 1

Features Hosting

WebService It can be hosted in IIS

WCF t can be hosted in IIS, windows activation service, Self-hosting, Windows

service 2 Programming [WebService] attribute has to be added to the class [WebMethod] attribute represents the method exposed to client One-way, RequestResponse are the different operations supported in web service System.Xml.serialization name space is used for serialization [ServiceContract] attribute has to be added to the class [OperationContract] attribute represents the method exposed to client One-Way, RequestResponse, Duplex are different type of operations supported in WCF System.Runtime.Serialization namespace is used for serialization

Model

Operation

XML

Encoding

XML 1.0, XML 1.0, MTOM, Binary, MTOM(Message Custom Transmission Optimization Mechanism), DIME, Custom Can be accessed through HTTP, TCP, Custom Security Web Services are stateless Can be accessed through HTTP, TCP, Named pipes, MSMQ,P2P, Custom Security, Reliable messaging, Transactions WCF Services can manage states

Transports

8 9

Protocols State Management

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/wcf-difference-faqs-1.html WCF Difference FAQs-2 1.Difference between Self Hosting and IIS Hosting S.No 1 Self Hosting Coding Effort: We need to add some extra code to host the process 2 Deployment: Easy to deploy IIS Hosting Coding Effort: No need to add extra code Automatic hosting Deployment: More difficult to deploy than Self-

Hosting 3 Recycling: Recycling: process recycling is

Automatic process recycling is Automatic not possible possible 4 Service Lifetime:

Service Lifetime: be controlled

Can control the service lifetime Lifetime cannot using Open and Close manually. methods 5 Host Process: Host Process:

Host process should be IIS host runs automatically when a running before client makes a client makes a call to the service. call to the service. 2.Difference between Behaviour and Contract (OR) Difference between Service Behaviour and Service Contract S.No 1 Service Contract Behaviour: Service Behaviour Behaviour:

Affects the behavior of both Only affects the behavior of the client and server server 2 Applicability: Applicability: to a class

Can apply to both interface Only applicable and class implementation 3 Impact on WSDL: Affects the WSDL emitted Impact on WSDL:

Does not affect the WSDL

3.Difference between proxy and channel factory S.No 1 Proxy Channel Factory

Only requires URL where the We must have direct access to the service resides assembly that contains that service contract T for Very simpler Easy to understand Not easier Channels are complex, networkrelated

2 3 4

There is Visual Studio gives us When we share a common service

add the reference

contract dll between the client and the server, we will be using the ChannelFactory class

Proxies have restrictions like:

several If we know that our entities will not change much and the client code is less, then a DLL would work better 1. Properties need to have than a proxy gets and sets 2. Contructors cannot be exposed 3. Methods other than the service contract cannot be exposed

By using SVCutil.exe we will When we are using DLL that refers create Proxy Service contract interface then use the channel factory class

4.Difference between DataContractSerializer and XMLSerializer S.No 1 DataContractSerializer A practical benefit of the design of the DataContractSerializer is better performance over Xmlserializer. This is because DataContratSerializer explicitly shows the which fields or properties are serialized into XML. XMLSerializer XMLSerializer does not provide better performance when compare with DataContratSerializer because XMLSerializer does not indicate which fields or properties of the type are serialized into XML

The DataContractSerializer XMLSerializer cannot translate the can translate the HashTable HashTable into XML. into XML. DataContractSerializer is XMLSerializer is used for complex basically for very small, simple schemas. subset of the XML infoset. DataContractSerializer serializes private members. DataContractSerializer uses the opts-in approach i.e, selecting the members that needs to be serialized .This is called as opts-in approach. DataContractSerializer XmlSerializer cannot private members serialize

4 5

XmlSerializer uses opts-out approach i.e., marking the members do not need to be serialized. This is called as optsout approach.

can XmlSerializer can serialize only

serialize both public types.

private

and public types. If we are trying to serialize a class that is marked private by InvalidOperation Exception will be thrown by the serializer.

DataContractSerializer does For any types that needs to be not need any default serialized by XmlSerializer must constructor before serializing have a default constructor. any type. DataContractSerializer does not give more control over the generated xml structure compared to the XmlSerializer. XmlSerializer gives more control over the generated xml structure compared to the DataContractSerializer. For ex, if a field should come as an attribute or element.

DataContractSerializer can XmlSerializer cannot able to able to serialize types that serialize types that implements implements Idictionary. IDictionary, for ex. Dictionary type cannot be serialized. We can serialize a type that marked with [Serializable] attribute with DataContractSerializer. It serializes all the members (private, public) even they are marked with [XmlIgnore]. WCF DataContractSerializer attribute Only the public members are serialized not the private members. Suppose we do not need any of the member to be serialized we can use [XmlIgnore] attribute

10

11

uses Webservice attribute

uses

XMLSerializer

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/wcf-difference-faqs-2.html WCF Difference FAQs-3 1.Difference between WCF Data Services and WCF RIA Services S.No 1 WCF Data Services Supported Clients: WCF RIA Services Supported Clients:

Resource-based API, supports Domain-based API, most tailored all clients via deep REST and for use with Silverlight, but OData support. supports other clients via SOAP, JSON, and OData. 2 Supported Data Access Supported Data Access Layers :

Layers : Supports EF, LINQ to SQL, and Targets EF. Other DALs are POCO (custom persistence layer). supported, but greater effort is required. 3 Client Development : Client Development :

Requires you to notify the Supports self-tracking entities, context for change tracking. synchronized client/server logic, and much more (particularly with Silverlight). 4 Service Development : Service Development :

Instant, code-less, extensible Requires you to code CRUD REST services out of the box operations manually in domain (with EF); free CRUD. service classes. Another good reference: http://silverlighttime.blogspot.in/2011/04/what-is-difference-between-wcf-data.html 2.Difference between Close and Abort in WCF Channels S.No 1 2 Close Abort

Close performs graceful Abort shut downs Client channel shutdown of Client Channel immediately. Close waits for in progress Abort ends in progress calls. calls to complete before closing Close should not be called in Abort should be called in faulted faulted channels as it can channels. throw Communication or Timeout exception

3.Difference between ASMX and SVC S.No 1 2 ASMX SVC

Web service class inheritance There is no Web service class for ASMX is called WebService inheritance for SVC. In ASMX,Web service class In SVC,Web service class attribute attribute is called as is called as WebServiceAttribute. ServiceContractAttribute. In ASMX,Web service method In SVC,Web service method attribute is called as attribute is called as WebMethodAttribute. OperationContractAttribute.

4 5

In ASMX,Data class attribute is In SVC,Data class attribute is called as XmlRootAttribute called as DataContractAttribute. In ASMX,Data class attribute is called XmlElementAttribute field In SVC,Data class field attribute is as called as DataMemberAttribute.

6 7

In ASMX,HTTP endpoint In SVC,HTTP endpoint resource is resource is called as .ASMX. called as .SVC In ASMX, Serialization attribute In SVC, Serialization attribute is is called as XMLSerializer called as DataContractSerializer attribute. attribute.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/wcf-difference-faqs-3.html Difference between reliable messaging and reliable sessions in WCF Difference between reliable messaging and reliable sessions in WCF S.No 1 Reliable messaging Reliable messaging is concerned with ensuring that messages are delivered exactly once. Reliable sessions Reliable session provides a context for sending and receiving a series of reliable messages.

Summary: Reliable sessions have a dependency on reliable messaging. We have to use reliable messaging to provide an end-to-end reliable session between a client application and a service. So finally, both are different but related concepts. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-reliablemessaging.html Differences between a regular WCF Services and a Silverlight-Enabled WCF Services Differences between a regular WCF Services and a Silverlight-Enabled WCF Services S.No 1 WCF Service Utilizes the wsHttpBinding as its default binding Are generated with an Silverlight-Enabled WCF Service Utilizes basicHttpBinding as its default binding

Have no interface generated when they are

Interface

created and the following is added to the class [AspNetCompatibilityRequirements(Requirements Mode = AspNetCompatibilityRequirementsMode.Allowed)] the following element is added to the

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/differences-between-regularwcf.html asp.net vs wcf session Difference between asp.net and wcf session S.No 1 2 ASP.NET Session WCF Session

ASP.NET sessions are initiated WCF sessions are initiated by by server only. WCF Client. ASP.NET sessions data can be In WCF, session Messages accessed in unordered way. delivered during a session are processed in the order in which they are received. ASP.NET has a general data In WCF, there is no such data storage mechanism for session storage mechanism available for session.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-aspnet-andwcf.html

Difference between ASP.Net Web services and .NET Remoting 1. What are the differences between ASP.Net Web services and .NET Remoting? S.No 1 Features Protocol ASP.Net Web services It can be accessed only over HTTP .NET Remoting It can be accessed over any protocol (including TCP, HTTP, SMTP and so on) It provides support for both stateful and stateless environments through Singleton and SingleCall objects Using binary communication, .NET Remoting can provide support for rich type system

State Management

Web services work in a stateless environment

Type System

Web services support only the datatypes defined in the XSD type system, limiting the number of objects that can be serialized. Web services support interoperability across platforms, and are ideal for heterogeneous environments Highly reliable due to the fact that Web services are always hosted in IIS

Interoperability

.NET remoting requires the client be built using .NET, enforcing homogenous environment. Can also take advantage of IIS for fault isolation. If IIS is not used, application needs to provide plumbing for ensuring the reliability of the application Very extensible by allowing us to customize the different components of the .NET remoting framework. Complex to program.

Reliability

Extensibility

Provides extensibility by allowing us to intercept the SOAP messages during the serialization and deserialization stages. Easy-to-create and deploy.

Ease-of-Programming

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/difference-between-aspnet-webservices.html Difference between API and WebServices S.No 1 API API returns the output in the form of void,scalar or generic type We need to add references for API WebServices Web Services gives the output in the form of XML or JSON We need to add web references for web-services

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-api-andwebservices.html Difference Between SOAP and RESTful webservices Difference between SOAP and RESTful webservices (OR) Difference between SOAP and REST S.No 1 SOAP Developer View: Object oriented 2 Standards Based: Yes . SOAP web services are based on SOAP and WS-* specifications For acquiring security tokens,it uses WS-Trust. For conveying security tokens, it uses WS-Security For defining policy, it uses WSPolicy For suppoting distributed ACID transactions, it uses WSAtomicTransaction and WSCoordination REST Developer View: Resource Oriented Standards Based: No

For acquiring interface definitions, it uses WSMetadataExchange For providing end-to-end reliability, it uses WSReliableMessaging For establishing security context, it uses WSSecureConversation 3 Security: SSL, WS-Security . WS-Security provides end-toend security covering message integrity and authentication 4 Transactions : WS-AtomicTransaction 5 Reliability : WS-ReliableMessaging 6 Performance: Good Transactions : No Reliability : Application specific Performance: Better Caching and lower message payload makes RESTful web services performance efficient and scalable 7 Caching : No 8 Message Size : Caching : GET operations can be cached Message Size : Security: SSL

Heavy, has SOAP and WS-* Lightweight, no extra xml markup specific markup 9 Message protocol : XML Communication Message protocol : Communication

XML, JSON, other valid MIME type . This flexibility of REST makes its

extremely useful in providing consumer need specific message payloads 10 Message Encoding : Yes Message Encoding : No

SOAP Web Services support RESTful encoding is limited to text text and binary encoding 11 Service Description : WSDL Service Description : No formal contract definition In REST, no formal way to describe a service interface means more dependence on written documentation 12 Human intelligible Payload : No 13 Developer Tooling : Yes Human intelligible Payload : Yes Developer Tooling : Minimal or none

Complexity of SOAP Web REST on the other hand due to its Services dictates the need for simplicity can be developed without using frameworks to facilitate any framework rapid application development. 14 Orientation : Wraps business logic 15 Abbreviation: Orientation : Accesses resources/data Abbreviation:

SOAP stands for Simple REST stands for Representational Object Access Protocol State Transfer 16 Who is using SOAP? Google seams to be consistent in implementing their web services to use SOAP, with the exception of Blogger, which uses XML-RPC. You will find SOAP web services in lots of enterprise software as well. Who is using REST? All of Yahoo's web services use REST, including Flickr, del.icio.us API uses it, pubsub, bloglines, technorati, and both eBay, and Amazon have web services for both REST and SOAP.

17

Simplicity: No

Simplicity: Yes Transport protocol support: HTTP

18

Transport protocol support: HTTP, SMTP, JMS Multiple transport protocol support makes SOAP Web Services flexible

Areas where SOAP based WebServices is a great solution: Asynchronous processing and invocation: If application needs a guaranteed level of reliability and security then SOAP 1.2 offers additional standards to ensure this type of operation. Things like WSRM WS-Reliable Messaging etc. Formal contracts: If both sides (provider and consumer) have to agree on the exchange format then SOAP 1.2 gives the rigid specifications for this type of interaction. Stateful operations: If the application needs contextual information and conversational state management then SOAP 1.2 has the additional specification in the WS* structure to support those things (Security, Transactions, Coordination, etc). Comparatively, the REST approach would make the developers build this custom plumbing. Areas where RESTful WebServices are a great choice: Limited bandwidth and resources: Remember the return structure is really in any format (developer defined). Plus, any browser can be used because the REST approach uses the standard GET, PUT, POST, and DELETE verbs. Again, remember that REST can also use the XMLHttpRequest object that most modern browsers support today, which adds an extra bonus of AJAX. Totally stateless operations: If an operation needs to be continued, then REST is not the best approach and SOAP may fit it better. However, if you need stateless CRUD (Create, Read, Update, and Delete) operations, then REST is suitable. Caching situations: If the information can be cached because of the totally stateless operation of the REST approach, this is perfect. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-soap-andrestful.html svcutil.exe vs wsdl.exe Difference between svcutil.exe and wsdl.exe S.No 1 SVCUTIL.EXE WSDL.EXE

Svcutil.exe tool is meant to be Wsdl.exe tool is meant to be used used with WCF services and it with ASMX services and generates can translate back and forth only proxy code. between metadata and code.

The default behavior for The default behavior for Wsdl.exe Svcutil.exe is to generate is to generate both synchronous synchronous methods and it and asynchronous methods will generate asynchronous methods only if the /async option is used. Svcutil.exe tool also supports Wsdl.exe does not support policy new features in WCF, such as section feature as like Svcutil.exe. a policy section in a WSDL file that can be used to describe services security requirements. Svcutil.exe tool can be used to Wsdl.exe tool cannot be used to generate metadata. generate metadata. The Svcutil.exe tool can be Wsdl.exe supports attribute-based used only with XML Schema schemas. (XSD) files that support data contracts. If data contracts cannot be generated, we must use the Xsd.exe tool to generate XML-based data types from the XSD file.Therefore,it does not support attribute-based schemas.

4 5

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-svcutilexeand.html

Difference between console and window application S.No 1 Console application A console application is designed to run at the command line with no user interface. Window application A Windows application,which has a user interface, is designed to run on a users desktop

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-console-andwindow.html Difference between Group box control and Panel control Difference between Group box control and Panel control S.No 1 2 3 Group box control A Group box control can be placed with a title. The group box control cannot display the scroll bar. Panel control A panel control cant be placed with a title. The panel control can display the scroll bar.

Only limited number of controls Any number of controls can be can be placed within the group placed within the panel. box. Group box is a light weight component. Panel is a heavy weight component.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-group-boxcontrol.html

WPF Difference FAQs-1 1.Difference between WPF and XBAP (OR) Difference between Standalone WPF and XAML Browser Applications(XBAP) S.No 1 WPF Installation: Installed on users computer. 2 Appearance in Start Menu: Appears in Start Menu. 3 XBAP Installation: Not installed computer. on the clients

Appearance in Start Menu: Does not appear in the Start Menu. in Add/Remove in the

Appearance in Add/Remove Appearance Programs : Programs :

Appears in the Add/Remove Does not appear Programs. Add/Remove Programs. 4 Installment methods : Installment methods :

Installed via XCopy, Windows Are automatically deployed via Installer (MSI) or ClickOnce. ClickOnce. YourApp.xbap is really a ClickOnce deployment manifest. 5 Code Access Security : Code Access Security :

Runs in Full Trust unless Runs in Internet Zone . modified by Administrator. 6 Process : Process :

Runs in its own standard OS Runs in PresentationHost.exe window. Presentation host is registered as the shell and MIME handler for *.xbap files. 7 Automatic Updates : Automatic Updates :

Standalone apps are not Newer version on server is always automatically updated. used. Developer must write auto updating framework or use the Microsoft ClickOnce system. 8 Offline access : Application works if offline. Offline access : Cannot run XBAP application

unless user can navigate to the XBAP URL. 9 Requirements : Requirements :

.NET 3.0 or later installed on .NET 3.0 or later installed on user user computer. computer. Internet Explorer(6.0 or later) Firefox (2.0 or later). 2.Difference between Silverlight Applications and XBAP Applications in WPF S.No 1 2 Silverlight Applications XBAP Applications

Silverlight applications can run XBAPs can run only in Internet in multiple Web browsers Explorer and Firefox Web browsers Silverlight provides the XBAPs require that .NET necessary components Framework exists on the users' through .NET Framework for computers Silverlight Component Silverlight application has only XBAP has access to the complete limited WPF functionality WPF functionality

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/wpf-difference-faqs-1.html Difference between MediaPlayer and MediaElement Difference between MediaPlayer and MediaElement S.No 1 MediaPlayer MediaPlayer has no visual interface and not suitable to display videos. It cannot be placed on the XAML designer. It provides Media PlayBack for drawings. MediaElement MediaElement has got visual interface and can easily display videos using its built in properties. It is designed for XAML use and can be placed on the XAML designer. It does not provide Media PlayBack for drawings.

3 Example:

MediaPlayer player = new MediaPlayer(); player.Open(new Uri("c:\\intro.wmv", UriKind.Relative)); VideoDrawing aVideoDrawing = new VideoDrawing(); aVideoDrawing.Rect = new Rect(0, 0, 100, 100); aVideoDrawing.Player = player; splayer.Play(); Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-mediaplayerand.html

User Settings vs Application Settings Difference between User Settings and Application Settings in WPF S.No 1 User Settings User settings are read/write. i.e., User Settings can be accessed or modified while our application is running (runtime). When we modify the User Settings, it will get saved by the application and immediate effect will be taken place. 2 Application Settings Application Settings are read-only. i.e., We cannot change the value of Application Settings at run-time. We will able to change the same only at design-time.

In User Settings, the Session In Application Settings, the Session is restricted to the User. is restricted to the Application . i.e., It is designed to be something specific to the user. For example, one user may have a requirement to see certain stocks, news articles or local weather. This can be set at run-time. i.e., It is designed to store information such as a database connection string. These settings are read-only at run-time.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-usersettings-and.html

XML Difference FAQs-1 1.Difference between XML 1.0 and XML 1.1 S.No 1 XML 1.0 XML 1.0 compatible. is XML 1.1 backward Unlike XML 1.0, XML 1.1 is forward compatible with the Unicode Standard. XML 1.1 processor is able to process documents that use characters that will be allotted in future versions of the Unicode Standard. XML 1.1 recognizes the characters at the end of line. New text characters have been introduced in order to correct the misalignment that is observed at the end of a line in XML.

In XML 1.0, no text characters are present to interpret the characters that are located at the end of the line.

Normalization and new name In XML 1.1, the NEL character characters are not supported in (0x85) is normalized to a linefeed the XML 1.0 version. in text. Ambiguity always exists in this A new set of control characters are version of XML 1.0 for coding introduced in XML 1.1 to support the characters the characters that are ambiguous.

2.Difference between XML and XSLT S.No 1 XML XSLT

XML is used for storing data in XSLT is used for transforming and a structured format. also for formatting XML file to display the content or to process the content. XML does not perform XSLT is a specialized language transformation of data. that performs transformation of one XML document into a different XML document. XSLT can also perform transformation of XML document into HTML document and XHTML document. XPath is a specialized XSLT will be using XPath for language that is used to transformation and formatting of address portions of the XML XML file. file.

3.Difference between XML and XHTML

S.No 1 2 3

XML

XHTML

XML is an extensible language XHTML provides both the flexibility but it is not very flexible. and extensibility. XML focuses mainly on the XHTML can interpret the design. languages that are designed badly. XML is used to create new XHTML mainly focuses on mobile internet languages. applications and browsers. It also runs in variety of applications without enforcing any limitation based on the platforms.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/xml-difference-faqs-1.html Difference between XML and JSON Difference between XML and JSON S.No 1 XML JSON

Abbreviation: Abbreviation: XML stands for Extensible JSON stands for JavaScript Object Markup Language. Notation. Meaning: XML is a markup language that defines a set of rules for encoding documents in a format that is both humanreadable and machinereadable. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications,all gratis open standards.The design goals of XML emphasize simplicity, generality, and usability over the Internet.It is a textual data format with strong support via Unicode for the languages of the world. Although the design of XML focuses on documents, it is widely used for the representation of arbitrary data structures, for example in web services. Type of format: Meaning: JSON is a text-based open standard designed for humanreadable data interchange. It is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects. Despite its relationship to JavaScript, it is languageindependent, with parsers available for many languages.The JSON format is often used for serializing and transmitting structured data over a network connection. It is used primarily to transmit data between a server and web application, serving as an alternative to XML.

Type of format:

Markup language 4 5 Extended from: SGML Developed by: World Wide Web Consortium

Data interchange Extended from: JavaScript Developed by: The JSON format was originally specified by Douglas Crockford for using it at State Software, a company co-founded by Crockford, starting around 2001. Data types: Provides scalar data types and the ability to express structured data through arrays and objects.

Data types: Does not provide any notion of data types. One must rely on XML Schema for adding type information.

Support for arrays: Support for arrays: Arrays have to be expressed Native array support. by conventions, for example through the use of an outer placeholder element that models the arrays contents as inner elements. Typically, the outer element uses the plural form of the name used for inner elements. Support for objects : Support for objects : Objects have to be expressed Native object support. by conventions, often through a mixed use of attributes and elements. Null support: Null support: Requires use of xsi:nil on Natively recognizes the null value. elements in an XML instance document plus an import of the corresponding namespace. Comments: Comments: Native support and usually Not supported. available through APIs. Namespaces : Supports namespaces, which eliminates the risk of name collisions when combining documents. Namespaces also allow existing XML-based standards to be safely extended. Namespaces : No concept of namespaces. Naming collisions are usually avoided by nesting objects or using a prefix in an object member name (the former is preferred in practice).

10

11

12

Formatting decisions : Complex. Requires a greater effort to decide how to map application types to XML elements and attributes. Can create heated debates whether an element-centric or attributecentric approach is better. Size : Documents tend to be lengthy in size, especially when an element-centric approach to formatting is used. Parsing in JavaScript : Requires an XML DOM implementation and additional application code to map text back into JavaScript objects. Learning curve : Generally tends to require use of several technologies in concert: XPath, XML Schema, XSLT, XML Namespaces, the DOM, and so on.

Formatting decisions : Simple. Provides a much more direct mapping for application data. The only exception may be the absence of date/time literal.

13

Size : Syntax is very terse and yields formatted text where most of the space is consumed (rightly so) by the represented data. Parsing in JavaScript : No additional application code required to parse text; can use JavaScript's eval function. Learning curve : Very simple technology stack that is already familiar to developers with a background in JavaScript or other dynamic programming languages.

14

15

16

Tools : Tools : Enjoys a mature set of tools Rich tool supportsuch as editors widely available from many and formattersis scarce. industry vendors. Microsoft .NET Framework : Very good and mature support since version 1.0 of the .NET Framework. XML support is available as part of the Base Class Library (BCL). For unmanaged environments, there is MSXML. Platform and language : Parsers and formatters are widely available on many platforms and languages (commercial and open source implementations). Microsoft .NET Framework : None so far, except an initial implementation as part of ASP.NET AJAX.

17

18

Platform and language : Parsers and formatters are available already on many platforms and in many languages. Consult json.org for a good set of references. Most implementations for now tend to be open source projects. in

19

Integrated language : Integrated language : Industry vendors are currently Is natively supported

experimenting with support JavaScript/ECMAScript only. literally within languages. See Microsoft's LINQ project for more information.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-xml-andjson.html Difference between DTD and XSD Difference between DTD and XSD S.No 1 DTD Abbreviation: DTD stands for Type Definition 2 Markup validation: XSD Abbreviation: Document XSD stands Definition for Xml Schema

Markup validation:

Can specify only the root Any global element can be root. No element in the instance ambiguous content support. document. No ambiguous content support. 3 Namespace support : Namespace support :

DTD does not support XSD uses its own set of namespace instead it has its namespaces and elements for own set of keywords for defining the schema. defining a schema example: !DOCTYPE for root tag !ELEMENT for an element !ATTLIST for an attribute !ENTITY for defining variables. 4 Code reuse: Code reuse:

Poorly supported. Can use Can reuse definitions using named parameter entities. types. 5 Datatype Support : Datatype Support :

No real datatype support. DTD Provides flexible set of datatypes. has only #PCDATA as the data type for the elements.(it is 1. primitive / fundamental data used for string datatype) types: string,decimal,float,boolean

2. Custom Data types i. complex type : a data type that contains child elements or attributes and also the mixed contents ii. simple type : a data type that contains only values. Provides multi-field key cross references. No co-occurrence constraints. 6 Datatype Validation: In DTD, no such restrictions Datatype Validation: XSD allows us to specify restriction on data . Example: tag. we can write only digits here. 7 Uses: Uses:

DTD is more suitable for small XSD is used in large XML Data ex: XML Data ADO.NET DataSets, Web ex:bookname,companyname Services. etc. 8 Strongly / Weakly typed: DTD is weaky typed. DTD lacks strong typing capabilities, and has no way of validating the content to data types. Strongly / Weakly typed: XML Schema is strongly typed. An XML Schema can define the data type of certain elements, and even constrain it to within specific lengths or values. This ability ensures that the data stored in the XML document is accurate.

Provisions Definitions:

of

Inline Provisions of Inline Definitions: XML Schema does not allow inline definitions

DTD allows inline definitions. This is good when working with small files, as it allows us to contain both the content and the schema within the same document, but when it comes to larger documents, this can be a disadvantage, as we pull content every time we retrieve the schema. This can lead to

serious overhead that can degrade performance. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-dtd-andxsd.html

You might also like