Giter VIP home page Giter VIP logo

gustavocp / dl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from krish-chandra/dl

0.0 2.0 0.0 851 KB

DL(Digital Library) is a full-fledged web application built using Yii/PHP. The main purpose of coming up with this demo app is to show newbie Yii developers how to use the various Yii features to build a meaningful web application that is different from the obligatory Blog demo that usually accompanies the frameworks.

License: MIT License

dl's Introduction

Digital Library is a full-fledged web application built using Yii/PHP. The main purpose of coming up with this demo app is to show newbie Yii developers how to use the various Yii features to build a meaningful web application that is different from the obligatory Blog demo that usually accompanies the frameworks.

#About Digital Library: An online book store app that has two modules: Admin (back end) and Library(front end).

#Versions of the app: There are 3 versions of the DL app corresponding to the 3 branches: - Version 1(master branch): - Uses PHP script file for authorization data and access control filters for RBAC - Allows a book to have only one author and category each. - Doesn't support caching - Supports database migration - Version 2('Caching-and-Many-Many-relations' branch): - Uses PHP script file for authorization data and access control filters for RBAC - Allows a book to have a maximum of 3 authors and categories each - Supports caching - Supports database migration - Version 3('Use-Yii-RBAC' branch): - Uses the database for RBAC - There is an admin component for it - Allows a book to have a maximum of 3 authors and categories each - Supports caching - Allows the books catalog to be searched based on title or author - Supports database migration

##Admin Module: Is where the book store is administered

###Admin Module Features:

  • Add/update/delete Books, Authors, Publishers, Categories, Admin Users, Admin Roles
  • Activate/Deactivate/Delete Members
  • View requests for books
  • Issue/return of books

####Books:

  • Add/update/delete books
    • Currently, a book can have only one author, category, and publisher
    • Before adding a book, atleast one author, category, and publisher need to be added to the system

####Authors, Publishers and Categories:

  • Add/update/delete

####Issues:

  • View a list of books issued to the members
  • Delete an issue by flagging it returned

####Requests:

  • View a list of requests for books from members
  • Issue a book to the respective user thereby removing it from the request list

####Admin Users:

  • Are those that administer the system
  • Belong to roles that can be defined by the master admin user (the omnipotent user of the system)
  • Can carry out activities as per the access rights assigned to the roles they belong to
  • The DB script that comes with the system automatically creates the master admin user: "administrator" with the password: "admin"
    • This user has full access rights to the system
  • Can add/delete admin users
    • Assign the user to a role while adding

####Members:

  • Are the public users of the system
  • Activate/deactivate/delete members

####Roles:

  • Roles determine the activities that can be performed by a user in the system

  • The included DB script automatically creates two roles:

    • 'admin'
      • Omnipotent
      • The 'administrator' user belongs to this role
        • Add/delete other admin users and assign roles to them
    • 'supervisor'
      • Less powerful than admin
      • Has restricted access to the backend
  • View a list of users belonging to a role

    • Change the role for a user

##Library Module:

Is the frontend of the application that will be used by members
  • Members can:
    • View the books catalog
    • Add books to the request cart
    • Checkout the books thereby sending a request to the backend
      • Only registered users can send request for books
    • Contact the administrator (needs to be tested!)

###Things that can be learned from studying these versions of the app:

  • Yii Module creation
    • Admin and Library
  • Authentication and authorization
    • Role based access control (both file- and db-based)
  • Enabling and disabling of menu items based on the logged in user's role
  • Use of Yii's ORM (Active Record and Relational Active Record) for database access
  • Form input and AJAX validation
  • Button columns with images in CGridView
  • Error handling
  • Implementing search
  • Database migrations to migrate up/down from one version of the app to the next/previous

###TODO list to make it more feature rich:

####App specific:

  • Allowing multiple authors and categories for a book (implemented in versions 2 and 3)
  • Role-based access control is a manual process
    • Need an interface to automate this process
      • Version 3 implements db based RBAC using srbac extension
      • Users of the Admin role can use the rbac component to create roles, tasks, operations and assign them to users
        • The app will automatically display the appropriate menu items based on these assignments
          • No need to add code in main.php view file to display various menu items
          • No need to add access control filters in controller classes to allow/deny access to actions
  • Concurrency support

####Yii specific:

  • Caching (implemented in versions 2 and 3)
  • Security
  • i18n
  • Search (implemented in version 3)

####Software Requirements:

  • Yii 1.1.9+, PHP 5.3+ and MySQL 5.0+

####Installation:

  • Clone or copy the app in a web-accessible folder

  • Checkout the submodules if cloned via git or copy/symlink the yii-framework to ./protected/yiiCore/

  • Create the database

  • Go!

dl's People

Contributors

krish-chandra avatar suralc avatar

Watchers

 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.