I have a site built with cakephp (1.3), where users can manage lists of items.
I now want to develop a facebook app that will work with the data of my web-based site. The facebok-app is to replicate many of the web-site's functionality (basic CRUD and more), so I would like to reuse as much code as I can from my current cake- just use a different layout, or maybe change the views.
My question is: from a software design perspective, what's the best way to go about that? Some ideas I had in mind are:
- Add branching code in my actions to behave differently if it's running as facebook iframe
- externalize lots of action-logic into libs, and create different actions for the facebook app which will reuse those libs, as well as views
Would love if you can come up with other ideas.
Thanks!