uprm-inso4117-2023-2024-s2 / semester-project-uprmarketplace

semester-project-uprmarketplace created by GitHub Classroom
0 stars 0 forks source link

Address Milestone 2 Feedback (2.1.2 Terminology) #142

Closed BreannaGSegarra closed 4 months ago

BreannaGSegarra commented 5 months ago

Address the following feedback for the milestone 2 documentation: Function signatures:

When you think of function signatures you are thinking about all that a function/operation/action needs in order to proceed and all that a function will produce. So, if you take for example your function exploreListings, if it needs to produce a collection of Listing - and it's not generating these Listing itself - then there has to be a parameter that it's fed, from which the Listings can be taken. Once you think this far, it's easy to see that any collection of Listing can be further constrained and so we might want to have a function constrainListings(collection: Listing[], criteria: Criterion[]): Listing[] then exploreListing would just be the special case where we call constrainListing with the collection of all the Listings that are in our world. Similar advice applies to many other function signatures.

Also, you have to decide - and document - how you think about e.g. a Listing. If I can browse Listings and then get in contact with the Seller, then somehow I have to be able to obtain the Seller from the Listing. But if this is so, then the function updateListing does not need the separate Seller even worse: the two Sellers then require that a developer remembers which one actually gets used.

Having a function removeListing producing void should ring a warning bell: of course it modifies something, namely a collection of Listings. So, we need a parameter that represents the collection of Listing before we remove one and we need a result component that represents the collection of Listing after we have removed the one we want gone.

Behaviors:

Some of the events that you have within the behaviors are not events. For example, "user interacts with various listings and categories" is not an event: think about it, the way it's stated it needs the user to do something and the interaction will have duration. What you want here is an event that is between the action of just browsing and the action of actually considering a listing. What could that event be? Maybe something like "the user has just found an item that is relevant to them" or similar.

Recommended Difficulty: 2/5 Recommended Urgency: 2.5/5