Awp Lab Manual
Awp Lab Manual
B.E. Semester 6
(Informaon Technology)
Cercate
year 2023-24.
Place: __________________
Date: __________________
Preface
Main moo of any laboratory/praccal/eld work is for enhancing required skills as well as
creang ability amongst students to solve real me problem by developing relevant
competencies in psychomotor domain. By keeping in view, GTU has designed competency
focused outcome-based curriculum for engineering degree programs where sucient weightage
is given to praccal work. It shows importance of enhancement of skills amongst the students
and it pays aenon to ulize every second of me alloed for praccal amongst students,
instructors and faculty members to achieve relevant outcomes by performing the experiments
rather than having merely study type experiments. It is must for eecve implementaon of
competency focused outcome-based curriculum that every praccal is keenly designed to serve
as a tool to develop and enhance relevant competency required by the various industry among
every student. These psychomotor skills are very dicult to develop through tradional chalk
and board content delivery method in the classroom. Accordingly, this lab manual is designed to
focus on the industry dened relevant outcomes, rather than old pracce of conducng praccal
to prove concept and theory.
By using this lab manual students can go through the relevant theory and procedure in advance
before the actual performance which creates an interest and students can have basic idea prior
to performance. This in turn enhances pre-determined outcomes amongst students. Each
experiment in this manual begins with competency, industry relevant skills, course outcomes as
well as praccal outcomes (objecves). The students will also achieve safety and necessary
precauons to be taken while performing praccal.
This manual also provides guidelines to faculty members to facilitate student centric lab acvies
through each experiment by arranging and managing necessary resources in order that the
students follow the procedures with required safety and necessary precauons to achieve the
outcomes. It also gives an idea that how students will be assessed by providing rubrics.
In the era of digizaon, the demand of Internet based applicaons is increasing day by day.
Advanced Web Programming is one of the required skills for IT Engineer. This focuses on frontend
and back-end design. Aer learning this subject students can advance their career in the eld of
web development.
Utmost care has been taken while preparing this lab manual however always there is chances of
improvement. Therefore, we welcome construcve suggesons for improvement and removal
of errors if any.
Advanced Web Programming (3161611)
CO 1 : Learn the concepts of client side programming using CSS and Java Script
CO 4 : Study the concept of database using Mongo DB and connect database with applicaon.
CO 5 : Design and implement full featured web applicaon using the concepts of Angular JS and
Node JS.
Sr.
Objecve(s) of Experiment CO1 CO2 CO3 CO4 CO5
No.
The following industry relevant competency are expected to be developed in the student by
undertaking the praccal work of this laboratory.
1. HTML/CSS Skills : HTML is used extensively by web developers to build web pages. CSS is
used to implement dierent fonts, colors and layouts in the design of a website.
2. Angular JS Skills : Angular JS is used to create fully funconal dynamic web applicaons.
Advanced Web Programming (3161611)
3. Node JS Skills : Node JS is extensively used to support back end acvies in the development
of dynamic web applicaons.
4. Web Development Skills : Angular JS, Node JS are widely used for the development of web
applicaons along with HTML and CSS.
1. Teacher should provide the guideline with demonstraon of praccal to the students with
all features.
2. Teacher shall explain basic concepts/theory related to the experiment to the students
before starng of each praccal
4. Teacher is expected to share the skills and competencies to be developed in the students
and ensure that the respecve skills and competencies are developed in the students aer
the compleon of the experimentaon.
5. Teachers should give opportunity to students for hands-on experience aer the
demonstraon.
6. Teacher may provide addional knowledge and skills to the students even though not
covered in the manual but are expected from the students by concerned industry.
7. Give praccal assignment and assess the performance of students based on task assigned
to check whether it is as per the instrucons or not.
8. Teacher is expected to refer complete curriculum of the course and follow the guidelines
for implementaon.
1. Students have to write answers / soluons of QUIZ in separate le pages. The quiz of
corresponding praccal must be aached just behind each praccal.
2. Students are expected to carefully listen to all the theory classes delivered by the faculty
members and understand the COs, content of the course, teaching and examinaon
scheme, skill set to be developed etc.
3. Students shall organize the work in the group and make record of all observaons.
5. Student shall aempt to develop related hand-on skills and build condence.
6. Student shall develop the habits of evolving more ideas, innovaons, skills etc. apart from
those included in scope of manual.
Advanced Web Programming (3161611)
8. Student should develop a habit of subming the experimentaon work as per the schedule
and s/he should be well prepared for the same.
Advanced Web Programming (3161611)
Index (Progressive
Assessment Sheet)
Sr. No. Objecve(s) of Experiment Page Date of Date of Assessmen Sign. of Remark
No. perform submissi t Teacher s
ance on Marks with date
Advanced Web Programming (3161611)
Total
Experiment No: 1
Date :
Relevant CO : CO 1
Objecves:
Theory:
•
What is AJAX?
1. A browser built-in XMLHpRequest object (to request data from a web server)
AJAX allows web pages to be updated asynchronously by exchanging data with a web
server behind the scenes. This means that it is possible to update parts of a web page,
without reloading the whole page.
•
How AJAX works?
Quiz:
Suggested Reference:
1. hps://www.w3schools.com/xml/ajax_intro.asp
www.geeksforgeeks.org
11
Assessment :
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (10 marks)
(3 marks) (4 marks) (3 marks)
Experiment No: 2
Aim : Create a HTML form that will accept Enrolment No., Name, Semester, Branch,
Mobile Number, Email, Address etc. from the student and display them on the
page using Angular JS Direcves and Expressions.
Date:
Relevant CO : CO 2
Objecves:
Theory:
▪ A form will take input from the site visitor and then will post it to a back-end applicaon
such as CGI, ASP Script or PHP script etc.
▪ The back-end applicaon will perform required processing on the passed data based on
dened business logic inside the applicaon.
▪ There are various form elements available like text elds, textarea elds, drop-down menus,
radio buons, checkboxes, etc.
Syntax :
</form>
11
Checkbox Checkboxes are used when
<input type = "checkbox" name =
more than one opon is
"maths" value = “maths"> Maths
required to be selected.
<input type = "checkbox" name =
"physics" value = “physics"> name =
"password" />
</select>
Buon
<input type = "button" name = "ok"
This creates a buon that is
value = "OK" />
used to trigger a clientside
script when the user clicks
that buon.
▪ ng-model : This direcve is used to bind the values of HTML controls to a variable.
▪ ng-bind : This direcve is used to bind HTML elements to variables. It is generally used to
display the values of variables in the HTML elements like <p> or <span>.
▪ Angular JS Expression : Angular JS expressions are used to print the values of the variables
on the page. An Angular JS expression starts with {{ and ends with }}.
- For example, {{ rst_name + “ “ + last_name }} will print rst_name and last_name separated
by space.
11
Implementaon: Create a HTML form that will accept Enrolment No., Name, Semester, Branch,
Mobile Number, Email, Address etc. from the student and display them on the page using Angular
JS Direcves and Expressions.
11
11
11
Output:
Conclusion:
Quiz:
1. Enlist ve most commonly used Angular JS direcves and state their usages.
11
2. Explain various ways to display the values of the variables on the page with suitable example.
Suggested References:
1. hps://www.w3schools.com/angular/angular_direcves.asp
2. hps://www.w3schools.com/angular/angular_model.asp
3. hps://www.w3schools.com/angular/angular_databinding.asp
Assessment :
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (10 marks)
(3 marks) (4 marks) (3 marks)
11
Experiment No: 3
Aim :Create a webpage using Angular JS that displays details of students' objects
(such as Enrolment No., Name, Semester, Branch, Mobile Number, Email Address,
Address etc.) in a tabular format with appropriate CSS eects.
Date:
Competency and Praccal Skills: HTML, CSS, Use of MVC in Angular JS Relevant
CO: CO 1, CO 2
Objecves:
2. To use objects dened in Angular JS and display it’s informaon in HTML table.
Theory:
• MVC Architecture
Model View Controller or MVC as it is popularly called, is a soware design paern for developing
web applicaons. A Model View Controller paern is made up of the following three parts, ▪ Model
− It is the lowest level of the paern responsible for maintaining data.
▪ View − It is responsible for displaying all or a poron of the data to the user.
▪ Controller − It is a soware Code that controls the interacons between the Model and
View.
Figure 2. MVC Architecture
11
MVC is popular because it isolates the applicaon logic from the user interface layer and supports
separaon of concerns. The controller receives all requests for the applicaon and then works with
the model to prepare any data needed by the view. The view then uses the data prepared by the
controller to generate a nal presentable response. The MVC abstracon can be graphically
represented as Figure 2.
▪ Aer dening an Angular JS applicaon, it can be bind with a controller using ng-controller
direcve.
▪ To dene controller, rst an applicaon module must be dened in <script> tag using
var app = angular.module('myApp', [ ]);
Here angular.module ( ) funcon is used to dene applicaon module. Where myApp is
the name of applicaon and [ ] (empty square brackets) are used to menon no addional
/ dependant modules are needed / used.
$scope.students=[
{enrolment:'301',name:'Rajesh',semester:'3',branch:'I.T.'},
{enrolment:'501',name:'Ishwar',semester:'5',branch:'Producon'},
{enrolment:'701',name:'Ronit',semester:'7',branch:'Mechanical'}];
});
Applicaon controller is dened using app variable along with controller( ) funcon.
Controller( ) funcon takes two arguments, rst is the name of controller, which is myCtrl
in our case and second is the callback funcon with a single variable that is $scope. $scope
is an object, that can be used to declare variables and objects within the controller and it
is accessible throughout the controller.
As it can be seen in the above code, students is an array of objects dened using $scope.
Each object contains various values including enrolment, name, semester and branch.
▪ Now to create separate rows for each objects in a table, the following syntax cab be used.
<tr ng-repeat="x in students">
Here, ng-repeat direcve will iterate over all the elements of students (array of objects)
and separate rows will be created for each object. Each me object will be accessed using
11
x and you will be able to print it’s variables using expression, such as, {{ x.enrolment } in
individual cells of a table row.
▪ HTML tables allow web developers to arrange data into rows and columns.
▪ colspan aribute is used to make a cell span more than one column.
▪ rowspan ariute is used to make a call span more than one row.
▪ cellpadding represents the distance between cell borders and the content within a cell.
Implementaon: Create your class me table using table tag, experiment with rowspan, colspan,
cellspacing and cellpadding aributes.
11
11
11
Output:
Conclusion:
Quiz:
Suggested Reference:
1. hps://www.w3schools.com/angular/angular_direcves.asp
2. hps://www.w3schools.com/angular/angular_tables.asp
Assessment :
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (10 marks)
(3 marks) (4 marks) (3 marks)
11
Experiment No: 4
Aim : Modify Praccal 3 and provide a search eld to search records on the top of
the page and also allow user to sort table according to the column values when
user clicks on a column using lter.
Date:
Competency and Praccal Skills: HTML, CSS, MVC in Angular JS, Filters in Angular JS Relevant
CO: CO 1, CO 2
Objecves:
2. To use objects dened in Angular JS and display it’s informaon in HTML table.
▪ Filters in Angular JS : Filters in Angular JS are used to format / transform the data. Angular JS
provides the following lters.
For example,
<ul>
<li ng-repeat="x in names | lter : 'i'">
{{ x }}
</li>
</ul
11
The above code will display an unordered list of items from names array consisng ‘i' as a
character.
<ul>
</li>
</ul>
Similarly the above code will display the name and country of all the elements of persons
array separated by comma in an unordered list, and this list will be sorted by value of country
variable of each object.
In Angular JS funcons can be dened inside the controller using $scope object. The general
syntax to dene a funcon is,
$scope.funcon_name = funcon(value1, value2, ...) {
the func
}
Implementaon: Modify Praccal 3 and provide a search eld to search records on the top of the
page and also allow user to sort table according to the column values when user clicks on a column
using lter.
11
11
210430116055
Output:
Conclusion:
Quiz:
11
1. Discuss various lters present in Angular JS with suitable examples.
2. Write Angular JS code to display numbers in Rupee format with Rupee symbol.
Suggested Reference:
1. hps://www.w3schools.com/angular/angular_lters.asp
hps://www.javaguides.net Assessment
:
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (10 marks)
(3 marks) (4 marks) (3 marks)
11
Experiment No: 5
Aim : Write Angular JS code to read Customer’s data in JSON format available in a
Customers.php le using $hp service and display the same on a webpage in
tabular format.
Date:
Competency and Praccal Skills: HTML, JSON (JavaScript), PHP, Services in Angular JS Relevant
CO: CO 1, CO 2
Objecves:
- $hp : It is used to request the resources available on the server and lets your
applicaon handle the response.
▪ $hp Service : The AngularJS $hp service makes a request to the server, and returns a
response. The following code demonstrates the general use of $hp service.
<script>
</script>
11
Here an object of $hp service needs to be passed in the callback funcon of controller.
Which can further be used to request the resources available on the server. Here it tries to
access MyPage.php. If resource request is handled then the response will be available in
response variable and that can be used to further process the output as per the user’s
need.
Implementaon: Write Angular JS code to read Customer’s data in JSON format available in a
Customers.php le using $hp service and display the same on a webpage in tabular format.
Output:
Conclusion:
Quiz:
1. Explain the usage of any ve services available in Angular JS with suitable examples.
Suggested Reference:
1. hps://www.w3schools.com/angular/angular_services.asp
11
2. hps://www.w3schools.com/angular/angular_hp.asp
Assessment :
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (10 marks)
(3 marks) (4 marks) (3 marks)
11
<body ng-app="">
<form name="Form1">
is required.</span>
</form>
</body>
The above code shows an example of using these states / ags. In this code, an input eld Name
of Form1 is validated using Form1.Name.$touched and myForm.myName.$invalid. If the input
control is modied then the value of Form1.Name.$touched will be true, otherwise false.
Similarly if the input control’s content is empty then the value of myForm.myName.$invalid will
be true, otherwise false.
Here, ng-show direcve is used to show / hide the <span> element based on the result of the
ags. Thus, <span> element will be visible only if both the states / ags are true, means the
input control is modied and empty.
Similarly ng-enabled and ng-disabled direcves can be used to enable or disable the controls in
the form. Both of these are assigned boolean values.
Implementaon: Create an Angular JS applicaon for validaon that will accept Email, Username
and Password as required elds from the user. It will enable submit buon only if all the entered
data are valid.
210430116055
Output:
Conclusion:
Quiz:
1. Briey discuss the usage of all the Input states and Form states with suitable examples.
2. Discuss various CSS classes present in Angular JS used for these validaon states.
Suggested Reference:
1. hps://www.w3schools.com/angular/angular_validaon.asp
Assessment :
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (10 marks)
(3 marks) (4 marks) (3 marks)
11
Experiment No: 7
Relevant CO: CO 2
Objecves:
1. To understand how to create Single Page Applicaon (SPA) using Angular JS Roung.
Theory:
▪ Roung in Anguar JS : In Angular JS, ngRoute module helps in conguring roung informaon
to create Single Page Applicaons.
In order to use ngRoute module, rst the developer need to include angular-route.js le
using the following line in <head> secon.
<script src=”angular-route.js” />
In the second step, links to load the pages needs to be created. For example,
<a href="#!red">Red</a>
In the third step, ngRoute module must be included as a dependency in applicaon module
using the following line,
var app = angular. module "myApp", ["ngRoute"]);
Now your applicaon has access to the route module, which provides the $routeProvider
object. In the fourth step, use this $routeProvider object to congure roung details in the
Angular JS applicaon. The following code demonstrates the same,
app. ($routeProvider) {
cong funcon
. uteProvider
en("/" ,{
in.htm"
}) mplateUrl :
.
en( templa ed", {
.htm"
})
.
en( templa reen", {
en.htm"
})
.
when( lue", {
11
templateUrl : "blue.htm"
});
});
In the above code, in when( ) funcon, two arguments needs to be passed, rst is the target
URL and second is the block of statements to execute when target URL is requested. Here,
templateUrl is used to load HTML page as a template.
Now to load the content of resource specied by templateUrl, a view needs to be created.
This can be done using ng-view direcve in three dierent ways.
Once, the view is specied, the pages will be loaded in the view when the links are clicked.
Output:
Conclusion:
Quiz:
2. State the usefulness of ng-view direcve. Explain various ways to use it.
Suggested Reference:
11
1. hps://www.w3schools.com/angular/angular_roung.asp
Assessment :
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (10 marks)
(3 marks) (4 marks) (3 marks)
11
Experiment No: 8
Date:
Relevant CO: CO 3
Objecves:
• Node JS Installaon
First, Node JS installaon package needs to be downloaded from,
hps://nodejs.org/en
Aer downloading the package, double click on it to install Node JS in your machine. Follow the
instrucons one by one and act accordingly. This will install Node JS with some basic packages such
as, fs, os, net, dns, url, hp, hps, path etc. in your machine. In order to install addional packages
Node Package Manager (NPM) can be used.
install package_name
install -g package_name
update package_name
npm list
Output:
Screenshots of installing Node JS environment:
Quiz:
2. State the usefulness of ng-view direcve. Explain various ways to use it.
Suggested Reference:
1. hps://www.geeksforgeeks.org/15-npm-commands-that-every-node-js-developershould-know/
Aim : Design a webpage with a le input control to browse appropriate le and
four buons Read File Synchronously, Read File Asynchronously, Compress File,
Decompress File. Implement the funconality of all four buons on the browsed
le using Node JS.
Date :
Competency and Praccal Skills: File System (fs) module and zlib modules of Node JS
Relevant CO : CO 3 Objecves:
2. To understand the funcons for compressing and decompressing les and use them.
Theory:
Now using fs variable, all the funcons dened in le system module can be accessed.
To read a le synchronously readFileSync( ) funcon is used. It takes only one parameter,
that is the URL / Name of the le (along with the extension). To display read data in
appropriate format, you need to convert it in specic types. When a le is being read
synchronously, other processes will be blocked ll the reading is done.
To read a le asynchronously readFile( ) funcon is used. It takes two parameters, rst is
the URL / Name of the le (along with the extension) and second is the callback funcon.
To display read data in appropriate format, you need to convert it in specic types. When
a le is being read asynchronously, other processes will connue their execuon in parallel
while reading is done.
▪ Compressing a le
To compress a le rst of all you need to read the le. createReadStream( ) funcon of le
system module allows you to read a le. It takes a single parameter that is the URL / Name
of the le to be read (along with the extension).
Aer reading a le you can compress it using zlib module’s createGzip( ) funcon.
11
Then you need to write the compressed le, that can be done using createWriteStream( )
funcon of le system module, again this funcon takes a single parameter, that is the
name of the le to be saved with.
In order to combine these funcon pipe( ) funcon can be used. It allows us to provide
output of one funcon as an input to the other one.
▪ Decompressing a le
Similarly to decompress a le you need to read the le using the same funcon previously
used createReadStream( ).
Implementaon : Design a webpage with a le input control to browse appropriate le and four
buons Read File Synchronously, Read File Asynchronously, Compress File, Decompress File.
Implement the funconality of all four buons on the browsed le using Node JS.
11
11
11
Output:
11
Conclusion:
Quiz:
1. Enlist various funcons available in fs module and also state their usages.
Suggested Reference:
1. hps://www.knowledgehut.com/blog/web-development/compression-decompressionof-data-
using-zlib-in-Nodejs#there-are-two-types-
ofcompression:%E2%80%AFlossless%E2%80%AFand%E2%80%AFlossy.
Assessment :
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (3 marks) (10 marks)
(3 marks) (4 marks)
11
Experiment No: 10
Aim : Create a Node JS applicaon that will allow a user to browse and upload a le
in localhost.
Date :
Competency and Praccal Skills: File System (fs), hp, and formidable modules of Node JS
Relevant CO : CO 3
Objecves:
1. To understand form processing while uploading any le on server in Node JS.
Theory:
In addion to formidable, le system (fs) and hp modules will be required.
While designing the interface that will allow a user to browse the le to be uploaded, one
important thing to remember is to use post as a method and specify enctype aribute in <form>
tag, like,
<form acon="URL of the page" method="post" enctype="mulpart/form-data">
Aer these modicaons, your form will be able to upload the les on the server.
Now as shown bellow, using the IncomingForm( ) method of formidable module, the form can be
referred using a variable.
var form = new formidable.IncomingForm();
Aer that form variable can be used to parse the request object, elds and les using parse( )
funcon. Using appropriate methods of le system (fs) module, the uploaded le can be stored in
specic directory with appropriate name.
11
Implementaon : Design a webpage with a le input control to browse appropriate le and four
buons Read File Synchronously, Read File Asynchronously, Compress File, Decompress File.
Implement the funconality of all four buons on the browsed le using Node JS.
Output:
Conclusion:
Quiz:
1. Enlist and explain various methods of formidable module used to manage uploading les.
Suggested Reference:
1. hps://www.w3schools.com/nodejs/nodejs_uploadles.asp
Assessment :
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (10 marks)
(3 marks) (4 marks) (3 marks)
11
Experiment No: 11
Aim : Create a Node JS applicaon that will allow a user to create new le, read le,
write into a le and delete a le.
Date :
Relevant CO : CO 3
Objecves:
Theory:
2. appendFile( ) : It is used to append content in a le. If le doesn’t exists, new le will be
created.
3. open( ) : If open( ) is used with ‘w’ ag, it will allow user to write into a le. If le doesn’t
exists empty le will be created.
4. writeFile( ) : It is used to write a le. If le doesn’t exists, new le will be created.
Implementaon : Create a Node JS applicaon that will allow a user to create new le, read le,
write into a le and delete a le.
11
11
Output:
Conclusion:
Praccal Quiz:
1. Create Node JS applicaon that will list all the les available in the browsed directory of a
server.
2. Create Node JS applicaon that will allow a user to create new les and rename exisng
les using the proper interface
Suggested Reference:
1. hps://www.w3schools.com/nodejs/nodejs_lesystem.asp
Assessment :
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (3 marks) (10 marks)
(3 marks) (4 marks)
11
Experiment No: 12
Aim : Study MongoDB environment setup and write Node JS code to perform
inseron operaon in Mongo DB.
Date :
Competency and Praccal Skills: Operaons on MongoDB Database, Node JS code for inseron in
Objecves:
Theory:
• Introducon to MongoDB
MongoDB is a document database which is oen referred to as a non-relaonal database. This
does not mean that relaonal data cannot be stored in document databases. It means that
relaonal data is stored dierently. A beer way to refer to it is as a non-tabular database.
MongoDB stores data in exible documents. Instead of having mulple tables you can simply
keep all of your related data together. This makes reading your data very fast.
You can sll have mulple groups of data too. In MongoDB, instead of tables these are called
collecons.
MongoDB can be used locally or you can use the cloud plaorm for the same.
▪ And collecon( ) funcon of Database object can be used to access the collecon.
▪ In MongoDB the records are inserted in terms of documents, therefore the object of
document(s) to be inserted must be dened before performing inseron operaon.
11
▪ To insert a single document insertOne( ) funcon is used.
Implementaon : Study MongoDB environment setup and write Node JS code to perform inseron
operaon in Mongo DB.
Output:
Conclusion:
Praccal Quiz:
Suggested Reference:
11
1. hps://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-windows/
2. hps://www.w3schools.com/nodejs/nodejs_mongodb_insert.asp
Assessment :
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (10 marks)
(3 marks) (4 marks) (3 marks)
11
Experiment No: 13
Aim : Write Node JS code to perform deleon operaon from Mongo DB.
Date :
Competency and Praccal Skills: Operaons on MongoDB Database, Node JS code for deleon in
Objecves:
1. To understand how to delete documents from a MongoDB Database through Node JS code.
Theory:
▪ connect( ) funcon of MongoClient will allow a user to connect with a MongoDB database.
▪ Once the connecon with the Database is established, collecon( ) funcon of Database
object can be used to access the collecon.
▪ Aer that create an object containing query data for a document to be deleted.
Implementaon : Write Node JS code to perform deleon operaon from Mongo DB.
11
11
Output:
11
Conclusion:
Suggested Reference:
1. hps://www.w3schools.com/nodejs/nodejs_mongodb_query.asp
2. hps://www.w3schools.com/nodejs/nodejs_mongodb_delete.asp
Assessment :
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (10 marks)
(3 marks) (4 marks) (3 marks)
11
Experiment No: 14
Aim : Write Node JS code to perform selecon and updaon operaon to select and
update specic document in Mongo DB.
Date :
Competency and Praccal Skills: Operaons on MongoDB Database, Node JS code for selecon and
updaon of document in MongoDB Database.
Relevant CO : CO 3, CO 4
Objecves:
1. To understand how to search documents from a MongoDB Database and updated them
through Node JS code.
Theory:
▪ connect( ) funcon of MongoClient will allow a user to connect with the MongoDB
database.
▪ Once the connecon with the Database is established, collecon( ) funcon of Database
object can be used to access the collecon.
▪ Aer that object containing query data for a document to be selected needs to be created.
▪ If the document is found then it’s details can be printed / used as per need.
Implementaon : Write Node JS code to perform selecon and updaon operaon to select and
update specic document in Mongo DB.
11
11
Output:
Conclusion:
Suggested Reference:
1. hps://www.w3schools.com/nodejs/nodejs_mongodb_query.asp
2. hps://www.w3schools.com/nodejs/nodejs_mongodb_update.asp
Aim : Create a single page applicaon for Library that will allow the librarian to add
a new book and search whether book is currently available in the library or not.
Date :
Competency and Praccal Skills: HTML, CSS, Angular JS, Node JS, MongoDB. Relevant
CO : CO 1, CO 2, CO 3, CO 4, CO 5
Objecves:
1. To learn applicaon development using HTML, CSS, Angular JS and Node JS.
Implementaon : Create a single page applicaon for Library that will allow the librarian to add a
new book and search whether book is currently available in the library or not.
Output:
Conclusion:
Suggested Reference:
1. hps://www.w3schools.com/html/default.asp
2. hps://www.w3schools.com/css/default.asp
11
3. hps://www.w3schools.com/angular/
4. hps://www.w3schools.com/nodejs/
5. hps://www.w3schools.com/mongodb/index.php
Assessment :
Understanding of Implementaon of Presentaon and report Total
Problem Problem wring (10 marks)
(3 marks) (4 marks) (3 marks)