Presentation is loading. Please wait.

Presentation is loading. Please wait.

We like GWT! …we think you will too. Stuart Ervine & Franck Rasolo Please plug in your laptops and pair up.

Similar presentations


Presentation on theme: "We like GWT! …we think you will too. Stuart Ervine & Franck Rasolo Please plug in your laptops and pair up."— Presentation transcript:

1 We like GWT! …we think you will too. Stuart Ervine & Franck Rasolo Please plug in your laptops and pair up.

2 We like 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

3 We like GWT! What is GWT? A 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, and uses asynchronous requests via an RPC framework. It is more akin to Swing or SWT.

4 We like 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)

5 We like GWT! Hello GWT In IntelliJ’s project pane: –Right click the src directory. –Choose New > Google Web Toolkit > GWT Sample Application. –Call it HelloWorld (or something). Locate the HelloWorld java file, open it, right click and run.

6 We like GWT! What’s going on? GWT RPC goodness

7 We like GWT! Open the exercise In IntelliJ –Click File > Reopen Project > …MegaBank.ipr. Run MegaTrade.

8 We like GWT! The Client MegaBank are losing lots of cash and can't be bailed out any further.

9 We like GWT! Their problem… You see the traders didn’t get their bonus and they can't be bothered answering the phone. In fact, they're often seen down the pub...

10 We like GWT! What they need Account Holding They've asked you to develop a front end to a trading platform to allow them to sell current holdings online, cutting out the dealer. Trading Service getAccount sellHolding

11 We like 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

12 We like GWT! Here's how it all hangs together.

13 We like 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

14 We like 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

15 We like GWT! Common widgets Button Button 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"));

16 We like GWT! Timers How to use a timer: Timer timer = new Timer() { public void run() { // do something } }; timer.scheduleRepeating(1000);

17 We like GWT! Any outstanding questions? Round up What did you think? Any feedback?

18 We like GWT! The code and slides are available at : http://code.google.com/p/welikegwt-presentation http://code.google.com/p/welikegwt-presentation Read more about GWT at : http://code.google.com/webtoolkit http://code.google.com/webtoolkit Please contact us at the following : spervine@gmail.com & franck.rasolo@gmail.com spervine@gmail.com Thank you! To find this presentation and example code the lazy way : Google ‘WeLikeGWT’


Download ppt "We like GWT! …we think you will too. Stuart Ervine & Franck Rasolo Please plug in your laptops and pair up."

Similar presentations


Ads by Google