Giter VIP home page Giter VIP logo

hmeets's Introduction

social_media_preview

hmeets's People

Contributors

aj-uniter avatar alanpjohn avatar muskansingh11 avatar pavleen14 avatar rashmikareddya avatar rishikeshshede avatar shubhrabhuniaghosh avatar sushmadammalapati avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hmeets's Issues

create dashboard

Create a dashboard of manager. Contains manager basic information along with meeting booking facility

Complete dao

Join input coming from controller to db using jsbc

Feedback mechanism

Feedback functionality

There will be a Recent Meetings table in the Manager and Member pages. The table contains details of past meetings that were unrated by the user. Each will have a button called Rate which will redirect it to /feedback

This will show feedback.jsp . The feedback.jsp is a page where users can give feedback for the room.

  • It will show meeting room details
  • Ask users for a rating between 1-10
  • Ask for some extra comments
  • Submit this feedback

Intended classes

com:
  hsbc:
    meets:
      dao:
      - FeedbackDao
      dao.impl:
      - FeedbackJDBCDaoImpl
      service:
      - FeedbackService
      service.impl:
      - FeedbackServiceImpl
      entity:
      - Feedback

The exception , util and validation classes will be added according to code development

What all has to be implemented

  • Get Feedback.jsp with meeting room details

  • Submit feedback

  • Get feedback summary

    Implementing this into service so that we can show a summary of feedback when we show meeting room along with the rating

request to data base

  • please mention the database name.
    image

  • or remove this
    image

  • keep this part
    image
    before
    image
    this part

  • change constraint names

User Functionalities

"/" - (root) controller

Home Page

  • GET: route to home.jsp

Display Meeting Rooms

  • GET: all rooms details
    • AJAX GET req from homepage.jsp to "/room" to get list of rooms
    • will paginate later to display few rooms at once (and send start-point and limit in query to get limited rooms at one go in response)
    • POST request to "/"
      • check if DB already has data:
        • TRUE: throw exception - DataAlreadyExistsException(), let user know that
        • FALSE: fetch XML, parse, encrypt passwords if not already encrypted(assumption to discuss with team)
        • similar encryption will be followed in frontend before sending user credentials
  • Login button
    • GET: req to "/login" to get login.jsp
  • Import Users (Button)

"/login" controller

Login Page

  • GET: login.jsp
  • POST: to authenticate user and redirect
  • User Authentication status:
    • Create session
    • Succes:now got a user object from homeservice
      1. Pass user as session attribute
      2. Based on user Role, pass control to respective controller i.e., admin , manager , member
  • Failed: InvalidCredentialsException()
    1. set username as session attribute
    2. set session timeout (not fixed)
    3. sendRedirect to "/login"

Rough Flow

Flow

TODOs

  • create basic classes files in all layers to start
  • create a home and login views
  • setup initial route
  • figure out how to parse XML data
  • store parsed data into DB
  • encrypt the passwords before storing
  • Create session while login
  • Create a method to search users by name
  • Close connection from the controller on destroyed
  • Convert prepared statements to callable statements
  • Use Logger functionality
  • Add documentation comments
  • Separate query constants into an enum

Document Preparation

As part of deliverables, following items have to submitted.
Design Documents:

  • Data Flow Diagram
  • ER-Diagram
  • Class Diagram
  • Use Case Diagram.

Test Case Documents:

  • Excel Workbook of test cases to validate the application.

Power Point Presentation:

  • PPT containing key facets of the project such as team members, application features, UI Snapshots and highlights from the learning(concepts, tools, collaboration) etc. during the project.

Short Video:

  • Max 7 minute video

Add on:

  • Proper README.md - containing necessary instructions to configure and execute the project on the env.

Javadoc comments

We need to add comments on our code and it's preferred if we use a similar code comment convention

Package comments

The package comments are stored in the package-info.java

/**
 * Package description
 * 
 * @author <AUTHOR>
 */
package com.hsbc.meets.subpackage;

Most of the comments for the package were implemented initially.

Class comments

