Apache Click: Difference between revisions

Content deleted Content added
Rescuing 1 sources and tagging 0 as dead. #IABot (v2.0beta14)
No edit summary
Tags: Mobile edit Mobile app edit Android app edit
 
(10 intermediate revisions by 9 users not shown)
Line 1:
{{Short description|Oriented web application framework for Java}}
{{ Infobox software
{{Cleanup bare URLs|date=September 2022}}
| name = Apache Click
{{ Infobox software
| logo = [[Image:Click-icon-43.png|43px|Click Framework logo]]
| name = Apache Click
| screenshot =
| logo = [[Image:Click-icon-43.png|43px|Click Framework logo]]
| caption =
| screenshot =
| developer = [[Apache Software Foundation]]
| caption =
| developer = [[Apache Software Foundation]]
| discontinued = Yes
| latest release version = 2.3.0
| latest release date = {{releaseStart date and age|2011|03|27}} <ref>http://click.apache.org/</ref>
| latest preview version =
| latest preview date =
| operating system = [[Cross-platform]]
| programming language = [[Java (programming language)|Java]]
| genre = [[Web application framework]]
| license = [[Apache License]] 2.0]]
| website = {{URL|http://click.apache.org/}}
}}
 
Line 20 ⟶ 23:
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 aan [[Apache Software Foundation|Apache]] top-level project in November 2009 with Bob Schellink. The project was [[Apache Attic|retired]] in May 2014.<ref>{{cite web|title=Apache Attic - Apache Attic|url=http://attic.apache.org/projects/click.html|accessdateaccess-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]], [[WebObjects]], [[Apache Wicket]] and [[Vaadin]].
 
Line 41 ⟶ 42:
 
== 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.
<div style="margin-left: 2em;"><sourcesyntaxhighlight lang="xml">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Line 54:
</body>
</html>
</sourcesyntaxhighlight></div>
 
; HelloWorld.java
: The page model that will be bound to the template.
<div style="margin-left: 2em;"><sourcesyntaxhighlight lang="java">
package org.wikipedia.click;
 
Line 72:
}
}
</sourcesyntaxhighlight></div>
 
; click.xml
Line 78:
: 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>
<div style="margin-left: 2em;"><sourcesyntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<click-app>
<pages package="org.wikipedia.click"/>
</click-app>
</sourcesyntaxhighlight></div>
 
; web.xml
: The [[Java servlet|servlet]] application definition.
<div style="margin-left: 2em;"><sourcesyntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Line 106:
</servlet-mapping>
</web-app>
</sourcesyntaxhighlight></div>
 
==Bibliography==
Line 121:
|archive-url = https://web.archive.org/web/20100114094157/http://www.fdaoud.com/clickbook/
|archive-date = January 14, 2010
|dead-url-status = yesdead
}}
{{refend}}
 
==See also==
*[[Comparison of server-side web frameworks|Comparison of web frameworks]]
 
==References==
{{Reflist}}
<references/>
 
==External links==