Today I am excited to share with you something I’ve been working on in my spare time: a preliminary javascript library that makes building web-apps for the SAFE Network easy and fun.
Purpose: to make it as easy as possible to make web apps that interact with the SAFE Network created by MaidSafe
As of this writing (2016-02-14) the SAFE api has not been released, but a general idea of its workings allows for an api to be created that will resemble the real thing. This library serves multiple purposes:
provides an API wrapper that makes CRUD operations on SAFE very easy
establishes guidelines on how to structure/organize entities and collections in an app
takes care of state and cache management
provides an additional wrapper that makes writing React apps a breeze
The “network” currently uses Firebase to replicate SAFE functionality, as they offer many similarities such as built-in authentication, URI based data, GET/PUT/DELETE functionality, etc. Firebase will be replaced with the test network as soon as possible.
@eblanshey Are you using redux here just for the api? (I don’t have a lot of time before work to read the full API, so just skimming now). ie. The app can use whatever it wants for data management? Any app would not really be aware of the api store?
I love the internet. This is exactly the sort of thing I was going to start looking at tomorrow. Good work!
That’s right! Only the API uses it primarily for caching, error messages, and loading indicators. The app can use whatever it wants for data management, but it has access to the Redux store should the dev want to use the SAFE store in more complex ways.
Ouch. Javascript. Cringe. I guess I have no choice but to learn javascript. I been bashing against JS for many many years, and all I see is increase usage of JS. Le sigh.
Great work, @eblanshey. I have not yet worked on a React Flux App (just know what it is), but will try to cope up soon and contribute to your project I guess, the launcher APIs in the first version should be sufficient to expand your project to the SAFENetwork, because your approach seems to store the data in the drive of the user.
We are just there, the API will be documented and published sooner. This would be good chance to get the feed back and keep improving the APIs too. Once again, GREAT WORK
I got a lot confused when I strated with Flux and Reflux, I didn’t spend a lot of time on it though. Thanks a lot for your input, will definitely checkout
I guess, the launcher APIs in the first version should be sufficient to
expand your project to the SAFENetwork, because your approach seems to
store the data in the drive of the user.
That’s the idea!
We are just there, the API will be documented and published sooner. This
would be good chance to get the feed back and keep improving the APIs
too. Once again, GREAT WORK
That’s exactly what I was hoping for! Hopefully this will help things get ironed out faster
I went the Reflux → Redux route. I personally found Reflux faster to grasp, but Redux is definitely more logical and worthwhile to fully understand. It’s also much easier to unit test.
Not to be pedantic, but Redux is technically a Flux implementation, so when you learn Redux, you learn Flux as well. The Redux documentation is the best way to get started IMO. Let me know if you have any questions, I’ll be happy to help.