Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Wiki Markup
{footnote}By "bespoke", we mean a non-component-based, manually created page; a standalone static HTML page.{footnote}

application, the developer will create a <script> block at the bottom of the page, and do initializations there. In Tapestry, it can be much more complex:

  • A JavaScript library, containing one or more initialization functions, is created
  • The initialization functions must be monkey patched into the T5.initializers namespace

    Wiki Markup
    {footnote}Prior to 5.3, it was the {{Tapestry.Initializers}} namespace;  both names reference the same object, for backwards compatibility.{footnote}

  • The JavaScriptSupport environmental must be used to invoke the function, by name, passing it a JSONObject to configure itself (the "specification")
  • The affected element must have a unique id attribute, used to coordinate the initialization in the client web browser

    Wiki Markup
    {footnote}Tapestry assists with unique id allocation, but it would be much better if unique ids were not necessary.{footnote}

...

Wiki Markup
{footnote}A rarely used feature of Tapestry is that a component library name may be mapped to multiple packages; resolving a module name may require a search among the packages. There is the expectation that the developer will ensure that there are no duplications that would lead to ambiguities.{footnote}

.

Under this system, module core/pubsub would be the file pubsub.js in the package org.apache.tapestry5.corelib.modulejs, since Tapestry's component library 'core' is mapped to package org.apache.tapestry5.corelib.

...

Wiki Markup
{footnote}{{app.properties}} provides application-specific messages, and overrides of other messages provided by Tapestry and other third-party libraries. The global message catalog is actually a composite of all of these sources.{footnote}

) and a client-side catalog. The client-side catalog is smaller, more limited, and less extensible.

Allowing the client application to have full access to the entire message catalog would make maintaining the catalog simpler, and make it easier to keep client-side and server-side messages consistent.

...

Wiki Markup
{footnote}It might be possible for the request to include a list of what's already loaded in the browser, so that the server can filter what it sends back; however, given factors such as content compression and typical upload vs. download bandwidth, it is almost certainly more effective for the browser to send too much, and let the client filter out duplicates.{footnote}

.

Tapestry 5.3 first loads any additional JavaScript (usually by adding new <script> tags to the page). Once JavaScript libraries and CSS links have been added, and JavaScript libraries have been loaded, the DOM is updated with the new content. Lastly, any initializations are processed.

...

  • Tapestry 5.3 style initializations will be a specific application of 5.4 style module requirement and invocation
  • IMMEDIATE may occur before DOM changes
  • Module requirement/invocation will occur in initialization priority order; for any single priority, initialization will occur in render order

    Wiki Markup
    {footnote}Technically, in the order of invocations on JavaScriptSupport.{footnote}

    .

  • The response will be embeddable inside other JSONObject responses.

...

Wiki Markup
{footnote}This should never have been the case, but that's hindsight.{footnote}

. Some of those server-side resource may expose details, such as other server hosts and potentially user names and passwords, that should never be exposed to the client.

In addition, a "walk" of the classpath to locate potential exportable assets can be quite expensive (though not considerably more so than what Tapestry already does at startup to identify page and component classes).

...