1 / 38

Lessons Learned Writing the AWS Toolkit for Eclipse

Lessons Learned Writing the AWS Toolkit for Eclipse. Zach Musgrave & Jason Fulghum Amazon Web Services March 28, 2013. AWS Toolkit For Eclipse. Lessons Learned. Error Reporting Build Automation and Distribution Responsive UIs Resource Management Data Binding

pepper
Download Presentation

Lessons Learned Writing the AWS Toolkit for Eclipse

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lessons Learned Writing the AWS Toolkit for Eclipse Zach Musgrave & Jason Fulghum Amazon Web Services March 28, 2013

  2. AWS Toolkit For Eclipse

  3. Lessons Learned • Error Reporting • Build Automation and Distribution • Responsive UIs • Resource Management • Data Binding • Build on Eclipse Platform Projects • Tips and Tricks

  4. Error Reporting When your software inevitably breaks.

  5. Use the Error Log • Use Plugin’s getLog() method: • getLog().log(new Status(Status.ERROR, PLUGIN_ID, errorMessage, e)); • Or… use StatusManager directly, for more control

  6. Fail Gracefully in UIs

  7. Proactively Debug Problems • Help your customers collect basic debugging information before you have to ask • Make it as easy as possible to report problems, or you might not find out about bugs before you start losing customers

  8. Build Automation Release early and often; make it easy!

  9. PDE Build • Eclipse’s standard release engineering tools • Built on Ant, so easy to integrate into existing build processes

  10. Automated Version Numbering

  11. Update Site Hosting • Plugins and features stored in Amazon S3 • Distributed through Amazon CloudFront for fast downloads from edge locations all over the world • Old versions remain in Amazon S3 if needed • Use Amazon CloudFront access logs feature for download metrics

  12. Responsive UIs The UI thread is for UI, and nothing else. Really.

  13. Number One Tip: DON’T DO SYNCHRONOUS IO IN THE UI THREAD! Seriously, not even once.

  14. Jobs Framework • For work that needs customer visibility, but will take some amount of time

  15. Cancelable Thread • Pattern for short-lived, but potentially disruptive IO work • Example: populate a Combo using data from a web service call

  16. Cancelable Thread • From the UI: cancel any running thread, then start a new one • From the CancelableThread: do non-UI work (web services calls), then: • Check if canceled • If not, update UI • Otherwise exit • Synchronization is important

  17. SWT Table Trees • Better performance than regular Tables • Use SWT.VIRTUAL to speed them up more

  18. Display Thread Execution • Display.asyncExec(Runnable) • Display.syncExec(Runnable)

  19. Resource Management Why make X copies when 1 will do?

  20. Sharing Images with the Registry • Override AbstractUIPlugin#createImageRegistry()

  21. Font Management • Remember: fonts use file handles! • Don’t create a font just to apply it to a control • Share fonts as much as possible, and remember to dispose() of them when they aren’t needed anymore • Or use shared fonts, like in JFaceResources

  22. JFace Data Binding A cleaner way to implement MVC, but with a steep learning curve.

  23. JFace Data Binding API • The basic idea: bind your data model to a UI element, and when one changes the other does too IObservableValue model = PojoObservables.observeValue(pojo, “field”); IObservabletarget = SWTObservables.observeText(text, SWT.Modify); bindingContext.bindValue(target, model);

  24. Demo: Elastic Beanstalk Configuration Editor

  25. Validation • Fields can validate themselves • Aggregate status gets rolled up

  26. Validation

  27. Build on Eclipse Platform Projects Stand on the shoulders of giants.

  28. Web Tools Platform (WTP) • Tools for developing and deploying web and Java EE applications • Used in the toolkit for: • Deploying AWS Java web apps to AWS Elastic Beanstalkthrough custom server types

  29. Data Tools Platform (DTP) • Vendor neutral platform and tools for working with relational and non-relational data sources • Used in the toolkit for: • Connecting to Amazon RDS databases • Browsing and editing Amazon SimpleDB data sources

  30. Common Navigator Framework (CNF) • Aggregates data contributed by multiple plugins into a single, hierarchical tree view • Good support for drag and drop actions • Used in the toolkit for: • AWS Explorer view

  31. Tips and Tricks A miscellany of time-saving advice.

  32. Grid Data Factory

  33. Message Dialog • Easy pluggable dialog box with an optional custom control area

  34. Eclipse Forms • Easy way to create clean, easy to use UIs

  35. IDialogSettings • Used to store hierarchical data to persist preferences and history for views, dialogs, and wizards • Allows UIs to be prepopulated with users’ previous selections and history

  36. Get the Source • Look for “SDK” packages on update sites

  37. F4 Hierarchy • Q: How do I implement this interface? • A: Copy someone else!

  38. Questions and Answers

More Related