GWT.create 2015

BEST DEVELOPMENT PRACTICES FOR GWT WEB APPLICATIONS JULIEN DRAMAIX

Julien Dramaix Software Engineer at Arcbees +JulienDramaix @jDramaix

MOTIVATIONS

GWT BEST PRACTICES

BEST PRACTICE 1

AVOID WIDGETS AS MUCH AS YOU CAN

BECAUSE

WIDGETS ARE HEAVY.

TAKE CONTROL OF YOUR HTML!

AVOID WIDGETS AS MUCH AS YOU CAN

Full Event Mechanism

AVOID WIDGETS AS MUCH AS YOU CAN

Full Event Mechanism

Even if you don’t need it

AVOID WIDGETS AS MUCH AS YOU CAN

How to attach event handler to elements ?

Maybe add gwtquery examples

“Speed up your GWT coding with gQuery” by Manuel Carrasco Moñino. Tomorrow 10:00 Room 3

AVOID WIDGETS AS MUCH AS YOU CAN

When to use widgets

To encapsulate complex component to reuse » Prefer PresenterWidget if the component has a lot of business logic. » In the future: Web Components.

AVOID WIDGETS AS MUCH AS YOU CAN

Exceptions

Cell widgets (CellTable, CellList…) HtmlPanel

BEST PRACTICE 2

EMBRACE BROWSER HISTORY

EMBRACE BROWSER HISTORY

Let the users use the back button !

EMBRACE BROWSER HISTORY

Let the users refresh the page !

EMBRACE BROWSER HISTORY

The url token should contains enough information to determine the state of the app

EMBRACE BROWSER HISTORY

Implement that at the beginning.

BEST PRACTICE 3

USE AN EVENT BUS

USE AN EVENT BUS

Always be decoupling

Fight spaghetti code !

BEST PRACTICE 4

USE DEPENDENCY INJECTION

BEST PRACTICE 5

USE MVP PATTERN

USE MVP PATTERN

MODEL

PRESENTER

VIEW

USE MVP PATTERN

Your presenters will contain your business logic

USE MVP PATTERN

Your presenters don’t know anything about DOM elements and widgets

USE MVP PATTERN

Your views must be as dumb as possible

GWTP

Embrace best practices

GWTP

A lot of interesting features

➔ ➔ ➔ ➔ ➔ ➔ ➔ ➔ ➔ ➔

Presenter Lifecycle Presenter Widget Nested Presenter Popup Presenter URL Parameters Route-Place-Tokens Navigation Confirmation Presenter Gatekeeper REST-dispatch RPC-dispatch

“How to improve your productivity using GWTP” by Christian Goudreau. Tomorrow 10:00 Room 2

BEST PRACTICE 6

USE CSS AS MUCH AS YOU CAN

USE CSS AS MUCH AS YOU CAN

Use CssResource with GSS.

USE CSS AS MUCH AS YOU CAN

Prefer gss files over UiBinder inline style.

USE CSS AS MUCH AS YOU CAN

Keep your CSS clean.

Remove unused styles.

BEST PRACTICE 6

LOAD EVERYTHING YOU CAN IN THE HTML PAGE

LOAD EVERYTHING YOU CAN

Inject static data in javascript arrays in your html page

LOAD EVERYTHING YOU CAN

Use Dictionnary to read them

LOAD EVERYTHING YOU CAN

Minimize the number of requests needed to load the app

UNIT TESTS

UNIT TESTS

MVP and Dependency injection Tests are now easy to write

UNIT TESTS

Test each protected and public methods of your presenters

CODE REVIEWS

CODE REVIEWS

IMPROVE QUALITY OF YOUR CODE

CODE REVIEWS

DETECT BUGS EARLIER

CODE REVIEWS

A WAY TO LEARN FROM YOUR PEERS

CODE REVIEWS

WEB BASED CODE REVIEW SYSTEM

GITHUB

STASH

BITBUCKET

GERRIT

CODE REVIEWS

CODE REVIEWS BEST PRACTICES

TAKE CONTROL USE A STYLE GUIDE ! OF YOUR HTML!

CODE REVIEW BEST PRACTICE

Address all comments before merging

CONTINUOUS INTEGRATION

CONTINUOUS INTEGRATION

THE FIRST PERSON TO DO CODE REVIEW IS YOUR CI SERVER

CONTINUOUS INTEGRATION

ENFORCE CHECKSTYLE

DEVELOPMENT PROCESS

Designer

Web Integrators

Developpers

SUCCESS

THANK YOU

Julien Dramaix Software Engineer at Arcbees +JulienDramaix @jDramaix

QUESTIONS ?

Best development practices for GWT web applications (2).pdf ...

There was a problem previewing this document. Retrying... Download ... Best development practices for GWT web applications (2).pdf. Best development ...

12MB Sizes 4 Downloads 315 Views