The class comments will be added in the .java file for the class above the class declaration

/**
 * The class description
 * 
 * @author <AUTHOR>
 *
 */
public class YourClass {
    
}

Method comments

The method comments will be added above the method declaration

	/**
	 * Method description ( write it like "Returns the sum" or "Prints sum")
	 * 
	 * @param parameter description of parameter
	 * @return What we will return
	 * @throws Exception if something goes wrong
	 */
     public ReturnType function()

JavaDoc conventions

you can refer this document to understand how comments can be written and how they work. The bare minimum tag is for classes and packages is @author

Methods should all the neccessary fields based on method signature.

In eclipse you can type /* above the declaration and press ENTER to generate an empty template. If you are using the eclipse source addition functionality, just tick the generate comments checkbox to get comment templates

Resolving database strategy

The previous approach and issue #22 to database queries and procedures was not working so we are starting a fresh task for it on the same branch

Naming conventions

The sql code currently added has a few inconsistencies mostly in the naming.

  • database name - should be more apt than projectdatabase
  • table names should have prefix - tbl_
  • stored procedures should have prefix - sp_
  • events should have the prefix - ev_
  • triggers should have the prefix - tr_
  • views have the prefix - vw_

SQL directory structure

  • The /sql folder will have one script to create database and table. Each table creation command will have a IF NOT EXISTS clause which is a good practice as it supports database migration.

  • Every stored procedure, view, event, trigger will have individual .sql files to boost productivity. when the project is going to be finished all the final sql scripts will be merged into one.

  • For database migration, a practice followed by tools such as alembic is to create revisions. So when we have to alter the .sql files after we already finalize them, instead of editting existing queries, prefer adding modify statements underneath them. This is useful for maintaining database revisions which is extremely useful for migrations. This is not a must but it is a preferred way of writing the SQL scripts.

    for example, If you use the create table sql scripts and the next day we change them to fix something, then you dont have to delete existing table to run the sql scripts again. just run the file as a whole again. The create table wont execute if the table already exists and the following alter table commands will update the structure.

SQL Integration

To comfortably integrate the sql database code with the pull requests in coming days. SQL functionswill be implemented in order of priority. That means as user-functionalities is the earliest pull request, all sql functions with respect to user-functionalities will be implemented first. This allows us to finish off even the database integration part of user-functionalities when we merge it with main. Similarly, we implement all the sql functions for meeting-room and then meeting-booking and then feedback.

Things to do

  • Rename the database and table names according to convention
  • Rename the trigger names according to convention

user-functionalities

  • datatype of tbl_users.lastlogin to TIMESTAMP
  • list users by name - sp
  • authenticate users - sp
  • mass insert users - sp
  • update last login - sp
  • make ID as AUTO_INCREMENT in Create statement (same in alter table)
  • don't assign any value to ID while inserting user - sp_InsertIntoUsers
  • keep varchar lengths same throughout
  • change Id to ID - sp_UpdateLastLogin

meeting-room

  • add meeting room - sp
  • delete amenity from meeting room - sp
  • get list of meeting rooms - sp
  • fetch all details of the meeting room except meeting room id - sp
  • get all amenities names - sp
  • add amenity to meeting room - sp
  • edit meeting room details- sp
  • trigger room cost update according to amenities edit - tr
  • check meeting room exists - vw/sp
  • update credits of manager every monday - ev

meeting

  • book meeting - sp
  • add user to meeting - sp
  • get upcoming meetings - sp
  • get recent meetings - sp

feedback

  • insert feedback - sp
  • update average rating when insert feedback triggered - tr

create controller

Controller servlet, should be responsible for processing the data and redirecting it accordingly

Book Meeting

UI
All are mandatory fields
Title (input field)
Meeting Date (choose from calendar)
Start time (input field)
Duration (input field)
Meeting type ( select from options radio button)
A Ui to search for and add members
A UI to select a meeting room

Save
cancel

Rules
The date and time should be a later date and time
Meeting should be available on start date time and the duration
Seating capacity > no of attendees
Project manager credits > cph*hours (cph=credits required per hour)
Validate amenity according to the meeting type
Generate unique id
If booked successfully deduce credits

  1. Classroom training - Whiteboard and projector
  2. Online training - Wifi and projector
  3. Conference call - Conference call facility
  4. business - Projector

Basic Implementation Idea:

Dao
BookMeetingRoomDao: BookMeeting
Directly add the meeting details in db

Controller:
BookMeetingRoomController: BookMeeting

View:
jsp page for manager

  • Create a dashboard of manager. Contains manager basic information along with meeting booking facility
  • Join input coming from controller to db using jsbc
  • Controller servlet, should be responsible for processing the data and redirecting it accordingly

Database

Here is the ER diagram with the changes (Version 2.1)

ER Diagram

Meeting Booking Database Demand

image

boolean checkIfMeetingTitleAlreadyExists(String MeetingTitle)
return true if meeting name already exists and false if not

Get amenities by meeting room name(Parameter = Room Name)
Return type = list of amenities Name

  • get All Users
  • show Meeting Rooms Conditions Applied
  • Get amenities by meeting room name
  • checkIfMeetingTitleAlreadyExists (for validation layer)
  • check Meeting Slot Is Free By Meeting room Id (for validation layer)
  • check Amenities Present By Meeting Room Id (for validation layer)
  • check Seat Capacity By Meeting Room Id (for validation layer)
  • check Manager Credits (for validation layer)
  • insert Value In Meeting (everything except meeting id)
  • add Attendee By User mail id And Meeting Id
  • deduct Manager Credit By Meeting Room Id

Room CRUD Operations

Functionality:

There will be an Admin Page which will include

  • Admin details ( Dummy data for now )
  • List of Meeting Rooms with Edit Room functionality
  • Create Room Button

Basic Implementation Idea:

Dao:

  1. MeetingRoom

Controllers:

  1. createRoom
  2. editRoom

As per the problem statement, deleteRoom functionality is not required, so we might include if time permits, otherwise not. #11

Service:
createRoomController:

  1. with different validations such as name/seating capacity is mandatory, at least 2 amenities should be included
  2. perHourCharges which will be calculated on the basis on amenities.
Amenities Credits
Seating capacity <=5 0 credits
Seating capacity >5 and <=10 10 credits
Seating capacity >10 20 credits
Projector 5 credits
Wifi Connection 10 credits
Conference Call Facility 15 credits
WhiteBoard 5 credits
Water dispenser 5 credits
TV 10 credits
Coffee Machine 10 credits

editRoomController:

  1. with different validations such as name/seating capacity is mandatory, at least 2 amenities should be included
  2. perHourCharges which will be calculated on the basis on amenities
  3. if there is meeting booked already for that meeting room, then in such a case that meeting details won't be affected. Only the future bookings will now be done on the updated room details.

Structured Implementation Plan:

Model

Class MeetingRoom{

Int meetingRoomId;
String name
Int seatingCapacity
Int rating = 0
String[] Amenities
Int credits PerHour
Int noOfFeedbacks = 0

//Get for all set for all (except meetingId)
//constructors
}

Dao Interface : CRUD operations

Void addMeetingRoom(MeetingRoom meetingRoom) throws MeetingRoomAlreadyExistsException{

}

Void updateMeetingRoomById(MeetingRoom meetingRoom) throws MeetingRoomDoesNotExistsException{

}

List displayMeetingRoom(){
}

View/UI Layer

  • links for creating room/ editing room
  • button for setting availability of meeting room.

Controller Layer
Service layer
Exception layer

^ The plan for above layers has been discussed and will be implemented as we move ahead.

TO DO LIST :

  • Creating Dummy Data
  • Creating Admin Page
  • Creating Model
  • Creating Dao layer
  • Creating Service layer
  • working on controllers
  • JSP Pages
  • Display all meeting Rooms functionality
  • Create a new meeting room functionality
  • Editing the meeting room functionality
  • Testing the functionality

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.