1

Since Jaxer has been around longer is it a better solution than Node.js if you are a developer like me who is new to programming with JavaScript on the server side?

Amen Ra
  • 2,843
  • 8
  • 47
  • 85
  • Node.js is so powerful and familiar platform today, a simple good search gives a lot of understanding, for Jaxer there is nice article by John Resig ( jQuery author ) here - http://ejohn.org/blog/server-side-javascript-with-jaxer/ This very nicely explain Jaxer and what all has been written in below answers. Hope it helps! – Anmol Saraf Jun 03 '15 at 19:56

2 Answers2

8

Jaxer and node.js are very different things.

Think of Jaxer as Firefox running on the server side, but instead of a GUI, its interface to the outside world is Apache. It can do pretty much anything a browser on the client side can do: fetch pages from a third-party server, run JS against that page, pull elements from it via the DOM, substitute new content into it, etc.

Jaxer can also work more or less like ASP or PHP, simply executing JS inside special tags inside the HTML files Jaxer serves up via Apache, so that you can insert some dynamic content into those otherwise-static pages.

Jaxer has one huge disadvantage: it is dead technology.

node.js, on the other hand, is not a browser running on the server, it is very much alive right now, and it doesn't have any tie to Apache or any other standard web server.

You can build your own web server using node.js's HTTP component, but that brings on The Lisp Curse: because there is no standard web server, everyone builds theirs a different way, so that there is no concentrated expertise on the subject.

The same goes for templating and other things that go into an ASP or PHP type platform: no complete, built-in component means you end up assembling your own from the provided pieces.

This makes node.js best suited for projects where you were already going to have to reimplement everything yourself, so what you want is a box of tools and components, rather than a "platform." If you can fairly describe your project as a web app, meaning that it's an application that just happens to show its UI via the web, and most of its content is dynamically-generated rather than being served from files, node.js might be a fine choice.

If instead you just need to substitute some dynamic content into a mostly static presentation, well, I cannot really recommend Jaxer, but something like it that plugs into a standard web server is a better choice.

Community
  • 1
  • 1
Warren Young
  • 40,875
  • 8
  • 85
  • 101
  • What if you have something like google charts and you need javascript to run on server in order to put together an html file for emailing the charts? I wonder if Node.js is more than we need, but we just need something that will run the javascript and spit out the corresponding html tags for emailing. – carinlynchin May 17 '16 at 15:12
  • 1
    @Carine: While it would indeed be easier to use Google Charts on the server with Jaxer than Node, it also requires you to use software that hasn't had a release in about *nine years*. That seems like a gross imbalance of priorities. Is Google Charts of such all-consuming importance that you will let that one third-party component drive your core server-side technology choice? There are many, many charting APIs and services to choose from. – Warren Young May 18 '16 at 01:24
7

Despite both using JavaScript as the language, Jaxer and Node.js achieve two different goals. Jaxer appears to be targeted as a server-side Web scripting language (like PHP or ASP.NET), whereas Node.js is more of a general-purpose event-driven network server framework that happens to be able to serve Web pages.

Which solution you should choose hinges entirely upon what you're trying to do. If you can expand upon your question with your goals for server-side JavaScript, then we can provide better suggestions as to what to use.

Justin ᚅᚔᚈᚄᚒᚔ
  • 15,081
  • 7
  • 52
  • 64
  • I am trying to decide which approach I should use to develop Web Applications instead of having to use Java or C# or PHP – Amen Ra Aug 18 '11 at 04:48