• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Web Application and Web Service inside one 'War' archive

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I'm kind of seek help in design (or may re-usable pattern) based on ranchers experience.

I have one Inventory web-service which has couple of operations exposed. I'm using Apache CXF (JAX-WS2.0) and design is simple as follow.

WebServiceImpl -> Spring Service (2.5.6) -> Hibernate DAO (3.x) -> DB (MySQL)

These web-services works fine & satisfies need for the business for end clients. However, I'm now in need of preparing a web-ui which pulls/updates the data using the web-app. (Not all CRUDS - But at least Read, update and search).

Design I'm preparing is-

WebApp (JSP) - Action - (Re-use) Spring Service (2.5.6) + Any new Services -> remaining layes as it is.

My intention is to re-use Spring Service layer and DAO layer I've written (May be with new interfaces for web-application). Is this a valid (good) design to tie back-end implementation of web-service & web-application togather ?

Thanks,
Vishal Shah
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is this a valid (good) design to tie back-end implementation of web-service & web-application togather?



No this is not a good design. It is better to keep web services and web applications separate. Both can certainly work together and have their own codebase.

 
vishalraju shah
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jimmy,

Thank you for your response. Can you help me in understanding why keeping those two seperate shall be better ? I've seen Appfuse framework example where they have got Web-Application & Web-Service (User service) tied togather in one war. I also posted similar question on their forum but has received no response yet.

Thanks,
Vishal
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you. Examples on Internet websites do not always show efficient designs, workable solutions, or accurate information. Loose coupling in terms of system components will help in many areas, e.g. maintainability, system agility to handle revisions, etc.

Your signature line states that you have multiple certifications in software design. So, I'm sure that you have learned the reasons why keeping these two components separate is better. You just need to think a bit harder
 
vishalraju shah
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your response again. Yeah, I'm thinking & validating my design. However, it's always good to understand feedback/review from people who have attempted such things. I'm now trying modular web-app approach with three modules

1) spring/dao - in a single jar
2) web-app (war format)
3) web-service (war format)

In above, last two refers 1st jar in pom.xml. I'll post if anything is un-obvious I come arcoess.

Thanks anyway for your response.

Cheers
Vishal
 
reply
    Bookmark Topic Watch Topic
  • New Topic