Skip to content
This repository has been archived by the owner on Nov 23, 2018. It is now read-only.

Application and database API design #95

Open
whymarrh opened this issue Oct 25, 2013 · 3 comments
Open

Application and database API design #95

whymarrh opened this issue Oct 25, 2013 · 3 comments

Comments

@whymarrh
Copy link
Contributor

Discuss.

whymarrh added a commit to whymarrh/aba-lookup that referenced this issue Oct 25, 2013
Link to MUNComputerScienceSociety#95.

This paves the way for us to move towards a hand-tuned-SQL-esque project.
@whymarrh
Copy link
Contributor Author

I feel that the database and API portions should reside in a new module separate from AbaLookup. (I'm fairly confident I fixed the issue that lead me to dismiss this option previously.) This module would include the database wrapper (#94), a simple object mapper, the matching algorithm (#29), and a public API. We could called it something generic like Matcher.

As for the methods we'll need exposed for the API, I can think of a few:

  • $api->createUser(array $options);
  • $api->getUserById(int $id);
  • $api->getUserByEmailAddress(string $email);
  • $api->updateUser(User $user);
  • $api->getUserTypes();
  • $api->getScheduleForUser(User user);
  • $api->updateSchedule(Schedule $s);

Question: should/could we move the form validation into the API and have the forms send their data there?

@MitMaro
Copy link
Member

MitMaro commented Oct 28, 2013

Results of the meeting on Oct 27, 2013

img_20131027_212743

@whymarrh
Copy link
Contributor Author

@MitMaro Is this up next for discussion?

To be completely honest, I don't remember much (read: any) of the details — I know we had a design in mind that separated the database/object mapper from the controllers? That picture has no answers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants