Roundcube Community Forum

 

Address Book: Bridging with a contact management app?

Started by shigoto chuu, April 19, 2012, 07:31:33 PM

Previous topic - Next topic

shigoto chuu

Hello,

I  have a contact manage app that allows users to add/edit/delete contacts and their information.  I am looking to bridge my application with Roundcube's address book so that I can add/edit/delete contact information from my app within Roundcube's address book.  And to also preserve as much functionality I can from the mail side of things.  For example, when clicking on a contact from within the address book, it will still allow you to compose a message to that person.  Note that I am using Roundcube 0.5.2 and the version cannot be changed.

Currently my app can handle HTTP requests allowing users to retrieve contact information through GET requests or add/edit contacts through PUT/POST requests (the requests have an XML body).  So that is one possible method, but it sounds like it would require a lot of modification into the Roundcube side.

Another possible option would be to "tear out" the Roundcube address book and embed my own application.  Although, I am still new to Roundcube so this may not be possible.

I was wondering if anyone here could help guide me in the correct direction on how to handle this situation.

SKaero

Why not just connect directly to the RoundCube database and then you can read and write contacts directly to the database.

shigoto chuu

I guess that is a possible option but there are a lot of other things that depend on the contacts table in my contact management app.  Sorry, I should have mentioned that earlier so I am not just confusing anyone.

So I hope to not replace the contact management app's database.  Although, if it is a matter of replacing Roundcube's contacts database with my contact management app's contact database.  How feasible is that?  Or should I still consider one of the other options I mentioned?

SKaero

So you just want to keep both databases in sync? Does the non RoundCube database need to be able to read and write contacts?

shigoto chuu

I don't necessarily need to keep any databases in sync.  I mainly just want to be able to edit Contact info from my app's database, from the Roundcube interface.  And yes, the non-Roundcube database (my app's contact database) needs to be able to read/write contacts because I want to allow users to edit contact information from my app as well.

SKaero

It probably best then to write changes from the other app to RoundCube's database and to make a RoundCube plugin that save changes to your apps database.

shigoto chuu

How difficult would it be to have Roundcube use my app's contact database?  Would that require tons of modification on Roundcube's side?

SKaero

I guess you could code a plugin that would pull directly out the other apps database, you should take a look at Global AddressBook plugin and see if you could customize it to work with your other system https://github.com/JohnDoh/Roundcube-Plugin-Global-Address-Book/

okiter