ui-cs383 / Freedom-Galaxy

Primary repository for the FitG
1 stars 6 forks source link

Jeff's Questions #34

Closed CrockAgile closed 10 years ago

CrockAgile commented 10 years ago

As I work on the prototypes of the backend functions I have been accumulating a couple of questions I thought that maybe some of you may be able to answer, so please feel free to chime in if you think you may have some answer for me!

  1. Not being directly involved with the SQL Alchemy side of things, by what imports and function calls should my code use to get/update data on the database?
  2. What sort of limitations are there for input I should expect from the client when making calls? I will obviously try to make it as basic as possible, but again not being on the client side of things I do not fully understand what I can ask it to pass me.
  3. Am I also in charge of creating the classes for the implementation? So far I have only been coding prototype functions with fictitious data structures being passed as I imagine them, but I have recently been informed that these classes are also backend responsibility, and I am fairly certain the other groups on the backend team are not working on this. On one hand it would be nice for us to make the classes so we know how to handle them, but implementing all both the Class and Use case diagrams might be a lot of work for just myself and @b-cumber . But maybe it will be possible, as the time is difficult to estimate.

Thank you for helping with my confusion! <3

CrockAgile commented 10 years ago

Or I suppose that there is no need for our own classes because all that info is stored on the DB, so really just need to know how to interact with the DB, reading, updating, etc.

andyleejordan commented 10 years ago

I think interaction is going to be handled by a connection abstraction layer, which will go through SnakeMQ, which will communicate with SQLAlchemy. If you have any code written, please push it to a feature branch off develop so that it's shared, that way as the backend is developed, your questions will get answered by implementation (believe me, I have the same questions).

Greg-Donaldson commented 10 years ago

Sorry for the delay. I had to rebuild the script that creates the database. Its done, and I am working on a key and tutorial script to show you how to call information out of the database. It will be with my next push to my repo.

CrockAgile commented 10 years ago

Thanks Greg! Actually already have been reading over a bunch of your database code and think I have it somewhat figured out, but I am sure your information will be useful as well! I am currently testing two approaches. One being just a direct database statement based approach, more on the functional side of things. And the other is direct mapping to the database, so I can just refer to the DB in an OOP manner. Benefit of the latter would be that it comes with built in rollback support and may save on required code in the long run at the cost of initial investment.

Greg-Donaldson commented 10 years ago

@crockj72 Alright. example.py (available on my repo, and in the pull request) should answer your questions. databaseKey.txt should help as well. Enjoy!

CrockAgile commented 10 years ago

That is excellent and in fact your new update pretty much matches exactly the updates I was making haha so points for us both coming up with the same things from the ORM docs? I will update my code and might modify little pieces of yours just for some consistency. Issue closed!