Hi Pierre,

PWA can be PIA until we gain our footing :-)

To be clear for us, and anyone late to the party, when you say “DA and PWA” 
what you mean is:

“I want to vend a progressive-web-app from a WebObjects DirectAction”

No, I have not done that before. I’m not sure why you want to do that but I do 
think it is possible. If you take PWA to also mean “offline first” with either 
server workers or AppCache then you probably want to vend sw.js too. Inside 
“sw.js” there will be an ID or number that has to change for the client to know 
there is something “new” to fetch. 

You are using RPC to store data (remote procedure call) - that sounds like your 
client code is invoking a method through a transport layer to do persistence on 
the backend. Which is fine but I haven’t tried it. There are so many ways to 
achieve our goals, all of them valid. 

For me - I’ve built JS apps like they were real apps and put those resources to 
be vended statically by Apache (or nginx). So I haven’t vended from a DA, I 
vended direct from disk. 

For persistence I have done REST calls to a WO app (which is really a DA when 
you think about it). This is much like you would do with an iOS or other app 
talking with a server through REST with the only difference being it is a pure 
JS app running in a web browser. I used local forage and then later PouchDB for 
some client side persistence so I didn’t have to do REST all the time but could 
batch it up for when a user did “save” 

For persistence I have also done CouchDB in the client (PouchDB) going direct 
to CouchDB as both the DB and the server (removed some layers, which is nice) 
and allowing them to sync natively. That’s what couch does really well, sync. 
Cluster-of-unreliable-commodity-hardware. 

You can make apps like this one: https://minutes.io/welcome 
<https://minutes.io/welcome>

AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319        
        
        

> On Apr 28, 2020, at 2:11 AM, GILQUIN Pierre <pierre.gilq...@hcuge.ch> wrote:
> 
> Hi Aaron,
>  
> Thanks your all theses information.
>  
> Did you successly mixed DA and pwa ?
> I am not sure what you mean :
> « .. then send DA to WO for permanent storage … »
>  
> But I guess, it’s equivalent to what I am doing using rpc call. The rpc 
> mecanism is from the WOGWT framework.
>  
> Pierre
>  
>  
>  
> De : Aaron Rosenzweig [mailto:aa...@chatnbike.com 
> <mailto:aa...@chatnbike.com>] 
> Envoyé : lundi 27 avril 2020 22:47
> À : GILQUIN Pierre
> Cc : WebObjects-Dev
> Objet : Re: PWA
>  
> Hi Pierre,
>  
> The critical part is figuring out how to be “offline first” - it’s a mindset 
> - offline is not an error condition. 
>  
> The “sw.js” you mention is a “service worker” which is a means of caching 
> files on the client so you don’t need to speak with the server. The next time 
> you access the web page it checks the version of the service worker and if 
> nothing has changed, there is no download. That’s great for:
>  
> 1) user experience - you can give users a full version of your app and it 
> doesn’t cost you anything because the information is all on the client. Don’t 
> even need a user account! They can pay when they want to persist and share 
> across devices but by that time they are hooked. 
>  
> 2) bandwidth - with no download your apps pop when they revisit and work 
> “real fast” even without an internet connection. 
>  
> 3) resource utilization - Clients have power, they aren’t dumb, let them do 
> the work and let your “server” just be a bit bucket. Do more with less. 
>  
> You probably want to use something like PouchDB for your client side 
> persistence and then send DA to WO for permanent storage. At some point, you 
> can consider switching out CouchDB for the back end for direct sync. 
>  
> Between you and me - “service worker” is a dumb name. It replaced “AppCache” 
> which was perfectly named and in many ways easier but is now deprecated. 
> AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
> 
> <~WRD000.jpg>
> 
> <~WRD000.jpg>
> 
> 
> 
> On Apr 27, 2020, at 9:18 AM, GILQUIN Pierre via Webobjects-dev 
> <webobjects-dev@lists.apple.com <mailto:webobjects-dev@lists.apple.com>> 
> wrote:
>  
> I found a solution.
>  
> I created an index.html using the html generated by the WO app.
> I just put it in the directory served by apache. It’s works, the rpc call 
> from the client app get the correct results from the WO app
>  
> I guess as domain name is the same, no security/SOP issue.
>  
> So, I think it will much easy to make an installable pwa app.
>  
>  
> Pierre
>  
> De : GILQUIN Pierre via Webobjects-dev [mailto:webobjects-dev@lists.apple.com 
> <mailto:webobjects-dev@lists.apple.com>] 
> Envoyé : lundi 27 avril 2020 09:16
> À : WebObjects-Dev
> Objet : PWA
>  
> Hi,
>  
> Do you think it’s possible to create a pwa(progressive web app) from a 
> directaction ?
> I am a complete beginner on the subject and everything I can find starts with 
> a static web directory with an index.html and some additionnal files 
> (manifest.json and sw.js) to make a app installable.
> Is there a way to adapt a WO/nder app to that ?
> My directaction just sent a unique component. Inside there is a single page 
> client application. it just uses the directaction to pass parameters.
> Ie : MyApp.woa/wa/questionnaire?type=coronavirus
> The client app is written in java GWT and call some rpc implemented inside 
> the WO/nder server app.
>  
> Thanks in advance for any idea,
>  
> Best, Pierre
>  
>  
>  
>  
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com 
> <mailto:Webobjects-dev@lists.apple.com>)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com 
> <https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com>
> 
> This email sent to aa...@chatnbike.com <mailto:aa...@chatnbike.com>
>  

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com
  • PWA GILQUIN Pierre via Webobjects-dev
    • RE: PWA GILQUIN Pierre via Webobjects-dev
      • Re: PWA Aaron Rosenzweig via Webobjects-dev
        • RE: PWA GILQUIN Pierre via Webobjects-dev
          • Re: PWA Aaron Rosenzweig via Webobjects-dev

Reply via email to