Professional Documents
Culture Documents
Date: 24/02/2023
Description:
The .NET SDK is a set of libraries and tools that allow developers to create .NET
applications and libraries. It contains the following components that are used to build
and run applications:
● The .NET CLI:
The .NET command-line interface (CLI) is a cross-platform toolchain for
developing, building, running, and publishing .NET applications.
● The .NET runtime and libraries:
The .NET runtime, which is installed on a machine for use by
framework-dependent apps, has an expansive standard set of class libraries,
known as runtime libraries, framework libraries, or the base class library
(BCL).
● The dotnet driver:
The driver is named dotnet and has two responsibilities, either running a
framework-dependent app or executing a command.
.NET Core and .NET 5 and later projects are associated with a software development
kit (SDK). Each project SDK is a set of MSBuild targets and associated tasks that are
responsible for compiling, packing, and publishing code. A project that references a
project SDK is sometimes referred to as an SDK-style project.
Practical No: 2
Date: 21/03/2023
Description:
Overall, the MVC pattern is a popular software design pattern that provides a clear
separation of concerns and promotes code reusability and scalability.
Practical No: 3
Date: 10/04/2023
Aim: Working with Docker hub.
Description:
Give Overview of Docker:
Docker is an open-source platform that allows developers to package and deploy
applications in lightweight, portable containers. These containers provide a consistent
runtime environment, regardless of the underlying infrastructure.
One of the key benefits of Docker is its portability. Containers can be easily moved
between environments, such as development, testing, and production, without
requiring changes to the application code. This makes it easier to maintain consistency
and reduce the risk of configuration issues.
Docker also provides a centralized repository for storing and sharing container
images, called Docker Hub. Developers can use pre-built images from Docker Hub to
quickly spin up new instances of applications or build their own images and share
them with others.
Date: 11/04/2023
Aim: Working with Docker Desktop App.
Description:
Give Overview of Docker Desktop App
Container:
A container packages up code and its dependencies so the application runs quickly
and reliably from one computing environment to another.
By default, a container is relatively well isolated from other containers and its host
machine. You can control how isolated a container’s network, storage, or other
underlying subsystems are from other containers or from the host machine.
Image:
An image is a read-only template with instructions for creating a Docker container.
You might create your own images or you might only use those created by others and
published in a registry. To build your own image, you create a Dockerfile with a
simple syntax for defining the steps needed to create the image and run it.
Volumes:
Volumes are the preferred mechanism for persisting data generated by and used by
Docker containers.
Volumes are easier to back up or migrate than bind mounts.
You can manage volumes using Docker CLI commands or the Docker API.
Volumes work on both Linux and Windows containers.
Volumes can be more safely shared among multiple containers.
Volume drivers let you store volumes on remote hosts or cloud providers, to encrypt
the contents of volumes, or to add other functionality.
New volumes can have their content pre-populated by a container.
Volumes on Docker Desktop have much higher performance than bind mounts from
Mac and Windows hosts.
Practical No: 5
Date: 12/04/2023
Aim: Building ASP.Net core REST API
Description:
ASP.NET Core is a modern, cross-platform framework for building web applications,
including RESTful APIs. REST (Representational State Transfer) is a software
architectural style that defines a set of constraints for creating web services. RESTful
APIs are a popular approach for creating web services that conform to these
constraints, making them simple, scalable, and loosely coupled.
ASP.NET Core REST APIs use HTTP methods (GET, POST, PUT, DELETE) to
perform CRUD (Create, Read, Update, Delete) operations on resources exposed by
the API. The framework provides an easy way to build APIs with features such as
routing, input validation, and serialization of JSON/XML data.
The API can be consumed by clients such as web applications, mobile apps, or other
services. Clients send requests to the API and receive responses in the requested
format. The responses can be in JSON, XML, or other formats. APIs can also provide
authentication and authorization mechanisms to control access to resources.
Overall, ASP.NET Core REST APIs are a powerful and flexible way to build modern
web services that can be consumed by a wide range of clients. With its rich features
and cross-platform support, ASP.NET Core is a popular choice for developing
RESTful APIs in the .NET ecosystem.
Practical No: 6
Date: 13/04/2023
Aim: Working with Members API of TeamService
Description:
The Members API of TeamService is a RESTful API that allows users to perform
CRUD (Create, Read, Update, Delete) operations on the members of a team. The API
appears to be using the HTTP protocol with JSON as the data format.
The API allows users to create new members with an ID, first name, and last name, as
well as retrieve member details by ID or retrieve all members of a specific team. It
also supports updating member details, such as changing their first or last name, and
deleting members from a team.
● Clients can create a new member by sending a POST request to the endpoint
‘/teams/{teamId}/members’ with a JSON payload containing the member's details.
● Clients can retrieve all members of a team by sending a GET request to the
endpoint ‘/teams/{teamId}/members’, or
Retrieve the details of a specific member by sending a GET request to the endpoint
‘/teams/{teamId}/members/{memberId}’.
● Clients can update the details of a member by sending a PUT request to the
endpoint ‘/teams/{teamId}/members/{memberId}’ with a JSON payload
containing the updated details.
● Clients can delete a member by sending a DELETE request to the endpoint
‘/teams/{teamId}/members/{memberId}’.
Date: 17/04/2023
Aim: Running Location Service
Description:
Building the services:
• We also want to maintain and query the locations of all of our team members.
• Upgrade the team service to contain locations.
• It makes more sense to put the responsibility of location management into its
own service.
• This service will manage the location history of individuals (without regard for
their team membership).
• We can add location events to a person, query location history, and as a
convenience we can also query for the current location of any individual for
whom we have location data.
• Eg: the public API for the location service
Description:
Practical No: 9
Date: 19/04/2023
Aim: Building an ASP.NET Core Web Application & Invoking REST APIs
from JavaScript
Description:
Explain Invoking REST APIs from JavaScript
To invoke a REST API from JavaScript, you typically use the built-in fetch() method
or a third-party library like Axios or jQuery.
The basic steps for invoking a REST API from JavaScript are:
1. Determine the endpoint URL of the REST API you want to call.
2. Choose the appropriate HTTP method (GET, POST, PUT, DELETE, etc.) to
use for the request.
3. Add any necessary request headers, such as Authorization or Content-Type.
4. If the API requires it, add a request body with any data that needs to be sent to
the server.
5. Use the fetch() method or a library function to send the HTTP request to the
API endpoint.
6. Handle the response returned from the API, which may include data or an error
message.
When invoking a REST API from JavaScript, it's important to handle errors and
handle the response data appropriately. This may involve parsing the data into a
specific format, such as JSON, or displaying it in the user interface of the application.
Practical No: 10
Date: 20/04/2023
Aim: Working with Docker Volumes and Networks
Description:
Explain the concept of Docker Volumes and Networks
Docker Volumes:
A volume in Docker is a way to persist data outside of a container's file system.
Volumes allow you to share data between containers, and between containers and the
host machine. By using volumes, you can store application data in a separate location
from the container, making it easier to manage and backup. Volumes are created using
the "docker volume" command and can be mounted to a container using the "docker
run" command.
Docker Networks:
A network in Docker is a way to connect containers together and allow them to
communicate with each other. By default, Docker creates a bridge network for each
host, which allows containers to communicate with each other using their IP
addresses. You can also create custom networks using the "docker network" command
and assign containers to those networks using the "docker run" command. By using
custom networks, you can isolate containers from each other, and control the flow of
traffic between them.