Recently, I have been bouncing back and forth across various JavaScript client libraries / frameworks. I like Backbone. Not a fan of ExtJs. Etc.
In any case, all of them have one gigantic problem: I need to determine the verification logic both on the server side ( Rails 3) and on the client side. Also, I have to do the same with my model definitions ( AR Objectsand `JS Objects'). Then I have to define business rules in both places.
It seems like I'm always developing two concurrent applications.
I know this is a subjective question, but for us small teams with one person who cannot afford to devote themselves to Ruby JS guys and guys, what are my solutions?
I am racking my brains and maybe I am missing something, but I cannot find a single solution to this problem.
I was thinking of writing a Ruby pearl that will generate local JS objects. That way, at least my business objects will be the same. But that sounds scary. Moreover, I do not want all attributes to be on the client side.
What are your thoughts on this issue? Do I just need to live with him?
source
share