Results 1 to 2 of 2

Thread: [Feature Request] Offer possibility to integrate custom handlers & scripts in PWA SW

    You found a bug! We've classified it as SDKTOOLS-1857 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member valio's Avatar
    Join Date
    Jan 2014
    Posts
    203
    Vote Rating
    22
      0  

    Lightbulb [Feature Request] Offer possibility to integrate custom handlers & scripts in PWA SW

    Background:
    It's cool that SenchaCmd now offers the "progressive" app.json config along with the @sw-cache annotation, which provides a possibility to easily generate a PWA by using sw-precache.
    This provides a simple approach for caching data in read-only apps, but not for storing data.

    I am currently implementing a progressive web app (PWA) that needs support for editing records offline.
    In the past month I have already invested a lot of time into researching this and related topics.

    One should be well aware that implementing such an app is indeed quite complex (just consider syncing with data inconsistencies between server & client) and certainly Sencha is unlikely to implement a one-fits-it-all-solution.

    However, it would be nice if devs could partially profit from the existing integration in SenchaCmd (especially for caching non-dynamic data; often termed the "app shell") and thus can focus on those harder parts.

    Feature request:
    I would suggest the following extension to the current PWA support offered by SenchaCmd:

    1) In the "progressive" (or some other) config in app.json, allow referering to an external JS file (that may reside in the workspace or app directory), which implements custom handlers for certain routes, as well as additional code that will be added to the service-worker
    2) In the "@sw-cache" annotation allow referencing a custom handler from the external JS file.

    I believe that this feature request might not be sooo hard to implement.
    The reason is, that the new implementation in SenchaCmd mentionned above is already using sw-precache, coupled with the runtimeCaching config for sw-toolbox, which is basically the collection of all @sw-cache annotations. The runtimeCaching config does already allow to implement handlers, by providing a Function instead of a string. Thus SenchaCmd could then provide a function as config for sw-precache that would then call the actual function that is implemented in the external JS. The external script can be added to the final service worker e.g. by using the importScripts config for sw-precache.

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Vote Rating
    296
      0  

    Default

    Thanks for the report! I have opened a feature request in our bug tracker.

Similar Threads

  1. Feature request: custom VTypes
    By ssamayoa in forum Sencha Architect 2.x: Help & Discussions
    Replies: 10
    Last Post: 27 Feb 2014, 12:39 PM
  2. Replies: 1
    Last Post: 30 May 2013, 8:52 AM
  3. small request about loading scripts
    By cs0ip in forum Ext: 4.x Beta
    Replies: 1
    Last Post: 13 Feb 2013, 8:56 PM
  4. Feature Request: Possibility to write textual comments
    By quixit in forum Sencha Architect 2.x: Help & Discussions
    Replies: 1
    Last Post: 11 Jan 2013, 1:26 PM
  5. Feature Request: Closeable TabItem with possibility to abort closing
    By jraue in forum Ext GWT: Help & Discussion (1.x)
    Replies: 3
    Last Post: 12 Jun 2008, 11:34 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •