2 ms·
> Even IIS/VB lets you write ES3, and you can pass in functions as arguments. That is really liberating. Oh man is that still possible? I remember doing both s
by rudasn 4y ago
> Even IIS/VB lets you write ES3, and you can pass in functions as arguments. That is really liberating.
Oh man is that still possible? I remember doing both server side and client side rendering with the same set of templates and JS with ASP classic (I think?). That was 2008 or something.. JSON handing was a pain though.
- turtleyacht 4y agoYep, ES3. It was even possible to import Crockford's JSON library to call stringify() and other methods server-side. Add Ramda.js, tell Babel to transpile to ES3, and it's nearly modern ES6 fun. I hit a wall getting fantasy-land set up with the same "customize the .js source files a bit" approach, but it was a nice PoC for server-side JS. Where Google went forward and I stopped short was `eval` n' friends: exporting functions to run on the client. It felt pretty involved, and I was already juggling multiple "Is this even possible" doubts. rpeterclark/aspunit is super nice for unit testing Classic ASP [1], by the way. That let me abstract IIS VB Let and Set for dictionaries. Combined with the ability to fling function "pointers" around, which opened the way to calling functions by string, lets you support data-driven, custom workflows: Set o = CreateObject("MyCustom") .And("CustomFunc1") .And("CustomFunc2") Kind of a "solution looking for a problem" situation, though. [1] https://github.com/rpeterclark/aspunit https://github.com/rpeterclark/aspunit