Comments (1)
So, there's two ways I can see this going. Both are a little bit annoying to deal with.
The first is decently similar to what we currently do in Realm (as in, data is stored under one type). We have one table full of all comments, with the model having something like this:
public class GameComment
{
public int? LevelId { get; set; }
public ObjectId? ProfileId { get; set; }
public int? PhotoId { get; set; } // (in the future)
// ...
}
I like this, but it comes with the advantage of bloating up the model a bit, and it becomes a bit janky in regards to retrieving the host object and serializing it. We already have a system like this for Events, and to be frank it's a bit of a pain to deal with both internally and in refresh-web.
The other approach to use is having multiple tables. So, instead of storing multiple host object keys in the first approach, we have a dedicated table & class for each time a comment can be posted to an object:
public interface IComment
{
// ...
}
public class ProfileComment : IComment
{
public GameUser? Profile { get; set; }
}
public class LevelComment : IComment
{
public GameLevel? Level { get; set; }
}
public class PhotoComment : IComment
{
public GamePhoto? Photo { get; set; }
}
Maybe we could have it be IComment<THost>
or something to keep API response types or w/e simple, but that's the idea. This comes at the cost of having to juggle multiple tables but I think that's better than juggling different keys on one table.
I lean towards the second approach, personally.
from refresh.
Related Issues (20)
- Team Pick by date/allow updates to Team Picks
- "There are other players playing this level, would you like to join them?" prompt appearing even if nobody is playing the level
- New Reviews pop-up doesn't take into account which game you are playing HOT 5
- Comments cannot be uploaded HOT 1
- Locked Adventures can be entered via Community Tab and Recent Activity
- Sublevels appear on Cool Levels page in LBP Vita HOT 1
- LBP hangs when attempting to find levels via a tag HOT 2
- 'Refresh.GameServer.Configuration.GameServerConfig' does not contain a definition for 'MaximumAssetSafetyLevel' HOT 3
- Track level completions
- Getting top scores by date cutoff HOT 2
- Store history of level hash for levels HOT 1
- Don't update level modification date if the root level has not changed
- Allow duplicate level uploads if the user is the original author
- Dive-In doesn't work properly on Adventure Levels HOT 2
- Dive In not working at all in LBP2 HOT 12
- User reviews list shows reviews from all the games
- Grief Report Photos don't get published
- Send notifications when someone comments on your profile/level
- Investigate scores by deleted users still not being removed properly
- Recent Activity Events for commenting on a level/profile
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from refresh.