Top 50 Technical and Non-Technical Questions – DOT NET Chapter Wise Interview Questions
Can you explain architecture of your current project?
Note: I think 40% of .NET interview starts with this question. Below is a sample answer and will differ from developer to developer.
My current architecture is a three-layer architecture with Ul (User Interface) made in ASP.NET MVC (Model/View/Controller), middle-tier having the business logic and the data access layer created by using Entity Framework code first. It follows MVC architecture and uses Unity Dl (Dependency Injection) to decouple the layers.
We also have a common library which is shared in our project and for external customer we have exposed a WCF (Windows Communication Foundation) service.
What role did you play in your project and company?
Note: Do not answer in one line like I am developer, project manager, talk end-to-end. This will help interviewer to understand much better about you completely. Below is a simple sample answer how professionals reply.
My role was end-to-end. I was involved right from the requirement phase where I was a member of requirement gathering team and helped the team in requirement documentation.
I was also actively involved in design phase to conceptualize the technical aspect of the project.
My main role was in development / coding phase where I was involved in coding and unit testing.
I also played an important role in acceptance testing where I helped the team to fix defects, and issues raised by testers and end users.
I am also partly involved with the COE group where I help developers in the company to upgrade to new technologies.
Note: If you are a part of other activities like training, quality, pre-sales team, estimation etc., speak about the same during interview.Companies look out for multitasking capabilities rather than specific capabilities.
What is your salary expectation?
This is a very complex question it the end of the book we have a complete Capter it last current .NET developer salary packages and some tips for negotiation will be discussed.
One golden tipfor interviewee, if you really want the job and you do not want salary to be a hurdle, add
the word “NEGOTIABLE” after the salary amount. Make the interviewer understand I am ready for a small sacrifice.
Why do you want to leave your current organization?
First and foremost avoid the below three reasons:
- Avoid saying negative about your previous organization because that would send a wrong message to the interviewer. Do not create a pessimistic image before the interviewer. On the contrary if you start with positive things like: “The current company has no issues and I am extremely happy with the current environment but it’s more of a personal problem, etc, etc…” that would create a very strong and positive image of yours.
- Avoid complaining about your current work profile like “It’s a maintenance project, it’s in 1.1 version and I am not learning anything new, etc.” It’s very much possible that the interviewer has a maintenance job. So in such kind of situation’s I have seen the interviewer rejecting people irrespective even though if they have performed well in technical round.
- Avoid saying you are jumping only because of salary. Some of the interviewer’s do not like people who just look at monetary benefits. When you are asked about salary expectation these things could be better discussed during that conversation. Do not make it explicit during the interview. Bet nobody likes greedy professionalsJ.
Below are some of the good reasons for which the interviewer probably would not question back:
- For better prospects and growth.
- Office is far away. I spend lot of time in travelling and would like minimize my travelling time.
- They are telling me to relocate but in my current situation it’s not viable.
- I am developer but due to project requirement I am in a testing role and so want to switch.
- Project is getting closed and the company does not have projects.
- Company is not paying salary on time.
How much do you rate yourself between 1 and 10?
Note: This question can be in different forms like, ‘How much do you rate yourself in ASP.NET?’ ‘How much do you rate yourself in SQL (Structured Query Language) Server?’ etc.
Answer for this question is again very subjective but some important tricks are given here to avoid any traps.
- Even if you are really good in that topic do not rate yourself 10 or 9. It just show that you are overconfident. If you are extremely good put 8. Let your technical answers talk about your rating.
- If you know the topic averagely, rate yourself 5.
- If you are bad in the topic or have never done anything do not put any rating. Probably it’s better to say you have not worked rather than trying to attempt and create more problems.
Can you speak about yourself?
Note: Many people become emotional here and talk personal. Most of the time interviewer is expecting to talk about your role you played, technological skills and which field you want to selected and grow. Below is a sample answer and it varies from person to person.
I have 8 years of experience. In the first 4 years I worked as a developer in Microsoft technologies. The next 2 years I worked as a team leader guiding the team, helping them resolve problems. Currently I have been working in Microsoft server products like SharePoint, BizTalk. My main technical skills revolve around C#, Visual studio, SQL Server, .NET (Network Enabled Technology) and ASP.NET.
I would like to see myself as an technical leader in further coming times.
Note: The last sentence is very important, let the interviewer know where you want to see yourself in the later stages.
How can we improve performance of .NET?
Note: This question can have various other forms like, ‘How can we improve performance of ASP.NET?’ ‘How can we improve performance of SQL Server?’, etc. Remember 5 best points are given for each category. You can pick your favorite ones. But whatever you pick, should be commonly used by every one.
Below are some common points you can remember. List is endless but I do not want to make it long, so that you can remember important ones.
- Use string builder for concatenation rather than string when concatenation data is huge.
- Avoid boxing / unboxing by using generics.
- Avoid inline SQL; queries use stored procedures.
- Choose your indexes (clustered and non-clustered) properly.
- Use Caching for data which will not change frequently.
- In ASP.NET use output cache directive for page level caching.
What is the difference between .NET 1 .X, 2.0,3.0,3.5,4.0 and 4.5?
Below is the list of top differences between the framework versions. Please remember the list is much bigger than what I have put down. But for interview perspective I have taken top 5 in each one of them so that we can remember the important ones.
|.NET 2.0||.NET 3.0||.NET 3.5||.NET 4.0||.NET 4.5|
|Support for 64-bit application. Generics SQL cache dependency Master pages Membership and roles||WCF
WPF (Windows Presentation Foundation) WWF (Windows Workflow) WCS (Windows Card Spale) (card space)
|LINQ Ajax inbuilt ADO (ActiveX Data Objects)
Entity framework ADO data services Multitargeting
|MEF (Managed Extensibility Framework) Parallel computing DLR (Dynamic Language Runtime) dynamic Code contract language runtime Lazy initialization Background GC (Garbage Collection)||Async / Await ZIP
What is IL Code, JIT, CLR, CTS, CLS and CAS?
- IL (Intermediate Language) Code is a partially compiled code.
- JIT (Just-in-time) compiler compiles IL Code to machine language.
- CLR (Common Language Runtime) is the heart of .NET Framework and it does four primary tasks: Garbage collection, CAS (Code Access Security), CV (Code Verification) and IL to Native translation.
- CTS (Common Types System) ensures that data types defined in two different languages get compiled to a common data type.
- CLS is a specification or set of rules or guidelines. When any .NET programming language adheres to these set of rules it can be consumed by any language following .NET specifications.
- CAS is the part of .NET security model which determines what kind of rights does a .NET code have.
Note: Do have a look at the video What are IL code, CLR, CTS, CLS and JIT? There are two parts to this video in the first part we have discussed the theory, and in the next part we have discussed practically how these terminologies come to .NET environment.
What is a garbage collector?
Garbage collector is a feature of CLR which cleans unused managed objects (it does not clean unmanaged objects) and reclaims memory. It’s a background thread which runs continuously and at specific intervals checks for unused objects whose memory can be claimed.
Note: Do have a look at the video ‘What are Garbage collector, Gen 0, 1 and 2?’
What is GAC?
GAC (Global Assembly Cache) is a machine-wide CLI assembly component where all shared .NET assembly resides. GAC is used when assemblies have to be shared among several applications which are installed in the same computer.
Note: Do have a look at two classic videos shipped in the DVD which show how garbage collector works internally.
What are Garbage Collector, Gen 0, 1 and 2?
What are I Disposable interface and finalize dispose pattern in GC (Garbage collector)?
What are stacks, heaps, value types, reference types, boxing and unboxing?
Stack and heap are memory types in an application. Stack memory stores data types like int, double, Boolean, etc., while heap stores data types like string and objects.
For instance when the below code runs the first two variables, i.e., “i” and “y” are stored in a stack and the last variable “o” is stored in heap.
int i = 1; // This is stored in stack,
int y = i; // This is stored in stack,
object o = null; // This is stored in heap.
// after this end the stack variable memory space is reclaimed while //
the heap memory is reclaimed later by garbage collector.
Value types contain actual data while reference types contain pointers and the pointers point to the actual data.
Value types are stored on stack while reference types are stored on heap. Value types are your normal data types like int, bool, double and reference types are all objects.
When value type is moved to a reference type it’s called as boxing. The vice-versa is termed as unboxing.
Note: Watch indepth videos given in the CD ‘What are stack, Heap, Value types and Reference types, and What are boxing and unboxing?. These examples explain step-by-step concept of boxing, unboxing, value, reference types, stack and heap.
How are exceptions handled in .NET?
Exceptions are handled by “System.Exception” base class. If you want raise an error from source you need to create the Exception object with below code snippet.
throw new Exception(“Customer code cannot be more than 10”);
Once the exception is raised of you want to catch the same you need to use the ‘try-catch’ block as shown below.
// This section will have the code which
// which can throw exceptions.
// Handle what you want to
// do with the exception
label.text = e.Message;
What are different types of collections in .NET?
There are five important collections in .NET Arrays, Lists, Hashtable, Stacks and Queues .
What are generics?
Generics help to separate logic and data type to increase reusability. In other words you can create a class whose data type can be defined on run-time.
<strong>Note:</strong> Watch the video shipped in the DVD‘What are generics?’
Explain abstraction, encapsulation, inheritance and polymorphism.
- Abstraction: Abstraction means show only what is necessary. Example color is abstracted to RGB (Red, Green, Blue). By just making the combination of these three colors we can achieve any color in world. It is a model of real world.
- Encapsulation: It is a process of hiding all the complex processing from the outside world and make your objects simple.
- Inheritance: This concept helps to define parent-child relationship between classes.
- Polymorphism: It’s a property of object to act differently under different conditions. For instance a simple user object depending on conditions can act like an admin or like data entry object.
Note: Watch the video ‘Can you define OOP and the four principles of OOP?’ for more detail explanation.
How is abstract class different from an interface?
|Implementation||Some methods in abstract classes can have implementation.||All methods, function, properties in interfaces are empty. They are simple signatures.|
|Scenario||Abstract classes are used when we want to share common functionality in parent-child relationship.||Interfaces are used to define contract, enforce standardization, decoupling and dynamic polymorphism.|
|Variable declaration||We can declare variables.||In interface we cannot declare variables.|
|Inheritance vs Implementation||Abstract classes are inherited.||Interfaces are implemented.|
Note: Refer the below three videos to understand abstract classes and interfaces in depth. What is an abstract class?
Define interface and what is the difference between abstract and interface.
Define interface and difference between abstract and interface? – Part 2
What are the different types of polymorphism?
There are two types of polymorphism: static and dynamic. Many people also call them as runtime or compile-time polymorphism. Static polymorphism is implemented by overloading while dynamic polymorphism is implemented by overriding and virtual keyword.
Note: Do watch the video “What is Polymorphism, overloading, overriding and virtual?” and get a demonstration of how to implement polymorphism in .NET. The video also talks about two different types of polymorphism in brief.
How does delegate differ from an event?
Delegate is an abstract strong pointer to a function or method while events are higher level of encapsulation over delegates. Events use delegates internally.
They differ because of the following reasons:
- Actually, events use delegates in internally. They add an extra layer on the delegates, thus forming the publisher and subscriber model.
- As delegates are function to pointers, they can move across any clients. So any of the clients can add or remove events, which can be confusing. But events give the extra protection / encapsulation by adding the layer, and make it a publisher and subscriber model.
Just imagine one of your clients doing this
c.XyzCallback = null
This will reset all your delegates to nothing and you have to keep searching where the error is.
Note: Do watch the below three videos given in the CD to get more insight on delegates and events.
What problem does delegate Solve ? – Part 1
What is a multicast delegate? – Part 2
What are events and what’s the difference between delegates and events? – Part 3
What are different access modifiers?
There are 5 access modifiers. Access modifiers define scope for members.
- Private: Accessible only within the class.
- Protected: Accessible within the class and in derived classes.
- Friend (internal in C#): Accessible anywhere within the current project.
- Protected friend (protected internal in C#): Accessible with current project and derived classes.
- Public: Accessible everywhere.
Note: Watch the video.
Can you explain encapsulation and abstraction? Where we have explained how encapsulation can be implemented using access modifiers?
Explain connection, command, data reader and dataset in ADO.NET.
- Connection: This object creates a connection to the database. If you want to do any operation on the database you have to first create a connection object.
- Command: This object helps us to execute SQL queries against database. Using command object we can execute select, insert, update and delete SQL commands.
- Data Reader: This provides a recordset which can be browsed only in forward direction. It can only be read but not updated. Data reader is good for large number of records where you want to just browse quickly and display it.
- Dataset Object: This provides a recordset which can be read back and in forward direction. The recordset can also be updated. Dataset is like a in-memory database with tables, rows and fields.
- Data Adapter: This object acts as a bridge between database and dataset. It helps to load the dataset object.
How does “Dataset” differ from a “Data Reader”?
- “Dataset” is a disconnected architecture, while “Data Reader” has live connection while reading data. If we want to cache data and pass to a different tier, “Dataset” forms the best choice and it has decent XML (extensible Markup Language) support.
- When application needs to access data from more than one table “Dataset” forms the best choice.
- If we need to move back while reading records, “data reader” does not support this functionality.
- However, one of the biggest drawbacks of Dataset is speed. As “Dataset” carries, considerable overhead because of relations, multiple table’s, etc., speed is slower than “Data Reader”. Use “Data Reader” when you want to quickly read and display records on a screen.
- Dataset can manipulate data while data reader is only for reading purpose.
How is ASP.NET page life cycle executed?
ASRNET is an open source server-side Web application framework designed for Web development to produce dynamic Web pages.
Following is the sequence in which the events occur:
Remember the word SILVER: SI (Init) L ( Load) V (Validate) E ( Event) R ( Render).
Note: Watch the complete video. Can you explain ASP.NET application and Page life cycle?
What are HTTP Handlers and HTTP Modules and difference between them?
Handlers and modules help you inject pre-processing logic before the ASP.NET request reaches the Website.
For instance before your request reaches any resource you would like to check if the user has been authenticated or not.
HTTP Handlers is an extension-based processor. In other words the pre-processing logic is invoked depending on file extensions.
HTTP Module is an event-based processor. In other words ASP.NET emits a lot of events like beginRequest, AuthenticateRequest, etc., we can write logic in those events using HTTP Module.
Note: Watch the complete video. Can you explain ASP.NETapplication and Page life cycle? Where we have explained handlers and modules in depth.
What are different types of validation controls in ASP.NET?
There are six main types of validation controls:
- RequiredFieldValidator: It checks whether the control has any value. It is used when you want the control should not be empty.
- RangeValidator: It checks if the value in validated control is in specific range.
Example: TxtCustomerCode should not be more than eight in length.
- CompareValldator: It checks that the value in control should match some specific value.
Example: Textbox TxtPie should be equal to 3.14.
- RegularExpressionValidator: When we use the control, value should match with a specific regular expression.
- CustomValidator: It is used to define user-defined validation.
- Validation Summary: It displays summary of all current validation errors on an ASP.NET page.
How is ‘Server.Transfer’ different from ‘Response.Redirect’?
“Response.Redirect” and “Server.Transfer” helps to transfer user from one page to other page while executing the page.
The main difference between them is who does the transfer. In “Response.Redirect” the transfer is done by the browser while in “Server.Transfer” it’s done by the server.
In “Server.Transfer” following the sequence of how transfer happens:
- User sends a request to an ASP.NET page. In Figure 1.3 the request is sent to “Webform1” and we would like to navigate to “Webform2”.
- Server starts executing “Webform1” and the life cycle of the page starts. But before the complete life cycle of the page is completed “Server.transfer” happens to “Webform2”.
- “Webform2” page object is created, full page life cycle is executed and outputHTML response is then sent to the browser.
In “Response.Redirect” following is the sequence of events for navigation:
- Client(browser) sends a request for a page. In figure 1.4 the request is sent to “WebForml ” and we would like to navigate to “Webform2”.
- Life cycle of “Webforml” starts executing. But in between of the life cycle “Response.Redirect” happens.
- Now rather than server does a redirect process it sends a HTTP (HyperText Transfer Protocol) 302 command (a common way of performing URL redirection) to the browser. This command tells the browser that he has to initiate a GET request to “Webform2.aspx” page.
- Browser interprets the 302 command and sends a GET request for “Webform2.aspx”.
When to use “Server.Transfer” and when to use “Response.Redirect”?
Use “Server.Transfer” when you want to navigate pages which reside on the same server as shown in Figure 1.5, use “Response.Redirect” when you want to navigate between pages which resides on different server and domain.
What is importance of “preserveForm” flag in “Server.Transfer”?
Note: This question can also be asked as What is the difference between “Server.Transfer(true)” and “Server. Transfer(false)?”.
“Server.Transfer” helps to redirect from one page to other page. If you wish to pass query string and form data of the first page to the target page during this redirection you need to set “preserveForm” to “true” as shown in the below code.
Server. Transfer(“Webform2.aspx”, true);
By default the value of “preserveForm” is “true”.
Response.Redirect(URL, true) vs Response.Redirect (URL, false)
Response.Redirect (URL, false): Client is redirected to a new page and the current page on the server will keep processing ahead.
Response.Redirect (URL, true): Client is redirected to a new page but the processing of the current page is aborted as shown in Figure 1.6.
Can you explain windows, forms and passport authentication?
There are three major ways of doing authentication and authorization:
- Windows: In this mode the users are stored in windows local user groups.
- Forms: In this mode we create a login screen and use the forms authentication class for validations. It’s a ticket-based authentication.
- Passport: In this mode the users are validated from Microsoft sites like Hotmail, devhood, MSN (Microsoft Network) etc., ticket is generated and that ticket can be used in authentication and authorization process in your Web application.
Note: Watch the six videos which talks in depth about the above concepts. It is possible that interviewer can get in to details.
What are Authentication, Authorization, Principal and Identity objects? Part-1
ASP.NET Authentication and Authorization Video series Part-2
ASP.NET Authentication and Authorization Video series Part-3
ASP.NET Authentication and Authorization Video series Part-4
ASP.NET Authentication and Authorization Video series Part-5
ASP.NET Authentication and Authorization Video series Part-6
What is difference between Grid view, Data list, and Repeater?
Grid view and data grid by default display all the data in tabular format, i.e., in columns and rows. Developer has no control to change the table data display of datagrid.
Data list also displays data in a table but gives some flexibility in terms of displaying data row-wise and column wise using the repeat direction property.
Repeater control is highly customizable. It does not display data in table by default. So you can customize from scratch the way you want to display data.
Which are the various modes of storing ASP.NET session?
- InProc: In this mode, session, state is stored in the memory space of the Aspnet_wp.exe process. This is the default setting. If the IIS (Internet Information Services) reboots or Web application restarts then session state is lost.
- StateServer: In this mode session state is serialized and stored in a separate process (Aspnet_state.exe); therefore, the state can be stored on a separate computer (a state server).
- SQL Server: In this mode session, state is serialized and stored in a SQL Server database.
Session state can be specified in <sessionState> element of application configuration file. Using State Server and SQL Server session state can be shared across Web Farms but note this comes at speed cost as ASP.NET needs to be serializes and deserializes data over network repeatedly.
How can we do caching in ASP.NET?
There are two ways of caching: output cache directive and using the cache objects.
What is ViewState?
ViewState is a built-in structure for automatically retaining values amongst the multiple requests for the same page. The ViewsSate is internally maintained as a hidden field on the page but is hashed, providing greater security than developer-implemented hidden fields do.
What are indexes, and what is the difference between clustered and nonclustered?
Index makes your search faster by using B-Tree (a tree data structure defined recursively as a collection of nodes) structure logic. Clustered and non-clustered indexes are two types of indexes. In clustered index the leaf node points to the actual data while in non-clustered index the leaf node uses the clustered index to locate data.
How is stored procedure different from functions?
- Function cannot affect the state of the database which means we cannot perform CRUD (Create Read Update Delete) operation on the database. Stored Procedure can affect the state of the database by using CRUD operations.
- Storeed Procedure can return zero or nvalues whereas Function can return only one value.
- Stored Procedure can have input, output parameters for it whereas functions can have only input parameters.
- Function can be called from Stored Procedure whereas Stored Procedure cannot be called from Function.
What’s the difference between Web services and remoting?
Remoting works only when both the ends, i.e., server and client are in .NET technologies. Web services are useful when the client is not .NET like Java, etc.
What’s the difference between WCF and Web services?
- WCF (Windows Communication Foundation) services can be hosted in multiple protocols like HTTP (HyperText Transfer Protocol), TCP (Transmission Control Protocol), etc. Web services can only be hosted on HTTP protocol.
- WCF has COM+ so you can call two different WCF services in a transaction, we cannot call two different Web services in one transaction.
- WCF integrates with MSMQ (Microsoft Message Queuing) easily, but for Web services we will need to write code to communicate with the MSMQ pool.
In simple words below equations show the difference.
WCF = Web services + Remoting + MSMQ + COM+
Web service = WCF – (Remoting + MSMQ + COM+)
Note: Do watch the below four videos of WCF to get more insight in to WCF.
What-are the basic steps to create a WCF service (Part 1, Creating the Service)?
What are the basic steps to create a WCF service (Part 2, Consuming the Service)?
What are endpoints, address, contracts and bindings?
What are various ways of hosting WCF service ?
What are endpoint, contract, address, and bindings?
When we want to host any WCF service we need to provide where to host it, how to host it and what to host.
- Contract (What): Contract is an agreement between two or more parties. It defines the protocol how client should communicate with your service. Technically, it describes parameters and return values for a method.
- Address (Where): An Address indicates where we can find this service. Address is a URL (Uniform Resource Locator), which points to the location of the service.
- Binding (How): Bindings determine how the service can be accessed. It determines how communications is done. For instance, you expose your service, which can be accessed using SOAP (Simple Object Access Protocol) over HTTP (HperText Transfer Protocol) or Binary over TCP (Transmission Control Protocol). So for each of these communications medium, two bindings will be created.
- End point: It is the combination of contract, address and binding.
In WCF Web.config file we can specify end point, address, binding and contract as shown in the below code snippet.
<endpoint address=”HTTP: //www.questpond.com” binding=”wsHTTPBinding”
contract=”WcfService3. /Service 1 ">
What are basic steps to create a WCF service (Part 1, Creating the Service)?
What are basic steps to create a WCF service (Part 2, Consuming the Service)?
What are endpoints, address, contracts and bindings?
What are various ways of hosting WCF service?
What is the difference of hosting a WCF service on IIS and self hosting?
What is the difference between BasicHTTPBinding and WsHTTPBinding?
What are WPF and Silverlight?
WPF (Windows Presentation Foundation) is a graphical subsystem for displaying user interfaces, documents, images, movies etc. It uses XAML (extensible Application Markup Language (Microsoft)) which is a XML (extensible Markup Language) descriptive language to represent Ul (User Interface) elements.
Silverlight is a Web browser plug-in by which we can enable animations, graphics and audio/video.
You can compare Silverlight with Flash. We can view animations with Flash and it’s installed as a plug-in in the browser.
Note: Do have a look at the below videos for WPF and Silverlight.
What is the need of WPF when we have GDI (Graphics Device Interface), GDI+ and DirectX?
Can you explain how we make a simple WPF application?
Can you explain the architecture of Silverlight?
What are the basic things needed to make a Silverlight application?
What is LINQ and Entity Framework?
LINQ (Language Integrated Query (Micosoft)) is a uniform programming model for any kind of data access. It is also an OR (Object Oriented) Mapper which helps us to expedite our business object creation process.
ADO.NET entity is an ORM (Object Relational Mapping) which abstracts data model by providing a simplified object model.
In other words the complete middle-tier development is expedited using entity framework.
Note: Below simple video demonstration in the CD will help your understand LINQ and entity framework in to great depth.
What is LINQ and can you explain same with example?
Can you explain a simple example of LINQ to SQL?
What’s the difference between LINQ to SQL and Entity Framework?
- LINQ to SQL is good for rapid development with SQL Server. EF (Entity Framework) is for enterprise scenarios and works with SQL server as well as other databases.
- LINQ maps directly to tables. One LINQ entity class maps to one table. EF has a conceptual model and that conceptual model map to storage model via mappings. So one EF class can map to multiple tables or one table can map to multiple classes.
- LINQ is more targeted towards rapid development while EF is for enterprise level where loosely coupled framework is needed.
If you are starting with fresh development using entity framework, in case you are in older version of framework where entity framework does not exist use LINQ to SQL.
What are design patterns?
Design patterns are recurring solution to recurring problems in software architecture.
Note: Do watch the following videos for design pattern which is shipped with the CD:
Which design patterns are you familiar with?
Left to the readers, pick any three patterns which you have used in your project and talk about it. In Chapter “Design patterns, UML, Estimation and Project management” we have explained three design patterns.
Note: In CD we have snipped three design pattern videos you can have a look at them.
Can you explain singleton pattern?
Singleton pattern helps us to create a single instance of an object which can be shared across project. Main use of singleton pattern is for global data sharing and caching.
Note: The CD contains a video explanation with source code for “Singleton Pattern”.
What are MVC, MVP and MVVM patterns?
All the above design patterns come in presentation pattern category and help to remove any kind of cluttered code in Ul like manipulation of user interfaces and maintaining state. Thus keeping your Ul code cleaner and better to maintain.
MVC pattern divides the architecture into three parts: model, view and controller. The first request comes to the controller and the controller then decides which view to be displayed and ties up the model with the view accordingly.
MVP (Model View Presenter) has the same goals as MVC, i.e., separating the Ul from the model. It does the same by using a presenter class. The Ul talks via an interface to the presenter class and the presenter class talks with the model.
MVVM (Model-View-View-Model) is an architectural pattern with the focus of removing Ul cluttered code. It does the same by using an extra class called as view model. MVVM is mostly suitable for Silverlight and WPF (Windows Presentation Foundation) projects because of the rich bindings provided by the technologies.
Note: In the CD we have shipped four videos which explains MVC, MVP and MVVM patterns. Below are the name of the videos:
The basic of MVC HTTP Handlers
MVC using core ASP.NETand HTTP Handler
Model View Presenter video
What is UML and which are the important diagrams?
The Unified Modeling Language (UML) is a graphical language for visualizing, specifying, constructing, and documenting the artifacts of a software-intensive system.
UML provides blueprints for business process, system function, programming language statements, database schemas and reusable components. Some of the important UML diagrams are use case, class diagrams, sequence diagram, activity diagram, object diagrams, collaboration diagrams, state chart diagrams, component diagram and deployment diagram.
Note: We have shipped five videos which explains some important UML diagrams in detail. Below is the list.
Use Case Diagrams
What are different phases in a software life cycle?
There are six phases in software development:
- Coding and unit testing
- System testing
- Acceptance testing
- Go live
What is Ajax and how does it help?
- It sends only necessary data to the server. For instance let’s say you have four textboxes and On a submit button you want to send only two textbox data, Ajax helps in the same.
- The second benefit is it’s asynchronous. In other words when you click on submit button and until the server processes the request you can do other activities on the site. For instance when you click on send e-mail and until the e-mail is sent, you can start composing a new e-mail at the background.
How did you do unit testing in your project?
From unit testing perspective there are two great tools “NUnit” (an open source unit testing framework) and “Visual Studio Unit Test Template”. Talk about which you are comfortable with. Below are two videos in DVD which shows demonstration of how to use NUnit and VSTS (Visual Studio Team System) unit test template.
Note: In the CD we have shipped four videos which explain unit testing using
What is unit testing and can we see an example of the same?
How can we write data driven test using NUNIT and VS Test?
What is Agile?
Agile is a group of software development methodologies where we develop projects. Its features are incremental (tasks divided into small increments with planning) and iterative (goals are released short time frames, for example 1 to 4 weeks). In Agile we consider software as the most important entity and accept user changes and deliver them in small releases. There are four important principles of Agile:
- Individuals and interactions over processes and tools.
- Working software over comprehensive documentation.
- Customer collaboration over contract negotiation.
- Responding to change over following a plan.
How do you do code reviews?
Code reviews are either done manually, i.e., peer review or automated review using free static code analysis tools like StyleCop and FxCop.
Note: We have shipped two videos in the CD which explains how to use StyleCop and FxCop tools for code reviews.
How do you convert requirements to technical document?
Note: This is a subjective answer. Below goes my version.
Requirements are normally available in use cases or free text. The first step is to identify the classes, properties for the classes, methods / functions and relationship between the classes.
As a general rule nouns become classes and verbs become actions for the classes.
Once the classes are identified we can use sequence or collaboration diagrams to detail out the interactions. The database objects are later created using the class diagrams.