• Hosting A JavaScript Engine In .NET

    Updated: 2013-10-31 22:10:16
    Articles Blog About Hosting A JavaScript Engine In NET Tuesday , September 10, 2013 10 comments Tweet ClearScript is simple to use and allows me to host either V8 or Chakra The samples on the home page show just how easy is the interop from C to JavaScript and vice versa . I use a simple wrapper because the only API I need is one to Evaluate small script expressions . public interface IJavaScriptMachine IDisposable dynamic Evaluate(string expression The following implementation sets up a default environment for script execution by loading up some required scripts , like underscore.js . The scripts are embedded resources in the current assembly . public class JavaScriptMachine JScriptEngine , IJavaScriptMachine public JavaScriptMachine( LoadDefaultScripts( void LoadDefaultScripts( var

  • Metaprogramming Fun In JavaScript

    Updated: 2013-10-31 22:10:16
    Articles Blog About Metaprogramming Fun In JavaScript Tuesday , September 3, 2013 3 comments Tweet The idea is to take a JavaScript statement like the : following c.find({ x : 1, y : 3, name : foo id : 0 limit(1 and turn the statement into a data structure that describes the methods being invoked and the arguments for each method call . There are multiple method names to capture not just find and limit but also findOne orderBy and more This sounds like a job for a mock object library , but let†s explore a few simple approaches that use One approach that doesn†t work is try to to build a function for each possible method call and forget how closures work . The following code has a bug . var CommandCapture function var commands find findOne limit orderBy for var i 0 i By the time the

  • cf.Objective() 2014 - call for speakers!

    Updated: 2013-10-21 18:43:09
    An Architect's View CFML , Clojure , Software Design , Frameworks and more . front page Archives Presentations Software RSS cf.Objective( 2014 call for speakers October 21, 2013 No Comments The cf.Objective( 2014 Call for Speakers is open until November 1st so you have just under two weeks to submit your topics . You can also vote for existing topic submission at that same . link Right now we've only had two general CFML topics submitted and seven ColdBox-related ones but there's a good number of JavaScript-related submissions and remember that cf.Objective( has a dedicated JavaScript track in js.Objective( as well as a mobile front-end track so it's more than a CFML conference . but we still want to see a good spread of CFML topics And if you want to submit non-CFML web development topics

  • lein-try rocks - instant HTTP server!

    Updated: 2013-10-18 02:06:45
    An Architect's View CFML , Clojure , Software Design , Frameworks and more . front page Archives Presentations Software RSS lein-try rocks instant HTTP server October 17, 2013 3 Comments The lein-try plugin is one of the more stunningly useful little pieces of software that you can have available if you're developing in Clojure . Simply add the plugin to your user profile in lein profiles.clj and then lein try some-dependency will fire up a REPL with the specified dependency on the . classpath Today , I needed a simple HTTP server running for a short while , serving up static assets from a specific folder tree . Instead of messing with my local Apache setup , I used lein-try to fire up a temporary HTTP : server lein try ring ring-core 1.2.0 ring ring-jetty-adapter 1.2.0 user= use

Current Feed Items | Previous Months Items

Sep 2013 | Aug 2013 | Jul 2013 | Jun 2013 | May 2013 | Apr 2013