serverside-javascript

Best server-side javascript servers [closed]

依然范特西╮ 提交于 2019-12-02 18:14:19
I've been wondering to try out server-side javascript for a while. And I'm finding a good amount of servers, like: Node.js Rhino SpiderMonkey among others. Could anyone with experience on server-side javascript, tell me which are the best engines? and why? I like the Node.js because it's based on Google's V8 engine. And seems easy to use. But some feedback on what you would choose would be great. Edit: Some benchmarks for Node. I'm thinking on going with this one but feedback is still welcome. Thanks Alexandre Morgaut I think each solution has its own advantages/disadvantages here a list of

a server side mustache.js example using node.js

有些话、适合烂在心里 提交于 2019-12-02 17:31:26
I'm looking for an example using Mustachejs with Nodejs here is my example but it is not working. Mustache is undefined. I'm using Mustachejs from the master branch. var sys = require('sys'); var m = require("./mustache"); var view = { title: "Joe", calc: function() { return 2 + 4; } }; var template = "{{title}} spends {{calc}}"; var html = Mustache().to_html(template, view); sys.puts(html); I got your example working by installing mustache via npm, using the correct require syntax and (as Derek said) using mustache as an object not a function npm install mustache then var sys = require('sys')

Calling SSJS from Java?

随声附和 提交于 2019-12-01 06:26:18
I have created an xPages application which uses a lot of server side javascript code functions located in a server side javascript library. Now I have some java code located in the java design element which I would like to use to call the javascript functions. I do understand that it is not logical to call javascript from java, but I guess that all server side javascript is compiled to java, so I was thinking that it might be possible to get a handle to the compiled java class that was generated. any ideas? Toby Samples You can create a value binding, ValueBinding vb = FacesContext

Calling SSJS from Java?

喜欢而已 提交于 2019-12-01 04:58:57
问题 I have created an xPages application which uses a lot of server side javascript code functions located in a server side javascript library. Now I have some java code located in the java design element which I would like to use to call the javascript functions. I do understand that it is not logical to call javascript from java, but I guess that all server side javascript is compiled to java, so I was thinking that it might be possible to get a handle to the compiled java class that was

Is it possible to develop a Google App Engine web app using Node.js or some other server side JavaScript approach?

自古美人都是妖i 提交于 2019-11-30 11:02:58
问题 I've been following the latest developments with server-side JavaScript - especially Node.js - and wondering if there is any possibility of using such an approach to develop a Google App Engine web application - either separately from or in combination with Python or Java? 回答1: node.js uses an event-loop model which is not really a good fit with the current App Engine design. However, there are several projects that bring JavaScript to App Engine. Check out App Engine issue 35 to read about

Does it make sense to build pure JavaScript based web applications (both client and server side)?

旧巷老猫 提交于 2019-11-30 08:41:59
I've always considered JavaScript as a great addition (or rather, for the last couple of years, as a must have) to the client side of any web application. Even when I started to use Mootools, which takes a big step away from DOM manipulation, and aims toward a general purpose, OO framework, I still didn't think that I would consider using JavaScript for server-side development. JavaScript belongs to the front, period - that's what I thought. Well, it seems like according to some damn smart people , I was wrong. For the first time ever, the web development platform contest called Plat_Form

Libraries to write xml with JavaScript

放肆的年华 提交于 2019-11-30 05:10:06
I am doing some server side coding with JavaScript (node.js) and I would like to write valid xml. I found two libs, but I am sure there are more/better!? http://goessner.net/download/prj/jsonxml/ (LGPL) not yet released: https://sourceforge.net/projects/jsonix (LGPL) Requirements: open source (for commercial usage) Would be cool if the project is fast, small and simple to use (in that order). And I would like to have a bit lower level access ala doc.addElement('xy').addAttr('name', 'bob'); There are a number of XML libraries for node.js listed at http://github.com/ry/node/wiki/modules#parsers

how to detect that user's connection is lost or he closed the browser window in Nodejs socket.io

走远了吗. 提交于 2019-11-30 03:39:10
I have a chat application on Node.js and Socket.io, user can connect and disconnect with a button... I am having a list of online users which is perfectly managed with the help of my defined events that user trigger. But the problem is I am unable to detect if the user has lost his connection or closed the browser window without disconnecting himself manually(by the disconnect button)... This socket.io event is fired only when user disconnects himself not when he lost his connection. socket.on('disconnect',function(){ console.log('user disconnected'); }); I want some really good mechanism to

Is it possible to develop a Google App Engine web app using Node.js or some other server side JavaScript approach?

霸气de小男生 提交于 2019-11-29 23:03:17
I've been following the latest developments with server-side JavaScript - especially Node.js - and wondering if there is any possibility of using such an approach to develop a Google App Engine web application - either separately from or in combination with Python or Java? node.js uses an event-loop model which is not really a good fit with the current App Engine design. However, there are several projects that bring JavaScript to App Engine. Check out App Engine issue 35 to read about some of the solutions. The highlights are: Rhino , Rhino For Webapps , if you like Python check out

Are there any static Call-Graph and/or Control-Flow-Graph API for JavaScript? [closed]

喜欢而已 提交于 2019-11-29 19:59:47
Are there any Call-Graph and/or Control-Flow-Graph generators for JavaScript? Call Graph - http://en.wikipedia.org/wiki/Call_graph Control Flow Graph - http://en.wikipedia.org/wiki/Control_flow_graph EDIT: I am looking specifically for a static tool that let me access the graph using some API/code To do this, you need: parsing, name resolution (handling scoping) type analysis (while JavaScript is arguably "dynamically typed", there are all kinds of typed constants including function constants that are of specific interest here) control flow analysis (to build up the structure of the control