Recommend Documents

Best Practices for Optimizing Web Advertising ... - AccountingWEB
May 1, 2006 - Set Clear Objectives: Identify what business goals the campaign is designed to ... small number of people will see the ads at a tremendously high .... Yahoo! Movies. -. 100. 200. 300. 400. 500. 600. 700. 800. 900. 1. 3. 5. 7. 9.

Best Practices for the Django Web Framework
App DesignChapter 5: Settings and Requirements FilesChapter 6: Model Best ... Django This is the swiss army knife for every Django developer. -- Jannis ...

Best Practices for Optimizing Web Advertising Effectiveness
May 1, 2006 - long enough for several best practices to emerge. ..... Aggregated Q1 2006 click-through-rate data for 136 large clients of ... Source: Dynamic Logic MarketNorms, based on benchmark analysis of 2,000-plus campaigns,.

google web toolkit gwt java ajax programming pdf
programming pdf. Download now. Click here if your download doesn't start automatically. Page 1 of 1. google web toolkit gwt java ajax programming pdf.

Best Practices for Nonprofits Services
Every Google+ page begins with a profile. This profile is usually the administrator, the person most responsible for the content of your Google+ page. If you don't already have a profile, you'll need to create one here. Next, you can set up your orga

INTERNATIONAL BEST PRACTICES FOR MARITIME PILOTAGE.pdf ...
Page 1 of 8. Page 1 of 8. Page 2 of 8. Page 2 of 8. Page 3 of 8. Page 3 of 8. Main menu. Displaying INTERNATIONAL BEST PRACTICES FOR MARITIME ...

Networking Best Practices for Large Deployments
Nov 16, 2016 - rights relating to the Google services are and shall remain the exclusive ..... 1. Network Evaluation: This section contains information on ...

Best Practices Guide for Retailers - AMA Atlanta
Prepare for an influx of mobile shoppers. • Engage on-the-go shoppers by adding mobile-relevant extensions to your ad—such as location, call, price, or app extensions—to showcase your business's information in detail. Extensions will help shopp

IBM-Best practices for KVM.pdf
Loading… Page 1. Whoops! There was a problem loading more pages. Retrying... IBM-Best practices for KVM.pdf. IBM-Best practices for KVM.pdf. Open. Extract.

Best Practices for IT Sourcing -v1.8- En.docx
Nov 27, 2007 - Everything in an enterprise can be outsourced except the core business processes. The reason ...... Technology integration: Definition of procedures for integration of the organization's infrastructure and the ...... added to the appli

Best Practices for Nonprofits Services
"We went through the advent of email, cell phones, Google Earth and now Google+. Hangouts. The technology has .... A +1 button on your site makes it easy for visitors to show support and share what they like. ○. Circle up. Google+ Circles allows yo

Best Practices Guide for Retailers - AMA Atlanta
Google Trends and the Shopping Insights tool. • Don't forget to plan for global holidays if you offer ... Back to School (AR, CL). 30: Passover (Global). 1 –14: Passover (Global) ... us the tools to accurately prove how much footfall we were send

Best Practices for RXSC ICO.pdf
Blend, Thin Blend, Beautiful Mind, Heart Smart and Fresh Breeze. Best Practices for RXSC ICO (10/06/17). This report is to inform and protect buyers, and. increase the chances of a successful token sale. Source: https://www.coinbase.com/legal/securit

Best Practices for Education Services
Case Studies. MIT Media Lab. Richland School District. Monash University. Launching Google+. Enabling Google+ for Your Institution. About Google+ Premium Features. Frequently ..... Hangouts will sync across all devices (computers, Android, iPhones, t

Guided Test Generation for Web Applications
as business rules. A business rule is typically related to business calculations or access control policies. For example, banking applications have rules for ...

introduction to web applications development pdf
introduction to web applications development pdf. introduction to web applications development pdf. Open. Extract. Open with. Sign In. Main menu.

Best Practices Services
Best Practices: Sourcing Participants for your Hangout On Air 1. Best Practices: Sourcing Participants for your Hangout On Air. Promote your HOA. • Use the Hype My Hangout tool on Google+ to create a. 12-second ad to promote your upcoming HOA. All

Best Practices Services
choosing a new retail location, changing the color of your logo, or pricing a product. It's much easier to write meaningful, productive surveys when you know what you'll do with the responses. 4. Keep questions simple. When you're writing a survey qu

RESTful Service Best Practices
Aug 2, 2013 - container which provides us with the concept of “session” which maintains state across multiple HTTP requests. ..... and most important concept to grasp when creating an understandable, easily leveraged Web service. API. .... attemp

gwt-tutorial-ru.pdf
1 На сайте http://gocha.org имеются дополнительные материалы связанные с новой версией GWT. Page 3 of 37. gwt-tutorial-ru.pdf. gwt-tutorial-ru.pdf.