Вы находитесь на странице: 1из 5

Introduction to Apache Wicket

Apache Wicket is an open source, component oriented Java web application framework,
It’s a lightweight component-based web application framework for the Java programming
language conceptually similar to Java Server Faces and Tapestry.
Wicket applications are trees of components, which use listener delegates to react to
HTTP requests against links and forms in the same way that Swing components react to
mouse and keystroke events.
Wicket uses plain XHTML for templating, which enforces a clear separation of
presentation and business logic.

Why Wicket over other Framework?

 Unlike most web application frameworks, Wicket doesn't use XML for
configuration. Other than minimal configuration in the web.xml deployment
descriptor, all application configurations reside in your Application subclass.

 Wicket is a component based framework, Components are isolated pieces of Java


code with supporting markup. Most components are abstract classes designed to
be subclassed with your domain-specific logic and requirements. Pages and
panels are components, as well as Links, Forms and ListViews.

 In Wicket, all server side state is automatically managed. You will never directly
use an HttpSession object or similar wrapper to store state. Instead, state is
associated with components.

 Wicket has been designed to work with POJO persistence frameworks such as
JDO or Hibernate. This can make database driven web applications quite easy to
write.

 Wicket does not introduce any special syntax to HTML. Instead, it extends
HTML in a standards-compliant way via a Wicket namespace that is fully
compliant with the XHTML standard.

 Wicket consistently uses a single id attribute in the Wicket namespace


("wicket:id") to mark HTML tags that should receive special treatment by the
toolkit. If you prefer not to render Wicket namespaced tags and attributes to your
end-users, Wicket has a simple setting to strip them all out, resulting in ordinary,
standards-compliant HTML.

 Wicket is a simple class library with a consistent approach to component


structure. In Wicket, your web applications will more closely resemble a Swing
application than a JSP application.
 Wicket has been explicitly designed to make it very, very easy to create reusable
components.

Features of Wicket

• EASY (SIMPLE / CONSISTENT / OBVIOUS)


o POJO-centric
o All code written in Java
o Minimize "conceptual surface area"
o Avoid overuse of XML configuration files
o Fully solve back button problem
o Easy to create bookmarkable pages
o Maximum type safety and compile-time problem diagnosis
o Maximum diagnosis of run-time problems
o Minimum reliance on special tools
o Components, containers and conventions should be consistent
• REUSABLE
o Components written in Wicket should be fully reusable
o Reusable components should be easily distributed in ordinary JAR files
• NON-INTRUSIVE
o HTML or other markup not polluted with programming semantics
o Only one simple tagging construct in markup
o Compatible with any ordinary HTML editor
o Easy for graphics designers to recognize and avoid framework tagging
o Easy to add tagging back to HTML if designers accidentally remove it
• SAFE
o Code is secure by default
o Only explicitly bookmarkable links can expose state in the page or URL
o All logic in Java with maximum type safety
o Easy to integrate with Java security
• EFFICIENT / SCALABLE
o Efficient and lightweight, but not at the expense of other goals
o Clustering through sticky sessions preferred
o Clustering via session replication is easy to accomplish and easy to tune
by working with detachable models.
Why AJAX?

 AJAX is not a new programming language, but a new technique for creating
better, faster, and more interactive web applications.

 AJAX uses asynchronous data transfer (HTTP requests) between the browser and
the web server, allowing web pages to request small bits of information from the
server instead of whole pages.

 The AJAX technique makes Internet applications smaller, faster and more user-
friendly.

 AJAX applications are browser- and platform-independent.

 AJAX is based on the following web standards:


 JavaScript
 XML
 HTML
 CSS

Why Adobe Flex?

1. Flex is a RIA (Rich Internet Application framework).

2. Easy to Learn and Use

3. Mature Language and Framework


Unlike JavaScript Based AJAX, Adobe Flex is built on a strongly typed Objected-
Oriented programming language.

4. Cross Browser Support

5. Fast Development and Easy Integration


Adobe Flex was born with many convenient components (such us DataGrid,
ProgressBar, RichTextEditor, Slider, Accordion, Charts …) to help create a RIA
faster and easier.

6. Richest Visual Effect


Most of those RIAs are done by Adobe Flash. Since Adobe Flex is built on top of
Flash, it can access all of Flash’s rich libraries and assets.
Feature Comparison Matrix (Flex Vs Ajax)
Feature AJAX FLEX/FLASH

Limited support and Richly supported


difficult to author
anything
Animation but simple linear
animations

Fully supported Limited support (no HTML tables,


No JavaScript, no frames, etc.)

HTML Rendering

No native support Supported, video quality is pretty


(user good but needs to improve before
needs a separate plug- Widely adopted by media companies.
in like Video and audio capture
QuickTime, Windows through user’s installed devices is
Video and Audio Streaming
Media also supported.
Player, or the Flash
Plug-in
to play video in AJAX
deployments)
Each browser is A single browser plug in provides
required to a single cross browser cross
Interpret code platform runtime
Runtime individually.

Supported No native support. Must use


external calls to JavaScript

DOM Control

Friendlier SEO by Limited support. SEO is


nature as achieved through meta tagging
the code is natively And alternate content publishing.
HTML.
However, most search
engines
Search Engine Optimization(SEO) will not follow
JavaScript
links. AJAX needs to
be
very carefully
architected if
SEO is critical.
Since AJAX is an The Flex components can be easily

Вам также может понравиться