GithubHelp home page GithubHelp logo

masterdid2022 / sopra-project-lhd Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 5.64 MB

A small project of software engineering, aiming to recreate a planning app

License: GNU General Public License v2.0

Java 87.37% CSS 2.27% PLpgSQL 10.36%
continuous-integration hikari-connection-pool hyperplanning java kanban-board nord-theme planning

sopra-project-lhd's People

Contributors

anastygnome avatar desmondmies avatar theo-hafsaoui avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

sopra-project-lhd's Issues

DAO Packet Core

To begin complete the user story we need the DAO classes, ---and the interface DAO---

image-title

Update SlotDao

as of now slotDao use string to manipulate the timerange we should try to find a better way

Facade : c.r.u.d

As of now, the facade only let to Read, but to achieve the next US(#20 #21 #22 #23) we need to be able
to easily manipulate the database through the facade, furthermore with #62 we should implement rigorous
testing.

  • addToSchedule(Slot)
  • DeteleInSchedule(Slot)
  • UpdateInSchedule(OldSlot,NewSlot)
  • Test

IHM Model

To begin complete the user story we need an HMI

Typo and constraint missing in DB

Admin should have an unique idea

lhd=# \d+ admins
                                                          Table "public.admins"
  Column  |       Type        | Collation | Nullable |           Default            | Storage  | Compression | Stats target | Description
----------+-------------------+-----------+----------+------------------------------+----------+-------------+--------------+-------------
 id       | bigint            |           | not null | generated always as identity | plain    |             |              |
 name     | character varying |           | not null |                              | extended |             |              |
 fname    | character varying |           | not null |                              | extended |             |              |
 email    | email             |           | not null |                              | extended |             |              |
 password | character varying |           | not null |                              | extended |             |              |
 dpt      | character varying |           |          |                              | extended |             |              |
Indexes:
    "admins_lower_email_key" UNIQUE, btree (lower(email::text))
Inherits: users
Access method: heap

Repetion in subject in french/english

lhd=# \d+ subject
                                                             Table "public.subject"
     Column     |       Type        | Collation | Nullable |           Default            | Storage  | Compression | Stats target | Description
----------------+-------------------+-----------+----------+------------------------------+----------+-------------+--------------+-------------
 id             | bigint            |           | not null | generated always as identity | plain    |             |              |
 name           | character varying |           | not null |                              | extended |             |              |
 hour_count_max | double precision  |           | not null |                              | plain    |             |              |
 nb_heure_max   | double precision  |           | not null |                              | plain    |             |              |
Indexes:
    "subject_pkey" PRIMARY KEY, btree (id)
Referenced by:
    TABLE "slots" CONSTRAINT "subject_fkey" FOREIGN KEY (subject) REFERENCES subject(id)
Access method: heap```

update delete

To avoid corrupt object, when we delete an entity the id should be set to -2
State Diagram
image-title

Facade : Users getter

Schedule needs to be able to get users (student / professor / admin) via mail and password, returning the correct Entity.
This makes it easy for future implementation of Auth. #47
And is needed for controller implementation #65 (right now for testing purpose, but in the long run, linking up views and facade in the auth system)

US1 : Consult schedule

Description:
As a User I want to consult a schedule

Precondition:User is connected(#47 )
Sequence Diagram:
image-title

Communication diagram:
image-title

Requirement:

  • Entity classes
  • DAO classes #36
  • IHM
  • #54

Controller Edt

first implementation of edt controller and observable pattern, upon Facade Schedule #61

road to 80% of code coverage

with the return of a functional C.I, we should erase every code smell and go the green again !
with adminDAO @beforeach
and unification of factory with Of for entities and getInstance for DAO

Add a real Slot in the Database

To realize the second User Story #20 we need to be able to add a Slot(done with #51) but also connect
this slot to associative table(Group_slot,Professor_slot).

To my mind we have two possibility:

  • first and simplest add an overload to existing save
 public void save ( Slot slot, Student student ) throws SQLException
 public void save ( Slot slot , Student student, Professor professor) throws SQLException
  • the second is almost the same but new dao for this associative table and the connection done in the facade
 public static addSlot ( Slot slot, Student student ) 
 public void addSlot ( Slot slot , Student student, Professor professor)

I prefer the first one but the second would also make sense to me.

[Bug] circular call between Student and Group

public class Student extends User 
    private List<Group> studendGroup;
*******************************************
public class Group 

    private long id;

    private final String name;
    private List<Student> students; //modify List<Student class>

The redundancy of information inside the class Student and Group is an issue for the #36 DAO.
Therefore we need delete the List<Student> students inside Group and update the DAO and the entities with this change.

CI Database

We need to have docker database for our CI

DAO Packet User

DAO USer

To begin complete the user story we need the DAO classes
image-title
Complete

Expand the number of exceptions

As of now we only have one exception, which make the readability of our code poor.
we should try to expand the number of exception to solve this issue, here are some proposal
DAO exception:

  • EntityNotFound:fail to find entity
    msg:Might be because the object $ClassOfObject is not persisted see if id is greater than 0 id[$IdOfObject]
  • FailedToSaveEntity:fail in saving
    msg:Might be because the entity failed to satisfied an unicity constraint
  • FailedToUpdateEntity:failure in update
    msg:Might be because the object $ClassOfObject is not persisted see if id is greater than 0 id[$IdOfObject] or it might be because the entity failed to satisfied an unicity constraint
  • FailedToLinkTwoEntity: for join table
    msg:Might be because one if the entity is not persisted see ID1[$IdOfObject1] and ID2[$IdOfObject2]

Entity exception:

  • IDexception No change

Facade exception:

  • NotEntityNotFound because if the getter return null that's the same msg
  • AddressException:if the format of the email is not correct from the official java email package
  • SomeParameterAreNotPersisted: if a parameter is not the database
    msg:You need to persisted these entity:$ListOfNotPersistedEntities

Gui exception:
-Might be contentious but I believe, None. Do you agree @anastygnome @Desmondmies

Skeleton Slot Packet

Skeleton Slot Packet
image-title

To begin complete the user story we need the entity classes

IHM View

To begin complete the user story we need an HMI

US5 : Delete slot

Description:
As an admin I want to delete a slot
Requirement:

  • US2

Facade Shedule

To improve readability and ease of use, we need to transform Schedule.java into a facade between the entities/Dao and the hmi
image-title

Retrieve DAO Slots to IHM

Currently working on getting dao slots information to show them inside ihm using the infamous MVC pattern

View Login

To solve the US6 #47 we need an interface for the user to enter his credential

DAO Packet Slot

DAO Packet Slot
To begin complete the user story we need the DAO classes
image-title
Requirement:

  • new SlotDAO
    • Read
    • Delete
  • new ClassroomDAO
  • new SubjectDAO
  • new GroupDAO
    note: the interface is made in the Core Packet

Skeleton User Packet

Skeleton User Packet
image-title

To begin complete the user story we need the entity classes

Edt Grid : Helper methods & QoL improvements

Need to add a little method to clear the edt grid content, for example when switching to another week :
erase slots from grid -> populate week

And adding week date for each day
Instead of MONDAY | TUESDAY | ...
Having MONDAY 15 | TUESDAY 16 | ...

US4 : Update slot

Description:
As an admin I want to modify a slot
Requirement:

  • US3

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.