Showing posts with label GWT. Show all posts
Showing posts with label GWT. Show all posts

Tuesday, July 12, 2011

Review: Using GWT and Eclipse to Build Great Mobile Web Apps



Summaries:

  • Design different view for different devices (Mobile, Tablet, Desktop)
  • Specify each ViewFactory with its corresponding Form Factor in the config file
  • Orientation Change: Use addResizeHandle, check for Potrait (Height > Width) or not, and adjust accordingly
  • Use MVP Pattern: Business Logic consist of Presenter (driving the View/Factory) and Model (DTO, RPC, cache, validation)
  • Make it Snappy: use ClientBundle, use Code Splitting/runAsync
  • GWT helps dead code elimination, duplicate function removal, obfuscation
  • Use Application Cache to load resources (works with iPhone and Anroid, Chrome, Safari, Firefox). Use AppCache linker (GWT 2.4).Use LocalStorage (GWT 2.3). Application Cache might still have some defects.

Review: GWT best practices for writing smaller, faster apps



Performance Tips:

  • Reduce HTTP Request, use ClientBundle
  • Use Scheduler for efficient Loop
  • Use Gwt-RPC / RequestFactory to do batch request
  • Gwt-RPC type explosion (because of serializer and deserializer for each subtype): use contrete types (ArrayList, not List), Limit Polymorphism with Gwt-RPC, blacklist certain RPC types, consider RequestFactory
  • Don't use Widget if HTML will do (unless event responds is required, but you can't add Widgets to HTML elements; counter with HTML panel perhaps?), use LayoutPanels, use Cell Widgets
  • Place is bookmarkable state, is History Management (handle app state when use click back or open a specific form directly through specific url)
  • Place + Activity + Code Splitting (load JS on demand)
  • Compile Faster: draftComple, set one User Agent and Locale
  • Shrink JS (around 7% reduction for 300K size): -XdisableClassMetadata (Disable some java.lang.Class methods like getName), -XdisableCastChecking, -compileReport, set compiler.stackMode strip, set compiler.enum,obfuscate.names true, set CssResource.obfuscationPrefix empty

Friday, July 8, 2011

HTML5 Game Development Ground Up



Resources: Code, Slides

Summary:

Thursday, July 7, 2011

Using GWT for Game Development

Why use GWT?
  • Abstraction for Different Brower and Platform
  • Ability to leverage on Java ecosystem, utilising existing Java game libraray like JBox2D
  • Real Time Debugging
  • ForPlay Game Engine, Asset Management, I/O System
  • Abstract Network Call & JSON (not WebScoket yet)
  • Ability to compile for HTML5 and Java (and Android), and Flash (ActionScript) *Apply to ForPlay only, not the entire GWT


More GWT Videos: