Results 1 to 10 of 10
  1. #1
    billy8988 is offline Member
    Join Date
    Feb 2012
    Posts
    5
    Rep Power
    0

    Question 3-tier archietcture question

    Hi,

    In a 3-tiered architecture, our client wants just HTML in the presentation layer. In the app layer, they want jsp/java/web services and EJBs (2 seperate EARs...the former communicating to the the later via web services. And of course the data layer. My question is,how would you handle the interface between presentation layer and application layer? If we are going to have static HTMLs in the presentation layer, would you just embed jsp calls to the app leyer in the HTML? or any other better way to handle this?

    Any help would be greatly appreciated.
    Thanks.

    -Bill

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: 3-tier archietcture question

    My question is,how would you handle the interface between presentation layer and application layer?
    Read about how to create a Session Facade.

    Core J2EE Patterns: Patterns index page

  3. #3
    billy8988 is offline Member
    Join Date
    Feb 2012
    Posts
    5
    Rep Power
    0

    Default Re: 3-tier archietcture question

    We are doing that. If you look at my OP, we have two components in the app layer, Web Logic and Application Logic. Web Logic is Session Facade.
    My question revolves around implementation. i.e, when you have a very thin presentation layer which consists of just static HTML, how would that be effectively communicating to the Session Facade?

  4. #4
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: 3-tier archietcture question

    Quote Originally Posted by billy8988 View Post
    We are doing that. If you look at my OP, we have two components in the app layer, Web Logic and Application Logic.
    If you look at your OP, you never mentioned anything about a session facade. Or perhaps you don't understand what is it - a method to organize how two tiers communicate which....

    My question revolves around implementation. i.e, when you have a very thin presentation layer which consists of just static HTML, how would that be effectively communicating to the Session Facade?
    ...if I'm not mistaken was exactly what your question was about. And perhaps you should define what you mean by 'static html', because in my mind this is just that - text unparsed by the server (in which case, you cannot output dynamic content from any source)

  5. #5
    billy8988 is offline Member
    Join Date
    Feb 2012
    Posts
    5
    Rep Power
    0

    Default Re: 3-tier archietcture question

    Quote Originally Posted by doWhile View Post
    If you look at your OP, you never mentioned anything about a session facade. Or perhaps you don't understand what is it - a method to organize how two tiers communicate which....
    Fair enough. After skimming through the link you posted, I came to the conclusion that is exactly what we are doing to communicate between 2 layers which reside in our app zone.

    Please see the attached image. In my mind, #3 (Web app servers) is indeed a Session Facade. Correct me if I am wrong.
    My question is, how would #2 pass the dynamic content generated by #3 to #1?

    Thanks for your patience.

    3-tier archietcture question-arch.jpg

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,044
    Rep Power
    20

    Default Re: 3-tier archietcture question

    As HTML.
    Well, generated by a JSP in all likelihood.

    All "HTML only" for the front end means is "no Javascript".
    Which generally means no Ajaxxy stuff going on...ie if data is needed on a page then the whole page gets refreshed.

    I don't quite understand your problem?

  7. #7
    billy8988 is offline Member
    Join Date
    Feb 2012
    Posts
    5
    Rep Power
    0

    Default Re: 3-tier archietcture question

    Thanks for the reply.
    I am trying to make sense out of the diagram that I posted.
    I don't quite understand the box #2. If jsps in #3 are going to generate html and send it to this "Html only" box (#2), how would a just "html only"(#2) communicate with #3 and process anything coming out of #3.
    That's where my confusion is.

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,044
    Rep Power
    20

    Default Re: 3-tier archietcture question

    Through the request, which tells the Web Server what the front end wants to do.
    If that request is something earmarked as being for the Web App Server then it passes it onto there, and sends the response back to the client when it gets it from the Web App Server.
    If that request isn't (eg it's an image request from an <img> tag) then the Web Server itself handles it.
    The Web Server does almost no "processing". It simply passes on request that need passing on, and returns responses as needed.

  9. #9
    billy8988 is offline Member
    Join Date
    Feb 2012
    Posts
    5
    Rep Power
    0

    Default Re: 3-tier archietcture question

    Quote Originally Posted by Tolls View Post
    Through the request, which tells the Web Server what the front end wants to do.
    If that request is something earmarked as being for the Web App Server then it passes it onto there, and sends the response back to the client when it gets it from the Web App Server.
    If that request isn't (eg it's an image request from an <img> tag) then the Web Server itself handles it.
    The Web Server does almost no "processing". It simply passes on request that need passing on, and returns responses as needed.
    Ok, let's say a html in the web server looks something like

    <html>
    <body>
    <a href="www.appserver.com/login.jsp">Login</a>
    </body>
    </html>

    When the user clicks on the Login link, aren't they talking directly to the appserver, bypassing webserver? In that case, client's DNS won't even find the appserver, isn't?

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,044
    Rep Power
    20

    Default Re: 3-tier archietcture question

    They talk to the web server.
    That web server maybe simply an Http stack stuck on top of the app server (eg Tomcat's inbuilt stack), or a separate entity.
    It has the same effect.
    That is the bit that takes requests from the client and serves the response.

Similar Threads

  1. Servlet on 3 and 2 tier architecture NEED HELP
    By lol-y-noob in forum Java Servlet
    Replies: 1
    Last Post: 08-27-2011, 10:45 PM
  2. Need explanation on 2 tier and 3 tier. Thank you
    By SnoopyX in forum Advanced Java
    Replies: 7
    Last Post: 03-26-2011, 06:22 PM
  3. Replies: 2
    Last Post: 03-25-2011, 05:56 AM
  4. Confusion about DAO in Three-Tier Architecture!
    By Maven0 in forum New To Java
    Replies: 4
    Last Post: 07-26-2010, 01:30 PM
  5. three tier Desktop Application
    By newmember in forum AWT / Swing
    Replies: 0
    Last Post: 07-27-2008, 03:10 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •