Skip to main content

Library Portal — Spring Project Overview

·5 mins
This article was originally published on Medium.

Photo by Gabriel Ghnassia on Unsplash

“A large library or study filled with lots of books, ornate ceilings, and two levels in Chantilly” by Gabriel Ghnassia on Unsplash

Hi Everyone!

This is my first blog entry on my new Spring MVC project — Library Portal — and also it is my first blog entry ever. I am a little bit nervous, but I hope you will gone like it.

Let me shortly introduce myself to you. My name is Wojtek and I leave in Warsaw (Poland). I would like to become a Java Software Developer in future and I hope this blog will help me achiving this. For now I am focused on this project, but in future I hope I will share with you my other ones. All of them can be found in my GitHub repository.

The key objective of this post is to give you some insight of my first Spring MVC project with all steps and difficulties I have faced during it. Thanks to that approach I think I will be able to learn more and memorize all challenges that I have faced (I will be honest with you — I am not good with remembering most of the stuff ;) ). So this entry and those that will be after it are chiefly for me. In next ones I will be focusing on different aspects/features of this project. But of course if you will find something useful for you I will be more than happy to help you.

And also if you have any question/suggestion please do not hesitate to reach me.

Project Description #

From the project name you probably guess that I am trying to make somekind of Library Customer Relationship Management (CRM) platform that can be used in libraries to manage users and stored books. It will also track of all actions that were made in it, like borrowing books, creating new user, etc., to give more insight for library managers.

I have divided all portal users into three categories: Readers, Librarians and Admins. And depending on a user the portal will be giving a different experience.

Readers #

This is the most numerous group of users. After login to their profile they will be able to find and borrow some books from library. They will have a limit of 5 books lend at the same time. They can keep them only for one month, otherwise they will be charged 0.05$ per day. So the user will be able to track their book history and her/his penalties. Finally they can return books, if they kept them for less than a month. If they have some penalties book can be returned only by the librarian.

Librarians #

These users will be able to add new books to the library. Using one of the Books Open API (I have not decided which one I would like to use) they will be able to find it and mark as available. Also they will be able to check each book if it is lend or not and check when the book should be returned to the library (it will be the last day when the penalties will not be charged). Finally they will be able to mark that reader has settled the payments (if there was any).

Admin #

This kind of users will be able to manage users, like inactivating them, creating new librarians (regular users will be able to register manually) or updating their info. I am considering adding dashboards that presents some basic data (like user traffic, book statistics), but I will think about it later.

These are all my assumptions that I have come up so far. Probably some of them will change slightly during the working on it, but I hope they will stay as they are.

Technology Stack #

Photo by <a href="https://unsplash.com/@grohsfabian?utm_source=medium&amp;utm_medium=referral">Fabian Grohs</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a>
Photo by Fabian Grohs on Unsplash

Finally I get to this part! As a Java developer I will focus on creating backend in Java using Spring MVC framework. The database will be created in MySQL. From a frontend perspective, I will be using JSP (JavaServer Page) to create HTML websites. To make it prettier I will take an advantage of Bootrstrap library and JavaScript.

The whole project will be build using Gradle to manage dependencies and also quickly run in on Tomcat server.

As I mentioned before, from Spring framework I would like to use Spring MVC pattern, but also I will take an advantage of Spring Security (for managing user logging).

For connecting with MySQL database I will use Hibernate ORM.

Some actions that are made in the portal will be recorded, and for this purpose I will be using Apache Log4j2.

General #

Configurations #

Clean code #

Features #

User Log Events

Full-text Search

User registration

Add book to library

Deployment #

Code of the whole project can be found here: wkrzywiec/Library-Spring *Library-Spring - The library website where you can borrow books.*github.com