Persistence and sync as an angularjs module

206 views
Skip to first unread message

Nate Dudenhoeffer

unread,
Nov 14, 2014, 10:43:40 AM11/14/14
to persis...@googlegroups.com
I have been using persistencejs inside of cordova apps written in angularjs. Is anyone else here using it in that setup? It has been working great for me. It is lightweight and flexible. Thanks again, Zef and other contributors.

I plan to refactor persistence.sync as an angular module as part of a project I will be starting soon.  Most importantly for support of promises, but there are some other angular features that would be nice too.  I am posting to this group, to ask if there is interest in working on a more thorough rewrite of persistencejs as an angular module, mostly for promise support. I am not able to commit the time to port the entire library, but I will help if there are others interested in committing to it. To clarify for anyone unfamiliar, persistence and angular work fine, but it doesn't follow angular conventions and modular structure.

Thanks in advance for your feedback,
Nate

Chris Coetzee

unread,
Nov 25, 2014, 5:51:38 AM11/25/14
to persis...@googlegroups.com

Hi Nate, 

We've been using persistencejs with Ionic framework (a mobile application framework built on-top of Cordova and AngularJS).
I have fixed several small issues in the persistence.sync.js file and added some additional features, which include:
  * Sync exclusion for certain fields
  * in-url RESTful API key authentication 
  * Relationships
  * Restore `deleted` entries to the pending table if 
    sync failed
  * Unnecessary posting to server if there are no changes 
And some other small fixes, which I can't recall right now. 

We have also written a Django TastyPie (RESTful framework) server-side resource for syncing with our server, this introduced several breaking changes to the persistence.sync module.

It would be nice to have an angularjs module in our application, however I don't see us refactoring to such an implementation in the near future, since we are nearing a deadline.

If you are interested in the aforementioned resources let me know.
Message has been deleted
Message has been deleted

Nate Dudenhoeffer

unread,
Jan 12, 2015, 3:51:33 PM1/12/15
to persis...@googlegroups.com
@Rony,
Zef has not passed this project to me. I am not the maintainer of the project, and don't have the time to be.

I opened this thread to discuss if there were other users of this project interested in contributing to better integration with angularjs. I still intend to do as I described in my original post, and refactor the "sync" module as an angularjs module. I have some other projects which are getting priority right now, and my next new app using persistence has been delayed a few months. When I start working on that refactor, I will put it in a github repository, and post a link in this thread.

On Friday, January 9, 2015 at 1:08:26 PM UTC-6, Rony Cohen wrote:
Nate, 

Zef passed this project to you, and you don't do anything.
If you are unavailable to support this project. Give it to someone available, with motivation to do it.

Le mardi 9 décembre 2014 11:44:36 UTC+1, Rony Cohen a écrit :
Hi Nate,
What you just wrote is amazing.
It would be very nice to share your Ionic persistence Work !!
Bye

Nate Dudenhoeffer

unread,
Jan 12, 2015, 3:57:09 PM1/12/15
to persis...@googlegroups.com
@Chris,
As I just mentioned in another reply, this project is on the back burner, but I haven't forgotten about it. If you wouldn't mind sharing the changes you have made to persistence.sync, I would like to consider them when I do get around to this.

I am using Django server-side also, but not TastyPie. What breaking changes did you need to introduce? If I am going to go through the trouble of refactoring, I may as well try to make it play nice with both TastyPie and DRF.

Nate
Reply all
Reply to author
Forward
0 new messages