https://github.com/aershov24/full-stack-interview-questions
π΄ More than ~3877 Full Stack, Coding & System Design Interview Questions And Answers sourced from all around the Internet to help you to prepare to an interview, conduct one, mock your lead dev or completely ignore. Find more questions and answers on π
https://github.com/aershov24/full-stack-interview-questions
angular full-stack full-stack-development full-stack-web-developer interview-practice interview-preparation interview-questions interview-test react vuejs
Last synced: about 1 year ago
JSON representation
π΄ More than ~3877 Full Stack, Coding & System Design Interview Questions And Answers sourced from all around the Internet to help you to prepare to an interview, conduct one, mock your lead dev or completely ignore. Find more questions and answers on π
- Host: GitHub
- URL: https://github.com/aershov24/full-stack-interview-questions
- Owner: aershov24
- Created: 2018-09-17T00:53:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-26T09:57:13.000Z (almost 5 years ago)
- Last Synced: 2025-04-03T22:08:18.348Z (about 1 year ago)
- Topics: angular, full-stack, full-stack-development, full-stack-web-developer, interview-practice, interview-preparation, interview-questions, interview-test, react, vuejs
- Homepage: https://www.fullstack.cafe
- Size: 3.12 MB
- Stars: 980
- Watchers: 27
- Forks: 293
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# 3877 Full-Stack, Coding and System Design Interview Questions (ANSWERED) To Land Your Next Six-Figure Job Offer from [FullStack.Cafe](https://www.fullstack.cafe)
[FullStack.Cafe](https://www.fullstack.cafe) is a biggest hand-picked collection of top technical interview questions for junior and experienced full-stack and web developers with more that 3877 tech interview questions and answers. Prepare for your next tech interview and land 6-figure job offer in no time.
π΄ Get All 3877 Answers + PDFs on [FullStack.Cafe - Kill Your Tech & Coding Interview](https://www.fullstack.cafe/?utm_source=github&utm_medium=fsiq)
---
## Machine Learning & Data Science Interview Questions π€π€π€
π For 1299 ML & DataScience Interview Questions Check [MLStack.Cafe - Kill Your Machine Learning, Data Science & Python Interview](https://www.mlstack.cafe/?utm_source=github&utm_medium=fsiq)
---
## Table of Contents
* [.NET Core](#.NETCore)
* [ADO.NET](#ADO.NET)
* [ASP.NET](#ASP.NET)
* [ASP.NET MVC](#ASP.NETMVC)
* [ASP.NET Web API](#ASP.NETWebAPI)
* [AWS](#AWS)
* [Agile & Scrum](#Agile&Scrum)
* [Android](#Android)
* [Angular](#Angular)
* [AngularJS](#AngularJS)
* [Azure](#Azure)
* [Behavioral](#Behavioral)
* [Big Data](#BigData)
* [Blockchain](#Blockchain)
* [Bootstrap](#Bootstrap)
* [C#](#C#)
* [CSS](#CSS)
* [Career](#Career)
* [Clojure](#Clojure)
* [Code Problems](#CodeProblems)
* [Data Science](#DataScience)
* [Data Structures](#DataStructures)
* [Design Patterns](#DesignPatterns)
* [DevOps](#DevOps)
* [Docker](#Docker)
* [Entity Framework](#EntityFramework)
* [Flutter](#Flutter)
* [Git](#Git)
* [Golang](#Golang)
* [GraphQL](#GraphQL)
* [HTML5](#HTML5)
* [Ionic](#Ionic)
* [JSON](#JSON)
* [Java](#Java)
* [JavaScript](#JavaScript)
* [Kotlin](#Kotlin)
* [LINQ](#LINQ)
* [Laravel](#Laravel)
* [MSMQ](#MSMQ)
* [Machine Learning](#MachineLearning)
* [Microservices](#Microservices)
* [MongoDB](#MongoDB)
* [Node.js](#Node.js)
* [OOP](#OOP)
* [PHP](#PHP)
* [PWA](#PWA)
* [PowerShell](#PowerShell)
* [Python](#Python)
* [Questions to Ask](#QuestionstoAsk)
* [React](#React)
* [React Native](#ReactNative)
* [Reactive Programming](#ReactiveProgramming)
* [Redux](#Redux)
* [Ruby](#Ruby)
* [Ruby on Rails](#RubyonRails)
* [SOA & REST API](#SOA&RESTAPI)
* [SQL](#SQL)
* [Software Architecture](#SoftwareArchitecture)
* [Software Testing](#SoftwareTesting)
* [Spring](#Spring)
* [Statistics](#Statistics)
* [T-SQL](#T-SQL)
* [TypeScript](#TypeScript)
* [UX Design](#UXDesign)
* [Vue.js](#Vue.js)
* [WCF](#WCF)
* [WPF](#WPF)
* [Web Security](#WebSecurity)
* [Webpack](#Webpack)
* [XML & XSLT](#XML&XSLT)
* [Xamarin](#Xamarin)
* [iOS & Swift](#iOS&Swift)
* [jQuery](#jQuery)
## [[β¬]](#toc) .NET Core Interview Questions
#### Q1: What is the difference between String and string in C#? β
**Answer:**
`string` is an alias in C# for `System.String`. So technically, there is no difference. It's like `int` vs. `System.Int32`.
As far as guidelines, it's generally recommended to use `string` any time you're referring to an object.
```csharp
string place = "world";
```
Likewise, it's generally recommended to use `String` if you need to refer specifically to the class.
```csharp
string greet = String.Format("Hello {0}!", place);
```
**Source:** _blogs.msdn.microsoft.com_
#### Q2: What is .NET Standard? β
**Answer:**
The **.NET Standard** is a formal specification of .NET APIs that are intended to be available on all .NET implementations.
**Source:** _docs.microsoft.com_
#### Q3: What is .NET Core? β
**Answer:**
The .NET Core platform is a new .NET stack that is optimized for open source development and agile delivery on NuGet.
.NET Core has two major components. It includes a small runtime that is built from the same codebase as the .NET Framework CLR. The .NET Core runtime includes the same GC and JIT (RyuJIT), but doesnβt include features like Application Domains or Code Access Security. The runtime is delivered via NuGet, as part of the ASP.NET Core package.
.NET Core also includes the base class libraries. These libraries are largely the same code as the .NET Framework class libraries, but have been factored (removal of dependencies) to enable to ship a smaller set of libraries. These libraries are shipped as `System.*` NuGet packages on NuGet.org.
**Source:** _stackoverflow.com_
#### Q4: What is the .NET Framework? β
**Answer:**
The .NET is a Framework, which is a collection of classes of reusable libraries given by Microsoft to be used in other .NET applications and to develop, build and deploy many types of applications on the Windows platform including the following:
* Console Applications
* Windows Forms Applications
* Windows Presentation Foundation (WPF) Applications
* Web Applications
* Web Services
* Windows Services
* Services-oriented applications using Windows Communications Foundation (WCF)
* Workflow-enabled applications using Windows Workflow Foundation(WF)
**Source:** _c-sharpcorner.com_
#### Q5: What's the difference between SDK and Runtime in .NET Core? ββ
**Answer:**
* The SDK is all of the stuff that is needed/makes developing a .NET Core application easier, such as the CLI and a compiler.
* The runtime is the "virtual machine" that hosts/runs the application and abstracts all the interaction with the base operating system.
**Source:** _stackoverflow.com_
#### Q6: What is .NET Standard and why we need to consider it? ββ
**Answer:**
1. **.NET Standard** solves the code sharing problem for .NET developers across all platforms by bringing all the APIs that you expect and love across the environments that you need: desktop applications, mobile apps & games, and cloud services:
2. **.NET Standard** is a **set of APIs** that **all** .NET platforms **have to implement**. This **unifies the .NET platforms** and **prevents future fragmentation**.
3. **.NET Standard 2.0** will be implemented by **.NET Framework**, .**NET Core**,
and **Xamarin**. For **.NET Core**, this will add many of the existing APIs
that have been requested.
3. **.NET Standard 2.0** includes a compatibility shim for **.NET Framework** binaries, significantly increasing the set of libraries that you can reference from your .NET Standard libraries.
4. **.NET Standard** **will replace Portable Class Libraries (PCLs)** as the
tooling story for building multi-platform .NET libraries.
**Source:** _stackoverflow.com_
#### Q7: What is the difference between decimal, float and double in .NET? ββ
**Details:**
When would someone use one of these?
**Answer:**
Precision is the main difference.
* Float - 7 digits (32 bit)
* Double-15-16 digits (64 bit)
* Decimal -28-29 significant digits (128 bit)
As for what to use when:
* For values which are "naturally exact decimals" it's good to use decimal. This is usually suitable for any concepts invented by humans: financial values are the most obvious example, but there are others too. Consider the score given to divers or ice skaters, for example.
* For values which are more artefacts of nature which can't really be measured exactly anyway, float/double are more appropriate. For example, scientific data would usually be represented in this form. Here, the original values won't be "decimally accurate" to start with, so it's not important for the expected results to maintain the "decimal accuracy". Floating binary point types are much faster to work with than decimals.
**Source:** _blogs.msdn.microsoft.com_
#### Q8: What are some characteristics of .NET Core? ββ
**Answer:**
* **Flexible deployment**: Can be included in your app or installed side-by-side user- or machine-wide.
* **Cross-platform**: Runs on Windows, macOS and Linux; can be ported to other OSes. The supported Operating Systems (OS), CPUs and application scenarios will grow over time, provided by Microsoft, other companies, and individuals.
* **Command-line tools**: All product scenarios can be exercised at the command-line.
* **Compatible**: .NET Core is compatible with .NET Framework, Xamarin and Mono, via the .NET Standard Library.
* **Open source**: The .NET Core platform is open source, using MIT and Apache 2 licenses. Documentation is licensed under CC-BY. .NET Core is a .NET Foundation project.
* **Supported by Microsoft**: .NET Core is supported by Microsoft, per .NET Core Support
**Source:** _stackoverflow.com_
#### Q9: What is an unmanaged resource? ββ
**Answer:**
Use that rule of thumb:
* If you found it in the Microsoft .NET Framework: _it's managed_.
* If you went poking around MSDN yourself, _it's unmanaged_.
Anything you've used P/Invoke calls to get outside of the nice comfy world of everything available to you in the .NET Framwork is unmanaged β and you're now _responsible_ for cleaning it up.
**Source:** _stackoverflow.com_
#### Q10: What is CTS? ββ
**Answer:**
The **Common Type System (CTS)** standardizes the data types of all programming languages using .NET under the umbrella of .NET to a common data type for easy and smooth communication among these .NET languages.
CTS is designed as a singly rooted object hierarchy with `System.Object` as the base type from which all other types are derived. CTS supports two different kinds of types:
1. **Value Types**: Contain the values that need to be stored directly on the stack or allocated inline in a structure. They can be built-in (standard primitive types), user-defined (defined in source code) or enumerations (sets of enumerated values that are represented by labels but stored as a numeric type).
2. **Reference Types**: Store a reference to the valueβs memory address and are allocated on the heap. Reference types can be any of the pointer types, interface types or self-describing types (arrays and class types such as user-defined classes, boxed value types and delegates).
**Source:** _c-sharpcorner.com_
#### Q11: What is the difference between .NET Core and Mono? ββ
**Answer:**
To be simple:
* Mono is third party implementation of .Net Framework for Linux/Android/iOs
* .Net Core is Microsoft's own implementation for same.
**Source:** _stackoverflow.com_
#### Q12: What is MSIL? ββ
**Answer:**
When we compile our .NET code then it is not directly converted to native/binary code; it is first converted into intermediate code known as MSIL code which is then interpreted by the CLR. MSIL is independent of hardware and the operating system. Cross language relationships are possible since MSIL is the same for all .NET languages. MSIL is further converted into native code.
**Source:** _c-sharpcorner.com_
#### Q13: What is a .NET application domain? ββ
**Answer:**
It is an isolation layer provided by the .NET runtime. As such, App domains live with in a process (1 process can have many app domains) and have their own virtual address space.
App domains are useful because:
* They are less expensive than full processes
* They are multithreaded
* You can stop one without killing everything in the process
* Segregation of resources/config/etc
* Each app domain runs on its own security level
**Source:** _stackoverflow.com_
#### Q14: What is CLR? ββ
**Answer:**
The **CLR** stands for Common Language Runtime and it is an Execution Environment. It works as a layer between Operating Systems and the applications written in .NET languages that conforms to the Common Language Specification (CLS). The main function of Common Language Runtime (CLR) is to convert the Managed Code into native code and then execute the program.
**Source:** _c-sharpcorner.com_
#### Q15: Name some CLR services? ββ
**Answer:**
**CLR services**
* Assembly Resolver
* Assembly Loader
* Type Checker
* COM marshalled
* Debug Manager
* Thread Support
* IL to Native compiler
* Exception Manager
* Garbage Collector
**Source:** _c-sharpcorner.com_
#### Q16: Talk about new .csproj file? βββ
Read answer on π FullStack.Cafe
#### Q17: Explain what is included in .NET Core? βββ
Read answer on π FullStack.Cafe
#### Q18: Is there a way to catch multiple exceptions at once and without code duplication? βββ
Read answer on π FullStack.Cafe
#### Q19: What about NuGet packages and packages.config? βββ
Read answer on π FullStack.Cafe
#### Q20: Why to use of the IDisposable interface? βββ
Read answer on π FullStack.Cafe
#### Q21: When should we use .NET Core and .NET Standard Class Library project types? βββ
Read answer on π FullStack.Cafe
#### Q22: What is the difference between Class Library (.NET Standard) and Class Library (.NET Core)? βββ
Read answer on π FullStack.Cafe
#### Q23: What is the difference between .NET Standard and PCL (Portable Class Libraries)? βββ
Read answer on π FullStack.Cafe
#### Q24: Explain the difference between Task and Thread in .NET βββ
Read answer on π FullStack.Cafe
#### Q25: What is FCL? βββ
Read answer on π FullStack.Cafe
#### Q26: What is Kestrel? βββ
Read answer on π FullStack.Cafe
#### Q27: What is implicit compilation? βββ
Read answer on π FullStack.Cafe
#### Q28: What is JIT compiler? βββ
Read answer on π FullStack.Cafe
#### Q29: What is .NET Standard? βββ
Read answer on π FullStack.Cafe
#### Q30: What is Explicit Compilation? βββ
Read answer on π FullStack.Cafe
#### Q31: What are the benefits of explicit compilation? βββ
Read answer on π FullStack.Cafe
#### Q32: Explain the difference between βmanagedβ and βunmanagedβ code? βββ
Read answer on π FullStack.Cafe
#### Q33: What's the difference between .NET Core, .NET Framework, and Xamarin? βββ
Read answer on π FullStack.Cafe
#### Q34: What is difference between .NET Core and .NET Framework? βββ
Read answer on π FullStack.Cafe
#### Q35: Explain two types of deployment for .NET Core applications βββ
Read answer on π FullStack.Cafe
#### Q36: What does Common Language Specification (CLS) mean? βββ
Read answer on π FullStack.Cafe
#### Q37: What is CoreCLR? βββ
Read answer on π FullStack.Cafe
#### Q38: What's is BCL? βββ
Read answer on π FullStack.Cafe
#### Q39: What is the difference between CIL and MSIL (IL)? ββββ
Read answer on π FullStack.Cafe
#### Q40: How to choose the target version of .NET Standard library? ββββ
Read answer on π FullStack.Cafe
#### Q41: Why does .NET use a JIT compiler instead of just compiling the code once on the target machine? ββββ
Read answer on π FullStack.Cafe
#### Q42: What is the difference between AppDomain, Assembly, Process, and a Thread? ββββ
Read answer on π FullStack.Cafe
#### Q43: What are benefits of using JIT? ββββ
Read answer on π FullStack.Cafe
#### Q44: What is the difference between .NET Framework/Core and .NET Standard Class Library project types? ββββ
Read answer on π FullStack.Cafe
#### Q45: What's the difference between RyuJIT and Roslyn? ββββ
Read answer on π FullStack.Cafe
#### Q46: Why does .NET Standard library exist? ββββ
Read answer on π FullStack.Cafe
#### Q47: Explain how does Asynchronous tasks (Async/Await) work in .NET? ββββ
Read answer on π FullStack.Cafe
#### Q48: Explain Finalize vs Dispose usage? βββββ
Read answer on π FullStack.Cafe
#### Q49: How many types of JIT Compilations do you know? βββββ
Read answer on π FullStack.Cafe
#### Q50: What is the difference between Node.js async model and async/await in .NET? βββββ
Read answer on π FullStack.Cafe
#### Q51: Could you name the difference between .Net Core, Portable, Standard, Compact, UWP, and PCL? βββββ
Read answer on π FullStack.Cafe
## [[β¬]](#toc) ADO.NET Interview Questions
#### Q1: What is ADO.NET? β
**Answer:**
**ADO** stands for Active Data Object and ADO.NET is a set of .NET libraries for ADO.
NET is a collection of managed libraries used by .NET applications for data source communication using a driver or provider:
* Enterprise applications handle a large amount of data. This data is primarily stored in relational databases, such as Oracle, SQL Server, and Access and so on. These databases use Structured Query Language (SQL) for retrieval of data.
* To access enterprise data from a .NET application, an interface was needed. This interface acts as a bridge between an RDBMS system and a .NET application. ADO.NET is such an interface that is created to connect .NET applications to RDBMS systems.
* In the .NET framework, Microsoft introduced a new version of Active X Data Objects (ADO) called ADO.NET. Any .NET application, either Windows based or web based, can interact with the database using a rich set of classes of the ADO.NET library. Data can be accessed from any database using connected or disconnected architecture.
**Source:** _c-sharpcorner.com_
#### Q2: What is exactly meaning of disconnected and connected approach in ADO.NET? ββ
**Answer:**
In short:
* **Disconnected** = Make Connection , Fetch Data , Close Connection
* **Connected** = Make Connection , Keep Connection alive , Close Connection when close is called.
The ADO.net architecture, in which connection must be kept open till the end to retrieve and access data from database is called as _connected architecture_. Connected architecture is built on the these types - `connection`, `command`, `datareader`
The ADO.net architecture, in which connection will be kept open only till the data retrieved from database, and later can be accessed even when connection to database is closed is called as _disconnected architecture_. Disconnected architecture of ADO.net is built on these types - `connection`, `dataadapter`, `commandbuilder` and `dataset` and `dataview`.
**Source:** _stackoverflow.com_
#### Q3: Describe when you would use the DataView in ADO.NET? ββ
**Answer:**
A **DataView** enables you to create different views of the data stored in a DataTable, a capability that is often used in data binding applications. Using a DataView, you can expose the data in a table with different sort orders, and you can filter the data by row state or based on a filter expression. A DataView provides a dynamic view of data whose content, ordering, and membership reflect changes to the underlying DataTable as they occur. This is different from the Select method of the DataTable, which returns a DataRow array from a table per particular filter and/or sort order and whose content reflects changes to the underlying table, but whose membership and ordering remain static. The dynamic capabilities of the DataView make it ideal for data-binding applications.
**Source:** _stackoverflow.com_
#### Q4: What is the SqlCommandBuilder? ββ
**Answer:**
**CommandBuilder** helps you to generate update, delete, and insert commands on a single database table for a data adapter. Similar to other objects, each data provider has a command builder class. The OleDbCommandBuilder, SqlCommonBuilder, and OdbcCommandBuilder classes represent the CommonBuilder object in the OleDb, Sql, and ODBC data providers.
**Source:** _c-sharpcorner.com_
#### Q5: What is the DataAdapter Object in ADO.NET? ββ
**Answer:**
A **DataAdapter** is used to retrieve data from a data source and populate tables within a `DataSet`. Data Adapters form the bridge between a data source and a dataset. The `DataAdapter` also resolves changes made to the `DataSet` back to the data source. The `DataAdapter` uses the `Connection` object of the .NET Framework data provider to connect to a data source, and it uses `Command` objects to retrieve data from and resolve changes to the data source.
A `DataAdapter` supports mainly the following two methods:
* **Fill():** The Fill method populates a dataset or a data table object with data from the database. It retrieves rows from the data source using the SELECT statement specified by an associated select command property. The Fill method leaves the connection in the same state as it encountered before populating the data.
* **Update():** The Update method commits the changes back to the database. It also analyzes the RowState of each record in the DataSet and calls the appropriate INSERT, UPDATE, and DELETE statements.
**Source:** _c-sharpcorner.com_
#### Q6: What is the basic difference between ADO.NET and Entity Framework? ββ
**Answer:**
ADO.NET Entity Framework is an ORM (object-relational mapping) which creates a higher abstract object model over ADO.NET components. ADO.NET is a layer closer to the database (datatables, datasets and etc...). The main and the only benefit of EF is it auto-generates code for the Model (middle layer), Data Access Layer, and mapping code, thus reducing a lot of development time. Consider the following example:
**ADO.NET**:
```csharp
DataTable table = adoDs.Tables[0];
for (int j = 0; j < table.Rows.Count; j++)
{
DataRow row = table.Rows[j];
// Get the values of the fields
string CustomerName =
(string)row["Customername"];
string CustomerCode =
(string)row["CustomerCode"];
}
```
**EF**:
```csharp
foreach (Customer objCust in obj.Customers)
{}
```
**Source:** _stackoverflow.com_
#### Q7: What is Connection Pooling in ADO.NET? ββ
**Answer:**
ADO.NET uses a technique called **connection pooling**, which minimizes the cost of repeatedly opening and closing connections. Connection pooling reuses existing active connections with the same connection string instead of creating new connections when a request is made to the database. It involves the use of a connection manager that is responsible for maintaining a list, or pool, of available connections for a given connection string. Several pools exist if different connection strings ask for connection pooling.
**Source:** _c-sharpcorner.com_
#### Q8: What is SqlCommand Object? ββ
**Answer:**
The **SqlCommand** carries the SQL statement that needs to be executed on the database. SqlCommand carries the command in the CommandText property and this property will be used when the SqlCommand calls any of its execute methods.
* The Command Object uses the connection object to execute SQL queries.
* The queries can be in the form of Inline text, Stored Procedures or direct Table access.
* An important feature of Command object is that it can be used to execute queries and Stored Procedures with Parameters.
* If a select query is issued, the result set it returns is usually stored in either a DataSet or a DataReader object.
The three important methods exposed by the SqlCommand object is shown below:
* ExecuteScalar
* ExecuteNonQuery
* ExecuteReader
**Source:** _c-sharpcorner.com_
#### Q9: What are the ADO.NET components? ββ
**Answer:**
ADO.NET components categorized in three modes:
* disconnected,
* common or shared and
* the .NET data providers.
The disconnected components build the basic ADO.NET architecture. You can use these components (or classes) with or without data providers. For example, you can use a `DataTable` object with or without providers and shared or common components are the base classes for data providers. Shared or common components are the base classes for data providers and shared by all data providers. The data provider components are specifically designed to work with different kinds of data sources. For example, ODBC data providers work with ODBC data sources and OleDb data providers work with OLE-DB data sources.
**Source:** _c-sharpcorner.com_
#### Q10: How can you define the DataSet structure? ββ
**Answer:**
A **DataSet** object falls in disconnected components series. The `DataSet` consists of a collection of tables, rows, columns and relationships.
`DataSet` contains a collection of `DataTables` and the `DataTable` contains a collection of `DataRows`, `DataRelations`, and `DataColumns`. A `DataTable` maps to a table in the database.
**Source:** _c-sharpcorner.com_
#### Q11: What do you understand by DataRelation class? ββ
**Answer:**
The **DataRelation** is a class of disconnected architecture in the .NET framework. It is found in the System.Data namespace. It represents a relationship between database tables and correlates tables on the basis of matching column.
**Source:** _c-sharpcorner.com_
#### Q12: How could you control connection pooling behavior? βββ
Read answer on π FullStack.Cafe
#### Q13: What is the difference between ExecuteScalar, ExecuteReader and ExecuteNonQuery? βββ
Read answer on π FullStack.Cafe
#### Q14: What is the difference between DataView, DataTable and DataSet? βββ
Read answer on π FullStack.Cafe
#### Q15: Could you explain me some of the main differences between Connection-oriented access and connectionless access in ADO.NET? βββ
Read answer on π FullStack.Cafe
#### Q16: What is the difference between Integrated Security = True and Integrated Security = SSPI? βββ
Read answer on π FullStack.Cafe
#### Q17: What is Unit Of Work? βββ
Read answer on π FullStack.Cafe
#### Q18: What are the differences between using SqlDataAdapter vs SqlDataReader for getting data from a DB? βββ
Read answer on π FullStack.Cafe
#### Q19: Mention what is the difference between ADO.NET and classic ADO? βββ
Read answer on π FullStack.Cafe
#### Q20: Can you explain the difference between a DataReader, a DataAdapter, a Dataset, and a DataView? ββββ
Read answer on π FullStack.Cafe
#### Q21: Name types of transactions in ADO.NET ββββ
Read answer on π FullStack.Cafe
#### Q22: Where should I use disconnected architecture approach? ββββ
Read answer on π FullStack.Cafe
#### Q23: Where should I use connected architecture approach? ββββ
Read answer on π FullStack.Cafe
#### Q24: Is there anything faster than SqlDataReader in .NET? ββββ
Read answer on π FullStack.Cafe
#### Q25: Could you explain some benefits of Repository Pattern? ββββ
Read answer on π FullStack.Cafe
#### Q26: What is the difference between OLE DB and ODBC data sources? ββββ
Read answer on π FullStack.Cafe
#### Q27: How could you monitor connection pooling behavior? ββββ
Read answer on π FullStack.Cafe
#### Q28: Is it necessary to manually close and dispose of SqlDataReader? ββββ
Read answer on π FullStack.Cafe
#### Q29: What's better: DataSet or DataReader? ββββ
Read answer on π FullStack.Cafe
#### Q30: What is the difference between ADODB, OLEDB and ADO.NET? ββββ
Read answer on π FullStack.Cafe
#### Q31: What is the best and fast way to insert 2 million rows of data into SQL Server? βββββ
Read answer on π FullStack.Cafe
#### Q32: Under what scenarios would setting pooling=false in an ADO.NET connection string be of value when connecting to SQL Server? βββββ
Read answer on π FullStack.Cafe
#### Q33: Name some problems that could occur with connection pooling βββββ
Read answer on π FullStack.Cafe
## [[β¬]](#toc) ASP.NET Interview Questions
#### Q1: What is ViewData? β
**Answer:**
Viewdata contains the key, value pairs as dictionary and this is derived from classββββViewDataDictionaryβ. In action method we are setting the value for viewdata and in view the value will be fetched by typecasting.
**Source:** _medium.com_
#### Q2: What is ASP.Net? β
**Answer:**
It is a framework developed by Microsoft on which we can develop new generation web sites using web forms(aspx), MVC, HTML, Javascript, CSS etc. Its successor of Microsoft Active Server Pages(ASP). Currently there is ASP.NET 4.0, which is used to develop web sites. There are various page extensions provided by Microsoft that are being used for web site development. Eg: aspx, asmx, ascx, ashx, cs, vb, html, XML etc.
**Source:** _guru99.com_
#### Q3: Talk about Logging in ASP.NET Core? ββ
**Answer:**
**Logging**Β is built-in and you get access to structured logs from the ASP.NET Core host itself to your application. With tools likeΒ [Serilog,](https://github.com/serilog/serilog-aspnetcore)Β you can extend your loggingΒ [easily](https://github.com/serilog/serilog-sinks-rollingfile)Β and save your logs to file, Azure, Amazon or any other output provider. You can configure verbosity and log levels via configuration (appsettings.json by default), and you can configure log levels by different categories.
**Source:** _talkingdotnet.com_
#### Q4: Explain startup process in ASP.NET Core? ββ
**Answer:**
Everything starts from Program.cs
```csharp
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup()
.Build();
```
CreateDefaultBuilder extension method will create a default configuration which will look first into `appsettings.json` files then will look for Environment variables and at the end, it will use command line arguments.
This part will also set up default logger sources (debug and console) and load the settings for logging from appsettings.json.
After theΒ `CreateDefaultBuilder` finishes, then `Startup` class is executed. First, the constructor code is executed. After that, services are added to DI container via `AddServices` method that lives in Startup class. After that, an order of middleware that will handle every incoming request is set up.
**Source:** _codingblast.com_
#### Q5: What exactly is an application pool? What is its purpose? ββ
**Answer:**
**Application pools** allow you to isolate your applications from one another, even if they are running on the same server. This way, if there is an error in one app, it won't take down other applications.
Additionally, applications pools allow you to separate different apps which require different levels of security.
**Source:** _stackoverflow.com_
#### Q6: How you can add an event handler? ββ
**Answer:**
** **Using the Attributes property of server side control.
e.g.
```csharp
btnSubmit.Attributes.Add("onMouseOver","JavascriptCode();")
```
**Source:** _guru99.com_
#### Q7: What's the use of Response.Output.Write()? ββ
**Answer:**
We can write formatted output using Response.Output.Write().
**Source:** _guru99.com_
#### Q8: How to configure your ASP.NET Core app? ββ
**Answer:**
Another crucial part of ASP.NET Core Framework is Configuration. Also, it is part of Dependency Injection. Use it anywhere in your code with an option toΒ [reload on changes](https://codingblast.com/asp-net-core-configuration-reloading-binding-injecting/)Β of configuration values from sources (appsettings.json, environment variables, command line arguments, etc.). It is also easy to override, extend and customize the Configuration. No more extensive configurations in web.config, the preferred way now is _**appsettings.json**_ in combination with a mix of Environment variables and cmd-line args.
**Source:** _talkingdotnet.com_
#### Q9: What is ASP.NET Core? ββ
**Answer:**
ASP.NET Core is a brand new cross-platform web framework built with .NET Core framework. It is not an update to existing ASP.NET framework. It is a complete rewrite of the ASP.NET framework. It works with both .NET Core and .NET Framework.
Main characterestics of ASP.NET Core:
* DI Container which is quite simple and built-in. You can extend it with other popular DI containers
* Built-in and extensible structured logging. You can redirect output to as many sources as you want (file, Azure, AWS, console)
* Extensible strongly typed configuration, which can also be used to reload at run-time
* Kestrel β new, cross-platform and super fast web server which can stand alone without IIS, Nginx or Apache
* New, fully async pipeline. It is easily configured via middleware
* ASP.NET All meta package which improves development speed, and enables you to reference all Microsoft packages for ASP.NET Core and it will deploy only those that are being used by your code
* There is no _web.config_. We now use _appsettings.json_ file in combination with other sources of configuration (command line args, environment variables, etc.)
* There is no _Global._asax β We have _Startup.cs_ which is used to set up Middleware and services for DI Container.
**Source:** _talkingdotnet.com_
#### Q10: What is the difference between ASP.NET and ASP.NET MVC? ββ
**Answer:**
ASP.NET, at its most basic level, provides a means for you to provide general HTML markup combined with server side "controls" within the event-driven programming model that can be leveraged with VB, C#, and so on. You define the page(s) of a site, drop in the controls, and provide the programmatic plumbing to make it all work.
ASP.NET MVC is an application framework based on the Model-View-Controller architectural pattern. This is what might be considered a "canned" framework for a specific way of implementing a web site, with a page acting as the "controller" and dispatching requests to the appropriate pages in the application. The idea is to "partition" the various elements of the application, eg business rules, presentation rules, and so on.
Think of the former as the "blank slate" for implementing a site architecture you've designed more or less from the ground up. MVC provides a mechanism for designing a site around a pre-determined "pattern" of application access, if that makes sense. There's more technical detail to it than that, to be sure, but that's the nickel tour for the purposes of the question.
**Source:** _stackoverflow.com_
#### Q11: What is ViewState? ββ
**Answer:**
**View State** is the method to preserve the Value of the Page and Controls between round trips. It is a Page-Level State Management technique. View State is turned on by default and normally serializes the data in every control on the page regardless of whether it is actually used during a post-back.
A web application is stateless. That means that a new instance of a page is created every time when we make a request to the server to get the page and after the round trip our page has been lost immediately
**Source:** _c-sharpcorner.com_
#### Q12: Can ASP.NET Core work with the .NET framework? ββ
**Answer:**
Yes. This might surprise many, but ASP.NET Core works with .NET framework and this is officially supported by Microsoft.
ASP.NET Core works with:
* .NET Core framework
* .NET framework
**Source:** _talkingdotnet.com_
#### Q13: What is the good practice to implement validations in aspx page? ββ
**Answer:**
Client-side validation is the best way to validate data of a web page. It reduces the network traffic and saves server resources.
**Source:** _guru99.com_
#### Q14: What is a postback? ββ
**Answer:**
A **postback** originates from the client browser. Usually one of the controls on the page will be manipulated by the user (a button clicked or dropdown changed, etc), and this control will initiate a postback. The state of this control, plus all other controls on the page (known as the View State) is Posted Back to the web server.
**Source:** _stackoverflow.com_
#### Q15: What is the file extension of ASP.NET web service? ββ
**Answer:**
Web services have file extension `.asmx`.
**Source:** _guru99.com_
#### Q16: How can we prevent browser from caching an ASPX page? βββ
Read answer on π FullStack.Cafe
#### Q17: In which event of page cycle is the ViewState available? βββ
Read answer on π FullStack.Cafe
#### Q18: From which base class all Web Forms are inherited? βββ
Read answer on π FullStack.Cafe
#### Q19: What is the meaning of Unobtrusive JavaScript? βββ
Read answer on π FullStack.Cafe
#### Q20: Explain JSON Binding? βββ
Read answer on π FullStack.Cafe
#### Q21: What is new in ASP.NET Core 2, compared to ASP.NET Core 1? βββ
Read answer on π FullStack.Cafe
#### Q22: What are the sub types of ActionResult? βββ
Read answer on π FullStack.Cafe
#### Q23: What exactly is the difference between .NET Core and ASP.NET Core? βββ
Read answer on π FullStack.Cafe
#### Q24: What is the difference between Server.Transfer and Response.Redirect? βββ
Read answer on π FullStack.Cafe
#### Q25: Where the viewstate is stored after the page postback? βββ
Read answer on π FullStack.Cafe
#### Q26: How do you register JavaScript for webcontrols? βββ
Read answer on π FullStack.Cafe
#### Q27: Explain usage of Dependency Injection in ASP.NET Core βββ
Read answer on π FullStack.Cafe
#### Q28: What are the different validators in ASP.NET? βββ
Read answer on π FullStack.Cafe
#### Q29: List the events in ASP.NET page life cycle βββ
Read answer on π FullStack.Cafe
#### Q30: What is ViewState? How is it encoded? Is it encrypted? Who uses ViewState? βββ
Read answer on π FullStack.Cafe
#### Q31: Can we add code files of different languages in App_Code folder? βββ
Read answer on π FullStack.Cafe
#### Q32: What are the different types of caching? βββ
Read answer on π FullStack.Cafe
#### Q33: What are the event handlers that we can have in Global.asax file? βββ
Read answer on π FullStack.Cafe
#### Q34: Explain Middleware in ASP.NET Core? βββ
Read answer on π FullStack.Cafe
#### Q35: How long the items in ViewState exists? βββ
Read answer on π FullStack.Cafe
#### Q36: What is the difference between an HtmlInputCheckBox control and an HtmlInputRadioButton control? βββ
Read answer on π FullStack.Cafe
#### Q37: In which event are the controls fully loaded? βββ
Read answer on π FullStack.Cafe
#### Q38: Which type if caching will be used if we want to cache the portion of a page instead of whole page? ββββ
Read answer on π FullStack.Cafe
#### Q39: How we can force all the validation controls to run? ββββ
Read answer on π FullStack.Cafe
#### Q40: List the major built-in objects in ASP.NET? ββββ
Read answer on π FullStack.Cafe
#### Q41: What is HttpModule in ASP.Net? ββββ
Read answer on π FullStack.Cafe
#### Q42: What is RedirectPermanent in ASP.Net? ββββ
Read answer on π FullStack.Cafe
#### Q43: What are the different types of cookies in ASP.NET? ββββ
Read answer on π FullStack.Cafe
#### Q44: What is the difference between and ? ββββ
Read answer on π FullStack.Cafe
#### Q45: What is an HttpHandler in ASP.NET? Why and how is it used? ββββ
Read answer on π FullStack.Cafe
#### Q46: What is the difference between Web Service and WCF Service? ββββ
Read answer on π FullStack.Cafe
#### Q47: What is the difference between web config and machine config? ββββ
Read answer on π FullStack.Cafe
#### Q48: Is it possible to create web application with both webforms and mvc? ββββ
Read answer on π FullStack.Cafe
#### Q49: What is the difference between ASP.NET Core Web (.NET Core) vs ASP.NET Core Web (.NET Framework)? ββββ
Read answer on π FullStack.Cafe
#### Q50: What are the different Session state management options available in ASP.NET? ββββ
Read answer on π FullStack.Cafe
#### Q51: What is the difference between 'classic' and 'integrated' pipeline mode in IIS7? ββββ
Read answer on π FullStack.Cafe
#### Q52: How can we apply Themes to an asp.net application? ββββ
Read answer on π FullStack.Cafe
#### Q53: How to choose between ASP.NET 4.x and ASP.NET Core? ββββ
Read answer on π FullStack.Cafe
#### Q54: What is Katana? ββββ
Read answer on π FullStack.Cafe
#### Q55: What exactly is OWIN and what problems does it solve? βββββ
Read answer on π FullStack.Cafe
#### Q56: Name some ASP.NET WebForms disadvantages over MVC? βββββ
Read answer on π FullStack.Cafe
#### Q57: What is the difference between a web API and a web service? βββββ
Read answer on π FullStack.Cafe
#### Q58: What is Cross Page Posting? βββββ
Read answer on π FullStack.Cafe
#### Q59: What is the equivalent of WebForms in ASP.NET Core? βββββ
Read answer on π FullStack.Cafe
#### Q60: Are static class instances unique to a request or a server in ASP.NET? βββββ
Read answer on π FullStack.Cafe
## [[β¬]](#toc) ASP.NET MVC Interview Questions
#### Q1: What is Layout in MVC? β
**Answer:**
Layout pages are similar to master pages in traditional web forms. This is used to set the common look across multiple pages. In each child page we can findββ
```html
@{
Layout = β~/Views/Shared/TestLayout1.cshtmlβ;
}
```
This indicates child page uses TestLayout page as itβs master page.
**Source:** _medium.com_
#### Q2: Explain Bundle.Config in MVC4? ββ
**Answer:**
**βBundleConfig.csβ** in MVC4 is used to register the bundles by the bundling and minification system. Many bundles are added by default including jQuery libraries likeβββjquery.validate, Modernizr, and default CSS references.
**Source:** _medium.com_
#### Q3: What is Razor View Engine? ββ
**Answer:**
**Razor** is the first major update to render HTML in MVC 3. Razor was designed specifically for view engine syntax. Main focus of this would be to simplify and code-focused templating for HTML generation. Below is the sample of using Razor:
```html
@model MvcMusicStore.Models.Customer
@{ViewBag.Title = βGet Customersβ;}
@Model.CustomerName
```
**Source:** _medium.com_
#### Q4: What is the use of ViewModel in MVC? ββ
**Answer:**
ViewModel is a plain class with properties, which is used to bind it to strongly typed view. ViewModel can have the validation rules defined for its properties using data annotations.
**Source:** _medium.com_
#### Q5: What you mean by Routing in MVC? ββ
**Answer:**
**Routing** is a pattern matching mechanism of incoming requests to the URL patterns which are registered in route table. ClassββββUrlRoutingModuleβ is used for the same process.
**Source:** _medium.com_
#### Q6: What are Actions in MVC? ββ
**Answer:**
**Actions** are the methods in Controller class which is responsible for returning the view or json data. Action will mainly have return typeββββActionResultβ and it will be invoked from methodββββInvokeAction()β called by controller.
**Source:** _medium.com_
#### Q7: What are the advantages of MVC over ASP.NET? ββ
**Answer:**
* Provides a clean separation of concerns among UI (Presentation layer), model (Transfer objects/Domain Objects/Entities) and Business Logic (Controller).
* Easy to UNIT Test
* Improved reusability of model and views. We can have multiple views which can point to the same model and vice versa.
* Improved structuring of the code
**Source:** _medium.com_
#### Q8: What are Scaffold templates in MVC? ββ
**Answer:**
Scaffolding in ASP.NET MVC is used to generate the Controllers, Model and Views for create, read, update, and delete (CRUD) functionality in an application. The scaffolding will be knowing the naming conventions used for models and controllers and views.
**Source:** _medium.com_
#### Q9: Can you explain Model, Controller and View in MVC? ββ
**Answer:**
* **Model**βββItβs a business entity and it is used to represent the application data.
* **Controller**βββRequest sent by the user always scatters through controller and itβs responsibility is to redirect to the specific view using View() method.
* **View**βββItβs the presentation layer of MVC.
**Source:** _medium.com_
#### Q10: What is Razor Pages? ββ
**Answer:**
[Razor Pages](https://codingblast.com/asp-net-core-razor-pages/) is a new feature of ASP.NET Core that makes coding page-focused scenarios easier and more productive.
With Razor Pages, you have this one Razor file (_.cshtml_), and the code for a single page lives inside of that file, and that file also represents the URL structure of the app. Therefore, you got everything inside of one file, and it just works.
However, you can separate your code to the _code behind_ file with _.cshtml.cs_ extension. You would usually have your view model and handlers (like action methods in MVC) in that file and handle the logic there. Of course, you could also have your view model moved to separate place.
Since Razor Pages is part of the MVC stack, you can use anything that comes with MVC inside of our Razor Pages.
**Source:** _codingblast.com_
#### Q11: Explain Sections is MVC? ββ
**Answer:**
Section are the part of HTML which is to be rendered in layout page. In Layout page we will use the below syntax for rendering the HTML β
```html
@RenderSection(βTestSectionβ)
```
And in child pages we are defining these sections as shown below β
```html
@section TestSection{
Test Content
}
```
**Source:** _medium.com_
#### Q12: What are Non Action methods in MVC? ββ
**Answer:**
In MVC all public methods have been treated as Actions. So if you are creating a method and if you do not want to use it as an action method then the method has to be decorated with "NonAction" attribute as shown below:
```csharp
[NonAction]
public void TestMethod()
{
// Method logic
}
```
**Source:** _stackoverflow.com_
#### Q13: Can a view be shared across multiple controllers? If Yes, How we can do that? βββ
Read answer on π FullStack.Cafe
#### Q14: What is the difference between ViewBag and ViewData in MVC? βββ
Read answer on π FullStack.Cafe
#### Q15: What is the difference between ViewResult() and ActionResult() in ASP.NET MVC? βββ
Read answer on π FullStack.Cafe
#### Q16: What are HTML Helpers in MVC? βββ
Read answer on π FullStack.Cafe
#### Q17: Can you explain the page life cycle of MVC? βββ
Read answer on π FullStack.Cafe
#### Q18: What is Attribute Routing in MVC? βββ
Read answer on π FullStack.Cafe
#### Q19: What is PartialView in MVC? βββ
Read answer on π FullStack.Cafe
#### Q20: Can you explain RenderBody and RenderPage in MVC? βββ
Read answer on π FullStack.Cafe
#### Q21: Explain the methods used to render the views in MVC? βββ
Read answer on π FullStack.Cafe
#### Q22: Explain ASP.NET WebApi vs MVC? βββ
Read answer on π FullStack.Cafe
#### Q23: What are some of the advantages of using ASP.Net MVC vs Web Forms? βββ
Read answer on π FullStack.Cafe
#### Q24: What is the "HelperPage.IsAjax" Property? βββ
Read answer on π FullStack.Cafe
#### Q25: What is RouteConfig.cs in MVC 4? βββ
Read answer on π FullStack.Cafe
#### Q26: Why to use Html.Partial in MVC? ββββ
Read answer on π FullStack.Cafe
#### Q27: What are Validation Annotations? ββββ
Read answer on π FullStack.Cafe
#### Q28: Explain TempData in MVC? ββββ
Read answer on π FullStack.Cafe
#### Q29: How route table has been created in ASP.NET MVC? ββββ
Read answer on π FullStack.Cafe
#### Q30: Explain Dependency Resolution? ββββ
Read answer on π FullStack.Cafe
#### Q31: What is Separation of Concerns in ASP.NET MVC? ββββ
Read answer on π FullStack.Cafe
#### Q32: What are AJAX Helpers in MVC? ββββ
Read answer on π FullStack.Cafe
#### Q33: What is Html.RenderPartial? βββββ
Read answer on π FullStack.Cafe
## [[β¬]](#toc) ASP.NET Web API Interview Questions
#### Q1: What is ASP.NET Web API? β
**Answer:**
ASP.NET Web API is a framework that simplifies building HTTP services for broader range of clients (including browsers as well as mobile devices) on top of .NET Framework.
Using ASP.NET Web API, we can create non-SOAP based services like plain XML or JSON strings, etc. with many other advantages including:
* Create resource-oriented services using the full features of HTTP
* Exposing services to a variety of clients easily like browsers or mobile devices, etc.
**Source:** _codeproject.com_
#### Q2: Which status code used for all uncaught exceptions by default? ββ
**Answer:**
**500** β Internal Server Error
Consider:
```csharp
[Route("CheckId/{id}")]
[HttpGet]
public IHttpActionResult CheckId(int id)
{
if(id > 100)
{
throw new ArgumentOutOfRangeException();
}
return Ok(id);
}
```
And the result:
**Source:** _docs.microsoft.com_
#### Q3: What are the Advantages of Using ASP.NET Web API? ββ
**Answer:**
Using ASP.NET Web API has a number of advantages, but core of the advantages are:
* It works the HTTP way using standard HTTP verbs like `GET`, `POST`, `PUT`, `DELETE`, etc. for all CRUD operations
* Complete support for routing
* Response generated in JSON or XML format using `MediaTypeFormatter`
* It has the ability to be hosted in IIS as well as self-host outside of IIS
* Supports Model binding and Validation
* Support for OData
**Source:** _codeproject.com_
#### Q4: What New Features are Introduced in ASP.NET Web API 2.0? ββ
**Answer:**
More new features introduced in ASP.NET Web API framework v2.0 are as follows:
* Attribute Routing
* External Authentication
* CORS (Cross-Origin Resource Sharing)
* OWIN (Open Web Interface for .NET) Self Hosting
* `IHttpActionResult`
* Web API OData
**Source:** _codeproject.com_
#### Q5: What exactly is OAuth (Open Authorization)? ββ
**Answer:**
**OAuth** (Open Authorization) is an open standard for access granting/deligation protocol. It used as a way for Internet users to grant websites or applications access to their information on other websites but without giving them the passwords. It does not deal with authentication.
Basically there are three parties involved: oAuth Provider, oAuth Client and Owner.
* oAuth Client (Application Which wants to access your credential)
* oAuth Provider (eg. facebook, twitter...)
* Owner (the person with facebook,twitter.. account )
**Source:** _stackoverflow.com_
#### Q6: Explain the usage of HttpResponseMessage? ββ
**Answer:**
`HttpResponseMessage` works with HTTP protocol to return the data with status/error.
**Source:** _c-sharpcorner.com_
#### Q7: What is the difference between ApiController and Controller? ββ
**Answer:**
* Use **Controller** to render your normal views.
* **ApiController** action only return data that is serialized and sent to the client.
Consider:
```csharp
public class TweetsController : Controller {
// GET: /Tweets/
[HttpGet]
public ActionResult Index() {
return Json(Twitter.GetTweets(), JsonRequestBehavior.AllowGet);
}
}
```
or
```csharp
public class TweetsController : ApiController {
// GET: /Api/Tweets/
public List Get() {
return Twitter.GetTweets();
}
}
```
**Source:** _stackoverflow.com_
#### Q8: What are main return types supported in Web API? ββ
**Answer:**
A Web API controller action can return following values:
* Void β It will return empty content
* HttpResponseMessage β It will convert the response to an HTTP message.
* IHttpActionResult β internally calls ExecuteAsync to create an HttpResponseMessage
* Other types β You can write the serialized return value into the response body
**Source:** _career.guru99.com_
#### Q9: What are the differences between WebAPI and WebAPI 2? βββ
Read answer on π FullStack.Cafe
#### Q10: How to Restrict Access to Web API Method to Specific HTTP Verb? βββ
Read answer on π FullStack.Cafe
#### Q11: What is Attribute Routing in ASP.NET Web API 2.0? βββ
Read answer on π FullStack.Cafe
#### Q12: Name types of Action Results in Web API 2 βββ
Read answer on π FullStack.Cafe
#### Q13: Compare WCF vs ASP.NET Web API? βββ
Read answer on π FullStack.Cafe
#### Q14: Explain the difference between WCF RESTful Service vs ASP.NET Web API? βββ
Read answer on π FullStack.Cafe
#### Q15: Is it True that ASP.NET Web API has Replaced WCF? βββ
Read answer on π FullStack.Cafe
#### Q16: What's the difference between REST & RESTful? βββ
Read answer on π FullStack.Cafe
#### Q17: Explain the difference between MVC vs ASP.NET Web API βββ
Read answer on π FullStack.Cafe
#### Q18: Why are the "FromBody" and "FromUri" attributes needed in ASP.NET Web API`? ββββ
Read answer on π FullStack.Cafe
#### Q19: What is ASP.NET Web API OData? ββββ
Read answer on π FullStack.Cafe
#### Q20: Explain briefly CORS(Cross-Origin Resource Sharing)? ββββ
Read answer on π FullStack.Cafe
#### Q21: Can we use Web API with ASP.NET Web Form? ββββ
Read answer on π FullStack.Cafe
#### Q22: How Can We Provide an Alias Name for ASP.NET Web API Action? ββββ
Read answer on π FullStack.Cafe
#### Q23: What is Delegating Handler? ββββ
Read answer on π FullStack.Cafe
#### Q24: How to register exception filter globally? ββββ
Read answer on π FullStack.Cafe
#### Q25: What's the difference between OpenID and OAuth? ββββ
Read answer on π FullStack.Cafe
#### Q26: How to Return View from ASP.NET Web API Method? ββββ
Read answer on π FullStack.Cafe
#### Q27: Explain advantages/disadvantages of using HttpModule vs DelegatingHandler? βββββ
Read answer on π FullStack.Cafe
#### Q28: Could you clarify what is the best practice with Web API error management? βββββ
Read answer on π FullStack.Cafe
#### Q29: What is difference between OData and REST web services? βββββ
Read answer on π FullStack.Cafe
#### Q30: Explain briefly OWIN (Open Web Interface for .NET) Self Hosting? βββββ
Read answer on π FullStack.Cafe
#### Q31: Explain the difference between WCF, Web API, WCF REST and Web Service? βββββ
Read answer on π FullStack.Cafe
#### Q32: Why should I use IHttpActionResult instead of HttpResponseMessage? βββββ
Read answer on π FullStack.Cafe
#### Q33: What is difference between WCF and Web API and WCF REST and Web Service? βββββ
Read answer on π FullStack.Cafe
## [[β¬]](#toc) AWS Interview Questions
#### Q1: What is AWS? β
**Answer:**
**AWS** stands for Amazon Web Services and is a platform that provides database storage, secure cloud services, offering to compute power, content delivery, and many other services to develop business levels.
**Source:** _onlineinterviewquestions.com_
#### Q2: Explain the key components of AWS? β
**Answer:**
* **Simple Storage Service (S3)**: S3 is most widely used AWS storage web service.
* **Simple E-mail Service (SES)**: SES is a hosted transactional email service and allows one to fluently send deliverable emails using a RESTFUL API call or through a regular SMTP.
* **Identity and Access Management (IAM)**: IAM provides improved identity and security management for AWS account.
* **Elastic Compute Cloud (EC2)**: EC2 is an AWS ecosystem central piece. It is responsible for providing on-demand and flexible computing resources with a βpay as you goβ pricing model.
* **Elastic Block Store (EBS)**: EBS offers continuous storage solution that can be seen in instances as a regular hard drive.
* **CloudWatch**: CloudWatch allows the controller to outlook and gather key metrics and also set a series of alarms to be notified if there is any trouble.
**Source:** _whizlabs.com_
#### Q3: What is buckets in AWS? β
**Answer:**
An Amazon S3 bucket is a public cloud storage resource available in Amazon Web Services' (AWS) Simple Storage Service (S3), an object storage offering. Amazon S3 buckets, which are similar to file folders, store objects, which consist of data and its descriptive metadata.
By default, you can create up to 100 buckets in each of your AWS accounts. If you need more buckets, you can increase your bucket limit by submitting a service limit increase.
**Source:** _whizlabs.com_
#### Q4: What is AWS Cloudfront? ββ
**Answer:**
Amazon **CloudFront** is a content delivery network (CDN) offered by Amazon Web Services. Content delivery networks provide a globally-distributed network of proxy servers which cache content, such as web videos or other bulky media, more locally to consumers, thus improving access speed for downloading the content.
**Source:** _en.wikipedia.org_
#### Q5: What do you mean by AMI? What does it include? ββ
**Answer:**
**AMI** stands for the term **Amazon Machine Image**. Itβs an AWS template which provides the information (an application server, and operating system, and applications) required to perform the launch of an instance. This AMI is the copy of the AMI that is running in the cloud as a virtual server. You can launch instances from as many different AMIs as you need. AMI consists of the followings:
* A root volume template for an existing instance
* Launch permissions to determine which AWS accounts will get the AMI in order to launch the instances
* Mapping for block device to calculate the total volume that will be attached to the instance at the time of launch
**Source:** _whizlabs.com_
#### Q6: How can I download a file from EC2? ββ
**Answer:**
Use scp:
```sh
scp -i ec2key.pem username@ec2ip:/path/to/file .
```
**Source:** _stackoverflow.com_
#### Q7: Is it possible to clone a EC2 instance data? ββ
**Answer:**
You can make an AMI of an existing instance, and then launch other instances using that AMI.
**Source:** _stackoverflow.com_
#### Q8: What is AWS Data Pipeline? ββ
**Answer:**
**AWS Data Pipeline** is a web service that you can use to automate the movement and transformation of data. With AWS Data Pipeline, you can define data-driven workflows, so that tasks can be dependent on the successful completion of previous tasks.
**Source:** _docs.aws.amazon.com_
#### Q9: Explain the features of Amazon EC2 services ββ
**Answer:**
Amazon EC2 services have following features:
* Virtual Computing Environments
* Proffers Persistent storage volumes
* Firewall validating you to specify the protocol
* Pre-configured templates
* Static IP address for dynamic Cloud Computing
**Source:** _whizlabs.com_
#### Q10: What is the connection between AMI and Instance? ββ
**Answer:**
Many different types of *instances* can be launched from one *AMI*. The type of an instance generally regulates the hardware components of the host computer that is used for the instance. Each type of instance has distinct computing and memory efficacy.
Once an instance is launched, it casts as host and the user interaction with it is same as with any other computer but we have a completely controlled access to our instances. AWS developer interview questions may contain one or more AMI based questions, so prepare yourself for the AMI topic very well.
**Source:** _whizlabs.com_
#### Q11: Are S3 buckets region specific? ββ
**Answer:**
Yes, buckets exist in a specific region and you need to specify that region when you create a bucket. Amazon S3 creates bucket in a region you specify. You can choose any AWS region that is geographically close to you to optimize latency, minimize costs, or address regulatory requirements.
**Source:** _stackoverflow.com_
#### Q12: What is AWS Direct Connect? ββ
**Answer:**
**AWS Direct Connect** bypasses the public Internet and establishes a secure, dedicated connection from your infrastructure into AWS. With established connectivity via AWS Direct Connect, you can access your Amazon VPC and all AWS services.
**Source:** _coresite.com_
#### Q13: What is AWS EBS? ββ
**Answer:**
**Amazon Elastic Block Store** (Amazon EBS) provides persistent block storage volumes for use with Amazon EC2 instances in the AWS Cloud. Each Amazon EBS volume is automatically replicated within its Availability Zone to protect you from component failure, offering high availability and durability.
**Source:** _aws.amazon.com_
#### Q14: What is AWS Lambda? ββ
**Answer:**
**AWS Lambda** is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you. You can use AWS Lambda to extend other AWS services with custom logic, or create your own back-end services that operate at AWS scale, performance, and security.
**Source:** _aws.amazon.com_
#### Q15: What is AWS DynamoDB? ββ
**Answer:**
**Amazon DynamoDB** is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. With DynamoDB, you can create database tables that can store and retrieve any amount of data, and serve any level of request traffic.
**Source:** _docs.aws.amazon.com_
#### Q16: What is AWS EMR? ββ
**Answer:**
**Amazon Elastic MapReduce (EMR)** is an Amazon Web Services (AWS) tool for big data processing and analysis. Amazon EMR offers the expandable low-configuration service as an easier alternative to running in-house cluster computing.
Amazon EMR is based on Apache Hadoop, a Java-based programming framework that supports the processing of large data sets in a distributed computing environment. MapReduce is a software framework that allows developers to write programs that process massive amounts of unstructured data in parallel across a distributed cluster of processors or stand-alone computers.
**Source:** _searchaws.techtarget.com_
#### Q17: Is data stored in S3 is always encrypted? ββ
**Answer:**
By default data on S3 is not encrypted, but all you could enable server-side encryption in your object metadata when you upload your data to Amazon S3. As soon as your data reaches S3, it is encrypted and stored.
**Source:** _aws.amazon.com_
#### Q18: Can we attach single EBS to multiple EC2s same time? ββ
**Answer:**
No. After you create a volume, you can attach it to any EC2 instance in the same Availability Zone. An EBS volume can be attached to **only one EC2 instance at a time**, but multiple volumes can be attached to a single instance.
**Source:** _docs.aws.amazon.com_
#### Q19: What is AWS API gateway? ββ
**Answer:**
Amazon **API Gateway** is an AWS service that enables developers to create, publish, maintain, monitor, and secure APIs at any scale. You can create APIs that access AWS or other web services, as well as data stored in the AWS Cloud.
**Source:** _aws.amazon.com_
#### Q20: What is AWS Direct Connect? ββ
**Answer:**
Using **AWS Direct Connect**, you can establish private connectivity between AWS and your datacenter, office, or colocation environment, which in many cases can reduce your network costs, increase bandwidth throughput, and provide a more consistent network experience than Internet-based connections.
**Source:** _aws.amazon.com_
#### Q21: What are the security best practices for Amazon EC2 instances? βββ
Read answer on π FullStack.Cafe
#### Q22: Can I automatically start and terminate my Amazon instance using Amazon API? βββ
Read answer on π FullStack.Cafe
#### Q23: Can we still continue working on EBS while creating snapshot of it? βββ
Read answer on π FullStack.Cafe
#### Q24: What is AWS Auto Scaling? βββ
Read answer on π FullStack.Cafe
#### Q25: What is AWS Auto Scaling group? βββ
Read answer on π FullStack.Cafe
#### Q26: What is the maximum size of a single S3 object? βββ
Read answer on π FullStack.Cafe
#### Q27: What is AWS bucket policy? βββ
Read answer on π FullStack.Cafe
#### Q28: Does AWS has the option for vertical "auto" scaling of EC2 instance? βββ
Read answer on π FullStack.Cafe
#### Q29: What is AWS WAF? What are the potential benefits of using WAF? βββ
Read answer on π FullStack.Cafe
#### Q30: How to get the instance id from within an EC2 instance? βββ
Read answer on π FullStack.Cafe
#### Q31: What is AWS Cloudwatch? βββ
Read answer on π FullStack.Cafe
#### Q32: What is the difference between Amazon EC2 and AWS Elastic Beanstalk? βββ
Read answer on π FullStack.Cafe
#### Q33: How many storage options are there for EC2 Instance? βββ
Read answer on π FullStack.Cafe
#### Q34: What is AWS Route 53? ββββ
Read answer on π FullStack.Cafe
#### Q35: How would you implement vertical auto scaling of EC2 instance? ββββ
Read answer on π FullStack.Cafe
#### Q36: What is Amazon Kinesis? ββββ
Read answer on π FullStack.Cafe
#### Q37: How to find a region from within an EC2 instance? ββββ
Read answer on π FullStack.Cafe
#### Q38: Where are EC2 snapshots stored? ββββ
Read answer on π FullStack.Cafe
#### Q39: When should one use the following: Amazon EC2, Google App Engine, Microsoft Azure and Salesforce.com? ββββ
Read answer on π FullStack.Cafe
#### Q40: When to use Amazon CloudFront and when S3? ββββ
Read answer on π FullStack.Cafe
#### Q41: Our EC2 micro instance occasionally runs out of memory. Other than using a larger instance size, what else can be done? βββββ
Read answer on π FullStack.Cafe
#### Q42: What is difference between Lightsail and EC2? βββββ
Read answer on π FullStack.Cafe
#### Q43: What is the underlying hypervisor for EC2? βββββ
Read answer on π FullStack.Cafe
#### Q44: How to safely upgrade an Amazon EC2 instance from t1.micro to large? βββββ
Read answer on π FullStack.Cafe
## [[β¬]](#toc) Agile & Scrum Interview Questions
#### Q1: What is ASP.NET MVC? β
**Answer:**
ASP.NET MVC is a web application Framework. It is light weight and highly testable Framework. MVC separates application into three componentsβββModel, View and Controller.
**Source:** _medium.com_
#### Q2: What is Scrum? β
**Answer:**
**Scrum** is one of the most popular frameworks for implementing *Agile*. Many people think scrum and agile are the same thing but they're not.
With scrum, the product is built in a series of fixed-length iterations called sprints that give teams a framework for shipping software on a regular cadence.
**Source:** _atlassian.com_
#### Q3: What is sprint in Scrum? β
**Answer:**
In the Scrum methodology a **sprint** is the basic unit of development. Scrum sprints correspond to Agile iterations.
Each sprint starts with
* a **planning meeting**, where the tasks for the sprint are identified and an estimated commitment for the **sprint goal** is made.
A Sprint ends with
* a **review or retrospective meeting** where the progress is reviewed and lessons for the next sprint are identified. During each sprint, the team creates finished portions of a product.
**Source:** _stackoverflow.com_
#### Q4: Name roles in Scrum β
**Answer:**
Three essential roles for scrum success are:
* **The Product Owner** are the champions for their product. They are focused on understanding business and market requirements, then prioritizing the work to be done by the engineering team accordingly.
* ** The Scrum Master** are the champion for scrum within their team. They coach the team, the product owner, and the business on the scrum process and look for ways to fine-tune their practice of it.
* **The Scrum Team** are the champions for sustainable development practices. Scrum teams are cross-functional, "the development team" includes testers, designers, and ops engineers in addition to developers.
**Source:** _atlassian.com_
#### Q5: What is User Stories? β
**Answer:**
**User stories** are features customers might want to see in their software. They are written on index cards to encourage face-to-face communication. Typically no more than a couple days work, they form the basis of our Agile plans.
#### Q6: What is an epic, user stories and task? β
**Answer:**
**Epic:** A customer described software feature that is itemized in the product backlog is known as epic. Epics are sub-divided into stories.
**User Stories:** From the client perspective user stories are prepared which defines project or business functions, and it is delivered in a particular sprint as expected.
**Task:** Further down user stories are broken down into different task
**Source:** _career.guru99.com_
#### Q7: Explain what is Refactoring? β
**Answer:**
To improve the performance, the existing code is modified; this is re-factoring. During re-factoring the code functionality remains same.
**Source:** _career.guru99.com_
#### Q8: What is an Agile iteration? β
**Answer:**
An Agile **iteration** is a short one to two week period where a team takes most important user stories, builds them completely and deliver as running-tested-software to the customer. Analysis, design, coding, testing happen during an iteration.
#### Q9: Name some types of meetings or ceremonies in Scrum ββ
**Answer:**
Scrum calls for four ceremonies that bring structure to each sprint:
* **Sprint planning**: A team planning meeting that determines what to complete in the coming sprint.
* **Daily stand-up**: Also known as a daily scrum, a 15-minute mini-meeting for the software team to sync.
* **Sprint demo**: A sharing meeting where the team shows what they've shipped in that sprint.
* **Sprint retrospective**: A review of what did and didn't go well with actions to make the next sprint better.
**Source:** _atlassian.com_
#### Q10: If a timebox plan needs to be reprioritized who should re-prioritise it? ββ
**Answer:**
If a timebox plan needs to be reprioritized it should include whole team, product owner, and developers.
**Source:** _career.guru99.com_
#### Q11: Mention the key difference between sprint backlog and product backlog? ββ
**Answer:**
* **Product backlog**: It contains a list of all desired features and is owned by the product owner
* **Sprint backlog**: It is a subset of the product backlog owned by development team and commits to deliver it in a sprint. It is created in Sprint Planning Meeting
**Source:** _career.guru99.com_
#### Q12: What is Agile? ββ
**Answer:**
**Agile** is a time boxed, **iterative approach (framework) to software delivery** that builds software incrementally from the start of the project, instead of trying to deliver it all at once near the end.
It works by breaking projects down into little bits of user functionality called **user stories**, prioritizing them, and then continuously delivering them in short two week cycles called **iterations**.
Agile refers to any process that aligns with the concepts of the [Agile Manifesto](http://agilemanifesto.org/).
**Source:** _agilemanifesto.org_
#### Q13: Explain in Agile, burn-up and burn-down chart? ββ
**Answer:**
To track the project progress burnup and burn down, charts are used
* Burnup Chart: It shows the progress of stories done over time
* Burndown Chart: It shows how much work was left to do overtime
**Source:** _career.guru99.com_
#### Q14: What is Sprint Planning? ββ
**Answer:**
The work to be performed in the Sprint is planned at the **Sprint Planning**. This plan is created by the collaborative work of the entire Scrum Team.
Sprint Planning answers the following:
* What can be delivered in the Increment resulting from the upcoming Sprint?
* How will the work needed to deliver the Increment be achieved?
The Sprint Goal is an objective set for the Sprint that can be met through the implementation of Product Backlog.
**Source:** _scrum.org_
#### Q15: Explain difference between a Product and a Sprint Backlog ββ
**Answer:**
* The **Product Backlog** is an ordered list of everything that is known to be needed in the product. It is the single source of requirements for any changes to be made to the product.
* The **Sprint Backlog** is the set of Product Backlog items selected for the Sprint during the Sprint Planning, plus a plan for delivering the product Increment and realizing the Sprint Goal.
**Source:** _scrum.org_
#### Q16: What is story points/efforts/ scales? ββ
**Answer:**
It is used to discuss the difficulty of the story without assigning actual hours. The most common scale used is a Fibonacci sequence (1, 2, 3, 5, 8,1 3,β¦.100) although some teams use linear scale (1, 2, 3, 4β¦.), Powers of 2 (1, 2, 4, 8β¦β¦) and cloth size (XS, S ,M, L, XL)
**Source:** _career.guru99.com_
#### Q17: How is Agile different from other software delivery aproaches? ββ
**Answer:**
* Analysis, design, coding, and testing are continuous activities
* Development is iterative
* Planning is adaptive
* Roles blur
* Scope can vary
* Requirements can change
* Working software is the primary measure of success
#### Q18: Have you ever used Scrum Task Board? ββ
**Answer:**
In Scrum the *task board* is a visual display of the progress of the Scrum team during a sprint. It presents a snapshot of the current sprint backlog allowing everyone to see which tasks remain to be started, which are in progress and which are done.
Consider the following layout of the task board:
- Stories
- To Do
- In Progress
- Testing
- Done
**Source:** _manifesto.co.uk_
#### Q19: Explain what does it mean by product roadmap? ββ
**Answer:**
A **product roadmap** is referred for the holistic view of product features that create the product vision.
**Source:** _career.guru99.com_
#### Q20: Explain what is Velocity in Agile? ββ
**Answer:**
**Velocity** is a metric that is calculated by addition of all efforts estimates related with user stories completed in an iteration. It figures out how much work Agile can complete in a sprint and how much time will it need to finish a project.
**Source:** _career.guru99.com_
#### Q21: Mention what should a burndown chart should highlight? ββ
**Answer:**
The burn-down chart shows the remaining work to complete before the timebox (iteration) ends.
**Source:** _career.guru99.com_
#### Q22: What is test driven development? ββ
**Answer:**
**Test driven development (TDD)** is also known as test-driven design. In this method, developer first writes an automated test case which describes new function or improvement and then creates small codes to pass that test, and later re-factors the new code to meet the acceptable standards.
**Source:** _career.guru99.com_
#### Q23: Explain what is Scrum ban? βββ
Read answer on π FullStack.Cafe
#### Q24: What does project velocity mean? βββ
Read answer on π FullStack.Cafe
#### Q25: Can you explain the purpose of a burndown chart? βββ
Read answer on π FullStack.Cafe
#### Q26: What is the Agile Manifesto? βββ
Read answer on π FullStack.Cafe
#### Q27: What does the Scrum Framework consist from? βββ
Read answer on π FullStack.Cafe
#### Q28: What are four Agile Manifesto values? βββ
Read answer on π FullStack.Cafe
#### Q29: Explain the difference between Extreme programming and Scrum? βββ
Read answer on π FullStack.Cafe
#### Q30: What are some methodologies used to implement Agile? βββ
Read answer on π FullStack.Cafe
#### Q31: Mention what are the challenges involved in Agile software development? βββ
Read answer on π FullStack.Cafe
#### Q32: What are the qualities of a good Agile tester should have? βββ
Read answer on π FullStack.Cafe
#### Q33: What is a Sprint Review? βββ
Read answer on π FullStack.Cafe
#### Q34: What is Acceptance Criteria? βββ
Read answer on π FullStack.Cafe
#### Q35: Mention what are the advantages of maintaining consistent iteration length throughout the project? βββ
Read answer on π FullStack.Cafe
#### Q36: Mention in detail what are the roleβs of Scrum Master? βββ
Read answer on π FullStack.Cafe
#### Q37: Mention what is the difference between Scrum and Agile? ββββ
Read answer on π FullStack.Cafe
#### Q38: Mention what are the Agile quality strategies? ββββ
Read answer on π FullStack.Cafe
#### Q39: Why Continuous Integration is important for Agile? ββββ
Read answer on π FullStack.Cafe
#### Q40: What is a Sprint Retrospective? ββββ
Read answer on π FullStack.Cafe
#### Q41: What are the Scrum values? ββββ
Read answer on π FullStack.Cafe
#### Q42: What the Scrum theory is based on? ββββ
Read answer on π FullStack.Cafe
#### Q43: When not to use Agile? ββββ
Read answer on π FullStack.Cafe
#### Q44: In Agile mention what is the difference between the Incremental and Iterative development? ββββ
Read answer on π FullStack.Cafe
#### Q45: Explain how you can measure the velocity of the sprint with varying team capacity? ββββ
Read answer on π FullStack.Cafe
#### Q46: What is Scrum Increment? ββββ
Read answer on π FullStack.Cafe
#### Q47: Explain main differences between Scrum and Agile? ββββ
Read answer on π FullStack.Cafe
#### Q48: Name the 12 Agile Principles ββββ
Read answer on π FullStack.Cafe
#### Q49: What are the benefits of Burn Up chart? βββββ
Read answer on π FullStack.Cafe
#### Q50: What is the Scrum's definition of "Done"? βββββ
Read answer on π FullStack.Cafe
#### Q51: Provide some examples of burn-up chart βββββ
Read answer on π FullStack.Cafe
#### Q52: Explain what is Spike and Zero sprint in Agile? What is the purpose of it? βββββ
Read answer on π FullStack.Cafe
## [[β¬]](#toc) Android Interview Questions
#### Q1: Mention the difference between RelativeLayout and LinearLayout? β
**Answer:**
* **Linear Layout** β Arranges elements either vertically or horizontally. i.e. in a row or column.
* **Relative Layout** β Arranges elements relative to parent or other elements.
**Source:** _android.jlelse.eu_
#### Q2: What is the difference between Bitmap and Drawable in Android? β
**Answer:**
* A **Bitmap** is a representation of a bitmap image (something like java.awt.Image).
* A **Drawable** is an abstraction of "something that can be drawn". It could be a Bitmap (wrapped up as a BitmapDrawable), but it could also be a solid color, a collection of other Drawable objects, or any number of other structures.
**Source:** _stackoverflow.com_
#### Q3: What is a difference between Spannable and String? β
**Answer:**
A **Spannable** allows to attach formatting information like bold, italic, ... to sub-sequences ("spans", thus the name) of the characters. It can be used whenever you want to represent "rich text".
**Source:** _stackoverflow.com_
#### Q4: What is an Activity? β
**Answer:**
An **activity** provides the window in which the app draws its UI. This window typically fills the screen, but may be smaller than the screen and float on top of other windows. Generally, one activity implements one screen in an app. For instance, one of an appβs activities may implement a Preferences screen, while another activity implements a Select Photo screen.
**Source:** _github.com_
#### Q5: What is Armv7? ββ
**Answer:**
There are 3 CPU architectures in Android:
* **_ARMv7_** is the most common as it is optimised for battery consumption.
* **_ARM64_** is an evolved version of that that supports 64-bit processing for more powerful computing.
* **_ARMx86_**, is the least used for these three, since it is not battery friendly. It is more powerful than the other two.
**Source:** _android.jlelse.eu_
#### Q6: Explain activity lifecycle ββ
**Answer:**
As a user navigates through, out of, and back to your app, the Activity instances in your app transition through different states in their lifecycle.
To navigate transitions between stages of the activity lifecycle, the Activity class provides a core set of six callbacks: `onCreate()`, `onStart()`, `onResume()`, `onPause()`, `onStop()`, and `onDestroy()`. The system invokes each of these callbacks as an activity enters a new state.
**Source:** _developer.android.com_
#### Q7: How can I get the context in a fragment? ββ
**Answer:**
You can use `getActivity()`, which returns the activity associated with a fragment. The activity is a context (since Activity extends `Context`).
You can also override the `onAttach` method of fragment:
```java
public static class DummySectionFragment extends Fragment{
...
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
DBHelper = new DatabaseHelper(activity);
}
}
```
**Source:** _stackoverflow.com_
#### Q8: What is View Group? How are they different from Views? ββ
**Answer:**
**View:** View objects are the basic building blocks of User Interface(UI) elements in Android. View is a simple rectangle box which responds to the userβs actions. Examples are EditText, Button, CheckBox etc. View refers to the `android.view.View` class, which is the base class of all UI classes.
**ViewGroup:** ViewGroup is the invisible container. It holds View and ViewGroup. For example, LinearLayout is the ViewGroup that contains Button(View), and other Layouts also. ViewGroup is the base class for Layouts.
**Source:** _android.jlelse.eu_
#### Q9: Is it possible to implement the modelβviewβcontroller pattern in Java for Android? ββ
**Answer:**
In Android you **don't have MVC**, but you have the following:
* You define your user interface in various XML files by resolution, hardware, etc.
* You define your resources in various XML files by locale, etc.
* You extend clases like ListActivity, TabActivity and make use of the XML file by inflaters.
* You can create as many classes as you wish for your business logic.
* A lot of Utils have been already written for you - DatabaseUtils, Html.
**Source:** _stackoverflow.com_
#### Q10: Whatβs the difference between onCreate() and onStart()? ββ
**Answer:**
* The `onCreate()` method is called once during the Activity lifecycle, either when the application starts, or when the Activity has been destroyed and then recreated, for example during a configuration change.
* The `onStart()` method is called whenever the Activity becomes visible to the user, typically after `onCreate()` or `onRestart()`.
**Source:** _android.jlelse.eu_
#### Q11: Explain the build process in Android ββ
**Answer:**
1. First step involves compiling the resources folder (/res) using the aapt (android asset packaging tool) tool. These are compiled to a single class file called R.java. This is a class that just contains constants.
2. Second step involves the java source code being compiled to .class files by javac, and then the class files are converted to Dalvik bytecode by the βdxβ tool, which is included in the sdk βtoolsβ. The output is classes.dex.
3. The final step involves the android apkbuilder which takes all the input and builds the apk (android packaging key) file.
**Source:** _android.jlelse.eu_
#### Q12: What is an Intent in Android? ββ
**Answer:**
An Intent is basically a message that is passed between components (such as Activities, Services, Broadcast Receivers, and Content Providers).So, it is almost equivalent to parameters passed to API calls. The fundamental differences between API calls and invoking components via intents are:
* API calls are synchronous while intent-based invocations are asynchronous.
* API calls are compile-time binding while intent-based calls are run-time binding.
To listen for an broadcast intent (like the phone ringing, or an SMS is received), you implement a **broadcast receiver**, which will be passed the intent. To declare that you can handle another's app intent like "take picture", you declare an intent filter in your app's manifest file.
If you want to fire off an intent to do something, like pop up the dialer, you fire off an intent saying you will.
An Intent provides a facility for performing late runtime binding between the code in different applications.
**Source:** _stackoverflow.com_
#### Q13: What is the most appropriate way to store user settings in Android application? ββ
**Answer:**
In general **SharedPreferences** are your best bet for storing preferences, so in general I'd recommend that approach for saving application and user settings.
The only area of concern here is what you're saving. Passwords are always a tricky thing to store, and I'd be particularly wary of storing them as clear text. The Android architecture is such that your application's SharedPreferences are sandboxed to prevent other applications from being able to access the values so there's some security there, but physical access to a phone could potentially allow access to the values.
**Source:** _stackoverflow.com_
#### Q14: In what situation should one use RecyclerView over ListView? ββ
**Answer:**
**RecyclerView** was created as a **ListView** improvement, so yes, you can create an attached list with **ListView** control, but using **RecyclerView** is easier as it:
* Reuses cells while scrolling up/down - this is possible with implementing View Holder in the ListView adapter, but it was an optional thing, while in the RecycleView it's the default way of writing adapter.
* Decouples list from its container - so you can put list items easily at run time in the different containers (linearLayout, gridLayout) with setting LayoutManager.
To conclude, **RecyclerView** is a more flexible control for handling "list data" that follows patterns of delegation of concerns and leaves for itself only one task - recycling items.
**Source:** _stackoverflow.com_
#### Q15: Explain briefly all the Android application components ββ
**Answer:**
**App components** are the essential building blocks of an Android app. Each component is an entry point through which the system or a user can enter your app.
There are four different types of app components:
* **Activities** - An activity is the entry point for interacting with the user. It represents a single screen with a user interface.
* **Services** - A service is a general-purpose entry point for keeping an app running in the background for all kinds of reasons. It is a component that runs in the background to perform long-running operations or to perform work for remote processes.
* **Broadcast receivers** - A broadcast receiver is a component that enables the system to deliver events to the app outside of a regular user flow, allowing the app to respond to system-wide broadcast announcements.
* **Content providers** - A content provider manages a shared set of app data that you can store in the file system, in a SQLite database, on the web, or on any other persistent storage location that your app can access.
**Source:** _developer.android.com_
#### Q16: What is 'Context' on Android? ββ
**Answer:**
The documentation itself provides a rather straightforward explanation: The Context class is an βInterface to global information about an application environment".
We may assume a **Context** is a handle to the system; it provides services like resolving resources, obtaining access to databases and preferences, and so on. An Android app has activities. Context is like a handle to the environment your application is currently running in. The activity object inherits the Context object.
**Source:** _stackoverflow.com_
#### Q17: What is the Dalvik Virtual Machine? ββ
**Answer:**
The **Dalvik Virtual Machine (DVM)** is an android virtual machine optimized for mobile devices. It optimizes the virtual machine for memory, battery life and performance.
The Dex compiler converts the class files into the `.dex` file that run on the Dalvik VM. Multiple class files are converted into one dex file.
**Source:** _www.javatpoint.com_
#### Q18: Tell about Constraint Layout ββ
**Answer:**
**ConstraintLayout** allows you to create large and complex layouts with a flat view hierarchy (no nested view groups). It's similar to **RelativeLayout** in that all views are laid out according to relationships between sibling views and the parent layout, but it's more flexible than RelativeLayout and easier to use with Android Studio's Layout Editor.
Intention of ConstraintLayout is to optimize and flatten the view hierarchy of your layouts by applying some rules to each view to avoid nesting.
**Source:** _developer.android.com_
#### Q19: What is ADB and what is it used for? ββ
**Answer:**
**ADB** is the acronym for Android Debug Bridge, which is part of the Android SDK (Software Development Kit). It uses a client-server-model (i.e. adbd, the ADB daemon, is running on the device and can be connected to), and in most cases is used via an USB connection. It is also possible to use it via WiFi (wireless adb).
There's nothing you need to install on your Android device, as the ADB daemon (adbd) is already integrated into the Android OS. It is usually accessed via a command line interface from the PC, where either the full Android SDK is installed (several 30 MB download archive currently), or a massively stripped-down version for "non-developers", sometimes referred to as "Mini ADB" or "ADB essentials" (for Linux, this is only the adb executable; for Windows it's adb.exe plus two or three .dll files).
**Source:** _developer.android.com_
#### Q20: What is Dalvik? ββ
**Answer:**
**Dalvik** is a Just In Time (JIT) compiler. By the term JIT, we mean to say that whenever you run your app in your mobile device then that part of your code that is needed for execution of your app will only be compiled at that moment and rest of the code will be compiled in the future when needed. The JIT or Just In Time compiles only a part of your code and it has a smaller memory footprint and due to this, it uses very less physical space on your device.
**Source:** _blog.mindorks.com_
#### Q21: What types of Context do you know? ββ
**Answer:**
The are mainly two types of context:
* **Application Context**: It is a