We have been discussing supporting scripting inside WebSharper applications as well. One of the requirements was the ability to interpret/translate these scripts to JavaScript on the client without any server intervention.

The approach we adopted is quite simple: we fix a subset of F# and call it "F# Script". We then develop a translator for F# Script to JavaScript in F#, translate it to JavaScript with WebSharper, and package it as a standalone library to be included in client-side WebSharper code (a trivial WebSharper extension can track this dependency automatically). At this point, any WebSharper application that uses F# Script on the client side can integrate scripting capabilities without having to re-compile that application.

The only cost incurred is running the F# Script interpreter once, which should be well below the sub-second boundary for most scripts.

If anyone has an interesting idea where scripting can play an important role, please pitch in on this thread.

Thanks, Adam.

By on 11/26/2011 1:48 PM ()

While I'd prefer to use quotations, the current potential victor looks like it will use the CodeDom + MEF.

By on 11/25/2011 5:24 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper