: 4582 | 108637 | 12353

Make Server Side JS standards compliant 
New idea submissions, commenting and voting are no longer available on this site. Logins have also been disabled.

Use this IdeaSpace to post ideas about Domino Designer.

: 42
: 42
: 0
: Domino Designer
: server side js, javascript
: Tommy Valand2746 26 Mar 2010
: / Email
The current implementation of Server Side JS has several inconsistencies in regard to the ECMA-262 spec(JavaScript 1.3) which I believe is what the Server Side JS in XPages is based upon.
This makes the API very unpredictable. Take Array.splice. According to spec, it should change the Array (remove item/-s), and return the deleted items. In Domino SSJS, it doesn't change the array, but returns an array with the items that remains after the deletion. Functions/objects are a little funky when doing more advanced stuff (function.call/apply). Regular expressions are also badly implemented.
What I fear the most is if the bugs remain for a couple of versions, IBM decides to keep the buggy API for backwards compatibility. :\
Here's an idea IBM: Why not use a SSJS engine developed by people who care about standards (Rhino)? 

1) Dan Sickles1710 (26 Mar 2010)
Yes!!!, and while they are at it, why not implement Ecmascript 5, the current spec as of last December. Just because IBM voted against Ecmascript 5 doesn't mean they can't implement it.

If they use the current version of Rhino, we would get the added benefit of all the features in Javascript 1.7. They could at least use the version of Rhino that ships with Java 6.x as the JSR 223 refence implementation. I think that's Javascript 1.5 +- a few things. Still more language features than Ecmascript 1.3.

If they don't keep up with the ECMA spec, we'll have an old non-standard scripting language in Notes. Again. The Ecmascript 1.3 spec is 10 years old.
2) Dan Sickles1710 (26 Mar 2010)
And speaking of SSJS, I's like to see the CommonJS stuff implemented too. That's where the real server-side action is in the JS world. Every other Javascript engine implementation is moving in this direction.

{ Link }
3) Peter Presnell26659 (26 Mar 2010)
Yes, yes, yes (and NOW). The slate is still fairly clean with SSJS so lets not create too many backward compatibility issues for us down the line by not conforming to the standards. And Yes to Dan's suggestion of moving to ECMAscript 5.
4) Tommy Valand2746 (26 Mar 2010)
@Dan: IBM seems to want to do their own thing for some reason or other (licensing/politics?). They had their own JVM, which I believe they gave up on. Hopefully they will see that it's too much work/too expensive maintaining their own (partial) implementation of SSJS, and implement Rhino.

I don't understand why they decided on making their own implementation in the first place..
5) Dan Sickles1710 (26 Mar 2010)
I've also been told on several occasions (conversations in the LS labs) that there *were* licensing issues around Rhino but I don't think that those apply to the the version of Rhino that ships with Java 6.

While we're at it, let's have E4X too. It's an optional Ecma spec that adds XML literal and object syntax to javascript. It's been in Javascript since 1.6.

Javascript 1.8.2 is in your Firefox and it implements some of Ecmascript 5.

Form lab conversations, the Xpages team is well aware of all this and would like to implement but...yada yada yada

Wasn't the XPages Javascript implementation was acquired?


Welcome to IdeaJam™

You can run IdeaJam™ in your company. It's easy to install, setup and customize. Your employees, partners and customers will immediately see results.

Use IdeaJam to:

  • Collect ideas from employees
  • Solicit feedback and suggestions from employees and customers
  • Run innovation contests and competitions
  • Validate concepts
  • Use the power of "crowd-sourcing" to rank ideas and allow the best ideas to rise to the top

IdeaJam™ works with:

  • IBM Connections
  • IBM Lotus Quickr
  • Blogs and Wikis
  • Websphere Portal
  • Microsoft Sharepoint
  • and other applications.

IdeaJam has an extensive set of widgets and API's that allow you to extend and integrate IdeaJam™ with other applications.

Learn more about IdeaJam >>

IdeaJam developed by

Elguji Software Logo