What is an example of "3 tier architecture application in Java"? Could frameworks like Spring help me understand this way of programming?
-
Well im trying to understand because im still kind of confusing with MVC pattern and 3-tier. model = data, view=prestenation, controller=Bus.logic. if you can only give me the path from where i should start and which are the Frameworks that i should use with java. i will appreciate
-
Answer:
Both are architecture patterns. MVC consists of Model, View, Controller. Model is not just data, it is data and methods that change this data. It doesn't contain information about how to present this data - View is used for this. View usually requests data from Model, but Model can also force View to render data (for example, in case of change it from outside). Controller is a component that validates user input and calls model method to change data. Controller should not update data directly (or it will become Fat Stupid Ugly Controllers (c)). 3 tier architecture consists of Presentation, Logic, Data. These tiers are usually associated more with database server, application server and browser. If you make a parallels between these two patterns, you may assume that Presentation is a View, Logic is a Controller and Model (data access objects), Data is Model (data). Both are design patterns, so they are not related with specific programming language. Frameworks like Spring MVC just help you to write applications in MVC style and deploy them as 3-tier architecture.
Boris Marchenko at Quora Visit the source
Other answers
Javafx programs are implemented using MVC architecture. To understand MVC study the sample codes that comes with your default Javafx install. You can also read Javafx tutorials on sun Microsystems site to get a better understanding of the concept.
Amos Ezeme
Three Tiers - 1- Front End 2. Middle Layer (Your server side logic stays here) 3. DB - Your data is here. To my understanding, this is three layered architecture.
Vineel Yalamarthy
I will use a standard shopping cart item selection to explain the 3-tier architecture. please note I am just referring to item selection action. This does not included delivery address action or payment action. A front-end or presentation layer will do the following in this case: notify the business layer (server-side) of the consumer (like you & me) action of 'buying' a product( usually by clicking a 'Buy' button on the product details page) via an ajax call. Once the business layer does its part & sends back a 'success' status of the ajax call, the front-end layer will inform the consumer of this 'sucess' visually. It will create an entry in the shopping-cart area( either the product image will fly & drop into that area or the shopping-cart icon will change with a no. on it) A business layer will do the following: Create a 'Consumer order' object or Model that will store your selected item subject to these basic criteria 1.item is available in inventory. 2.price calculation based on quantity selected(for some items, you can get a discounted rate based on the quantity) 3. shipping cost computation 4. Finally the 'order' object will be stored in user session. Business layers of industry-grade e-commerce models will have lot more criteria. Finally, the data or persistence layer will persist the consumer order to the data store(Oracle or MySQL e.g.). Nowadays an ORM framework such as Hibernate or JPA comprises this layer. A standard technology stack that can accomplish the above 3-tier can be JSP+Spring MVC+Hibernate. There are many other combinations of technologies which you can use to acheive a 3-tier architecture. You can have additional layers such as a security layer that will sit between the front-end and business layers. Spring Security or JAAS are some technologies that can be used for this layer. Of'coz there are others as well.
Ramaswamy R Iyer
Three-tier generally refers to: Load balancing and static web content tier (F5, Apache, Sun iPlanet, Oracle Traffic Director, nginx, Microsoft IIS, etc.) Application server tier (Oracle WebLogic, IBM WebSphere, JBoss, Glassfish, etc.) Database tier
Cameron Purdy
Related Q & A:
- What is an example of relational data and what is an example of a document?Best solution by people.cs.pitt.edu
- What is an example of web based application?Best solution by ChaCha
- List of elements to cover in skippers briefing for voyage (could anyone help me understand what that means?Best solution by answers.yahoo.com
- Pls Help me understand how this integral is solved?Best solution by Yahoo! Answers
- What is a 3 tier budget?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.