Greg philologue has blogged most a newborn promulgation politician for Aptana Jaxer that contains a aggregation of newborn features.
Kevin Hakman told us most the release:
We’ve had server-side JS database APIs every along, but today handing termination sets is modify easier. There’s also today flooded dustlike foodstuff curb and admittance to the whole act wheel with APIs for communication headers, redirects, noesis and types. Speaking of types… for the prototypal instance with Jaxer, you crapper convey noesis types another than HTML including JSON, XML, GIF, etc… Yes, modify GIFs. Jaxer has a firm newborn Image API that among another things crapper modify Canvas to noise images and help them up. Like, Greg, I likewise rattling aforementioned the intent of using Jaxer for easily creating JSON accumulation services which is a apace ontogeny way as developers conceive the coercive capabilities of JSON more and more. In Jaxer, it’s rattling modify since it’s every autochthonous JavaScript on the client, on the wire, and on the server. There’s modify enhanced JSON publishing to attain it modify easier than before on both computer and server. JSON services also unstoppered Jaxer to be multipurpose in compounding with flush internet clients another than Ajax UIs much as Flash, Flex or modify Silverlight since every those hold JavaScript on the computer and crapper spend JSON data. For Ajax and RIA developers this is a boon since you crapper today indite your client-side and server-side cipher in the aforementioned language. And if you favour XML accumulation services Jaxer’s autochthonous E4X (ECMAScript for XML) hold effectuation you crapper appendage XML docs natively in JS on Jaxer as well.
This promulgation also includes a totally newborn concept: a bonded toy which as Greg explains, “lets you load, on the server, pages from another domains and earmark their JavaScript to fulfil without gift them admittance to the Jaxer API or your possess server-side code, but ease gives your cipher admittance to their pane objects and anything exclusive them”. For anyone who has ever finished screenscaping for mashups or another applications, this rattling helps a aggregation since Ajax pages hit historically thwarted bowing operations. With this feature in Jaxer you crapper securely intend a far page, fulfil its functions, and bowing the resulting DOM nodes (yes, you requirement not do windy manipulations with strings) and voila!
Here are the features:
- Application environment settings that allowing for easier app configuration, app properties, database settings, etc…
- Database API enhancements with richer APIs for employed with termination sets.
- Server-side ikon touching including server-side sheet hold and knowledge to modify to another ikon types.
- Native bidding enforcement API so that you crapper separate grouping commands and appendage the production from those.
- Asynchronous server-side JavaScript processing lets you compel callbacks in your server-side cipher too.
- Ability to convey bespoken noesis types (e.g. json, xml, gif, html, etc…)
- Full curb of the request/response lifecycle including environment redirects, headers, content, etc…
- Secure toy activity interbreed field calls, sandboxed JavaScript execution, META refreshes, …
- Serialization hold for JavaScript objects to and from XML, E4X and JSON.
Uri Sarid has a enthusiastic place that shows how you crapper do DOM Scraping with Jaxer, and updates it for this stylish release:
There’s a aggregation of another newborn morality in Jaxer 1.0, as substantially as the authorised free edition of the Mozilla engine institute in Firefox 3. So for warning getElementsByClassName is natively implemented (see John Resig’s pace comparison), in constituent to the another Mozilla features much as built-in XPath functionality and a rattling burly DOM feature set — meet what you requirement for whatever earnest ’screen scraping’, mashups, and noesis repurposing.
Let’s wager it in action!
It includes cipher that shows the Sandbox in action, as substantially as the DOM work:
-
-
// Gets a separate of the far page’s HTML, after whatever cleanup
-
function getFragment(title, url, isClassName, identifier, classesToRemove)
-
{
-
var toy = new Jaxer.Sandbox(url);
-
var table = sandbox.document[isClassName ? ‘getElementsByClassName’ : ‘getElementById’](identifier);
-
var container = addToPage(title, contents);
-
if (classesToRemove)
-
{
-
if (typeof classesToRemove == “string”) classesToRemove = [classesToRemove];
-
classesToRemove.forEach(function(className)
-
{
-
removeNodeList(container.getElementsByClassName(className));
-
});
-
}
-
return container.innerHTML;
-
}
-
getFragment.proxy = true;
-