Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2581

Javascript public API (interface/wrapper)

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.4.2
    • Fix Version/s: None
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      I think Tapestry should expose JavaScript methods for "public" usage not to break JavaScript code on upgrade. By using JSDoc (http://usejsdoc.org) users will get warnings on code change in the IDE. Methods can be marked as @deprecated etc. Method should be annotated @public (easier than mark all other @private). @typedef makes code completion good and marks wrong parameters with warning.

      I am trying to use Tapestry without accessing its "internal" JavaScript methods, but sometimes it's reasonable to access them directly. The new way of accessing server-side events with @PublishEvent and t5/core/ajax will result to that more developers discover other nice Tapestry JavaScript methods also.

      https://github.com/sveine/tapestry-multi-module-demo/blob/master/core/src/main/resources/META-INF/modules/util/tapestryutil.js

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              svein Svein
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: