Ololade
Posts: 0
Joined: Wed Jul 16, 2014 8:24 pm

HELP! What is the best way to develop this?

I am new to MongoDB and an intermediate with javascript. I am wondering how to go about building the app below (for the purpose of educating and motivating staff at my health department about a national initiative we will be participating in).
I am doing this for work and will hopefully be able to add it to my speaking points at a national conference where I'll be presenting in a couple of months (for other organizations to learn from and perhaps to build the same kind of thing using appery too) but I need help!! (Our IT dept doesn't have time to help me with this)

I need to know if this is even possible using appery and if anyone can help me figure out how to go about it...

Basically, it works like this:

Users register by signing up (email as login and password) and select one of 3 teams to join (Heat, Rockets, Lakers) and see a list of multiple choice questions such as:

Question 1. Who is scooby do?
a. a dog
b. a cat
c. a person

Question 2. Who is Stephen Colbert
a. The president of Canada
b. A CNN anchor
c. A comedian

DATABASE:
I have four collections so far (i'm not sure if this is the best set up):
USERS (username, passsword, team),
POINTS (userpoints, userteampoints),
GAMES (questions, answera, answerb, answerc, pointvalues), and
TEAMS (teamname, totalpoints)
(I still have no idea how to record what questions a user has completed yet)

GENERAL IDEA:
Here is how it is supposed to work: I have a question bank (25 total questions) saved in the games collection. Each time the user answers an individual question correctly, they get either 6 (easy questions) or 10 (hard questions) points added to their userpoints column in my "points" collection. That question disappears from their list of questions (so they can't keep answering the same question and getting more points) and they choose another question to answer.

When a user gets points, their total team score (the team they selected at the beginning registration) is also increased as a bonus with half of those points so "UserBob" gets 6 points for his answering Question1 correctly and his team, Rockets, also gets 3 points as a bonus for his work.

DYANAMIC SIDE
In terms of moving back and forth between collections, I need to be able to:

  • Assign points to a user for answering specific questions

  • Identify and remove questions a user has completed

  • Show users their own current points

  • Show users the number of points they have added to their team

  • Show users each team's total current points (the rankings)

    Is this something that can be accomplished using Appery? Would it require a bunch of server scripts or is there an easier way? I am assuming this would involve using "pointers" but I haven't seen any examples i can follow.

    I have registration complete but I'm not sure how to go about doing the rest (i'm used to relational databases and so I'm learning MondoDB on the fly).

Ololade
Posts: 0
Joined: Wed Jul 16, 2014 8:24 pm

HELP! What is the best way to develop this?

also, I have been looking at all the available appery documentation and watching tutorials like crazy!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

HELP! What is the best way to develop this?

Hello!

You don't need to use a few DB, it would be enough one DB with several collections (team, question, etc.)

To link user with a team in Users collection add team field with pointer type which points to a specific team.

To check if user answered a question create collection with user and question fields, or store in Users collection array with answered questions id.

Here is more information http://devcenter.appery.io/documentat...

Ololade
Posts: 0
Joined: Wed Jul 16, 2014 8:24 pm

HELP! What is the best way to develop this?

Thank you for your response---I appreciate your thoughts but I was wondering if someone out there is willing to provide more detail.

I'm not really sure how this item got marked as 'answered' but i still would like to see if anyone else has perhaps a few ideas to share...

For example, I am aware of what the pointer type is but i was hoping someone might provide advice on how to use it (that goes for the other things I wrote too)

obullei
Posts: 0
Joined: Thu Jun 05, 2014 12:17 am

HELP! What is the best way to develop this?

Hello!

Please specify do you need support team help?

Ololade
Posts: 0
Joined: Wed Jul 16, 2014 8:24 pm

HELP! What is the best way to develop this?

yes :) Some of the support staff provide more detailed help on some of these questions so i was (or am still) hoping one of them might help me a bit

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

HELP! What is the best way to develop this?

Hi Ololade,

You can read more about pointer type here:

http://devcenter.appery.io/documentat...

Regards.

Return to “Issues”