Javascript Report
Javascript Report
Javascript Report
1.0 Rationale:
Libraries dole out a critical role in the Education industry. It is considered as the brain
of any education institute, be it small or large schools, colleges or universities. Today
education institutes understand the importance of the library with the increase in
education standards. With the development of digital content, it becomes more
important to manage the catalog of educational information with scalable and reliable
Library Management System that will support the general requirement of the library.
Easy to use Campus library management systems are now available for stress-free
management of campus libraries of any size. A trustworthy web-based library
management system provides a complete resolution for students, librarians, and faculty
members.
Library Management System helps in maintaining data of books issued to learners and
books available in the library. This helps librarians to spot any particular book at any
given time in the library. This kind of Library management system can be easily
customized as per individuals requirement. It’s easy to use interface and immediate
reporting make things easier for the school library staff. For easy arrangement, such
type of system divides the books on Biographer name, Manuscript group, Publisher and
more. With the help of barcode, Librarian can keep track of different records such as:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="/CSS/homePageStyle.css">
<script src="/JS/homePage.js"> </script>
<title>Home Page</title>
</head>
<div class="container">
<h1>Register</h1>
<p>Please fill in this form to register a book.</p>
<hr>
</body>
</html>
app.js
console.log("This is indexES6.js");
let num = 0;
var notesObj = [];
const libraryForm = document.getElementById("libraryForm");
class Book {
constructor(name, author, type) {
this.name = name;
this.author = author;
this.type = type;
}
}
class Display {
add(bookObj) {
console.log("Adding details to UI");
notesObj.push(BooksManager);
if (BooksManager == null) {
BooksManager = [{ "num": 1, "bookName": bookObj.name, "bookAuthor":
bookObj.author, "bookType": bookObj.type }];
}
else {
BooksManager.push({ "num": BooksManager[BooksManager.length - 1].num +
1, "bookName": bookObj.name, "bookAuthor": bookObj.author, "bookType":
bookObj.type });
}
localStorage.setItem("BooksDetails", JSON.stringify(BooksManager));
}
clear() {
libraryForm.reset();
}
validate(bookObj) {
if (bookObj.name == "" || bookObj.author == "")
return false;
else
return true;
}
showAlert(type, message) {
if (type == "error")
type = "danger";
else {
type = "success"
}
event.preventDefault();
const name = document.getElementById("name").value;
const author = document.getElementById("author").value;
const fiction = document.getElementById("fiction");
const programming = document.getElementById("programming");
const cooking = document.getElementById("cooking");
let type;
if (fiction.checked)
type = fiction.value;
else if (programming.checked)
type = programming.value;
else if (cooking.checked)
type = cooking.value;
if (displayObj.validate(bookObj)) {
displayObj.add(bookObj); // Calling a user-defined function called add()..
displayObj.clear() // Calling a user defined function called clear()..
displayObj.showAlert("success", "Your book has been added successful");
}
else // Show error to the user...
displayObj.showAlert("error", "Sorry you cannot add this book.");
}
8.0 Output:
9.0 Skills Developed:
1. Working within a team allows for the workload to be shared equally among
members and distributed according to each member’s skills and strengths.
2. When the workload is shared and members of a team collaborate, we can feel a
greater sense of accomplishment
3. When we complete a task and reach a goal that we would not have been able to
achieve had they been working alone. Another huge benefit of teamwork is the
establishment and development of strong relationships among co-workers.
12.0 References:
1. JavaScript (the definitive guide) by Darld
2. JavaScript by Dr. Axel Rauschmayer.