Comments (3)
This is done in the commit above, however, there're quite a few things that IMO should be done. The most important for me are:
- 1 - The form state should be managed by the store as well as validation. I'm not sure what the best way to do this is, but
react-form
seems like a popular choice. - 2 - All this redux CRUD boilerplate can be avoided by using a model framework (backbone, ampersand, maybe lorejs) and syncing it with the store, if [...]
- 3 - Steemconnect.com should follow HTTP standards and expose a convention driven API
follow HTTP standards
Creating things responds with 201, things being good respond with 200, proper error codes throughout; 400, 422, 401, 403, 502 will all be common.
expose a convention driven API
The post/comments API should have the structure:
fullPermlink
could be the /:category/:author/:permlink
url encoded. This is similar to what GitLab does. But the URL doesn't matter here.
POST /api/v1/comments/
GET /api/v1/comments/?filter=...
GET /api/v1/comments/:fullPermlink
DELETE /api/v1/comments/:fullPermlink
PUT /api/v1/comments/:fullPermlink
The votes API should look like
POST /api/v1/comments/:fullPermlink/votes
Or something like that.
This sort of convention makes it very simple to take something like ampersand
and minimize the amount of boilerplate code for API integration. A framework with swagger
support like loopback
could also have a similar effect.
from busy.
Are all these points related to the same issue? Breaking these down into separate issues would help to discuss easier about each part. I'm interested to learn more about this:
All this redux CRUD boilerplate can be avoided by using a model framework (backbone, ampersand, maybe lorejs) and syncing it with the store,
Are you talking about ampersand collections? I'm not sure how valuable it is as I feel it may actually change the core principles of redux design pattern. I'll be interested to see an example of combining these two together.
from busy.
Are you talking about ampersand collections?
Yes, collections and models; if there's a custom transport (i.e. not HTTP), a custom sync method.
I'm not sure how valuable it is as I feel it may actually change the core principles of redux design pattern. I'll be interested to see an example of combining these two together.
You can sync the store with the model layer. It does break the principle of CQRS/unidirectional data-flow, but if you're really worried you can generate actions to manipulate models and read them from the store.
So, I'm not sure of the solution, but the value is in:
- Not writing transport bound code
- Not hand-rolling a transport independent abstraction
- Not writing dirty entity management (
isLoading
) - Not writing pagination management
- Not thinking about indexing
- Not thinking about standard API change resiliency
- Not thinking about standard mapping of memory state to protocol
- Not writing update/create/delete action mapping (you can generate an action
function saveUser(userId) { return ({collections}) => { payload: { promise: collections.usersCollection.get(userId).save(); } }
It's not a pristine command architecture, but some layer like that feels very useful to me. Again, I'm not sure about what the layer should be exactly, but that all of these things need to be solved in some way or another.
from busy.
Related Issues (20)
- [Urgent] Frequent user page loading fail - page not found errors HOT 1
- Busy voting percent cache problem => cause found and PR submitted HOT 1
- All posts including comments made by current user's account are showing as reblogged. HOT 2
- beneficiary shouldn't show for editing
- multiple links in one sentence.
- all drafts are gone! HOT 1
- Unable to login on busy.org. Error in console HOT 1
- Power down amount is showing as 0 in wallet HOT 3
- Ability to suggestion (Two Factor Authentication )(Schedule Posting ) IN Busy.org
- Busy is showing different payout than steemit, steemnow etc.
- (BUG) found in https://busy.orgPayout is not being shown at https://busy.org, whereas payout shows on steemit.com
- SBD price & estimated account value are not working
- busy.org is down
- increase max num of tags to 12 for SCOT
- zero paid out amount with 100% beneficiary
- [suggestion] beneficiary payout amount for paid out posts
- Upgrade steemconnect.js to v3 and use login() method to support steemconnect chrome extension HOT 1
- reputation on feed/comments
- busy seems working now with anyx.io (but not api.steemit.com) voting will be resumed when api.steemit.com is up again.
- Image Hosting Broken
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 busy.