Wicket Next (1.4/1.5)
Upcoming SlideShare
Loading in...5
×
 

Wicket Next (1.4/1.5)

on

  • 9,435 views

Apache Wicket meetup Amsterdam 2008 roadmap presentation

Apache Wicket meetup Amsterdam 2008 roadmap presentation

Statistics

Views

Total Views
9,435
Views on SlideShare
9,346
Embed Views
89

Actions

Likes
3
Downloads
165
Comments
0

4 Embeds 89

http://www.slideshare.net 48
http://moreta.tistory.com 39
http://moretajoo.blogspot.com 1
http://translate.googleusercontent.com 1

Accessibility

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Wicket Next (1.4/1.5) Wicket Next (1.4/1.5) Presentation Transcript

  • Wicket NEXT Johan Compagner
  • Who is Johan Compagner
    • Senior Java Developer at Servoy
    • 10+ years of Java experience
      • Swing and the Web (Struts/Tapestry)
    • Core Wicket developer since September 2004
  • Agenda
    • Wicket 1.4 (GENERICS!!)
    • Wicket 1.5 (or 2.0)
    • Q&A
  • Wicket 1.4
    • Generics
      • Model<T>
      • Component<T>
      • MetaData<T>
  • Model<T>
    • class IModel<T> {
    • T getObject()
    • void setObject(T)
    • }
    • Model<String> model = new Model<String>(“Wicket”);
    • String str = model.getObject(); // no cast.
  • Component<T>
    • Why the need to generify Component?
      • IModel parameter in constructor.
        • public Component(String id, IModel<T> model)
      • set/getModel() methods
        • public Component<T> setModel(IModel<T> model)
        • public final IModel<T> getModel()
      • getModelObject()
        • public final T getModelObject()
  • Component<T>
    • TextField<Double> tf = new TextField<Double>(“txt”,Double.class)
      • Double.class still needed for converter..
    • Also makes it more clear what components really want like ListView:
      • ListView<T> extends AbstractRepeater<List<T>>
      • public ListView(String id, IModel<List<T>> model)
    • And my personal favorite:
    • public DropDownChoice(String id,IModel<T> model,
    • IModel<List<T>> choices, IChoiceRenderer<T> renderer)
    • public ListMultipleChoice(String id, IModel<Collection<T>> model,
    • IModel<List<T>> choices,
    • IChoiceRenderer<T> renderer)
  • Wicket 1.4 what more..
    • A little bit more generics here and there
      • MetaData without generics:
        • MetaDataKey PERMISSION = new MetaDataKey(Permission. class );
        • Permission p = (Permission)session.getMetaData(PERMISSION);
      • With generics:
        • MetaDataKey<Permission> PERMISSIONS = new MetaDataKey<Permission>();
        • Permission p = session.getMetaData(PERMISSION);
      • Varargs..
        • MarkupContainer.add(Component... childs)
        • Component.add(IBehavior... behavior)
    • Some API breakage compared to 1.3 to fix some bugs and cleanup some API.
      • So no drop in replacement!
  • Wicket 1.4, WHEN!?!
    • NOW!!! (or almost, start commit now!)
      • At least in svn (trunk)
      • Or snapshot release (if bambo works out)
      • Not a release yet in a few weeks first milestone build.
  • Wicket 1.5/2.0
      • Don't hold me responsible if some of the next mentioned features don't make it!
  • Inheritance Improvement
    • Multiply extend/child area's
    • <html><body>
    • This is in the super markup.<wicket:child />This is in the super markup.
    • </body></html>
    • <html><body>
    • This is in the child markup.
    • <wicket:extend>This is in the child markup.</wicket:extend>
    • This is in the child markup.
    • </body></html>
    • <html><body>
    • This is in the super markup.
    • This is in the child markup.
    • This is in the super markup.
    • </body></html>
  • Inheritance Improvement
    • <html><body>
    • This is in the super markup.<wicket:child name=”child1”/>
    • This is in the super markup.<wicket:child name=”child2”/>
    • </body></html>
    • <html><body>
    • This is in the child markup.
    • <wicket:extend name=”child1”>This is in the child1 markup.</wicket:extend>
    • This is in the child markup.
    • <wicket:extend name=”child2”>This is in the child2 markup.</wicket:extend>
    • </body></html>
    • <html><body>
    • This is in the super markup. This is in the child1 markup.
    • This is in the super markup. This is in the child2 markup.
    • </body></html>
  • Inheritance Improvement
    • Childs can come from different sub pages.
    • Can have multiply childs itself again.
  • ProxyModel
    • A Model based on invocation recording.
    • Generates string expressions for the existing PropertyModel
    • SafePropertyModel<Person> p = new SafePropertyModel<Person>(new Person());
    • TextField field = new TextField(&quot;name&quot;, p.bind(p.toProperty().getFirstName()));
  • ProxyModel
    • Generates byte code that is a Macro
    • SafePropertyModel<Person> p = new SafePropertyModel<Person>(new Person());
    • TextField field = new TextField(&quot;name&quot;, p.bind(p.toProperty().getAddress().getCity()));
    • class Macro implements IPropertyInvoker {
    • void setObject(Object rootObject, Object value) {
    • Address address = ((Person)rootObject).getAddress();
    • if (address != null) address.setCity((City)value);
    • }
    • Object getObject(Object rootObject) {
    • Address address = ((Person)rootObject).getAddress();
    • if (address != null) return address.getCity();
    • return null; }
    • Almost no state to keep, the state is a class that is shared
    • Build on top of commons-proxy (and needs proxy/codegen classes)
    • Most likely not in core but in a separate project.
  • Validators/Behaviors
    • Validator should also be able to contribute to the markup.
    • Class MyLengthValidator implements IContributeBehaviorValidator
    • {
    • void validate(IValidatable validatable) {
    • String str = validatable.getValue();
    • if (str.length() > length) error();
    • }
    • IBehavior getBehavior() {
    • return SimpleAttributeModifier(“maxlength”,length);
    • }
    • }
  • Wicket 1.5/2.0
    • Window support (PageMap replacement)
      • A sub session for every tab in a browser.
    • More URL improvements
      • So that it becomes easier to use any URL encoding for everything (stateless forms etc)
    • CompoundAjaxBehavior
      • More then 1 action under 1 event.
    • Development Mode dashboard widget
      • Combination of InspectorBug and AjaxDebug
    • Resource/IResourceStream cleanup
  • Wicket Testing
    • WicketTester improved or replaced completely.
    • JDave/Hamcrest style testing
  • Wicket Security
    • Swarm/Wasp moved to Apache
  • Q/A
    • Do you guys want even more?