Best server-side javascript servers [closed] - javascript

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
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

I think each solution has its own advantages/disadvantages
here a list of SSJS solutions:
Aptana Jaxer:
sadly abandoned
Sitepoint Persevere:
based on rhino -
include JSDB, supports JSON Query -
by Kris Zyp, the author of JSON Schema
RingoJS:
based on rhino -
ex Helma NG successor of Helma which existed from long time ago -
multi-thread -
nice community -
great actor on CommonJS
Narwhal:
can work on either spidermonkey, V8, or webkit JavaScriptCore -
another great actor on CommonJS -
defined the JSGI API in the Jack Server
Joyent NodeJS:
based on V8
(fast) -
all is running in a single thread -
all the code must be written using callbacks -
lot of modules available via npm (Node Package Manager)
4D Wakanda:
based on Webkit JavaScriptCore aka SFX or Nitro (which has been faster than V8 and could be faster again) -
include an NoSQL Object oriented JavaScript datastore with a native REST API -
multi-threaded -
provides a studio with a debugger, a Model Designer, and a GUI Designer -
provides a Framework with Widgets directly bindable to the datastore and between each others
APE project: based on spidermonkey - a Push engine to synchronize in live data between many visitor browsers
10gen MongoDB: A NoSQL Document store allowing code in either Erlang & JavaScript (using spidermonkey)
Apache CouchDB: Another NoSQL Document store also allowing code in either Erlang & JavaScript (using spidermonkey)
See a Server-Side JavaScript presentation with some history, benchmarks, & descriptions

The word server is badly used. Those are different JavaScript implementations.
Personally the only thing I'm doubtful about these implementations is about the low amount of system libraries. Most of them come with standard stuff (sockets, filesystem etc..) but lack support for Threads and concurrency. That's why I usually use Rhino, unless I care for speed.

It might help to describe what problem you are trying to solve. There are a lot of "server-side" JS implementations that fill various needs. An there also several "server" platforms built around these implementations. I wrote one implementation on top of Rhino and Java Servlets, called Myna. Myna is for web applications, and I detailed some of its advantages in another question.
Are you trying to deploy web applications? Are you trying to script existing code? Does your code need to start quickly from a commandline, or is it going to be implemented as a daemon?
There are currently no clear winners in this space that do all of these things well, but there are good choices for specific needs.

Related

