Database Articles

  Home arrow Database Articles arrow Book Inventory Management
DATABASE ARTICLES

Book Inventory Management
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating:  stars stars stars stars stars / 0
    2011-09-21

    Table of Contents:
  • Book Inventory Management
  • Using Scaffolding

  •  
     

    SEARCH CODEWALKERS

    Book Inventory Management


    (Page 1 of 2 )

    If you're trying to work with the scaffolding feature of Ruby on Rails, this article series gets you off to a great start. In it, you'll learn how to implement a book inventory management system using this built-in capability. This article is excerpted from chapter three of the book Practical Rails Projects, written by Eldon Alameda (Apress; ISBN: 1590597818).

    In this chapter, we will quickly implement a complete book inventory management system using the built-in scaffolding feature of Ruby on Rails. While implementing the system, we will write Ruby on Rails integration tests that exercise the whole book inventory management system from end to end. As we work through this sprint, we will show you how to map database relationships with ActiveRecord, including one-to-many, many-to-one, and many-to-many relationships. Plus, you will learn how to implement file upload functionality with Rails. We’ll also introduce you to the Textile markup language, which can be used to author web content.

    Getting the Requirements

    To figure out the requirements for this sprint, we ask George what tasks he should be able to perform with the book management system. He tells us that he receives information from publishers about when new books are published and when old ones go out of print. He asks us to build a system that will allow him to update the Emporium book inventory accordingly.

    George tells us that he is a big fan of Amazon, even if the giant is eating away at his profits. He likes, for example, the way Amazon is able to recommend books that are similar to what the customer has browsed and bought before, and the small details like the book cover shown next to the details of the book.

    We tell George that he at least has to be able to find books in the system, and to view and edit the book details. George confirms that he indeed needs those features. We take a short break, to let George have a coffee. This far into the discussion we have identified the following user stories:

    1. Add book: George, the administrator of Emporium, must be able to add new books to the inventory.
    2. Upload book cover: The administrator must be able to upload an image of the book cover. This image will be shown to customers.
    3. List books: The administrator must be able to list all of the books that are currently available in the inventory.
    4. View book: The administrator must be able to view the details of a book.
    5. Edit book: The administrator must be able to edit the details of a book.
    6. Delete book: The administrator must be able to delete books from the inventory.

    We aren’t sure how we should implement the book recommendation feature George wanted, so we decide to postpone that for a later sprint (covered in Chapter 7).

    When George comes back, he tells us that he must also be able to keep track of the book publishers. After a brief brainstorming session, we come up with a list of user stories related to publisher management:

    1. Add publisher: The administrator must be able to add publishers to the system.
    2. List publishers: The administrator must be able to view a list of all publishers in the system.
    3. View publisher: The administrator must be able to view the details of a publisher.
    4. Edit publisher: The administrator must be able to edit the details of a publisher.
    5. Delete publisher: The administrator must be able to remove publishers from the system.

    We will also implement these in this sprint, as we are confident that we can finish them within the schedule.

    More Database Articles Articles
    More By Apress Publishing

    blog comments powered by Disqus

    DATABASE ARTICLES ARTICLES

    - MariaDB, a MySQL Alternative, Opens Foundati...
    - Oracle Supporting HP Itanium Again, Finally
    - Completing a Book Inventory Management System
    - Uploading Images for a Book Inventory Manage...
    - Finishing the Add Book Story for a Book Inve...
    - Integration Testing for a Book Inventory Man...
    - User Stories for a Book Inventory Management...
    - Unit Testing a Book Inventory Management Sys...
    - Testing a Book Inventory Management System
    - Implementing Models for a Book Inventory Man...
    - Book Inventory Application: Publishers and B...
    - Handling Publishers in a Book Inventory Mana...
    - Publisher Administration for Book Inventory ...
    - Book Inventory Management
    - Using the SQL Reference Manual

    Developer Shed Affiliates

     



    © 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap