Skip to content

Repository files navigation

ElibManagement Project

This is a project I made for my Programming Languages & Paradigms class in my 3rd year of a Bachelor of Computer Science (Software Engineering).

A three-tier project with a SQLite database, C++ Data Logic, and ImGUI UI. Made under the specific constraints of the C++ language.

This project was an interesting challenge given the unconventional language I'm using to create a local full-stack application: C++. I chose this language not only for the unique challenge it poses to developing a UI frontend that is interactable and dynamic to an end-user, but also to try and extend my knowledge of the language's capabilities. Though most developers would vouch moreover for Java, Typescript, Python, or C#/.NET for this sort of full-stack application - and these languages are very reasonably the standard for these projects - the concept of, from the ground-up, designing an application with a lower-level language like C++, poses a unique learning challenge.

During the development of this project, the SQLite integrationg proved relatively easy once I got the hang of the C/C++ interface. However, my initial fumbling with the interface made for some minor mistakes in the reliability in the code that had to be remedied later in the development lifecycle. Further, the UI integration with C++ proved to be an intensely difficult process. Currently (07/05), the project uses a standard CLI interface. It uses the "_getch()" function from conio.h, which is not quite as reliable as I'd like it to be.

Rudimentary class diagram from assignment image

Preparations / System Req's Document

FR

  • The system must allow users to be authenticated as "librarians"
  • The system must allow librarians to edit the book catalogue (CRUD)
  • The system must allow librarians to edit the list of members belonging to a library (CRUD)
  • The system must allow librarians to manage the books borrowed by members of a library (and only the library that the librarian belongs to)
  • The system must allow librarians to conduct borrowing/returns of books in accordance with member actions

NFR

  • The system needs a functional, friendly GUI that helps users navigate the operations (QTGUI)
  • The system should be data-safe and authenticate inputs without sudden exceptions

Scope

  • The system is assumed to only interact with librarians, and not need to provide useage to member users (beyond librarians acting as mediators to functionality - books returned and borrowed)
  • The system has the scope a single library.

TODO and ISSUES

  • ADD proper validation of inputs in the database loading (see existing one for opening the database)
  • FIX Pointer ISSUE : Over-usage of pointers. It's not reliable, and though it is effectively showing the language, it just isn't worthwile for the purpose of the report. This is also an issue as far as garbage collection goes. If we just use either unique pointers, or none at all, there is no problem. Pointers are helpful for when passing ARGUMENTS to FUNCTIONS where we don't want to COMPLETELY DUPLICATE the data structure being passed as it may be rather large (i.e. the catalogue of the library).
  • Upgrade CLI interface to a GUI solution

Notes

  • C++ has a lot of support for low-level handling of memory.
  • C++ is useful for making majorly performant applications that can manage large data structures.
  • C++, unlike its successor Java, and that language's successor C#, does not have a lot of good UI integrations.
  • Creating an app locally within C++ is a very arduous process, though it is certainly portable.
  • C++ UI libraries and older C++ libraries, such as ImGUI, QTGUI, SQLite3, etcetera, are generally less well-documented and harder to find tutorials and guidance on than that of more library-reliant languages such as Python

Resources / Libraries

SQLite3 C/C++ Interface : https://sqlite.org/cintro.html

Dear ImGUI : https://github.com/ocornut/imgui

Idea (only inspiration, no code has been taken from here, and I wouldn't claim that this is the first instance of a library manager system) : https://www.geeksforgeeks.org/dsa/e-library-management-system/ (by user Jagroop Singh)

QTGUI : https://doc.qt.io/qt-6/qtgui-index.html

CPP Reference Site : https://en.cppreference.com/

Bjarne Stroustrup's 4th ed. C++ Programming Language Book : https://chenweixiang.github.io/docs/The_C++_Programming_Language_4th_Edition_Bjarne_Stroustrup.pdf

About

A 3-Tier SQLite-based C++ Library Manager Application - Proof of concept, a challenge to myself to implement a larger application in a language that isn't best suited for it

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages