ivansofeski / Hackademy-IV-frontend

1 stars 5 forks source link

changing the project json file. #134

Closed sheon closed 7 years ago

sheon commented 7 years ago

I am changing the project.json file to include the events for each project. Thus, to better organize the images of the projects, each project has its own folder named as project001, including two subfolders named as main (main picture of the project) and events (one picture per event numbered from 1 increasing as the new events are added to the project).

alayham commented 7 years ago

I suggest creating a new "blog" or "events" entity that contains entries, each entry has a project id, and a new component to show entries, then you use the component to show the blog entries of a project in the project page. This is how blogs will be represented in the DB, and this is a lot easier and more flexible, and does not require any update on the existing code.

@IvanCybercom what do you think?

ahmedBazzara commented 7 years ago

and you also added a new property for the projects interface , openProject : boolean

alayham commented 7 years ago

If you put blog entries inside the project entity, and if admin wants to see the latest updates of all projects, then admin must load all project to be able to see their latest updates.

If you create a new entity for blog entries, then you can access all entries if needed without loading any all projects, or the entries of a specific project as you expect the use case to be.

sheon commented 7 years ago

I understand what Al says. Please spare sometime to think about what Al suggests and let me know what you think. I can change the file.

here is a pull request for current changes. If you like the current design then approve it so that I can merge it. #137

yaseenawazah commented 7 years ago

I agree with Al, it's better for the DB also, because some projects won't have any post, and some of them will have many posts.

and because we are dealing with RDBMS and not non-relational databases, for me that makes more sense.

sheon commented 7 years ago

The event is now a separate JSON and interface. new pull request been created #138

alayham commented 7 years ago

fixed in #138