Jump to content

PW Admin as Chrome App?


thomas
 Share

Recommended Posts

Hello,

has anyone here thought about building a PW backend as a Chrome App to support offline mode?

The editors using the backend of the pages I built often travel to remote places without any internet access so they asked me if it was possible to draft the articles offline and then simply upload them once they have access again. My first idea was to build a Chrome App that stores all data locally until it's explicitly told to upload everything and publish the articles. I've never built a Chrome App but from what I've figured it would mean packing an entire PW installation, modifying the database and file upload classes to use local storage and add an online status listener to provide the upload functionality.

Makes sense? Or is there another way to achieve this?

Thanks,

thomas

Link to comment
Share on other sites

Building the Chrome App is one part, but building the logic for syncing back changes is certainly a whole lot of another topic. I don't want to discourage you, but my suggestion would be: Some Folders and textfiles, maybe you could a an importer for those files, to save the copy/pasting. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By franciccio-ITALIANO
      Hello to all. I would like to create an app. So I need to learn at least one programming language. I got informed online, and discovered that javascript with node.js, is the revolution of recent years, because it's faster than php. I wonder: if I develop an app with javascript and with a javascript framework (e.g. Meteor), is there a way to integrate processwire work? I know that processwire supports the transformation of the site into an application, but would it be as simple as Meteor? With the Meteor framework I have my app online in 10 minutes, and without even knowing javascript! (Knowing javascript would serve to personalize it). I should then install the app in a SUB-DOMAIN. If I study php, instead, and if I use a php framework (e.g. Laravel), how long does it take to have my first working app? Is it easy to process Laravel's components? Is writing forms for processwire apps with php a very complex job? Is it better to use Meteor and start with javascript? What would you recommend?
    • By FrancisChung
      Long but well written, detailed and informative article written by an Engineering Manager for Google Chrome about the true cost of Javascript and what you can do to alleviate some of that cost.
      Must read!

      https://medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4
    • By clsource
      Hello,
      I just want to point out this framework for making html apps https://onsen.io/
      it's compatible with jquery, angular, vue, react or any other js framework.
      So far I made an app using this and bootstrap with https://propeller.in/
      for the desing and some libs like jquery and lodash for the app logic
      I prefer this to other alternatives like ionic since it does not bound you to angular or react.
       
      Cheers
    • By thetuningspoon
      I've been getting more and more into building full fledged web apps using PW as a framework. I use PW for data modeling and storage, user management, etc., and extend the Page class for different templates to add functionality to specific types of pages/data models. It is a very simple and powerful way to develop. 
      However, one thing that I have struggled with is finding the right way to approach page view access for users of an application (This would also apply to a password-protected area of any PW site). I'm going to try and boil this down to the most simple, common scenario, and go from there:
       
      I am building an app where every page in the app (except for the login screen) should be password protected. Should I...
       
      1. Turn off page view access in the template access settings for the guest user and use the settings to redirect the user to a login page.
      This has the drawback that you cannot disable guest view of the home page (a built-in PW limitation that seems a bit arbitrary). You are also limited in how you can define what to do when the page is not viewable (you must use the options provided in the admin interface), and you do not have the option of continuing to load the page with an alternate view (for example, a login form). Also, sometimes it requires configuring a lot of settings for a lot of different templates.  It also doesn't give you page-specific access control.
       
      2. Leave the access settings wide open but write some code at the top of my template files, init.php, or ready.php to redirect users who are not logged in.
      This has the disadvantage that it only applies if ProcessWire gets that far into the page load process, and it doesn't effect any other aspect of ProcessWire (for example, whether the page is available in a $pages->find()). If I wanted, I could allow anyone to reach any page and just show/hide the content based on the user's permissions or role. If the user doesn't have permission, I could keep them on the same page but show the login. Once they logged in, they'd be on the page they were originally looking for.
       
      3. Write my own hook before or after Page::viewable and/or ProcessPageView::execute (or somewhere else?) to switch access on or off and redirect based on my own requirements.
      This should be more reliable and secure than #2 and more flexible than #1, but it feels kind of like reinventing the wheel. Maybe the best approach is some combination of #1 and #3, with #2 reserved only for showing and hiding individual sections of a page that is already viewable.
       
      I'd be very interested to hear how others are handling this.
×
×
  • Create New...