wicket introduction

27
红红红 红红 红红红红红红红红红红 红红红 红红红红红红红 () : 176 红 红红红红红红 西 11 红红 3 红 红红(86)-0571-89939888 Wicket introduction 2008-10-29 Davey.wu

Upload: gail-fowler

Post on 02-Jan-2016

35 views

Category:

Documents


0 download

DESCRIPTION

Wicket introduction. 2008-10-29 Davey.wu. Agenda. What is wicket Why wicket Wicket Components Ajax Behavior Wicket Validate Wicket Tester Other. What is wicket: Hello World. Create web with just java + html. Just java + html = wicket. Example: Hello, world. What is wicket. - PowerPoint PPT Presentation

TRANSCRIPT

红杉树(中国)信息技术有限公司公司 地址:杭州市天目山路 176 号西湖数源软件园 11 号楼 3 层 电话: (86)-0571-89939888

Wicket introduction

2008-10-29

Davey.wu

Agenda

• What is wicket

• Why wicket

• Wicket Components

• Ajax Behavior

• Wicket Validate

• Wicket Tester

• Other

What is wicket: Hello World

• Create web with just java + html.

• Just java + html = wicket.

• Example: Hello, world

What is wicket

What is wicket

• Apache web framework.

• Like Swing Style.

• Component oriented.

• Model-3,Pull against push.

• Rule-based, no xml configuration.

Why wicket

• Just java + html

• Object oriented component model easy to reused, maintain/extend, test

• Very complete framework

Ajax, security, redirect after post, input valid&feedback,popups,i18n…

Why wicket

• Compare several Framework

Table Page example (JSF, FreeMarker, JSP)

problems Merge logic into normal HTML, hard to read & maintain

Hard to refactoring.

Hard to work with designers.

Why Wicket: vs. webwork

• Compare with Webwork

• Google trends

Why Wicket: Login Demo

• Page Redirect: RequestCycle.get().setResponsePage(…)

• Login Form's action value action="?wicket:interface=:0:loginForm::IFormSubmitListener::“

parse

will do

Core Concepts

• Application

• Session

• RequestCycle

• Models

• Components

• Behaviors

Core Concepts

• Models

Wicket Components

Wicket Components

Wicket Components

• Some Special Demo

wizard

window panel

tab panel

tree,treetable

Wicket Components

• Creating your own components: using a Panel

Ajax Behavior

• AjaxLink

Ajax Behavior

• Ajax behaviors are those that can receive Ajax requests.

Ajax Behavior

• Creating your own Ajax components: using ajax behaior

components.add( Ibehavior)

add js, markup etc.

Wicket Validate:Server

• FeedbackPanel

• Validation

Wicket Validate:Server

• Required

• NumberValidator

• Customized Validator: PatronCodeValidator

Wicket Validate:Client

• Wicket without client validation, but you can add JS behavior.

• Integrate with JQuery Validation.

Wicket test

• Easy to Test: WicketTester

• JDave: Wicket module

Other

• Wicket + Spring

• Wicket Security

• relation

Pull Vs Push

• Pull vs. Push

• http://java.sun.com/blueprints/patterns/MVC-detailed.html

• http://www.theserverside.com/patterns/thread.tss?thread_id=22143

view model

Resources

• Wicket: http://wicket.apache.org/

• Wicket Stuff: http://wicketstuff.org/confluence/display/STUFFWEB/Home

• Eclipse plugin: http://code.google.com/p/loom-t5/

Resources

Q & A

Q & A