Arc Forumnew | comments | leaders | submitlogin
1 point by evanrmurphy 5485 days ago | link | parent

Thanks for sharing your code.

Alternatively, couldn't you use JavaScript to dynamically generate itself? You could even write it in sexps if you really wanted to using JS arrays [1]. This is not meant as a critique of your approach but rather as an observation of JS's expressiveness and of the fact that much logic (not all, and maybe not in this particular case) can be implemented client-side or server-side with only subtle differences in the end result.

[1] http://www.crockford.com/javascript/little.html



1 point by akkartik 5485 days ago | link

Yeah I can imagine using js to generate js. But if I'm using arc on the server anyway it doesn't seem to make sense to hand off to a js compiler just to to code-generate js. When I need to generate event handlers I'm within the arc html code-generation. Or am I misunderstanding you?

-----

1 point by evanrmurphy 5485 days ago | link

Nope, you got it. :) You're right it wouldn't make sense in this case where the app is already based in Arc. If you were approaching the project again from scratch though, perhaps there would be a just-as-good implementation path that involves letting JS handle more of the logic.

-----