10 tips on how to prevent business value risk
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Alex Blewitt on Dec 09, 2009
ECMAScript 5 was released this week (pdf), generally known as JavaScript™, bringing advances to the basic libraries whilst introducing stricter runtime modes to aid with identifying and removing common coding errors.
Earlier attempts to rationalise ECMAScript 4 largely failed; only Adobe's ActionScript is based on the proposed changes. ECMA didn't even release a version 4 specification owing to different groups being unhappy at the developments; and as such, no browsers support it.
Over the last few years, with large improvements in JavaScript engines like Nitro and TraceMonkey, JavaScript has become performant to the extent that collaborative tools like Google Wave are showing the way forward for on-line applications. There's even Speed Tracer, an extension to Google Chrome, released as part of GWT 2.0, to help optimise the performance of JavaScript applications.
With that in mind, ECMAScript 5 aims to be backwardly compatible with the currently in-use ECMAScript 3 version (to foster quicker adoption across browsers), as well as providing for stricter constraints for developers to avoid common coding pitfalls.
Strict mode
The introduction of strict mode aims to avoid common coding problems in ECMAScript applications. This is achieved with the presence of a lone string literal in a unit (script or function):
"use strict;"
This literal will have no effect on existing runtimes, but new runtimes that target version 5 will turn on strict mode for either the entire script (if at the top of the script) or for a single function (if the first part of a function). This allows for a mixture of strict and non-strict code and for an evolution of existing code. So, what does strict mode actually mean?
i=3 becomes a runtime error; var i=3 is needed (assuming i is not in scope at the time)eval("var i=3"); print(i); will now throw an error.010 is ten, and not eightdelete cannot be used against arguments, functions or variables or other properties with the configurable flag set to falsewith statements, often a source of errors, are no longer used and considered syntax errorsarguments and caller variables become immutableLibrary extensions
Other extensions are also present in the base library:
20091209T12:34:56Z) as well as to parse themtrim() methodJSON object with parse and stringify to support efficient generation of JSON data; like eval but without the security implications of being able to reduce code. In addition, any JSONValue can be used, not just JSONObject and JSONArray as specified in RFC 4627. (4627 defines JSON-Text to be constrained to an object or array.)bind builtin has been added, with the same semantics as Prototype's bind()indexOf(), map(), filter(), and reduce()seal() (which prevents new properties being added or existing properties deleted) and freeze() (which makes all properties read-only, as well as preventing new properties being added or deleted)Object.keys() lists all the enumerable properties of the objectObject.getOwnPropertyNames() lists all the enumerable and non-enumerable propertiesObject.getPrototypeof() returns the prototype of the given objectSummary
The additions of a standard JSON parsing mechanism and strict mode will be of great benefit to developers, with the potential to translate into smaller libraries for Prototype and other extension libraries required. Parsing ISO dates from a JSON stream now becomes much more portable than before, and looks likely to be the de facto standard for representing dates in the future. Lastly, since this is backwardly compatible and takes cues from existing libraries like Prototype, it is likely that developers and web browsers alike will take to the new features of JavaScript in the near future.
Using Drools? See what you're missing! Get the Power of Drools with the Assurance of Red Hat
Improve Java Garbage Collection, Runtime Execution, and JVM visibility with Zing
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.
Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.
John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.
Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.
Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.
Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?
Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.
No comments
Watch Thread Reply