We like GWT! …we think you will too. Stuart Ervine & Franck Rasolo Nat Pryce Please plug in your...
-
Upload
leonard-miles -
Category
Documents
-
view
213 -
download
0
Transcript of We like GWT! …we think you will too. Stuart Ervine & Franck Rasolo Nat Pryce Please plug in your...
Welike
GWT!…we think you will too.
Stuart Ervine & Franck RasoloNat Pryce
Please
plug in
your
laptops
and pair
up.
Welike
GWT!
Introduction • In this workshop we'll be building a short
application
• Please figure out how to boot your laptop from either the CD or USB
• If you can't boot from either, please pair up with someone who can
Welike
GWT!
What is GWT? • Java toolkit for building rich web applications
• You can write all the code in Java, so no JSPs, templating languages or action classes
• It compiles into Javascript, uses asynchronous requests
• It is more akin to Swing
Welike
GWT!
What we're not going to cover here: • No GWTTestCase• No Google API integration• No 3rd party GWT library integration• No optimization
(though feel free to talk to us about this after)• No JSNI• Little, if any, CSS• No clever ruby / python back end integration• No discussion on client architecture• Little, if any, comparison with or discussion
about other (Java) web frameworks
Welike
GWT!
The Client• MegaBank are losing lots of cash and can't
be bailed out any further - they can't sell stocks fast enough, you see the dealers didn't get their bonus and can't be bothered answering the phone any more. In fact, they're often seen down the pub...
• They've asked you to develop a front end to a trading platform to allow them to sell stocks online, cutting out the dealer.
Welike
GWT!
The Stories• Display account number & P&L.• Display account holdings details.• Add a way to refresh the prices.• Add profit as a percentage per holding.• Show negative profit holdings in red,
otherwise in green• Make the prices auto-refresh (see Timer)• Add a way to sell the holding
Welike
GWT!Here's
how it all
hangs
together.
Welike
GWT!
Boot up your machines• Boot from the USB drive (BOOT mount)
or CD provided
• Open the APPS mounted drive and run ./start.sh
• IntelliJ should open and you can run the sample application by clicking the Run button (green triangle)
Welike
GWT!
What's been done so far• Display account number & P&L.• Display account holdings details.• Add a way to refresh the prices.• Add profit as a percentage per holding.• Show negative profit holdings in red,
otherwise in green• Make the prices auto-refresh (see Timer)• Add a way to sell the holding
Welike
GWT!
What's left to do• Add a way to refresh the prices.
• Add profit as a percentage per holding.
• Show negative profit holdings in red, otherwise in green
• Make the prices auto-refresh (see Timer)
• Add a way to sell the holding
Welike
GWT!
Common widgetsButtonButton button = new Button();button.addClickListener(new ClickListener() { public void onClick(Widget sender) { // do something }});
FlowPanel (outputs an HTML DIV tag)FlowPanel panel = new FlowPanel();panel.add(new Label("hello"));panel.add(new Label("goodbye"));
Welike
GWT!
TimersHow to use a timer:
Timer timer = new Timer() { public void run() { // do something } };
timer.scheduleRepeating(1000);
Welike
GWT!
Any outstanding questions?
Round up
What did
you think?
Does anyone want to show & tell?
Welike
GWT!
• The code and slides are available at : http://code.google.com/p/welikegwt-presentation
• Read more about GWT at : http://code.google.com/webtoolkit
• Please contact us at the following :[email protected] & [email protected]
Thank you!