This document contains an agenda and slides for a presentation titled "Secrets of the GWT" about Google Web Toolkit (GWT). The presentation covers topics such as why to use GWT for rich web apps, GWT quickstarts, developer tools, GWT performance, and building with GWT 2.12. It discusses how GWT compiles Java code to JavaScript to create browser-compatible web apps without plugins, and allows catching errors at compile time for improved productivity.
The document discusses how 2011 will be the year of web apps. It predicts that web app stores will grow popular across different browsers and devices. Hybrid apps combining web technologies like HTML5 with native device APIs will become more common, allowing developers to write once and deploy apps across multiple platforms. Key technologies that will enable this include HTML5, device APIs, and frameworks for building hybrid apps.
Patrick Debois gave an introduction to DevOps. He discussed how Agile development improved collaboration between developers and testers but neglected operations teams. Traditional continuous integration models separated development and operations. DevOps aims to bring development and operations teams together through practices like infrastructure as code, configuration management, continuous integration/delivery, and collaboration across roles. Culture and mindset shifts are also important for DevOps, prioritizing collaboration, craftsmanship, and trust between teams.
Develop and Deploy Scalable Apps with Google App EngineDavid Chandler
Google App Engine allows developers to easily build and deploy scalable web applications. It provides a platform as a service (PaaS) that handles tasks like provisioning servers, load balancing and scaling. Developers can build apps using popular languages like Python and Java without worrying about managing infrastructure. Apps benefit from automatic scaling, high availability and simple administration through Google's cloud-based hosting environment.
Pavel Plakhotnik has over 20 years of experience in IT programming. He has strong skills in Java, SQL, JavaScript and frameworks like Spring and Hibernate. Currently he works as a Java developer where he fixes bugs and supports an existing product. Previously he has managed projects, developed applications, and provided support for accounting, payroll and ERP systems implemented in technologies like 1C, FoxPro and FinExpert. He is currently located in Lublin, Poland.
AppFuse is an open source project/application that uses best-of-breed Java open source tools to help you develop web applications quickly and efficiently. Not only does it provide documentation on how to develop light-weight POJO-based applications, it includes features that many applications need out-of-the-box: authentication and authorization, remember me, password hint, skinnability, file upload, Ajax libraries, signup and SSL switching. This is one of the main features in AppFuse that separates it from the other "CRUD Generation" frameworks like Ruby on Rails, Trails and Grails. AppFuse is already an application when you start using it, which means code examples are already in your project. Furthermore, because features already exist, the amount of boiler-plate code that most projects need will be eliminated.
In this session, you will learn Seven Simple Reasons to Use AppFuse. If you don't use it to start your own projects, hopefully you will see that it provides much of the boiler-plate code that can be used in Java-based web applications. Since it's Apache Licensed, you're more than welcome to copy/paste any code from it into your own applications.
Also see article published at:
http://www.ibm.com/developerworks/java/library/j-appfuse/index.html
GWT is currently stable with version 2.8 but has seen declining activity and contributions. Its future direction with version 3.0 is unclear but it aims to better integrate with modern JavaScript by using J2CL as a compiler to JavaScript and improving support for Elemental2 and JsInterop. Developers are advised to embrace the growing JavaScript ecosystem and consider alternative frameworks if relying on future GWT developments.
This document provides an overview of Java EE 6 and how it can simplify enterprise application development. It discusses the evolution of Java EE and new features in Java EE 6 like profiles, pruning of legacy technologies, pluggability, dependency injection, RESTful web services, and validation APIs. It also covers tools like NetBeans IDE and Glassfish application server and demonstrates a bookstore application.
1. The document discusses testing practices for software development including reasons for testing, types of testing, and testing methodologies like test-driven development.
2. It provides examples of bugs in major software projects that cost hundreds of millions of dollars and discusses how testing aims to reduce these costs.
3. Continuous integration, iterative development, and test automation are presented as ways to systematically test software throughout the development process.
The document summarizes the key lessons learned from building the Google Plugin for Eclipse (GPE). It discusses challenges around installation, creating new web applications, running/debugging apps, supporting multiple SDK versions, and features for GWT like JSNI. Lessons included the need for stability, ease of use, classpath management, and supporting various configurations and developer needs.
Are you tired of spending hours trying to reproduce and diagnose bugs? Do you have a hard time getting testers and developers to talk to each other? Is it difficult to determine which tests are most important to run after you produce a new build? Software testing is perhaps the #1 area of investment for the application lifecycle management capabilities of Microsoft Visual Studio 2010. In this session, we will introduce the software testing capabilities offered by Visual Studio 2010, which are covered comprehensively in the respective sessions. Given that you want to deliver high quality code, when you drive your entire software development lifecycle with tests – you will dramatically improve overall quality.
This document outlines the past, present, and future of Java SE. In the past, Java gained widespread adoption for application development and the JRockit JVM provided high performance. Currently, efforts are focused on Java 7 and the convergence of Hotspot and JRockit. Going forward, trends like multi-core processors and cloud computing will influence Java's direction.
This document summarizes a presentation about building scalable apps with Google App Engine. It discusses the history and capabilities of App Engine, including how it provides developers with a cloud platform that handles hardware, networking, operating systems, runtimes and more. App Engine automatically scales apps across Google's infrastructure and provides tools to deploy and manage apps with high availability and performance.
This document provides an overview of Google Web Toolkit (GWT), including its history and development, why it is still useful despite newer JavaScript frameworks, how it works, and examples of its use. Key points include: GWT started at Google but is now an open source project overseen by a committee including Google; it allows developing complex browser apps in Java that compile to optimized JavaScript; it enables strong typing and code reuse across platforms; major companies like Google use it for applications; and frameworks like Errai extend it for full-stack web development.
This document discusses the Eclipse Virgo application server and its approach to modularity. It describes how Virgo achieves modularity through an OSGi-based architecture with bundles, loose coupling between components, and well-defined contracts. The document outlines some of the benefits of modularity like ease of maintenance and reuse. It also notes some challenges in achieving modularity like backward compatibility issues and risks. Finally, it provides an overview of Virgo's features and how it supports modular application development.
A presentation I delivered to the Richmond JUG on the evolution of HTML through XHTML to HTML5 and some of the technologies that support implementation now, before a specification is reached by the WHATWG/W3C
Javascript as a target language - GWT kickoff - part1/2JooinK
This document summarizes a presentation about Google Web Toolkit (GWT) given by Alberto Mancini and Francesca Tosi. It discusses what GWT is, provides statistics on its usage and popularity, explores why developers use GWT and its benefits, and gives examples of using GWT with computer vision libraries to enable augmented reality applications in the browser.
Slide deck for a presentation during a JavaScript meetup in Atlanta, GA.
This is an intro into titanium with a twist being that I focused on explaining some of the power titanium gives developers by allowing them to easily create their own UI versus using native graphics.
Tools needed to build a Continuous delivery pipeline. Most tools are generic and can be used regardless of language, some are specific for Java/JVM.
http://2014.itakeunconf.com/
Taking Your GWT App to Tablets with GXT 4.0David Chandler
Sencha GXT builds on the open source GWT compiler to enable Java developers to build complex desktop-like user interfaces that run in the browser. In GXT 4.0, the core widgets have been updated to include touch functionality such as draggable borders, tree expand / collapse, LiveGrid scrolling, and long press to hover. In addition, you can add new gesture recognizers such as pinch and rotate to your apps. In this presentation, we look at the ins and outs of JavaScript touch event handling for GWT developers, touch support in GXT 4.0 widgets, how to eliminate the 300ms click delay in mobile browsers, and how to work with GXT’s new gesture recognizers. In addition, we look at some of the lessons learned by the GXT team while building GXT 4.0 and demo some debugging strategies for GWT apps on touch devices.
StORM: a lightweight ORM for Android SQLiteDavid Chandler
Project stORM is an ORM library for SQLite on Android that aims to provide an easy and convention-based way to map objects to database tables. It uses annotation processing to generate database helper classes and data access objects (DAOs) that allow storing and querying objects with minimal boilerplate code or performance overhead. The library supports basic CRUD operations on objects as well as filtering and sorting but does not currently support object relationships or complex queries.
Presentation from GWT.create 2015 on how to easily build a REST API that can be consumed via GWT or native mobile clients. Presentation video here: http://gwtcreate.com/videos/#rpc-jersey-resty-gwt
El documento resume cómo trabajan los empleados de Google (Googlers) y algunas de las herramientas y servicios de Google que utilizan. Los Googlers tienen acceso a comida gratis, herramientas sencillas como el navegador y editor de texto vi, y se divierten en el trabajo. El documento también describe atajos de teclado y funciones útiles de Gmail, Google Drive, Calendario, Contactos, Fotos y otros servicios de Google.
This document summarizes an engineer's career path and offers advice for success. It describes the author's own non-linear career path, which included contracting work and jobs at startups and larger companies like Intuit and Google. It notes that the traditional path of staying at one company for decades is no longer common. The document then provides tips for finding jobs, including networking, attending user groups, and ensuring resumes emphasize coding skills. It emphasizes the importance of continually learning, through activities like reading source code instead of just documentation, blogging, speaking at conferences, and being willing to solve problems and share solutions online. Personal maturity, such as having a soft answer and listening to others, is also advised as key to career success
This document provides an overview and introduction to stORM, a simple template-based Object Relational Mapping (ORM) library for Android. Key points include that stORM aims to provide an easy and convention-based way to map Android objects to SQLite tables using annotations with minimal performance overhead. It generates DAO and table classes but does not support modeling all possible relations or achieving absolute maximum performance.
The document summarizes an App Engine update presentation given by David Chandler, a Google Developer Advocate. The presentation covered new App Engine features including improved SLAs, paid support options, security audits, backends, pull queues, the High Replication Datastore, query planner improvements, and XG transactions. It also provided examples of App Engine customers and common app types, and tips for optimizing performance including using memcache and content caching.
The 90-Day Startup with Google AppEngine for JavaDavid Chandler
The document discusses Google App Engine, a platform for developing and hosting web applications on Google's infrastructure. It provides an overview of App Engine and how to get started, discusses some limitations and tradeoffs compared to traditional web hosting, and recommends frameworks and techniques for building scalable applications on App Engine, including Objectify, Guice, and gwt-dispatch. It also notes that while App Engine is still relatively new, it has significant potential for developing scalable applications with minimal upfront costs.
The document discusses best practices for building applications with Google Web Toolkit (GWT) using the Model-View-Presenter (MVP) pattern, including defining display interfaces, handling events through presenters rather than views, and leveraging frameworks like gwt-presenter and gwt-dispatch for improved code organization and asynchronous communication with servers. It also provides an overview of tools and techniques for debugging, dependency injection, animations and resources for further learning GWT development.
Securing JSF Applications Against the OWASP Top TenDavid Chandler
JSF provides built-in validation of user input through converters and validators. While this centralizes validation, developers must still take care to validate all user input, including hidden fields and related fields. Custom converters and validators can be used where needed. Cross-site request forgery is also a risk, but can be prevented by adding random tokens to requests.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/07/intels-approach-to-operationalizing-ai-in-the-manufacturing-sector-a-presentation-from-intel/
Tara Thimmanaik, AI Systems and Solutions Architect at Intel, presents the “Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” tutorial at the May 2024 Embedded Vision Summit.
AI at the edge is powering a revolution in industrial IoT, from real-time processing and analytics that drive greater efficiency and learning to predictive maintenance. Intel is focused on developing tools and assets to help domain experts operationalize AI-based solutions in their fields of expertise.
In this talk, Thimmanaik explains how Intel’s software platforms simplify labor-intensive data upload, labeling, training, model optimization and retraining tasks. She shows how domain experts can quickly build vision models for a wide range of processes—detecting defective parts on a production line, reducing downtime on the factory floor, automating inventory management and other digitization and automation projects. And she introduces Intel-provided edge computing assets that empower faster localized insights and decisions, improving labor productivity through easy-to-use AI tools that democratize AI.
UiPath Community Day Kraków: Devs4Devs ConferenceUiPathCommunity
We are honored to launch and host this event for our UiPath Polish Community, with the help of our partners - Proservartner!
We certainly hope we have managed to spike your interest in the subjects to be presented and the incredible networking opportunities at hand, too!
Check out our proposed agenda below 👇👇
08:30 ☕ Welcome coffee (30')
09:00 Opening note/ Intro to UiPath Community (10')
Cristina Vidu, Global Manager, Marketing Community @UiPath
Dawid Kot, Digital Transformation Lead @Proservartner
09:10 Cloud migration - Proservartner & DOVISTA case study (30')
Marcin Drozdowski, Automation CoE Manager @DOVISTA
Pawel Kamiński, RPA developer @DOVISTA
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
09:40 From bottlenecks to breakthroughs: Citizen Development in action (25')
Pawel Poplawski, Director, Improvement and Automation @McCormick & Company
Michał Cieślak, Senior Manager, Automation Programs @McCormick & Company
10:05 Next-level bots: API integration in UiPath Studio (30')
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
10:35 ☕ Coffee Break (15')
10:50 Document Understanding with my RPA Companion (45')
Ewa Gruszka, Enterprise Sales Specialist, AI & ML @UiPath
11:35 Power up your Robots: GenAI and GPT in REFramework (45')
Krzysztof Karaszewski, Global RPA Product Manager
12:20 🍕 Lunch Break (1hr)
13:20 From Concept to Quality: UiPath Test Suite for AI-powered Knowledge Bots (30')
Kamil Miśko, UiPath MVP, Senior RPA Developer @Zurich Insurance
13:50 Communications Mining - focus on AI capabilities (30')
Thomasz Wierzbicki, Business Analyst @Office Samurai
14:20 Polish MVP panel: Insights on MVP award achievements and career profiling
Sustainability requires ingenuity and stewardship. Did you know Pigging Solutions pigging systems help you achieve your sustainable manufacturing goals AND provide rapid return on investment.
How? Our systems recover over 99% of product in transfer piping. Recovering trapped product from transfer lines that would otherwise become flush-waste, means you can increase batch yields and eliminate flush waste. From raw materials to finished product, if you can pump it, we can pig it.
Details of description part II: Describing images in practice - Tech Forum 2024BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and transcript: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
Are you interested in learning about creating an attractive website? Here it is! Take part in the challenge that will broaden your knowledge about creating cool websites! Don't miss this opportunity, only in "Redesign Challenge"!
The Rise of Supernetwork Data Intensive ComputingLarry Smarr
Invited Remote Lecture to SC21
The International Conference for High Performance Computing, Networking, Storage, and Analysis
St. Louis, Missouri
November 18, 2021
MYIR Product Brochure - A Global Provider of Embedded SOMs & SolutionsLinda Zhang
This brochure gives introduction of MYIR Electronics company and MYIR's products and services.
MYIR Electronics Limited (MYIR for short), established in 2011, is a global provider of embedded System-On-Modules (SOMs) and
comprehensive solutions based on various architectures such as ARM, FPGA, RISC-V, and AI. We cater to customers' needs for large-scale production, offering customized design, industry-specific application solutions, and one-stop OEM services.
MYIR, recognized as a national high-tech enterprise, is also listed among the "Specialized
and Special new" Enterprises in Shenzhen, China. Our core belief is that "Our success stems from our customers' success" and embraces the philosophy
of "Make Your Idea Real, then My Idea Realizing!"
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfjackson110191
These fighter aircraft have uses outside of traditional combat situations. They are essential in defending India's territorial integrity, averting dangers, and delivering aid to those in need during natural calamities. Additionally, the IAF improves its interoperability and fortifies international military alliances by working together and conducting joint exercises with other air forces.
Hire a private investigator to get cell phone recordsHackersList
Learn what private investigators can legally do to obtain cell phone records and track phones, plus ethical considerations and alternatives for addressing privacy concerns.
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Erasmo Purificato
Slide of the tutorial entitled "Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Emerging Trends" held at UMAP'24: 32nd ACM Conference on User Modeling, Adaptation and Personalization (July 1, 2024 | Cagliari, Italy)
Performance Budgets for the Real World by Tammy EvertsScyllaDB
Performance budgets have been around for more than ten years. Over those years, we’ve learned a lot about what works, what doesn’t, and what we need to improve. In this session, Tammy revisits old assumptions about performance budgets and offers some new best practices. Topics include:
• Understanding performance budgets vs. performance goals
• Aligning budgets with user experience
• Pros and cons of Core Web Vitals
• How to stay on top of your budgets to fight regressions
Blockchain and Cyber Defense Strategies in new genre timesanupriti
Explore robust defense strategies at the intersection of blockchain technology and cybersecurity. This presentation delves into proactive measures and innovative approaches to safeguarding blockchain networks against evolving cyber threats. Discover how secure blockchain implementations can enhance resilience, protect data integrity, and ensure trust in digital transactions. Gain insights into cutting-edge security protocols and best practices essential for mitigating risks in the blockchain ecosystem.
An invited talk given by Mark Billinghurst on Research Directions for Cross Reality Interfaces. This was given on July 2nd 2024 as part of the 2024 Summer School on Cross Reality in Hagenberg, Austria (July 1st - 7th)
this resume for sadika shaikh bca studentSadikaShaikh7
I am a dedicated BCA student with a strong foundation in web technologies, including PHP and MySQL. I have hands-on experience in Java and Python, and a solid understanding of data structures. My technical skills are complemented by my ability to learn quickly and adapt to new challenges in the ever-evolving field of computer science.
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Chris Swan
Have you noticed the OpenSSF Scorecard badges on the official Dart and Flutter repos? It's Google's way of showing that they care about security. Practices such as pinning dependencies, branch protection, required reviews, continuous integration tests etc. are measured to provide a score and accompanying badge.
You can do the same for your projects, and this presentation will show you how, with an emphasis on the unique challenges that come up when working with Dart and Flutter.
The session will provide a walkthrough of the steps involved in securing a first repository, and then what it takes to repeat that process across an organization with multiple repos. It will also look at the ongoing maintenance involved once scorecards have been implemented, and how aspects of that maintenance can be better automated to minimize toil.
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threatsanupriti
In the rapidly evolving landscape of blockchain technology, the advent of quantum computing poses unprecedented challenges to traditional cryptographic methods. As quantum computing capabilities advance, the vulnerabilities of current cryptographic standards become increasingly apparent.
This presentation, "Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats," explores the intersection of blockchain technology and quantum computing. It delves into the urgent need for resilient cryptographic solutions that can withstand the computational power of quantum adversaries.
Key topics covered include:
An overview of quantum computing and its implications for blockchain security.
Current cryptographic standards and their vulnerabilities in the face of quantum threats.
Emerging post-quantum cryptographic algorithms and their applicability to blockchain systems.
Case studies and real-world implications of quantum-resistant blockchain implementations.
Strategies for integrating post-quantum cryptography into existing blockchain frameworks.
Join us as we navigate the complexities of securing blockchain networks in a quantum-enabled future. Gain insights into the latest advancements and best practices for safeguarding data integrity and privacy in the era of quantum threats.
10. Eating our own dogfood
+= AdSense, Maps, Docs, Groups...
10
Monday, March 14, 2011 10
11. Rich ecosystem
www.gwtmarketplace.com
Monday, March 14, 2011 11
12. More ecosystem
Util: GIN, gwt-dnd, gwt-fx, gwt-comet, ...
Widgets: EXT-GWT, Smart-GWT, ...
Frameworks: Vaadin!
Monday, March 14, 2011 12
13. 4+ years in review
May 2006 GWT 1.0 Launch at JavaOne
… …
Aug 2008 GWT 1.5 Java 5 language support
Apr 2009 GWT 1.7 Dedicated IE8 support
Fall 2009 GWT 2.0 UIBinder (XML template), runAsync()
Oct 2010 GWT 2.1 MVP, RequestFactory, Spring Roo
13
Monday, March 14, 2011 13
14. GWT Quickstart
> svn checkout https://google-web-toolkit.googlecode.com/
svn/trunk/samples/expenses expenses
> cd expenses/src/main/webapp
> mvn -f ../../../pom.xml gwt:run (dev mode)
(note: most projects can use mvn gwt:run in the dir containing pom.xml--this
one is special because it loads test data from a .txt file in src/main/webapp)
1.Browse to http://127.0.0.1:8888/LoadExpensesDB.html?
gwt.codesvr=127.0.0.1:9997
2.Click Generate Data button
3.Browse to Expenses.html to run the app
To create an Eclipse project:
1.Install Sonatype m2eclipse and m2extras
2.File | Import | Existing maven project, select expenses/
pom.xml
Monday, March 14, 2011 14
15. GWT delivers...
Productivity for developers
- Language, IDEs, tools,
libraries
- People, ecosystem
Performance for users
- 'Perfect' caching
- Whole program optimization
15
Monday, March 14, 2011 15
16. Developing with GWT
Develop
- Google Plugin for Eclipse, GWT Designer, STS / Roo
Debug
- In Eclipse with dev mode browser plugin
Optimize
- SpeedTracer for GWT, App Engine, Spring Insight
Deploy
- Standard WAR or one-button push to App Engine
Monday, March 14, 2011 16
18. Google Plugin for Eclipse
Easiest way to get latest GWT, GAE SDKs
Debug / Run / Optimize / Deploy
Wizards (new module, entry point, ClientBundle,
UiBinder)
Quick fixes (auto-create RPC Async interface)
Run As | GWT JUnit Test
Maven integration via m2eclipse plugin
Monday, March 14, 2011 18
34. Deferred binding
Firefox Webkit (Safari) Opera IE
Typical portable 2876 ms 1276 ms 2053 ms 4078 ms
setInnerText()
textContent=... - 908 ms 1386 ms -
innerText=... 2477 ms 918 ms 1520 ms 2469 ms
DOM manipulation 7148 ms 1997 ms 4836 ms 14800 ms
Improvement 14% 29% 32% 39%
34
Monday, March 14, 2011 34
35. GWT compiler optimization
“The fastest code is that which does not run.”
Joel Webber
GWT co-creator
Monday, March 14, 2011 35
36. GWT compiler optimization
Does all the stuff you’d do by hand in a tight JS app
- Shrinking (obfuscation)
- Modularization (pay only for what you use)
- Dead code removal
- Method inlining
…but automated and even tighter
Developer-guided code splitting (runAsync)
Monday, March 14, 2011 36
37. What’s new in 2.2?
Integration with Spring / Roo
SafeHTML wrappers
GPE: Maven support, integration GWT Designer
Application framework
- RequestFactory
- Activities and Places
Cell Widgets and Editor framework
Monday, March 14, 2011 37
38. Four flavors of RPC
1. RequestBuilder + JSONParser (see RESTY-GWT)
2. RequestBuilder + XMLParser
3. GWT-RPC (easiest)
4. RequestFactory (new in 2.1)
Monday, March 14, 2011 38
39. GWT-RPC
@RemoteServiceRelativePath("greet")
public interface GreetingService extends RemoteService {
String greetServer(String name) throws IllegalArgumentException;
}
public interface GreetingServiceAsync {
void greetServer(String input, AsyncCallback<String> callback)
throws IllegalArgumentException;
}
public class GreetingServiceImpl extends RemoteServiceServlet implements
GreetingService
{
public String greetServer(String input) throws IllegalArgumentException {
...
}
}
Monday, March 14, 2011 39
40. Simple, powerful GWT-RPC
Send / receive Plain Old Java Objects (POJO)
- Easy: interface, async, & implementation
- Versioned to help keep client & server in sync
- Even smaller than JSON
- Supports polymorphism
- No JavaScript hijacking risk (JSON attack)
- Easy to find all calls to given service in IDE
Monday, March 14, 2011 40
41. GWT 2.1 RequestFactory
Newer alternative to GWT-RPC
Designed for data-oriented services
- Higher level of abstraction than GWT-RPC
- Foundation for future caching / batching
Even faster than GWT-RPC
- JSON-based == very fast (no serialization /
deserialization required)
- Tracks changes on the client and sends only diffs
Monday, March 14, 2011 41
42. RequestFactory
The entity / DTO problem
EntityProxy / ValueProxy
Service stub interfaces extend RequestContext
AppRequestFactory extends RequestFactory
GWT.create(MyAppRequestFactory.class)
Monday, March 14, 2011 42
43. EntityProxy
@Entity
public class ItemList extends DatastoreObject
{
private String name;
private Key<AppUser> owner;
private ListType listType;
@Embedded
private List<ListItem> items; // value type
...
}
@ProxyFor(ItemList.class)
public interface ItemListProxy extends DatastoreObjectProxy
{
// TODO enums work!
public enum ListType {NOTES, TODO}
String getName();
void setName(String name);
List<ListItemProxy> getItems();
AppUserProxy getOwner(); // NOT Key
...
}
Monday, March 14, 2011 43
44. DatastoreObject
package com.listwidget.domain;
public class DatastoreObject
{
@Id
private Long id;
private Integer version = 0;
@PrePersist
void onPersist()
{
this.version++;
}
...
}
package com.listwidget.shared.proxy;
public interface DatastoreObjectProxy extends EntityProxy
{
Long getId();
Integer getVersion();
}
Monday, March 14, 2011 44
45. ValueProxy
public class ListItem // POJO
{
private String itemText;
private Date dateCreated;
public Date getDateCreated()
{
return dateCreated;
}
}
@ProxyFor(value = ListItem.class)
public interface ListItemProxy extends ValueProxy
{
String getItemText();
void setItemText(String itemText);
Date getDateCreated();
}
Monday, March 14, 2011 45
46. Making a RequestFactory
public interface ListwidgetRequestFactory extends RequestFactory
{
@Service(value = ItemListDao.class, locator = DaoServiceLocator.class)
interface ItemListRequestContext extends RequestContext
{
Request<List<ItemListProxy>> listAll();
Request<Void> save(ItemListProxy list);
Request<ItemListProxy> saveAndReturn(ItemListProxy newList);
}
ItemListRequestContext itemListRequest();
}
private final ListwidgetRequestFactory rf =
GWT.create(ListwidgetRequestFactory.class);
Monday, March 14, 2011 46
47. Using RequestFactory
@Override
public void persistList(String listName)
{
final ListwidgetRequestFactory rf = this.clientFactory
.getRequestFactory();
ItemListRequestContext reqCtx = rf.itemListRequest();
final ItemListProxy newList = reqCtx.create(ItemListProxy.class);
newList.setName(listName);
newList.setListType(ListType.TODO);
reqCtx.saveAndReturn(newList).fire(new Receiver<ItemListProxy>()
{
@Override
public void onSuccess(final ItemListProxy savedList)
{
// Refresh table
listDataProvider.getData();
}
});
}
Monday, March 14, 2011 47
48. Using RequestFactory
@Override
public void update(int index, ItemListProxy obj, final String newName)
{
ItemListRequestContext reqCtx = clientFactory.getRequestFactory()
.itemListRequest();
ItemListProxy editable = reqCtx.edit(obj);
editable.setName(newName);
reqCtx.save(editable).fire(new Receiver<Void>()
{
@Override
public void onSuccess(Void response)
{
eventBus.fireEvent(new MessageEvent(newName + " updated",
MessageType.INFO));
}
});
}
Monday, March 14, 2011 48
49. Using RequestFactory
private void getData()
{
// To retrieve relations and value types, use .with()
Request<List<ItemListProxy>> findAllReq = rf.itemListRequest()
.listAll().with("owner");
// Receiver specifies return type
findAllReq.fire(new Receiver<List<ItemListProxy>>()
{
@Override
Text
public void onSuccess(List<ItemListProxy> response)
{
updateRowData(0, response);
}
});
}
Monday, March 14, 2011 49
50. Using RequestFactory
editList = reqCtx.edit(editList);
List<ListItemProxy> items = editList.getItems();
// must initialize collections
if (items == null)
{
editList.setItems(new ArrayList<ListItemProxy>());
}
editList.getItems().add(newItem);
reqCtx.save(editList).with("items").to(new Receiver<Void>()
{
@Override
public void onSuccess(Void response)
{
itemsProvider.setList(editList.getItems());
itemsProvider.refresh();
}
}).fire();
Monday, March 14, 2011 50
51. GWT MVP - Concepts
View
- Interface + implementation
- Interface enables testing without GWTTestCase
- Typically expensive to construct so make reusable
Presenter
- No Widgets, just business logic
- Middle man between service layer and views
Monday, March 14, 2011 51
52. GWT MVP - Concepts
Place
- Place represents bookmarkable state of an activity
- PlaceController makes back button / bookmarks
work like users expect
- PlaceTokenizers map to / from String tokens on URL
Monday, March 14, 2011 52
53. Demo
third_party/java_src/gwt/svn/trunk/samples/
expenses
Monday, March 14, 2011 53
54. Place
public class EditListPlace extends Place
{
private String token;
public EditListPlace(String token)
{
this.token = token;
}
public String getToken()
{
return token;
}
public static class Tokenizer implements PlaceTokenizer<EditListPlace>
{
public EditListPlace getPlace(String token)
{
return new EditListPlace(token);
}
public String getToken(EditListPlace place)
{
return place.getToken();
}
}
}
Monday, March 14, 2011 54
55. PlaceHistoryMapper
/**
* PlaceHistoryMapper interface is used to attach all places which the
* PlaceHistoryHandler should be aware of. This is done via the @WithTokenizers
* annotation or by extending PlaceHistoryMapperWithFactory and creating a
* separate TokenizerFactory.
*/
@WithTokenizers({ ListsPlace.Tokenizer.class, EditListPlace.Tokenizer.class })
public interface AppPlaceHistoryMapper extends PlaceHistoryMapper
{
}
Monday, March 14, 2011 55
56. Hello Places
// Start PlaceHistoryHandler with our PlaceHistoryMapper
PlaceHistoryMapper historyMapper = clientFactory.getHistoryMapper();
PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(hisoryMapper);
historyHandler.register(placeController, eventBus, defaultPlace);
// Goes to place represented on URL or default place
historyHandler.handleCurrentHistory();
Monday, March 14, 2011 56
60. Activities
Activity, ActivityManager are not required!
ActivityManager
- Owns a region of the window
- Choose what to do with it on place change
Activity (“wake up, set up, show up”)
- Started by ActivityManager
- Provides a widget to display, asynchronously
- Can refuse to relinquish screen
Monday, March 14, 2011 60
67. Activities and Places wiring
// Start ActivityManager for the nav (west) panel with our WestActivityMapper
ActivityMapper westActivityMapper = new WestActivityMapper(clientFactory);
ActivityManager westActivityManager =
new ActivityManager(westActivityMapper, eventBus);
westActivityManager.setDisplay(westPanel);
// Start ActivityManager for the main (center) panel with our CenterActivityMapper
ActivityMapper centerActivityMapper = new CenterActivityMapper(clientFactory);
ActivityManager centerActivityManager =
new ActivityManager(centerActivityMapper, eventBus);
centerActivityManager.setDisplay(centerPanel);
// Start PlaceHistoryHandler with our PlaceHistoryMapper
PlaceHistoryMapper historyMapper = GWT.create(AppPlaceHistoryMapper.class);
PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
historyHandler.register(placeController, eventBus, defaultPlace);
RootPanel.get().add(dockLayoutPanel);
// Goes to place represented on URL or default place
historyHandler.handleCurrentHistory();
Monday, March 14, 2011 67
68. Cell Widgets
Fast, lightweight table rendering
Data binding with
DataProviders, ValueUpdaters
Scrolling and paging controls
Sortable columns, adjustable width
TextBox, IntegerBox, ValueBox<T>
Monday, March 14, 2011 68
70. Editable Column
// Editable column for list name
nameColumn = new Column<ItemListProxy,String>(new EditTextCell())
{
@Override
public String getValue(ItemListProxy list)
{
return list.getName();
}
};
Monday, March 14, 2011 70
71. Custom Column type
// Note Flyweight pattern: only one instance of HyperlinkCell passed to the Column
Column<ItemListProxy, Hyperlink> linkColumn =
new Column<ItemListProxy, Hyperlink>(new HyperlinkCell())
{
@Override
public Hyperlink getValue(ItemListProxy list)
{
String proxyToken =
clientFactory.getRequestFactory().getHistoryToken(list.stableId());
String historyToken =
clientFactory.getHistoryMapper().getToken(new EditListPlace(proxyToken));
Hyperlink h = new Hyperlink(list.getName(),historyToken);
return h;
}
};
Monday, March 14, 2011 71
72. Populating a CellTable
public static class MyDataProvider extends
AsyncDataProvider<ItemListProxy>
{
@Override
protected void onRangeChanged(HasData<ItemListProxy> display)
{
// To retrieve relations and value types, use .with()
Request<List<ItemListProxy>> findAllReq = rf.itemListRequest()
.listAll().with("owner");
// Receiver specifies return type
findAllReq.fire(new Receiver<List<ItemListProxy>>()
{
@Override
public void onSuccess(List<ItemListProxy> response)
{
updateRowData(0, response);
}
});
}
}
this.myDataProvider = new MyDataProvider(requestFactory);
Monday, March 14, 2011 72
73. Updating with a CellTable
public class NameFieldUpdater implements FieldUpdater<ItemListProxy, String>
{
@Override
public void update(int index, ItemListProxy obj, final String newName)
{
ItemListRequestContext reqCtx = clientFactory.getRequestFactory()
.itemListRequest();
ItemListProxy editable = reqCtx.edit(obj);
editable.setName(newName);
reqCtx.save(editable).fire(new Receiver<Void>()
{
@Override
public void onSuccess(Void response)
{
eventBus.fireEvent(new MessageEvent(newName + " updated",
MessageType.INFO));
}
});
}
};
// Make list name field editable
display.getNameColumn().setFieldUpdater(new NameFieldUpdater());
Monday, March 14, 2011 73
74. GWT Logging
GWT now has java.util.Logging emulation
Configure in your .gwt.xml
Easily enable remote logging, too
Monday, March 14, 2011 74
75. GWT secrets
-compileReport
Monday, March 14, 2011 75
76. GWT secrets: faster compile
- -draftCompile skips optimizations
- Set only one user-agent in gwt.xml for dev
- Careful with RPC polymorphism
Monday, March 14, 2011 76
77. GWT secrets: shrink JS
- -XdisableClassMetadata: Disables some
java.lang.Class methods (e.g. getName())
- <set-property name="compiler.stackMode"
value="strip"/>
Removes client-side stack trace info (can
reduce code size up to 15%)
- <set-configuration-property
name="CssResource.obfuscationPrefix"
value="empty"/>
Monday, March 14, 2011 77
78. GWT secrets: shrink JS
- <set-property
name="compiler.enum.name.obfuscation"
value="true"/>
(only if you’re not using enums as String values)
- -XdisableCastChecking: Disables run-time
checking of cast operations
(use with caution)
- See GWT FAQ, CompilerParameters.gwt.xml
Monday, March 14, 2011 78
79. GWT speak
“Very productive environment for Java
developers, but there is a learning curve”
“UI layout and styling is a challenge”
“GWT has enabled our team to run much faster
than we could otherwise”
“Would be impossible to write our app without
GWT”
Monday, March 14, 2011 79
80. New GWT book
http://code.google.com/webtoolkit/books.html
Monday, March 14, 2011 80
81. Thank you!
Where to get it:
http://code.google.com/webtoolkit/
Wiki, issue tracker, source:
http://code.google.com/p/google-web-toolkit/
Official GWT blog:
http://google-web-toolkit.blogspot.com/
Twitter:
@googledevtools
81
Monday, March 14, 2011 81
Editor's Notes
\n
What&#x2019;s new in GWT?\n
\n
\n
Google Web Toolkit 101\n
\n
\n
\n
You get the benefit of code completion, javadoc\nAND Eclipse refactoring tools\n
One GWT\n
\n
\n
\n
\n
GWT has two main goals\n
Google Web Toolkit gives you tools for the whole development lifecycle\n
Easiest way to get started is with Google Plugin for Eclipse\n
\n
\n
\n
\n
\n
\n
Instantiations, free, contribute WindowBuilder\nGenerates corresponding Java code and provides round-trip editing\nUiBinder, externalize strings, absolute layout, new LayoutPanel\n
You can also use GWT Designer with UiBinder XML templates\n
GWT Designer provides a nice CSS editor with visual preview\n
Now you&#x2019;ve written some code and you want to test it.\nGWT development mode lets you test changes quickly without having to compile to JavaScript\n
Now you&#x2019;ve written some code and you want to test it.\nGWT development mode lets you test changes quickly without having to compile to JavaScript\n
Now you&#x2019;ve written some code and you want to test it.\nGWT development mode lets you test changes quickly without having to compile to JavaScript\n
Browser plugin connects to the GWT code server running in Eclipse\nand runs your Java code.\n
Browser plugin connects to the GWT code server running in Eclipse\nand runs your Java code.\n
Browser plugin connects to the GWT code server running in Eclipse\nand runs your Java code.\n
Browser plugin connects to the GWT code server running in Eclipse\nand runs your Java code.\n
Browser plugin connects to the GWT code server running in Eclipse\nand runs your Java code.\n
Dev mode also lets you debug right inside Eclipse\n
When you&#x2019;re ready to deploy, you run the GWT compiler, which\npackages your app in a standard WAR structure\n
Download SpeedTracer for Chrome from the GWT team\n
Launch from Eclipse to find Java code for certain events\n
SpeedTracer can even show server-side speed traces in GAE\nand Spring tcServer\n
Deploy WAR to any servlet container\nOr one click to GAE\n
\n
How do you upgrade your application?\nEnsure that new images, CSS, etc. are updated on each browser?\nGenerates random URLs\nNocache does deferred binding (browser detection, i18n), then pulls in cached permutation for the browser\n
GWT compiler creates the bundled image and calculates cropping\nso your can use each image just like normal\n
GWT compiler creates the bundled image and calculates cropping\nso your can use each image just like normal\n
GWT compiler creates the bundled image and calculates cropping\nso your can use each image just like normal\n
GWT compiler creates the bundled image and calculates cropping\nso your can use each image just like normal\n
\n
\n
\n
Even more on its way: lightweight collections, enum ordinalization\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
DatastoreObject ID/version, Key, enum, value type\n
\n
ListItem a POJO on server only\nAll proxies go in a shared directory (client and server)\n
interface extends RequestFactory, @Service points to impl, locator can find it\nservice stubs extend RequestContext, return parameterized Request\naccessor for each service stub\n
Create a new object, call .create() to get mutable obj\nFire the request with Receiver (like AsyncCallback)\n
To update, must edit first to get mutable obj\n
.with\n
must edit() parent obj, init Collections, save .with() for relations & value types\n
No special methods to implement\nReusable via factory\n
No special methods to implement\nReusable via factory\n
\n
evil back button\n
\n
Extends Place, constructors can take arguments\nTokenizer converts to/from String\n
\n
Lists all places that participate in browser history\nAll generated, can also implement PlaceHistoryMapper yourself\n
\n
instantiate ActivityManagers, PlaceHistoryMapper, PlaceHistoryHandler\nAdd a widget to the root panel and handleCurrentHistory()\nSee also CachingActivityManager, FilteredActivityManager\n
Define a model to cleanly separate view & presenter code\n
Column represents model of a column, contains no widget code\nSo can use in presenter or view\n
\n
\n
\n
Java is the kingdom of nouns\n
\n
How do you shrink it and make compile faster? shows each permutation, split point, package\n