Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Service Oriented Architecture

  1. #1
    Junior Member
    Join Date
    Jan 2013
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Service Oriented Architecture

    Hy guys, I'm so sorry if I ask an very very ordinary question, but I just learn about SOA, and i found that we use XML to provide Web Service, one thing i confused about is, what make the SOA application different from Web application that use servlet and JSP?


  2. #2
    Junior Member
    Join Date
    Apr 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Service Oriented Architecture

    I recommend you spend more time learning about SOA. For example, the current trend is moving towards REST and JSON, away from SOAP and XML.

    One common approach is the Web Application presents a JSP-based GUI. Users interact with Java Servlets. The Web application maintains the application database.

    When there are other applications that need to interact with your database, the best practice is to NOT give them direct access to your database. Why? Say you find bad data on your database. Did it come from a bug in your application or the others? This complicates matters and reduces productivity.

    This is an anti-pattern known as "coupling at the database".

    It's best that each application "owns" it's own database and controls all access to it. When other applications need to perform CRUD operations on your database, you work with them to design the API's that meet their requirements, and you create services they call, keeping your database under your control.

    You can even leverage existing logic in your application to be more DRY.

    Keep in mind services are slow, so strive to accomplish these application-to-application interactions with a minimum number of service calls (optimally one.)

    There are many variations of course. One approach is to have the front end browser call services instead of Servlets. There are cases when this justifiable, but it adds complexity.

    Any time you discuss adding complexity you need to do the math. Compare what you are hoping to gain with the loss of productivity. If the benefit is not significantly greater, don't do it. Favor simplicity.

    Another current industry best practice is never allow "Future Proofing" (adding features you don't immediately need), nor "Gold Plating" (features you'd like to add, such as "for appearance sake" that have not been requested by those footing the bill.)

    Many folks are tempted by future proofing, but Agile methods recommend avoiding future proofing altogether. As far as I can tell this is well supported by my experience and by the industry leaders I follow, like Martin Fowler, Venkat Subramaniam, etc.

  3. #3
    Junior Member
    Join Date
    Jul 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Service Oriented Architecture

    Thanks gr8ful it's very helpful.I am new in java programming and i got a lot of information from it.

Similar Threads

  1. Architecture to be followed
    By Kumardev in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 15th, 2013, 01:12 AM
  2. Server <-> Client architecture.
    By daniel.j2ee in forum Java Networking
    Replies: 3
    Last Post: October 28th, 2011, 10:40 AM
  3. project architecture
    By crazyjava in forum Java Theory & Questions
    Replies: 1
    Last Post: September 28th, 2010, 11:42 PM
  4. Java Architecture help !!
    By java4 in forum Java Theory & Questions
    Replies: 1
    Last Post: September 20th, 2010, 01:11 PM
  5. a new pattern with a new architecture
    By mcgrow in forum Web Frameworks
    Replies: 0
    Last Post: August 4th, 2010, 02:28 PM