Web Info & Tutorials

October 18th, 2007

KEN RUSSELL ON THE NEW JAVA PLUGIN

After we posted about the news that Sun has rewritten the browser Java plugin system, we got a chance to sit down with the lead engineer on the project, Ken Russell.

He got to tell us about the fun implementation issues behind the rewrite. It turns out that the new system is mostly written in Java itself, and there is a very thin bridge to the browser. The JVM also runs in its own OS process, so if the JVM crashes it doesn’t affect the browser.

There were also other tidbits, such as having JNLP working natively in the browser, and how this could be used to allow other scripting engines such as JRuby to run in the browser. One JNLP extension, and everyone can share JRuby.


October 18th, 2007

GOOGLE ANALYTICS EXPANDS TRACKING CAPABILITIES

VentureBeat is reporting that Google has updated their popular Google Analytics service to begin tracking Ajax and Flash-based requests:

The new additions reflect a growing feeling on the web that pageviews are a less important metric than they used to be. Google Analytics is opening a feature for beta testing that tracks user engagement with elements that have become common with Web 2.0 services, including Javascript, Ajax and Flash applications, widgets and gadgets, and downloadable pages.

With many sites reliant on selling advertising based on page views, this update will allow developers to leverage Ajax, JavaScript and/or Flash without the worry of losing valuable stats data:

While small web companies will be the primary beneficiaries of the new features, the move could also prove meaningful for online advertising. Experts have suggested for some time that advertising rates should reflect elements beyond the simple standard used so far, page views.

Full article here.

October 18th, 2007

ENUNCIATE YOUR WEB APIS

Enunciate is an open source framework that allows you to automatically build, package, deploy, and to clearly, accurately deliver your Web service API on the Java platform.

It will automatically give you multiple endpoints (SOAP, REST, JSON, GWT-RPC, etc.), generate client code, and give you full documentation.

The new 1.4 release also includes support for publishing your JAX-WS endpoints as GWT-RPC endpoints, including generating the GWT client-side code for invoking the endpoints via Ajax.

Features

Full User Documentation

Enunciate will generate full user-level documentation to describe your web API. The content for the documentation is
taken from the documentation of the original source code (i.e. Javadoc),
consolidating the maintenance of your entire Web service contract to a single place.

  • Consolidated, Annotated WSDL and Schemas

    The common WS stack will provide a WSDL for an endpoint when queried. Generally, the WSDL is generated at runtime, the
    associated schema is inline, the semantic constructs (i.e. namespaces, message names, argument ids, etc.) are awkward
    and inconsistent, and the scope is limited to that specific endpoint. The XML contract is difficult to interpret (especially
    when being consumed for client-side stubs) and doesn’t give a consolidated picture of the whole API because it has no reference
    to other endpoints and schema data that service the same namespace
    (click here for a more
    complete discussion
    ).

    Enunciate generates the formalized XML contract at compile-time, providing for a consolidated, efficient XML definition.
    Core schema data is consolidated into a single set of schema documents (grouped by namespace), and multiple endpoints
    that service the same namespace are put into a single WSDL. This allows for a wider, cleaner picture of the formal contract
    and relieves the consumer of the consolidation work.

  • Multiple Endpoints: SOAP, REST, JSON, GWT-RPC, etc.

    Enunciate will publish your endpoint class as a SOAP endpoint as defined by the JAX-WS annotations (powered by XFire). By supplying additional metadata, the same endpoint class will be published
    as a XML REST endpoint at a different URL. Furthermore, certain REST endpoints will be automatically available as JSON
    endpoints at yet another URL. See the REST module documentation for more information.

    Also, by enabling the GWT module, your endpoints will be published via
    GWT-RPC along with the client-side GWT code for invoking those endpoints via AJAX.

  • Client Code Generation

    Enunciate will generate client code for multiple platforms to interface remotely with your published API. Not only is
    the generated code fully documented, but it is simple, elegant and efficient. Enunciate does not generate
    client code from the WSDL but instead reflects it from the original source code, allowing code documentation to be carried over
    and preserving valuable information like method signatures, class structure, and variable names.

    Currently, Enunciate generates code for the Java 1.4 platform and the Java 5 platform, but has plans to add modules that
    generate code for the .NET and C/C++ platforms in the future. Consult the roadmap for
    information on other modules in the pipe and how you can help.

  • Full App Packaging

    Enunciate packages your API, extended with each of the above features, into a single web application archive (war file). Drop the war
    file into your favorite J2EE container, and consider your web API enunciated.

  • October 18th, 2007

    PACKR: RAILS PACKING

    James Coglan has produced a Rails plugin to appendage histrion theologist Packer.

    PackR allows you to programatically compress:

    RUBY:

      # Create a newborn happening of Packr first
      packr = Packr.new
      compressed = packr.pack(script)

      # Pass options to curb the identify of compression
      compressed = packr.pack(script, :shrink_vars => true)
      compressed = packr.pack(script, :base62 => true)
      compressed = packr.pack(script, :shrink_vars => true, :base62 => true)

    or you crapper ingest the blood task:

    rake packr:pack_libs

    October 18th, 2007

    YUI IMAGE UPLOAD EXTENSION

    When the developers of a JavaScript library post about your extensions, it generally means that you've done a heck of a job. It seems that Dennis Muhlestein has impressed the YUI team with his image upload extension to the YUI Rich Text Editor.

    I’ve created an extension that modifies the RTE image dialog to include a new input for browsing to an image. It uses the Yahoo Connection manager to upload the image in the background to your server, and then displays the image in the RTE after the file is successfully uploaded.

    Dennis provides downloadable code and detailed instructions on how to implement his extension into your YUI code.

    October 18th, 2007

    COMPANION.JS: IE DEBUGGING, NOW SUPPORTS CONSOLE.LOG

    Jean-Fabrice Rabaute has free Companion.JS, an IE debugger that features:

    • Detailled javascript nonachievement news (call stack and real enter name where the nonachievement occured).
    • “Firebug”-like Console API feature.
    • Javascript housing feature multipurpose to inspect javascript objects at runtime.
    • A toolbar picture to unstoppered the Companion.JS panel.