Wicket And Swing From One Codebase

  • 3,604 views
Uploaded on

Wicket and Swing very alike

Wicket and Swing very alike

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
3,604
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
141
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Wicket and Swing from one code base Johan Compagner
  • 2. Who is Johan Compagner
    • Senior Java Developer at Servoy (and Topicus)
    • 10+ years of Java experience
      • Swing and the Web (Struts/Tapestry)
    • Core Wicket developer since September 2004
  • 3. Agenda
    • How does Servoy work.
    • Wicket/Web compared to Swing.
    • One codebase -> 2 Clients
    • Q&A
  • 4. How does Servoy work
    • Own Drag'N'Drop RAD IDE
    • Developers use Javascript to code.
      • Those scripts are attached to events (onaction)
      • Those scripts can alter the form components.
    • Repository based, no code generation.
    • First only a Swing rich client (via webstart)
    • Web client introduced in 2005
    • Full AJAX based webclient in 2006
  • 5. The IDE
  • 6. The Eclipse Servoy IDE
  • 7. Wicket compared to Swing
    • Both component based (MVC)
    • Wicket even “more” MVC then Swing.
    • Pull against Push.
    • Swing has setLocation/setBackground/Ect.
    • Swing is richer (even when using AJAX)
    • Web has browsers....
  • 8. One codebase -> 2 clients
    • We kept the Model part of the MVC.
    • Controller and View are generated based on client type.
  • 9. The Controller part
    • IComponentFactory
      • IButton createButton(..);
    • 2 Component Factories
      • SwingComponentFactory
      • WicketComponentFactory
    • Swing Button uses ActionListener interface.
    • Wicket Button generates onclick attribute.
  • 10. The View part
    • Swing has this build in (the controller)
    • Template Generator
      • HTML per form.
      • CSS per form.
    • Custom IResourceStreamLocator
  • 11. Use of AJAX
    • All events are done by AJAX.
    • Basic AJAX support build in a few days..
    • But.. a Servoy developer can do anything in a script.
      • button.setLocation/button.setBackground.
  • 12. ChangeRecording
    • AJAX event is coming in.
    • Calls the events method.
    • All components are recording the changes when touched
    • An IVisitor walks over the page collecting the changed components.
    • And are added to the AjaxRequestTarget.
  • 13. The Result (Swing)
  • 14. The Result (Web)
  • 15. Q/A
    • ?