문제

I am designing a suite of web applications that have the same base functionality. That is, they all will know how to create and operate on widgets. The differences will be in their target audience and how a user will interact with a widget. Essentially, if these applications were developed independently, there would be a lot of duplicated effort.

To simplify this I have thought of two solutions. I would like all of your feedback on the pros and cons for each solution, and which you would prefer.

  1. "Platform" -- The idea is that there is an independent service layer, a la web services. It wouldn't be a web service, but simply a back-end for all the applications. The platform would talk to the applications via messaging or object serialization.

    I would want to write the platform with Java, but the intention would be that the applications could be written with any web framework such as Rails, Django, Flex, or just something in Java.

    The platform would abstract the database, so all interaction with the back-end would be done via the platform. One potential problem with this is that updating the platform will entail taking down all the applications. But at least all the applications will be consistent in regards with the back-end.

    I like how this is cut horizontally, and that the application really only has to focus on the front-end, rather then worrying about how to organize the back-end.

  2. "Modules" -- The idea is that I just write everything with Java and develop modules which would live in their own jars. Each module would represent a Guice module and each application would just include the modules they want, and create their own Injectors.

    This approach would make each application completely independent from each other, aside of sharing a common database. So, theoretically, it would be much easier to deploy an application in a different environment with out worrying about the platform. I would be stuck in one language environment, Java. Although, JRuby and Jython would be available. So maybe that isn't much of a concern.

    Also, I foresee it being easier to customize an application with out effecting the platform. The one con is that if I update a module, I would want to redeploy each application using that module. This would be easy with continuous integration, though.

Thank you for your time.


In regards to Gary's answer, I've decided to take a hybrid approach.

I'm going to develop a platform, which will be the access point for the web applications to data and services. I will then modularize the platform, but all the modules will remain under a single repository with a parent POM. While I could just keep them all in a single JAR, I would like the classpath separation for development purposes, to make me/others think before requiring a module to depend on another.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 softwareengineering.stackexchange
scroll top