It reduces the learning curve for new developers because they only have to learn javascript, not javascript plus something else.
It reduces the learning curve for new developers because they only have to learn javascript, not javascript plus something else.
http://github.com/raganwald/homoiconic/blob/master/2010/02/d...
In the rails world, for example, if you've done your validates_* declarations on an ActiveRecord model, it shouldn't be too difficult to generate the javascript required for client-side validation.
Actually found a project that goes a long way towards achieving just that: http://github.com/grimen/validatious-on-rails
But I guess you're referring to complex validations, expressed as code instead of validates_* declarations. It seems like you would prefer either an all-JS approach or an automated translation to JS, as per the blog post you linked. To me, it boils down to whether such a complicated validation is really appropriate for client-side validation and whether it blurs the lines between form validation and business logic to such an extent that it's better off just living on the server.
But I'd love to hear your further thoughts on the matter.
It would be nice to write both client and server in one language.
I think this was briancarper.net where - since he's using clojure on the server - ended up running a javascript interpreter (rhino) on the server so that the same formatting code could run on the client and server.