JWt (pronounced "jay-witty") is an
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 ...
widget-centric
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 programming 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 an ...
developed by
Emweb. It has an API that uses established GUI application development patterns. The programming model is component-based and
event-driven
Event driven may refer to:
The term event-driven refers to a methodology that focuses on events and event dependencies.
Examples include
* Event-driven finite-state machine, finite-state machine where the transition from one state to another i ...
, similar to
Swing
Swing or swinging may refer to:
Apparatus
* Swing (seat), a hanging seat that swings back and forth
* Pendulum, an object that swings
* Russian swing, a swing-like circus apparatus
* Sex swing, a type of harness for sexual intercourse
* Swing rid ...
.
The goal of the library is to benefit from the stateful component model used in desktop applications APIs, applied to web development, instead of the traditional
model–view–controller
Model–view–controller (MVC) is a software architectural pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. This is done to separate internal representations of infor ...
(MVC) model. Rather than using MVC at the level of a page, MVC is pushed to the level of individual components.
While the library uses a desktop application development model, it does support web-specific features including
semantic URL
Clean URLs, also sometimes referred to as RESTful URLs, user-friendly URLs, pretty URLs or search engine-friendly URLs, are URLs intended to improve the usability and accessibility of a website or web service by being immediately and intuitively ...
s, browser history navigation support, internationalization, themes, and styling.
A unique feature of the library is its abstraction layer of the browser rendering model. The library uses
Ajax
Ajax may refer to:
Greek mythology and tragedy
* Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea
* Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris
* ''Ajax'' (play), by the ancient Gree ...
for communicating with Ajax-capable browsers, while using plain HTML form post-backs for other user agents (for accessibility and search engines). Using a progressive bootstrap method, the user interface is initially rendered as plain HTML, and for Ajax-capable browsers, it is automatically upgraded to use Ajax for increased interactivity.
JWt is distributed as a jar file. A JWt application is a war file that is deployed in a standards-compliant
servlet container
A web container (also known as a servlet container;
and compare "webcontainer"
) is the component of a web server that interacts with Jakarta Servlets. A web container is responsible for managing the lifecycle of servlets, mapping a URL to a pa ...
.
Major features
See the feature list on the project homepage for a more detailed overview.
* Automatic
graceful degradation
Fault tolerance is the property that enables a system to continue operating properly in the event of the failure of one or more faults within some of its components. If its operating quality decreases at all, the decrease is proportional to the ...
and
progressive enhancement
Progressive enhancement is a strategy in web design that puts emphasis on web content first, allowing everyone to access the basic content and functionality of a web page, whilst users with additional browser features or faster Internet access r ...
* On all modern browsers, a JWt application is a
single-page application
A single-page application (SPA) is a web application or website that interacts with the user by dynamically rewriting the current web page with new data from the web server, instead of the default method of a web browser loading entire new pages. ...
, with full support for forward/back and bookmark navigation, but still fully
SEO
Seo or SEO may refer to:
* Search engine optimization, the process of improving the visibility of a website or a web page in search engines
Organisations
* SEO Economic Research, a scientific institute
* Spanish Ornithological Society (''Socied ...
.
* Supports server-initiated events (
Comet
A comet is an icy, small Solar System body that, when passing close to the Sun, warms and begins to release gases, a process that is called outgassing. This produces a visible atmosphere or Coma (cometary), coma, and sometimes also a Comet ta ...
), and uses
asynchronous I/O
In computer science, asynchronous I/O (also non-sequential I/O) is a form of input/output processing that permits other processing to continue before the transmission has finished. A name used for asynchronous I/O in the Windows API is overlap ...
when deployed within a Servlet 3.0 container.
* A unified 2D rendering API (SVG/HTML5 canvas/VML/PDF) with java.awt.Graphics2D compatibility
* Integrated
PDF
Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. ...
rendering for Widgets, Graphics (Charts) and HTML/CSS, to generate reports
* Both client-side and server-side validation
* Various automatic built-in security features to avoid
cross-site scripting
Cross-site scripting (XSS) is a type of security vulnerability that can be found in some web applications. XSS attacks enable attackers to inject client-side scripts into web pages viewed by other users. A cross-site scripting vulnerability may ...
and
CSRF
Cross-site request forgery, also known as one-click attack or session riding and abbreviated as CSRF (sometimes pronounced ''sea-surf'') or XSRF, is a type of malicious exploit of a website or web application where unauthorized commands are submitt ...
vulnerabilities.
* Theme support through CSS or
Bootstrap
* Available widgets are demonstrated in th
widget gallery* A 3D painting API for WebGL rendering, with fallback to server-side GPU accelerated rendering
* A 3D chart API (surfaces, points, bar charts, ...) supporting selection, intersection highlighting, height maps, isolines, ...
Code example
The Hello World! example full source code
/*
* A simple hello world application class which demonstrates how to react
* to events, read input, and give feed-back.
*/
public class HelloApplication extends WApplication
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 applica ...
*
Wt, the C++ project from which JWt is derived
References
External links
JWt Project HomepageArticlein Dr Dobb's Journal, Feb 2008
Introductory articleat CodeGuru, Jun 2008
{{DEFAULTSORT:JWt - Java web Toolkit
Ajax (programming)
Articles with example Java code
Rich web application frameworks
Web development software
Web frameworks