Cabal-Syndicate / randora_website

Cabal Syndicate's website
1 stars 2 forks source link

website db structure #12

Open FFX01 opened 9 years ago

FFX01 commented 9 years ago

OK, so our database structure is starting to get a little complicated, so I mapped out this flow chart to help us visualize it:

randora_website

Alternatively:

randora_website_alt

We should probably get this structure straightened out before I continue as otherwise I have a feeling we will end up needing to re-write a lot of code.

Master-Foo commented 9 years ago

Thanks for mapping this out. BTW, MySQL Workbench will do this for you automatically, (If you want to go through the trouble of setting up MySQL).

Don't worry, this is nowhere near complex. I've worked on systems with hundreds of models. You once you get to understand the way things work it's pretty easy to decipher.

I think the first image best covers our use case, so run with that. But treat each yellow piece as it's own App. Generally speaking, an App = Model = DB Table.

Master-Foo commented 9 years ago

@FFX01 I hate to sound like the guy nagging or something. I'm not doing that. I just want to check up on you and see how you are doing. As always, work at a pace that is convenient for you.

I am curious to see where you are at though. There's a lot on your plate, so I understand that you shouldn't be done by now.

Do you have any questions, or anything that you are unsure about?

Let me know if there is anything I can do to guide you in the right direction. I'm here as a resource, so be sure to use me.

BTW, I'm in the middle of building the first game for Randora-Framework now. There's still a lot that needs to be done with the Framework, but this is giving me an opportunity to figure out all the minor things we still need to flesh out in the Framework itself.

So, yeah, I think we are building something really cool. Thanks for your help!

FFX01 commented 9 years ago

Hey, haven't been able to work on this that much over the last 2 days. I was moving into my new place. I should have some time tomorrow to continue working on it. I really do feel like this is a pretty cool project, and thanks to working on it, I have an interview Tuesday for a jr. dev position.

Do you have any questions, or anything that you are unsure about?

Yeah, some advice would be great.

Master-Foo commented 9 years ago

Good luck with your interview, dude. Give them my e-mail if you want a reference.

Do you think I should define the Board, Thread, and Post models in the forum module, or each in a separate module(I think module sounds better than django app).

Yeah, those are pretty tightly related. You really can't have one without the others. So, put them all in one "App", or "Module" (I use both terms interchangeably, they are the same thing).

However, instead of putting them all in models.py, make a models folder inside the app and then make a board.py thread.py, post.py inside that folder. This way, we are encouraging "Everything in it's place"

Would you rather have me right unit tests now or after we have a more complete site?

I will leave that up to you. We will need them, because that's how we verify things when we migrate to staging so we can be sure we can safely move to production. We don't need them NOW, but we will need them before we can "Go Live".

You'll notice, I haven't even done extensive unit testing in Randora-Framework yet. (And I'm a big proponent of Unit Testing). The reason is, the spec isn't 100% nailed down, so unit testing at this stage is kind of cumbersome. We can make the same lazy excuse for the current state of the website.

When you think about it, the Unit Test IS the spec. So, you write the Unit Test when you've finalized the spec. Right now, we are just prototyping to see what we like, what works, what doesn't. So, it's OK to be wrong about things right now.

When users post in a thread, should it generate a form right on the same page or redirect to a new post form page? I would prefer the former, but I know some people prefer the latter.

Go with the simplest solution for now (Which would be to have things on their own separate page) Once we have everything working we can use various techniques to mold the page into something more user friendly.

General rule of thumb is:

1 Make it work.

  1. Make it better.
  2. Make it betterer

We are still at the beginning of step 1.

Do you think the way I have implemented the URLs thus far is an efficient way of doing things?

The main concern with URLs is, to keep "DRY". We don't really have a very complex system at this time, so DRY isn't an issue yet. Let me know when you find yourself breaking "DRY" and I'll show you some techniques to help "KISS".

Should we just adopt PEP 8 instead of trying to write our own list of conventions?

That's fine. I'm not the one writing the code, so I'm not going to be a Nazi about enforcing coding standards. But you are deep in the shit, so I'll let you decide. All I ask is that there is SOME standard and that it is consistent. PEP 8 would cover this.

Could you take a look at users/views.py and give me some critique? I feel like there is a lot of code there for what should be a relatively simple task.

I'll take a look at it later today. Is there anything specific you want me to look at? Glancing at it, it actually seems pretty small for a Users controller. Users is generally the core module of a project. Almost everything is related to Users. So, don't be afraid if it is a lot of code. It will be MUCH bigger.

I will do a code review of it though. Expect a report tomorrow.

Master-Foo commented 9 years ago

I created a new issue covering the Code Review

FFX01 commented 9 years ago

So, I have spent a little time working on this, and plan to spend a lot more time doing so tomorrow as well.

Just wanted to share that I got the Jr Dev job! Honestly, I don't think I could have done it without this project. I'm very grateful I've been able to work with you. I'll continue to do my best.

Master-Foo commented 9 years ago

Cool man, That's kind of the idea behind this. Work on some stupid shit here for free and eventually you are working on important shit somewhere else for lots of money.

Anyway, yeah, take your time. Let me know when you are ready for the next step.