Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

I'm not 100% sure I've understood your question correctly, but it sounds like you're building an API that exposes a bunch of Web Services (I'm going to assume RESTFul-Like as you're using Java WS and RoR) that has multiple clients built in various technologies. Sounds perfectly acceptable to me!

I think you do want to keep the RoR web application separate from the RoR API. Why? Because the RoR web app is not your only client. So you'll want to use web services to communicate between any client and your API. Keeping your RoR Web application separate will help you design a much cleaner RESTFul-like API, more effort now, but more rewards later when your users want that iPad client ;) or your boss says we're moving to F# for the API!

share|improve this answer
    
Good points all around Martijn. The one about the web app not being the only client is the clincher. Thanks for the insight. –  opendd Jan 20 '11 at 21:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.