My backend is in Postgres. I'm using Scala to build APIs of it.
Everytime there is a change in the database, I want my chrome extension to be notified. I've a few questions regarding this:
Backbone. Backbone has been around for a long time, but it's still under steady and regular development. It's a good choice if you want a flexible JavaScript framework with a simple model for representing data and getting it into views.
Backbone. js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
Who uses Backbone. js? 3466 companies reportedly use Backbone. js in their tech stacks, including Uber, Pinterest, and reddit.
Front-End MVC frameworks (Backbone, Angular, etc) all rely on a backend service to provide the data that, say Backbone, would then use as its model. You could have an entire MVC pattern on the backend that accepts requests and spits out some JSON for a frontend MVC framework to use.
1) I would use http://socket.io/
3) This is interesting question. Observer pattern is commonly used on front end. I would recommend you to check out this article http://addyosmani.com/largescalejavascript/. It helped me to better structure my application. It is basically Pub/Sub pattern with EventBroker/Mediator between. It would be idealy to decouple publisher and subcriber. You can place EventBroker in your application namespace. In this way you have access to message bus from your modules, without needing to pass reference through modules all the time.
4) We have used redis for real/time notifications on website that have similar functionality like pinterest. I am impressed with redis performance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With