invisible-college / statebus

All aboard the STATEBUS!!!
117 stars 5 forks source link

Step back #6

Closed mariusnita closed 9 years ago

mariusnita commented 10 years ago

Maybe it's useful to step back and re-iterate the key points of ActiveRest. I see these:

  1. Simple synchronization of a React app with a "rest-style" backend. What we want is that whenever the app invokes a change on the data,
    1. the UI is re-rendererd -- we plan on doing setProps() on the root with the new data
    2. the update is sent to the backend
  2. The data is stored in a local cache keyed by url.
  3. Each object can be in various states of completion:
    1. not loaded and currently loading
    2. partially loaded and currently loading
    3. partially loaded and currently not loading
    4. fully loaded
  4. You can invoke a load on a partially loaded object.
    1. You can tell the object to load itself fully.
    2. You can tell the object to load some sub-part of itself.
  5. The app can invoke a change by
    1. invoking save() on an object or by
    2. telling a partially-loaded object to load itself to a greater extent.

I kinda want to state the core points without mentioning with the details of implementation -- like whether you use url key/value pairs to denote object state, etc.

toomim commented 10 years ago

That's good!

I was also thinking about using the term "Incrementally-loaded data" when talking about the cache. Like, to reference that it's some incrementally growing snowball of data on the client. You just signal what data you're going to need, and it adds itself to the pile of available cache. This term also interacts with the concepts for "partially-loaded objects" and the "cache."

mariusnita commented 10 years ago

Reminds me of the ever-growing all-annihilating technological blob in Akira https://www.youtube.com/watch?v=GkAPQXX0AEY

toomim commented 10 years ago

Oh yeah. Maybe that's a better name for ActiveREST. (It's this ever-growing technological blob...)

No, I'm not suggesting we change the name to "Akira." That would be too obvious.

"Blob." ;)

mariusnita commented 10 years ago

Haha... It's like something that gets bigger and bigger, but it's Good. It's like the Force. Like the oxygen rushing into a room when you open the window. It's gaseous and God-like.

toomim commented 10 years ago

Maybe the bREAST is a big ever-growing blob of pleasure and heavenly sustenance.

toomim commented 10 years ago

Here's a view on the spirit of BREST:

BREST is both a library, and a RESTful design pattern that uses the library. But you can use the library without fully adopting the design pattern.

tkriplean commented 10 years ago

Wait, you're serious about calling this project BREST?

toomim wrote:

Here's a more ... sales-pitch view on the spirit of BREST:

  • Insight: we can connect a React app to a REST-style API with very little code, and get for free: o one-way data binding with realtime updates (|fetch()|) o single call to change data on client and server (|save()|) o local cache of a subset of the REST database o partial data downloading o loading indicators when the current page needs more data o learning to pre-fetch the required data over time, before it's needed

— Reply to this email directly or view it on GitHub https://github.com/TheInvisibles/BREST/issues/6#issuecomment-45423377.

toomim commented 10 years ago

Yes, it's my current favorite name. I don't know any other libraries that reference breasts. I think ActiveREST is funny to me, but I don't think the joke is very accessible. I think BREST is more accessible.

tkriplean commented 10 years ago

It makes me uncomfortable. I imagine that I am not alone in that.

toomim wrote:

Yes, it's my current favorite name.

— Reply to this email directly or view it on GitHub https://github.com/TheInvisibles/BREST/issues/6#issuecomment-45423424.

toomim commented 10 years ago

When I wanted to name my old company friendbow, and have a big gay rainbow logo, that made people uncomfortable too. There's nothing wrong with breasts.

tkriplean commented 10 years ago

QED

I'm sorry for having invalid feelings.

toomim wrote:

When I wanted to name my old company friendbo, and have a big gay rainbow logo, that made people uncomfortable too.

— Reply to this email directly or view it on GitHub https://github.com/TheInvisibles/BREST/issues/6#issuecomment-45423486.

mariusnita commented 10 years ago

Haha. Well now that we have a flamboyant name and a disruptive coding style, time to get to work on some architecture.

toomim commented 10 years ago

Thanks.-o-o--o----o-------o------!-!!!