schmunk42 / yii2-extension-requests

Ideas "marketplace" for Yii 2 extensions
18 stars 0 forks source link

Real-time and offline apps #13

Open rubenheymans opened 9 years ago

rubenheymans commented 9 years ago

https://www.firebase.com/

Don't just save data. Sync it.

When data changes, apps built with Firebase update instantly across every device -- web or mobile.

Firebase-powered apps work offline. Data is synchronized instantly when your app regains connectivity.

schmunk42 commented 9 years ago

CouchDB has replication - and at least Doctrine can handle CouchDB.

rubenheymans commented 9 years ago

@schmunk42 I don't really understand your answer?
I'm going to try and implement firebase in yii2
they have an offline function too: https://www.firebase.com/docs/web/api/firebase/gooffline.html when my app goes offline, users can continue to use it, sounds really great

rubenheymans commented 9 years ago

https://github.com/j42/laravel-firebase

schmunk42 commented 9 years ago

Sorry, my bad ... this is the database client for your offline app: http://pouchdb.com Couchdb implemented in JavaScript.

rubenheymans commented 9 years ago

interesting, but yii does not support Couchdb either? do you think couchdb / pouchdb is a better solution than firebase? realtime sync is not what I need, offline application is what I really need my knowledge of offline apps is nonexistent

schmunk42 commented 9 years ago

I had good experiences with couch and pouch, haven't tried Firebase so far. As mentioned above, you can use doctrine, which gives you a data-access layer "like" Yii 2 AR for couch.

We used another approach though, by "exporting" MySQL data to JSON with https://github.com/dmstr/yii2-db/blob/master/db/behaviors/HydratedAttributes.php