HOME

TheInfoList



OR:

Apache Click is a page and component oriented
web application framework A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and ...
for the
Java language Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers ''write once, run any ...
and is built on top of the
Java Servlet A Jakarta Servlet (formerly Java Servlet) is a Java software component that extends the capabilities of a server. Although servlets can respond to many types of requests, they most commonly implement web containers for hosting web application ...
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
. It is a free and
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
project distributed under the Apache license and runs on any
JDK The Java Development Kit (JDK) is a distribution of Java Technology by Oracle Corporation. It implements the Java Language Specification (JLS) and the Java Virtual Machine Specification (JVMS) and provides the Standard Edition (SE) of the Java ...
installation (1.5 or later). Click was initially created by Malcolm Edgar as the click.sourceforce.net project in 2003. The project then graduated to an
Apache The Apache () are a group of culturally related Native American tribes in the Southwestern United States, which include the Chiricahua, Jicarilla, Lipan, Mescalero, Mimbreño, Ndendahe (Bedonkohe or Mogollon and Nednhi or Carrizaleño an ...
top-level project in November 2009 with Bob Schellink. The project was
retired Retirement is the withdrawal from one's position or occupation or from one's active working life. A person may also semi-retire by reducing work hours or workload. Many people choose to retire when they are elderly or incapable of doing their j ...
in May 2014.


Overview

The main design goals are simplicity, ease of use, performance and scalability. To achieve these goals Click leverages an intuitive page and component oriented design. Pages and components provide good encapsulation of web concepts and enables rapid application development. Click takes a pragmatic approach and expose few abstractions to learn and understand. The
Java Servlet A Jakarta Servlet (formerly Java Servlet) is a Java software component that extends the capabilities of a server. Although servlets can respond to many types of requests, they most commonly implement web containers for hosting web application ...
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
is fully exposed to the developer which eases the upgrade path from an action based framework to a component based one. Pages and components are developed in
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
while templates can be written in
Velocity Velocity is the directional speed of an object in motion as an indication of its rate of change in position as observed from a particular frame of reference and as measured by a particular standard of time (e.g. northbound). Velocity is a ...
,
FreeMarker Apache FreeMarker is a free Java-based template engine, originally focusing on dynamic web page generation with MVC software architecture. However, it is a general purpose template engine, with no dependency on servlets or HTTP or HTML, and i ...
or JSP. Components know how to draw themselves alleviating developers from maintaining redundant markup. A major difference between Click and other component oriented web frameworks is that Click is stateless by design, although stateful pages are supported.


Competing frameworks

There are a number of other component oriented frameworks available for Java such as JSF,
Tapestry Tapestry is a form of textile art, traditionally woven by hand on a loom. Tapestry is weft-faced weaving, in which all the warp threads are hidden in the completed work, unlike most woven textiles, where both the warp and the weft threads may ...
,
WebObjects WebObjects was a Java web application server and a server-based web application framework originally developed by NeXT Software, Inc. WebObject's hallmark features are its object-orientation, database connectivity, and prototyping tools. Ap ...
,
Apache Wicket Apache Wicket, commonly referred to as Wicket, is a component-based web application framework for the Java programming language conceptually similar to JavaServer Faces and Tapestry. It was originally written by Jonathan Locke in April 2004. Ver ...
and
Vaadin Vaadin () is an open-source web application development platform for Java. Vaadin includes a set of Web Components, a Java web framework, and a set of tools that enable developers to implement modern web graphical user interfaces (GUI) using the Jav ...
. Some developers prefer the more traditional action-based web frameworks including
Apache Struts Apache Struts 2 is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model–view–controller (MVC) architecture. The WebWork framework ...
, Spring MVC, and
Stripes Stripe, striped, or stripes may refer to: Decorations *Stripe (pattern), a line or band that differs in colour or tone from an adjacent surface *Racing stripe, a vehicle decoration *Service stripe, a decoration of the U.S. military Entertainment ...
.


Example

A
Hello World ''Hello'' is a salutation or greeting in the English language. It is first attested in writing from 1826. Early uses ''Hello'', with that spelling, was used in publications in the U.S. as early as the 18 October 1826 edition of the ''Norwich C ...
Click application, with four files: ; hello-world.htm : The default template engine for Click is
Velocity Velocity is the directional speed of an object in motion as an indication of its rate of change in position as observed from a particular frame of reference and as measured by a particular standard of time (e.g. northbound). Velocity is a ...
, the htm file will be similar to a normal, static
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
page.

$message

; HelloWorld.java : The page model that will be bound to the template.
package org.wikipedia.click; import org.apache.click.Page; public class HelloWorld extends Page
; click.xml : The heart of a Click application is the click.xml configuration file. This file specifies the application pages, headers, the format object and the applications mode. : Click is smart enough to figure out that the HelloWorld page class maps to the template hello-world.htm. We only have to inform Click of the package of the HelloWorld class, in this case org.wikipedia.click. We do that through the click.xml configuration file which allows Click to map hello-world.htm requests to the org.wikipedia.click.HelloWorld page class. : By default the ClickServlet will attempt to load the application configuration file using the path: /WEB-INF/click.xml
; web.xml : The
servlet A Jakarta Servlet (formerly Java Servlet) is a Java software component that extends the capabilities of a server. Although servlets can respond to many types of requests, they most commonly implement web containers for hosting web application ...
application definition.
Click Example click-servlet org.apache.click.ClickServlet 0 click-servlet *.htm


Bibliography

*


See also

*
Comparison of web frameworks Two comparisons of web frameworks are available: * Comparison of JavaScript-based web frameworks (front-end) * Comparison of server-side web frameworks This is a comparison of notable web frameworks, software used to build and deploy web applicat ...


References


External links

* {{DEFAULTSORT:Click Framework Java enterprise platform Web frameworks