ngallajuke / glance-backend Goto Github PK
View Code? Open in Web Editor NEWBackend- Tailors Social Media App
Backend- Tailors Social Media App
Right now user controller is returning all the records. This can be an issue when we reach million of record or even less.
As a user, I can see records (ie user, post, etc) paginated
Right now the model code relies heavily on mongo. This can be a pain if we want the underlying database. See example https://github.com/NgallaJuke/Glance-Backend/blob/master/models/User.js
As a developer, I can interact with model using repository object oriented methods.
// just an abstract shell class until we have the base methods
export default abstract class Repository {
findAll () {}
find () {}
update() {}
delete() {}
count () {}
exists () {}
}
import Repository from '@/repository/Repository';
export default class UserRepository extends Repository {
}
Right now the shape of the response changes depending on the page we're in. That can be avoided by having a same json schema for the api responses.
Context:
Glance-Backend/controllers/user.js
Line 38 in b934ac8
Glance-Backend/controllers/user.js
Line 68 in b934ac8
{
type: 'success|error|warning',
message: string,
data: {} | []
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.