Question about API and Web application code sharing
- by opendd
This is a design question. I have a multi part application with several user types. There is a user client for the patient that interacts with a web service. There is an API evolving behind the web service that will be exposed to institutional "users" and an interface for clinicians, researchers and admin types.
The patient UI is Flex. The clinician/admin portion of the application is RoR. The API is RoR/rack based. The web service component is Java WS. All components access the same data source.
These components are deployed as separate components to their own subdomains. This decision was made to allow for scaling the components individually as needed.
Initially, the decision was made to split the code for the RoR Web application from the RoR API.
This decision was made in the interests of security and keeping the components focused on specific tasks.
Over the course of time, there is necessarily going to be overlap and I am second guessing my decision to keep the code totally separate. I am noticing code being lifted from the admin side being lifted, modified and used in the API. This being the case, I have been considering merging the Ruby based repositories.
I am interested in ideas and insight on this situation along with the reasoning behind your thoughts.
Thanks.