Hi everyone on this list. First time posting here
This small library is very early on and is very opinionated. Even so, here’s a few things that this library does.
I may start with the most controversial feature. I know that prototype.js had issue with this a while ago. But the web environment is not what it’s used to be.
Event based response when dealing with JS request.
I wanted to have something that could use rails’ remote=true attributes and be automatically dispatch the response to different object in the DOM. So I build a custom XHR object that will take the response from JS and build an event with the following naming scheme: “controller:action”. So basically, if you send a form with remote=true to create a new posts through the PostsController, an event posts:create would be fired automatically.
Automatic instantiation of objects
HTML might be slower than JSON to render, but it offers a lot more flexibility. You can look for attributes, children, etc.
I’m aware that this might all sound a little vague, so I made a gem that, hopefully, will make it easier for you guys to understand.
Feel free to ask question if you have any