P
Peter Michaux
I'm writing a server-side web application framework using Mozilla's
Rhino JavaScript engine. My two primary motivations are so I can write
code on server and client sides without needing to switch gears
mentally and so that the server and client can share code.
The types of code sharing I know I can use immediately are form
validations and html previews. For form validation, I'll be able to
specify the regexp for what is an email address in just one language
rather than in both Perl|Python|Ruby|Java|etc and in JavaScript. For
something like a blog comment form or a wiki editor, where the user
can use *bold* or _underline_ syntax, the algorithm to convert this
code to HTML will only need to be expressed in one language. This
makes live previews in the editor much easier to implement.
I'm curious what other bits of common (or uncommon) client-side
functionality that you would be able to share with the server if you
had server-side framework running JavaScript.
Thanks,
Peter
Rhino JavaScript engine. My two primary motivations are so I can write
code on server and client sides without needing to switch gears
mentally and so that the server and client can share code.
The types of code sharing I know I can use immediately are form
validations and html previews. For form validation, I'll be able to
specify the regexp for what is an email address in just one language
rather than in both Perl|Python|Ruby|Java|etc and in JavaScript. For
something like a blog comment form or a wiki editor, where the user
can use *bold* or _underline_ syntax, the algorithm to convert this
code to HTML will only need to be expressed in one language. This
makes live previews in the editor much easier to implement.
I'm curious what other bits of common (or uncommon) client-side
functionality that you would be able to share with the server if you
had server-side framework running JavaScript.
Thanks,
Peter