Giter VIP home page Giter VIP logo

booklink's Introduction

50.008 Database Project (2017): Booklink

Bookstore Database-system with Django

Group members:

  1. Pinardy Yang (1001520)
  2. Joshua Lim (1001509)
  3. Jway Jin Jun (1001555)
  4. Eiros Tan (1001538)
  5. Sanjay Pushparajan (1001646)

Instructions:
Ensure that you have setup the database with the following details:

  • Database name: bookstore
  • User: bookstore_user
  • Password: password
  • Host: 127.0.0.1
  • Port: 3306

After setting up the database, perform the following steps:

  • Run schema.py to create the tables. (schema.py contains the DDL)
  • Run createSQL.py (Inserts dummy data into the database, so we can view some books in the bookstore)
  • Run populate.py to populate the database. -> If any error occurs during the execution of populate.py, it is due to certain characters in the book title and is normal. The script still works so long as some data is populated into the database.
  • Create a superuser with the command 'python manage.py createsuperuser'. This superuser account will act as the bookstore manager account which will allow us to do commands specific to staff accounts. Name the superuser account as 'admin'

Run the command 'python manage.py runserver' and go to 127.0.0.1:8000/booklist/browse once you are done.

The links below show where our functions and other SQL codes are used


Git-tracked development workflow In our project, we make use of GitHub version control for our project to enable us to manage our project in an organised, less-risky manner.

Thanks to GitHub, each of the group member can work on individual parts remotely without having fear of overriding each other’s work unnecessarily. In the case where a part has merge conflicts, the group can decide what to keep and what to remove. With the use of branches and merging, the group can efficiently work on the project as each member will not have to worry about messing up the project if multiple people are working on the same part.

Assume that multiple people are working on the project, possibly making edits to the same file. How do we know the members’ work will not be unnecessarily overwritten? Assume each member is working on their part on their own branch. Listed below is a typical workflow for a team member for safe merging.

On branch:

  • git add (Add changes and prepare for commit)
  • git commit -m "your message" (Informing others what changed)
  • git push origin (Push the changes onto branch)
  • git checkout master (Change branch to master branch)

MASTER:

  • git pull (Get latest changes if any)
  • git checkout (Change branch to personal branch)

BRANCH:

  • git merge (Merge branch with master)

at this point, there could be conflicts in the code, which you will need to resolve <<

  • git commit -m 'message' (Informing others what changed)
  • git push (Push the changes onto branch)
  • git checkout master (Change branch to master branch)

MASTER:

  • git merge (Merge master with personal branch)
  • git push (Push the changes onto master)

jQuery
jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML. In our project, we make use of AJAX (Asynchronous JavaScript and XML) to make the process of ordering books a smooth and seamless process.

Through the use of jQuery we learnt three aspects of it: Concept and implementation of AJAX requests In page scripting to fetch and update HTML elements Adding interactivity to our application

The AJAX requests asynchronously performed GET and POST operations to a given view tied to a function at the /ajax/XXXXX endpoint. The response is a HTTP response code (for a POST request) and a returned row (for a GET request) for updating parts of the Django page template without triggering a page refresh. This allows for multiple functions to coexist on the same page without the need for a very fragmented app.

JQuery was also used for elements of interaction- eg. modals and tool tips. Calling scripts in a webpage allowed us to access specific HTML elements (identified by their name) and whose value was tied to their ISBN13 credentials. This allowed effects such as popups and information shown on hovering to be dynamically displayed (as seen in the browse page).

booklink's People

Contributors

pinardy avatar truesanju avatar limwenyao avatar whale-ofatime avatar

Watchers

James Cloos avatar Jin Jun avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.