-
Exception handling:
-
software application's reaction and recovery mechanisms in the event of an error.
-
Program or application doesn't crash and Maintains the regular execution flow
-
Recover smoothly
-
Provide us much information for the cause which caused it.
-
If occur again , can send the related data to error queue.
-
-
Performance issue
-
Difference between function and method :
If you have a function that is accessing/muttating the fields of your class, it becomes method. Otherwise, it is a function.
-
What is the difference between abstract class and interface in C#?
multiple inheritance, default implementation, constants,third party convenience, s-a vs -able or can-do, plug-in, homogeneity, speed, terseness, adding functionality
-
When to use an interface instead of an abstract class and vice versa
-
When we talk about abstract classes we are defining characteristics of an object type; specifying what an object is.
-
When we talk about an interface and define capabilities that we promise to provide, we are talking about establishing a contract about what the object can do.
-
An abstract class can have shared state or functionality. An interface is only a promise to provide the state or functionality.
-
A good abstract class will reduce the amount of code that has to be rewritten because it's functionality or state can be shared. The interface has no defined information to be shared.
-
For example, an abstract base class is used for the template method design pattern, whereas an interface is used for the strategy design pattern.
-
An interface is a programming construct that defines a set of methods, properties, and events that a class or struct can implement to provide a certain functionality.
-
An abstract class is a class that is declared abstract---it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed.
-
-
SOLID
-
- code that is logical, easy to read, convenient to maintain and possible to extend. That makes it easy to modify the software, add new features and make it more adaptable.'
-
Single responsibility
-
Open closed principle
-
Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.
-
You should be able to extend a classes behaviour, without modifying it
-
Some ways to do this include Polymorphism/Inheritance, Composition, Inversion of Control (a.k.a. DIP), Aspect-Oriented Programming, Patterns such as Strategy, Visitor, Template Method, and many other principles, patterns, and techniques of OOAD.
-
-
-
Definition : Substitutability is a principle in object-oriented programming stating that, in a computer program, if S is a subtype of T, then objects of type T may be replaced with objects of type S (i.e., an object of type T may be substituted with any object of a subtype S) without altering any of the desirable properties of the program (correctness, task performed, etc.).
-
Let Φ(x) be a property provable about objects x of type T. Then Φ(y) should be true for objects y of type S where S is a subtype of T.
-
some standard requirements
-
Contravariance of method parameter types in the subtype.
-
Covariance of method return types in the subtype.
-
-
restrictions
-
Preconditions cannot be strengthened in the subtype.
-
Postconditions cannot be weakened in the subtype.
-
Invariants must be preserved in the subtype.
-
History constraint
-
-
5 rules of liscove
-
Contravariance of method arguments in sub class and Covariance of return type in sub class
-
No new exception types are allowed to be thrown, unless they are subclasses of previously used ones
-
Preconditions cannot be strengthend in a subclass and Postconditions cannot be weakend in a subclass
-
Invariants of the baseclass must be preserved by the subclass
-
-
-
Interface segregation principle
-
Dependency inversion principle
-
The Dependency Inversion Principle (DIP) is a software design guideline which boils down to two recommendations about de-coupling a class from its concrete dependencies:
-
'High-level modules should not depend on low-level modules. Both should depend on abstractions.'
-
'Abstractions should not depend upon details. Details should depend upon abstractions.'
-
"Abstractions should not depend upon details" is that the design or blueprint of the system should not be influenced by the details of how the individual parts are made or where they come from. The design should only focus on what the parts do and how they fit together to create the desired functionality.
-
"Details should depend upon abstractions" means that the individual parts of the system should be designed in a way that conforms to the overall design or abstraction. This makes it easier to swap out or modify individual parts without affecting the overall functionality of the system, much like being able to swap out Lego pieces without affecting the overall design of the house.
-
-
Dependency Inversion-,Dependency%20Inversion%20Principle%20(DIP),-Dependency%20Inversion%20is) is broadly about de-coupling concrete classes by preventing those classes having any direct reference to each other.
-
boilerplate and singleton
-
subclassing thing
-
-
-
-
A mechanism to invert the dependency from end user class to the beginning.
-
Dependency injection means giving an object its instance variables.
-
Dependency injection is basically providing the objects that an object needs (its dependencies) instead of having it construct them itself.
-
-
Types of Dependency Injection
-
Constructor Injection
-
Property Injection
-
Method Injection
-
-
It involves below type of classes:
-
Client Class: The client class (dependent class) is a class which depends on the service class
-
Service Class: The service class (dependency) is a class that provides service to the client class.
-
Injector Class: The injector class injects the service class object into the client class.
-
-
Why do we need to use this?
-
Loose coupling -- app is not tightly coupled as it is not creating the object.
-
Mock dependency for testing
-
Last principle of solid
-
-
-
What is DI containers and how does they work.
-
A DI Container is a framework to create dependencies and inject them automatically when required. DI Container helps us to manage dependencies within the application in a simple and easy way.
-
a software library that that provides DI functionality and allows automating many of the tasks involved in Object Composition, Interception, and Lifetime Management.
-
Lifecycle of the DI Containers --
-
Register
-
Resolve
-
Dispose
-
-
A Composition Root is a (preferably) unique location in an application where modules are composed together.
-
The Composer is the part of the Composition Root that does the actual construction of the object graphs. It's an important part of the Composition Root. The Composer is often a DI Container, but it can also be any method that constructs object graphs manually.
-
Why do we need it _2- your dependencies chain can become nested, and it quickly becomes unwieldy to wire them up manually. Even with factories, the duplication of your code is just not worth it. DI Container keeps it simple.
-
-
Difference between DI & DIP
-
Dependency Injection is an Inversion of Control technique for supplying objects ('dependencies') to a class by way of the Dependency Injection Design Pattern.
-
The Dependency Inversion Principle (DIP) is a software design guideline which boils down to de-coupling a class from its concrete dependencies
-
Dependency Injection == "Gimme it" and Dependency Inversion == "Someone take care of this for me, somehow.".
-
-
-
-
IoC is a generic term meaning rather than having the application call the methods in a framework, the framework calls implementations provided by the application.
-
It is a practice where you let the actual behavior come from outside of the boundary (Class in Object Oriented Programming). The boundary entity only knows the abstraction (e.g interface, abstract class, delegate in Object Oriented Programming) of it.
-
IoC / DI to me is pushing out dependencies to the calling objects.
-
-
Which problem does it solve?
-
When is it appropriate to use and when not?
-
basic techniques to implement inversion of control. These are:
-
Using a service locator pattern
-
Using dependency injection;
-
Using a contextualized lookup
-
Using the template method design pattern
-
Using the strategy design pattern
-
-
-
Composition Root : A Composition Root is a (preferably) unique location in an application where modules are composed together.
-
Design patterns
Design patterns are typical solutions to commonly occurring problems in software design. They are like pre-made blueprints that you can customize to solve a recurring design problem in your code.
-
Factory Method :
-
What is it - Factory Method is a creational design pattern that provides an interface for creating objects in a superclass, but allows subclasses to alter the,आ%++ type of objects that will be created.
-
allows an interface or a class to create an object, but let's subclasses decide which class or object to instantiate.
-
The Factory Method pattern suggests that you replace direct object construction calls (using the new operator) with calls to a special factory method.
-
Why we use it :
-
Did you use it and what was the scenario ?
-
-
Abstract Factory is a creational design pattern that lets you produce families of related objects without specifying their concrete classes
-
Difference between factory, abstract factory and factory method
-
The Factory Method is a design pattern that relies on inheritance. If you make it static, you can no longer extend it in subclasses, which defeats the purpose of the pattern.
-
When a static creation method returns new objects it becomes an alternative constructor.
-
The Simple factory pattern describes a class that has one creation method with a large conditional that based on method parameters chooses which product class to instantiate and then return.
-
-
Singleton pattern :
-
What is it.
-
Why to use this
-
Advantages and disadvantage
-
Static vs singleton
-
Usages of it
-
-
-
What is it?
-
Why should we use it?
-
Did you use it and what was the scenario ?
-
-
-
What is it?
-
Why should we use it?
-
Did you use it and what was the scenario ?
-
-
-
What is it?
-
Why should we use it?
-
Did you use it and what was the scenario ?
-
-
-
What is it?
-
Why should we use it?
-
Did you use it and what was the scenario ?
-
-
-
What is it?
-
Why should we use it?
-
Did you use it and what was the scenario ?
-
-
What is the Repository Pattern?
-
Repository: Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects.
-
Benefits of the Repository Pattern
-
it abstracts the database behind it or decouples the application from persistence framework.
-
Minimizes duplicate query logic.
-
you can use dependency injection and make your code more testable.
-
queries in a central place; otherwise your queries are scattered around and are harder to maintain.
-
-
how does Repository Pattern work?
- A layer between ORM(or Database) and application which keeps all the queries in one place and easy to maintain. All the calls to ORM or database are made from repository from the different methods.
-
What is the Unit of Work Pattern?- A unit of work maintains a list of object affected by business transaction and coordinates the writing off changes .
-
Does Entity Framework Really Implement Repository and Unit of Work Patterns?
-
DBSet and dbcontext work like repository and Unit of work but EF returns iqueryable which is used to query with different way. So implementing of repository .
-
All the iqueryable all over the app means lots of query and hard to manage
-
-
what is the difference between Repository Pattern and Entity Framework ?
-
EF returns iqueryable while repository not.
-
User can write some query to EF(will translate to DB) but not to repository.
-
-
Why would you want to use a Repository Pattern with an ORM?
-
iqueryable vs ienumerable
-
All the orm query in repository only .
-
Which leads to less duplicate code.
-
Easily replacing the orm
-
-
In OOP, what is the difference between the Repository Pattern and a Service Layer?
-
Is Unit Of Work equals Transaction?
Unit of work is business transcation , not DB transaction.
-
What is an Aggregate Root in the context of Repository Pattern?
-
In the Context of a Repository the Aggregate Root is an Entity with no parent Entity. It contains zero, One or Many Child Entities whose existence is dependent upon the Parent for it's identity. That's a One To Many relationship in a Repository. Those Child Entities are plain Aggregates.
-
Aggregate Root is the mothership entity inside the aggregate (in our case Computer), it is a common practice to have your repository only work with the entities that are Aggregate Roots, and this entity is responsible for initializing the other entities.
-
-
How should I be grouping my Repositories when using Repository Pattern?
-
if entity shouldn't live alone. if it's just an entity, it doesn't need a repository, it should be updated/created/retrieved through repository of aggregate root it belongs.
-
Is Repository Pattern as same as Active Record Pattern?
Active Record Pattern defines An object that wraps a row in a database table or view, encapsulates the data access, and adds domain logic on that data.
In the Repository pattern all of the data access is put in a separate class and is accessed via instance methods.
-
What is relationship between Repository and Unit of Work?
- One Unit of work contains many repository and complete after the business transaction.
-
Is the repository pattern useful with Entity Framework Core?
- No, the repository/unit-of-work pattern (shortened to Rep/UoW) isn't useful with EF Core. EF Core already implements a Rep/UoW pattern, so layering another Rep/UoW pattern on top of EF Core isn't helpful.
-
-
-
What is SDLC and what is it used for?
-
What are the different types of SDLC methodologies?
-
What are the different phases of the Waterfall model?
-
What is CMM Maturity Level and what is its importance?
-
What are the drawbacks of Waterfall model?
-
Who are the different team members involved in the different phases of the Waterfall model?
-
What are LLDs or HLDs in SDLC?
-
What are the different phases in the Agile model?
-
What are the advantages of the agile model?
-
What is a V-shaped model in SDLC?
-
-
What is Azure Dev Ops?
-
What is ci cd and repo,build,release in dev ops?
-
What is repository ?
-
What is a Build , debugger ?
-
Ef
-
What is ADO.Net EF?
-
How does the entity framework is differ from ADO.Net?
-
List and explain the components of the entity framework.
-
Functions of entity framework.
-
List out the primary parts of the entity data model.
-
What is migration in the entity framework?
-
What are the types of inheritance in the entity framework?
-
How to load related entities?
-
What is the difference between entity framework and LINQ?
-
List out approaches used in the Entity framework.
-
-
Rest APi
-
What is REST?
REST, or REpresentational State Transfer, is an architectural style for providing standards between computer systems on the web, making it easier for systems to communicate with each other.
-
What is a REST API?
An API, or application programming interface, is a set of rules that define how applications or devices can connect to and communicate with each other. A REST API is an API that conforms to the design principles of the REST, or representational state transfer architectural style.
-
What are the principles of REST?
-
Stateless
-
client server,
-
uniform interface
All API requests for the same resource should look the same, no matter where the request comes from. The REST API should ensure that the same piece of data, such as the name or email address of a user, belongs to only one uniform resource identifier (URI).
-
cacheble,
-
layered system,
-
code on deman
-
-
What does it mean for an API to be stateless?
-
Which protocol do REST APIs use?
-
Which markup languages are primarily used to represent resources in REST APIs?
-
Which HTTP request methods are supported by REST?
-
What is the difference between the POST method and the PUT method?
-
What is CRUD?
-
What is messaging in the context of REST?
-
What are the main parts of an HTTP request?
-
What are the main parts of an HTTP response?
-
What are some common HTTP response status codes you might see when working with a REST API?
-
What is a resource?
-
What is a URI?
-
What is caching?
-
What is payload?
-
What's a real-world example of a REST API?
-
What is the difference between REST and SOAP?
-
What is the difference between REST and AJAX?
-
What are some benefits of REST?
-
What are some drawbacks of REST?
-
How do you test APIs?
-
How do you keep REST APIs secure?
-
What are some main characteristics of REST?
-
-
Micro service
-
MVC
-
What is MVC Life Cycle? Explain in detail?
-
Explain the difference between MVC and three-layered architecture?
-
Name the different types of controller action methods?
-
Explain the function of beforFilter(),beforeRender and afterFilter in Controller?
-
What are the filters? Name a few MVC filters?
-
Explain the difference between ViewData and ViewBag?
-
Name the three segments that are important in routing?
-
What is MVC Scaffolding?
-
What is a partial view in MVC?
-
What is the difference between TempData and ViewData? Will data be preserved in TempData in the next request as well?
-
-
SQL Server
-
What is SQL? Describe the importance of SQL in RDBMS?
-
Structured query language (SQL) is a programming language for storing and processing information in a relational database.
-
RDBMS stands for Relational DataBase Management System.
-
A database management system supports the development, administration and use of database platforms through sql
-
-
What is the difference between SQL and PL/SQL?
-
SQL is a non-procedural language that executes a single query at a time whereas, PL/SQL is a procedural language and executes blocks of code at once which helps reduce traffic and increases processing speed.
-
Sql does not support variable, conditional and iterative constructs.
-
-
What are the main components of SQL?
-
DATA DEFINITION LANGUAGE
-
DATA MANIPULATION LANGUAGE
-
DATA CONTROL LANGUAGE
-
TRANSACTIONAL CONTROL LANGUAGE
-
DATA QUERY LANGUAGE
-
-
What is the difference between delete and truncate commands?
-
Delete -- DML, can contains where
-
TRUNCATE is a DDL(Data Definition Language) , delete all the rows , fast
-
-
Write a SQL query to find the 3rd highest salary from the table without using the TOP/limit keyword?
-
How will you perform pattern matching operations in SQL?
- Like with wildcards
-
Write a query to get employee names ending with a vowel?
- LIKE '%[AEIOU]'
-
How will you copy rows from one table to another table?
-
What is the difference between the 'WHERE' clause and the 'HAVING' clause?
-
How will you get a first name, salary, and round the salary to thousands?
-
Display the first name and experience of the employees?
-
Write a query to get the first name and last name after converting the first letter of each name to upper case and the rest to lower case?
-
Display the length of the first name for employees where the last name contain the character 'b' after the 3rd position?
-
Change the salary of employee 115 to 8000 if the existing salary is less than 6000?
-
How will you Insert a new employee into employees with all the required details?
-
Display employees who joined in the month of May?
-
What is the meaning of TRIGGER in SQL?
-
DML Events
-
DDL Events
-
LOGON Event
-
-
-
Oracle
-
Find the error from the below SQL Query?
-
What is Semijoin? How to implement it in SQL?
-
What is PL/SQL?
-
How to handle errors in PL/SQL?
-
What are the constraints? How to add a named PRIMARY KEY constraint in SQL?
-
What are savepoints?
-
What is BLOB?
-
Find the error in the below code snippet if any?
-
Write a query to display a list of tables owned by the user.
-
What is dynamic SQL? When to use dynamic SQL?
-
What is a database trigger? How to create it?
-
Tell me about set operations in SQL?
-
What is the answer to the below query? Additionally, implement a correction so that the query below behaves as expected?
-
What is the purpose of COALESCE and NVL functions?
-
What is the use of HAVING clause?
-
-
Databases
- what is index
A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of additional writes and storage space to maintain the index data structure.
index is a copy of selected columns of data, from a table, that is designed to enable very efficient search.
An index normally includes a "key" or direct link to the original row of data from which it was copied, to allow the complete row to be retrieved efficiently.
-
What do you understand by the terms Entity, Entity Type, and Entity Set in DBMS?
-
What are relationships and mention different types of relationships in the DBMS
-
What is concurrency control?
-
What are the different levels of abstraction in the DBMS?
-
What is normalization and what are the different types of normalization?
-
What are the different types of keys in the database?
-
What is the difference between two and three-tier architectures?
-
Mention the differences between Unique Key and Primary Key
-
Mention the differences between Trigger and Stored Procedures
-
What are the differences between Hash join, Merge join and Nested loops?
-
What are indexes? Mention the differences between the clustered and non-clustered index
-
What do you understand by cursor? Mention the different types of cursor.
-
Explain what is a deadlock and mention how it can be resolved?
-
Mention the differences between UNION and UNION ALL
-
What do you understand by CLAUSE in SQL?
-
Mention the differences between HAVING and WHERE clause?
-
What are joins in SQL and what are the different types of joins?
-
What is a view
-
.Net core
-
C#
-
benefits of async
-
why to do it
-
did you implement it
-
what was the scenario
-
covariant and contravariant functional and actional delegates
-
builder , adapter , repository problem statement and solution with pattern
-
What are queues.
-
Database queues
-
Active MQ