Can I use lovefield for syncing to the database when there is internet?

80 views
Skip to first unread message

abbey....@gmail.com

unread,
Mar 21, 2020, 4:43:09 PM3/21/20
to lovefield-users
Ok, so I have a web application built with core PHP, I am trying to add the following functionalities to it:
When Internet connection is lost, save data on client side and ones Internet returns the data should reflect on the data base on server.

Help heads up ?

Blake McBride

unread,
Mar 21, 2020, 6:14:00 PM3/21/20
to abbey....@gmail.com, lovefield-users
Having written a browser-based inventory system that works equally well with or without an Internet connection, I recommend the following:

1.  Use lovefield to store the data locally.

2.  Use UUID's for primary keys so you don't get record clashes.

3.  Do all of the UI processing on the front-end.  Don't generate HTML on the back-end.  (Communicate with REST.)

4.  Use https://developers.google.com/web/tools/workbox/ to make your app run when there is no Internet connection.

Blake McBride
  

--
You received this message because you are subscribed to the Google Groups "lovefield-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lovefield-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lovefield-users/702a1527-381b-414c-9e0e-e6eedddb0a5d%40googlegroups.com.

abbey....@gmail.com

unread,
Mar 22, 2020, 4:09:09 AM3/22/20
to lovefield-users
Thanks for the swift reply, if I'm getting you right, I need to create a rest API for the web app I developed(in core PHP) and no HTML should be generate?

Blake McBride

unread,
Mar 22, 2020, 11:32:54 AM3/22/20
to abbey....@gmail.com, lovefield-users
Yes, that is true.  I've not done much with PHP, but I think it's about the worst choices possible.  I believe PHP is big on generating HTML on the backend and small on REST services - exactly the opposite of what you need.

(As a self-serving side note, you may want to have a look at my own framework.  It is architected as I am suggesting.  kissweb.org )

Blake McBride


On Sun, Mar 22, 2020 at 3:09 AM <abbey....@gmail.com> wrote:
Thanks for the swift reply, if I'm getting you right, I need to create a rest API for the web app I developed(in core PHP) and no HTML should be generate?

--
You received this message because you are subscribed to the Google Groups "lovefield-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lovefield-use...@googlegroups.com.

abbey....@gmail.com

unread,
Mar 22, 2020, 1:11:03 PM3/22/20
to lovefield-users
Kiss looks lovely to use, do you think it would be easy to implement kiss into the hotel management system I built in php or I need to start from scratch?

Blake McBride

unread,
Mar 22, 2020, 3:07:35 PM3/22/20
to abbey....@gmail.com, lovefield-users
Thanks.

Kiss is basically a REST server that also serves up static pages.  The JavaScrip static pages are processed on the front-end.  If you are producing HTML on the back-end, there is no way to make it work without an Internet connection because you depend on the back-end to generate the HTML code on-the-fly.  For this reason. if you want to make your app work offline, you may be forced into a re-write away from PHP.  Sorry.

--blake


On Sun, Mar 22, 2020 at 12:11 PM <abbey....@gmail.com> wrote:
Kiss looks lovely to use, do you think it would be easy to implement kiss into the hotel management system I built in php or I need to start from scratch?

--
You received this message because you are subscribed to the Google Groups "lovefield-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lovefield-use...@googlegroups.com.

abbey....@gmail.com

unread,
Mar 24, 2020, 9:26:13 AM3/24/20
to lovefield-users
Thanks alot
Reply all
Reply to author
Forward
0 new messages