Pure JavaScript Programming [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm diving into web development again (first time was an utter failure), and I have some pretty spectacular resources for learning both HTML5 and CSS3. What I want to begin studying next is JavaScript so I can have absolute control over my pages. But before I begin integrating JavaScript into my work, I'd like to use JavaScript solely as a programming language (with console I/O and basic programs) to familiarize myself first. What are the best tools for accomplishing this? Because thus far, I haven't found any browser/tool that approaches the simplicity of writing a source file, and clicking run like you might with a C++ program. Thanks.
Node.js is your best shot.
Node is used for:
Server-side applications (Sails, Express, Socket.io)
Various frontend-related scripting (Grunt, LESS)
You can try Node.js, that allows you to run Javascript programs from commandline. Other than that, Javascript runs in a browser.
I think JetBrains makes the best IDEs in the world. Their support of JavaScript, HTML5, and CSS3 is first-rate. I'd recommend looking at WebStorm as your IDE.
I would recommend jsfiddle.net which allows you to type and run code. I might also suggest codecademy.com which has a very good program to teach you javascript and many other languages as well. There is also a really simple part of there website called "codebits" where you can compile js, html, and css and play around. W3schools.com is also very helpful for reference.
If you are running windows, the Windows Scripting Host (WSH) can run both Visual Basic Scripting and JavaScript... with the JavaScript having full access to things.
Because Microsoft supprorted VB Script over JScript (their version of EMCAScript), it is difficult to find documentation, though it does exist. I have a fair number of admin tools written in JScript.
Because that's not how Javascript works. You can't read user input from console.
You can use any browser's development tools and write Javascript code line by line.

Uses of javascript, not just for aesthetics but uses on the server side [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have read this article (Uses of Javascript), while it is right I know there are other uses of javascript, modern javascript nowadays. I haven't read about node.js and how this one works but I have heard that this one makes js do server-side stuffs?
The question is, what are other uses of javascript, can this replace php and ruby? I know this might not be a good idea for enterprise applications but will work well with medium-size applications, am I right?
What are the other uses of javascript other than the one given in the article?
Javascript can very well be used server side. If you're on an IIS server, you can for example use JScript, nodejs, v8cgi (currently known as TeaJS), or a combination of these. On *nix servers nodejs is a popular framework. Nodejs can even be used to program your own webserver (e.g. using the expressjs framework).
Dive in the given links and see what's possible.
There is TESSEL and Espruino javascript inside microcontroller.
I use Node.js for web application for few years, few projects and really happy so far.
The Express.js + MongoDB makes a perfect match (exactly as PHP + MySQL, 5 years ago). You can find reference on MEAN stack.
It works good no only for small applications. We have medium-size app that could be easily scaled up.
Node.js is not to about substitute PHP or Ruby, but what's happening now is indeed, it's more and more used for web applications nowaday. The reason is simple, Node.js has "web-oriented" core, meaning it's originally created to aim highly productive tcp/http applications. With some progress beautiful web development frameworks appeared on top of Node.js that makes web application development even more easy and fun.
For me, programming Node.js on server makes a lot of sense, since JavaScript is main client-side language (almost without alternatives), so context-switching between client/server programming is less. With practice you get use to some initial JavaScript weirdness and things goes smooth and nice.

Opa vs Dart vs Haxe vs CoffeeScript [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I've been googling for latest web apps, and found the following languages:
- Opa
- Dart
- Haxe
- CoffeeScript
Since these languages are new, there are not many information available.
Can anyone explain the advantages and disadvantages of these languages.
EDIT:
Which language is efficient?
What new features are available in each languages?
How can it improve existing languages like JavaScript?
Which will be easy to learn?
Opa
Functional programming
Pro: Run client, server, and database code in the same language
Con: Currently the least popular of these languages
Dart
Similar to Java/JavaScript
Pro: Can run client and server code in the same language (though in practice, this is not yet the best option)
Pro: In the future you will be able to run client code in the Dart VM in some browsers
Pro: Polymer MDV provides easy approach to encapsulation and re-use of components
Haxe
Similar to ActionScript
Pro: Mult-platform language: compile to other language/platforms besides for JavaScript (for instance, creating high-performance mobile games)
CoffeeScript
Similar to Ruby
Pro: Currently the most popular of these languages
Some features common to all the languages:
Compile to JavaScript
Interact with JavaScript code
I researched all of these for a project that never ended up happening. I never really got into CoffeeScript since it was less familiar to me given its Ruby flavor. Opa was very intriguing but I ultimately decided against it since it seemed to have a very small community, and I preferred something more class-based and object-oriented. I was familiar with Haxe already, having played around with it for a mobile game, but JavaScript didn't seem like a huge focus here: tutorials and samples were hard to come by.
With Dart, everything suddenly seemed to come together:
Given my Java/ActionScript/JavaScript background I knew the language before even writing a line of code
The WebUI (now Polymer) Model-Driven-View approach, provided a sane way to encapsulate and re-use components
A dedicated IDE (Dart Editor) that made debugging quick and easy
Pub package manager made it easy to quickly add 3rd-part libraries
Plenty of tutorials, articles, and documentation to help get me up to speed
Ultimately, you can build great web apps in any of these languages, but the one you choose will be influenced by your past experience. In my case, I was looking for a class-based, object-oriented solution, which made it between Haxe and Dart, and Dart was clearly the victor in terms of features, tooling, and support.

RIA liblaries/framework in day-to-day development [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I need to develop quite simple web application with some Ajax functionality and GUI components with Java as a server-side language. The main purpose for me is to learn sth about designing web app that I can make use of when I start looking for a job ... .I ran into lots of framework (RAP, Nice JSF implementations etc.) and there are also GWT and JQuery . I started reading about GWT and it seems to be great at the beginning, but there are limited number of visual components. When You missed one it seems to be much harder to write it with GWT than in JavaScript/JQuery (e.g sortable components).
Also:
If JavaScript is is easy why to learn API to just make translation?
The main argument seems to be that GWT is for developers who don't
know Java Script very well, but is JS harder than GWT API and
configuration to work with?
GWT offers also very nice Remote Procedure Call and translating
objects to JS, but there are lots of libraries like DWR.
You need also to use standard servlet to e.g send file stream to a
user, so You need also to save it to a Database or as a hidden XHTML files to make them available to servlet.
So should I start to learn GWT? It is really wide spread? Or maybe JSF implementations with Ajax support outperforms GWT in usability? The biggest problem I have that I cannot imagine how to solve simple problems in GWT while they are almost complete solutions with JQuery. Mixing JavaScript native code with GWT don't seems to be a good option also.
When working with GWT, its always better to now whats going on behind. So you have to learn HTML, CSS and JavaScript as anyway. Maybe you can start with less knowledge on browser frontend technologies. But you will come to the point where you need to know whats going on.
So ask yourself. Is your app large enough that its worth to start with complex GWT app. Also if you're on a large team and familiar with JAVA, Maven and Junit it makes senses.
On the other hand there are a bunch of small (backbone.js with jquery), middle (mootools) or large (extjs) JavaScript frameworks to build RIA.
I've never work with JSF, but all people a meet that used it, wasn't really satisfied.
After all I dont think its a good idea to select a framework by the current feature set of your app. As this can change of the time, you will have to implement it later with a technologie you not familiar with.
Note there is a table sort library for GWT as well: http://code.google.com/p/gwt-advanced-table/
GWT contains several unique features which make it difficult to be compared with other frameworks. The key point is that GWT isn't just a framework or library -- it's a toolkit. Consider:
Ability to use Java IDE's and debugger during development
Automatic generation of compiled scripts optimized for different browsers
Benefits of java for organization of code-base: OOP, package system, checked exceptions, compile-time type-checking etc.
These features make GWT suitable for big projects built by large teams that should be enhanced and maintained over a large time-frame. Off course, many projects do not have such requirements and therefore developers should give more weight to other consideration like widget library and learning curve.

Are there any HTML5 Canvas implementations for embedding in c++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm working on a browser based game atm and already looking into options porting it to other platforms such as consoles or devices where playing in a web browser may not be suitable.
The game is pretty much all JavaScript with rendering done via a 2d canvas context.
What i was hoping for is that there is already a c++ library/api that will work in conjunction with maybe google's v8 engine to handle the canvas calls in JavaScript and render them with opengl or something similar
Does anyone know of a project out there that may be providing this functionality?
Otherwise how would you suppose I go about embedding my javascript in c++ with as little changes required to the javascript as possible as I don't really want to have to maintain too many differences between platforms?
Qt is a very nice C++ library compatible with LGPL licensing that among other things includes a webkit based widget with javascript support. Also as scripting language Qt uses javascript with a tight integration with C++ (it's easy to write a C++ class and and make it visible at the javascript level).
Qt is multi platform and comes with an highly sophisticated IDE.
Qt is not currently using V8 but the porting is in progress and they aim at providing a 100% backward compatible solution.
The only "problems" of Qt are IMO that:
It's huge
It's a framework, not a library. You cannot just "use" Qt easily, you should embrace the view (the documentation is however of excellent quality).
The long term prospects are a bit fuzzy (not as bad as a few months ago, tho)
I guess I'm a bit late here, but I'm searching for a similar solution. I found node-canvas and I do not know if it is feasible to hook that so it renders into something like an SDL or SFML-managed window or not.
But for my own purposes, I will port my code over to C++ and use Cairo directly with SFML and OpenGL.
Interesting idea - another possibility is using Adobe Air, and rendering the game via StageWebView and Flex 4. Here's some example code for using the thing if you're interested:
https://github.com/JustinBeckwith/frink/blob/master/frink-flex/src/controls/WebBrowser.as
An interesting Project that I have uses id FireBreath(firebreath.org). This is not exactly what you are looking for, but in some ways it would get you close. Firebreath allows the creation of browser plugins in C++. One of the features of Firebreath is it allows you to access and modify the DOM from the C++ in you browser plugin as well as create methods and properties in C++ that can be accessed from JavaScript on your page.

Categories