ArticleslgStudy

science

Java view technologies and frameworks

Java view technologies and frameworks is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Java view technologies and frameworks rather than just read about it. In short: Java view technologies and frameworks are web-based software libraries that provide the user interface, or "view-layer", of Java web applications. Such application frameworks are used for defining web pages and handling the HTTP requests (clicks) generated by those web pages.

Key takeaways

  • Java view technologies and frameworks belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Java view technologies and frameworks to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Java view technologies and frameworks from memory before moving on to harder problems.

Reference excerpt

Java view technologies and frameworks are web-based software libraries that provide the user interface, or "view-layer", of Java web applications. Such application frameworks are used for defining web pages and handling the HTTP requests (clicks) generated by those web pages. As a sub-category of web frameworks, view-layer frameworks often overlap to varying degrees with web frameworks that provide other functionality for Java web applications. Java view-layer frameworks often claim to support some or all of the model–view–controller design pattern.

At a glance

Jakarta Faces (JSF), Apache Tapestry and Apache Wicket are competing component-based technologies, abstracting the stateless HTTP request-response cycle and the Jakarta Servlet API behind an object-oriented, event-driven component model. In contrast, Struts and the Spring MVC Framework are action-oriented frameworks that provide a thinner abstraction layer over the servlet API. Apache Tiles is a templating framework designed to work with Struts. Facelets is a view definition and templating technology designed to work with JSF. SiteMesh can be used with any Jakarta Pages (JSP). Facelets, Tapestry and Wicket have their own templating approaches based on HTML/XHTML. Apache Click uses HTML based Apache Velocity templates and plain old Java objects (POJOs), with JSP optional.

Servlet API

The Servlet API is the foundation of almost all Java Web View technologies. Servlet provides the basic mechanism for writing Java classes for web applications. Servlets can respond to HTTP requests, create cookies and maintain sessions.

Jakarta Pages (JSP)

Built on top of the Servlet API, JSP provides a document-centric, tag-based templates, server programming model which can generate many forms of textual content. Java code may be embedded in JSP files and is compiled and executed when a request is received.

Apache Struts

Struts provides for a decoupling of the Controller and the View. Requests are received by a Java Class (Controller) which can decide which View to display. The actual View can be written in different view technologies, like JSP, free marker template, velocity template etc. An XML configuration file is used to specify the "Page Navigation", i.e. the flow of the request to the appropriate Controller, and which View to display based on the outcome of the Controller. Competitor: Spring MVC, Grails

Apache Tapestry

A component-based view framework. Classes are written as POJOs and byte-code transformed at runtime Configured with annotations and naming conventions rather than XML Compared to JSPs, enforces a clear separation of HTML markup and Java code. HTML templates can be directly previewed by web designers Changed component classes are live-reloaded into running application for faster development. Uses the Post/Redirect/Get navigation pattern for form submission. Competitor: Wicket, JSF

Apache Tiles This is an HTML templating framework based on the composite pattern. It allows for the HTML page to be broken up into multiple "pagelets", called Templates, Definitions and Composing pages. At runtime the pagelets are stitched together to generate the final HTML. Pages are written in JSP. Competitor: SiteMesh

Apache Wicket

A component-based view framework. Pages directly interact with stateful Java components on the server. Components and their state are managed by the Wicket framework, freeing the application developer from having to use HttpSession directly to manage state. Does not require XML for configuration. Compared to JSPs, enforces a clear separation of HTML markup and Java code. Web page components are 'pushed' into the HTML markup from the code. Competitor: Tapestry, JSF

Jakarta Faces and Facelets

A specification for component-based view frameworks. Eclipse Mojarra and Apache MyFaces implementations are available Typically uses Facelets for XML/XHTML-based templating. Classes are written as POJOs, with Annotations or XML configuration files used to associate them with page and component templates. The Unified Expression Language allows binding component fields and events to POJO bean properties and methods. Conversion and validation constraints can be specified in Facelets and are automatically applied, normally resulting in reposting of the same page with error information in case of failure. Navigation can be via configuration file rules or directly specified in the page. Can transparently support Ajax. Competitor: Wicket, Tapestry

SiteMesh SiteMesh is an HTML templating framework based on the "Decoration" model. It allows for the creation of a 'decoration' template which is then applied to any other HTML to generate a new HTML. The newly generated HTML contains elements from the original HTML blended into the template. This allows for the original HTML to be very simple and devoid of any formatting or layout specification. The template, in turn, is devoid of any actual information. Blending the two allows for a consistent look and feel for all web pages. Competitor: Tiles

Spark Spark a micro web framework built around a simple routing system It runs on an embedded Jetty web server by default, but can be configured to run on other webservers. It supports three different templates engines: Velocity, FreeMarker and Mustache It aims to facilitate rapid development, and does not make use of annotations or proprietary solutions.

See also

List of web service frameworks List of Java frameworks

References

Worked examples

Example 1 — a first encounter with Java view technologies and frameworks

Start with the simplest possible case. Write down what Java view technologies and frameworks claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Java view technologies and frameworks before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Java view technologies and frameworks ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Java view technologies and frameworks

In research
Java view technologies and frameworks appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Java view technologies and frameworks in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Java view technologies and frameworks is common in secondary-school and first-year university syllabi. It links to neighbouring topics Java (programming language), Java APIs, so understanding it makes those chapters shorter.
In everyday life
Look for Java view technologies and frameworks outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Java view technologies and frameworks” →

How to study Java view technologies and frameworks in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Java view technologies and frameworks means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Java view technologies and frameworks out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Java view technologies and frameworks in simple terms?

Java view technologies and frameworks are web-based software libraries that provide the user interface, or "view-layer", of Java web applications. Such application frameworks are used for defining web pages and handling the HTTP requests (clicks) generated by those web pages.

Why does Java view technologies and frameworks matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Java view technologies and frameworks?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Java view technologies and frameworks.

Tags

  • Java (programming language)
  • Java APIs

Keep exploring