Content deleted Content added
No edit summary |
No edit summary Tags: Mobile edit Mobile app edit Android app edit |
||
(36 intermediate revisions by 30 users not shown) | |||
Line 1:
{{Short description|Oriented web application framework for Java}}
{{ Infobox Software▼
{{Cleanup bare URLs|date=September 2022}}
| name = Apache Click▼
| logo = [[Image:Click-icon-43.png|43px|Click Framework logo]]▼
| screenshot = ▼
| caption = ▼
| developer = [[Apache Software Foundation]]▼
| latest release version = 2.2.0▼
| discontinued = Yes
| latest release date = {{Start date and age|2011|03|27}} <ref>http://click.apache.org/</ref>
| latest preview version =
| latest preview date
| operating system
| programming language
| genre
| license
| website
}}
'''Apache Click''' is a
It is a free and [[Open-source software|open-source]] project distributed under the [[Apache License|Apache license]] and runs on any [[JDK]] 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 Software Foundation|Apache]] top-level project in November 2009 with Bob Schellink. The project was retired in May 2014.<ref>{{cite web|title=Apache Attic - Apache Attic|url=http://attic.apache.org/projects/click.html|access-date=17 June 2014}}</ref>
==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.
Line 35 ⟶ 37:
==Competing frameworks==
There are a number of other component oriented frameworks available for Java such as [[JavaServer Faces|JSF]], [[Tapestry (programming)|Tapestry]],
▲There are a number of other component oriented frameworks available for Java such as [[JavaServer Faces|JSF]], [[Tapestry (programming)|Tapestry]] and [[Apache Wicket]].
Some developers prefer the more traditional action-based web frameworks including [[Apache Struts]], [[Spring Framework (Java)|Spring MVC]], and [[Stripes (framework)|Stripes]].
== Example ==
A [["Hello, World!" program|Hello World]] Click application, with four files:▼
▲A [[Hello World]] Click application, with four files:
; hello-world.htm
: The default template engine for Click is [[Apache Velocity|Velocity]], the htm file will be similar to a normal, static [[HTML]] page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
Line 54:
</body>
</html>
</syntaxhighlight></div>
; HelloWorld.java
: The page model that will be bound to the template.
<
package org.wikipedia.click;
Line 72:
}
}
</syntaxhighlight></div>
; click.xml
: The heart of a Click application is the <code>click.xml</code> 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 <code>HelloWorld</code> page class maps to the template <code>hello-world.htm</code>. We only have to inform Click of the package of the <code>HelloWorld</code> class, in this case <code>org.wikipedia.click</code>. We do that through the <code>click.xml</code> configuration file which allows Click to map <code>hello-world.htm</code> requests to the <code>org.wikipedia.click.HelloWorld</code> page class.
: By default the <code>ClickServlet</code> will attempt to load the application configuration file using the path: <code>/WEB-INF/click.xml</code>
<
<?xml version="1.0" encoding="UTF-8"?>
<click-app>
<pages package="org.wikipedia.click"/>
</click-app>
</syntaxhighlight></div>
; web.xml
: The [[Java servlet|servlet]] application definition.
<
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>Click Example</display-name>
<servlet>
Line 105 ⟶ 106:
</servlet-mapping>
</web-app>
</syntaxhighlight></div>
==Bibliography==
{{refbegin}}
* {{cite book
|
|
|
|
|
|
|
|access-date = January 5, 2010
|archive-url = https://web.archive.org/web/20100114094157/http://www.fdaoud.com/clickbook/
|archive-date = January 14, 2010
|url-status = dead
}}
{{refend}}
==See also==
*[[Comparison of server-side web
==References==
{{Reflist}}
==External links==
*{{Official website}}
{{Apache Software Foundation}}
{{Application frameworks}}
[[Category:
[[Category:Web frameworks]]
|