background preloader

Gwt

Facebook Twitter

Osgi

Crux Released – a Component Framework on top of GWT. What's New in GWT 2.0? The latest release of GWT, version 2.5, includes the new features and functionality listed below. See the 2.5 Release Notes for bug fixes and other changes. New Features Super Dev Mode (experimental) Super Dev Mode is an experimental replacement for Development Mode. For more, see Introducing Super Dev Mode.

Elemental (experimental) Elemental is an experimental new library for fast, lightweight, and "to the metal" web programming in GWT. New compiler optimizations The GWT compiler can optionally use the Closure compiler to provide additional JavaScript optimizations. Updated ARIA support We added a new accessibility ARIA library that has a full coverage of the W3C ARIA standard. UIBinder Enhancements GWT 2.5 adds extensions to UiBinder that allow it to support Cell rendering and event handling.

We? Validation Enhancements GWT 2.5 adds support for more features of JSR-303 Bean Validation specification and this support is no longer considered "experimental". Getting Started If you? Problems? Lost in Translation or Why GWT Isn’t the Future of Web Developme. I recently read Is GWT the future of web development? The post postulates that GWT (“Google Web Toolkit”) is the future because it introduces type safety, leverages the existing base of Java programmers and it has some widgets. Google has recently put their considerable weight behind it, most notably with Google Wave.

I’m naturally hesitant to bet against Google or Lars Rasmussen but the fact is that’s what I’m doing. On Type Safety and Static Typing In the 90s type-safety and static typing ruled almost unchallenged, first with C then C++ and Java (yes I realize Pascal, Algol-68 and a plethora of other languages came beforehand). Perl was the calling card of smug, bearded Unix systems administrators. Performance and the challenges of increasing complexity with relatively low-powered hardware (certainly by today’s standards) were the impetus behind this movement. On Leveraging Java Programmers The problems you face when writing a “cross-compiler” are: On Widgets and Maturity 03.

On Idioms. GWT fu, Part 1: Going places with Google Web Toolkit. In the 1990s, I used Swing a fair bit. I loved Swing because it let me implement anything I could imagine. To me, that's the thrill of developing software: being able to imagine something, and then make it come to life onscreen. With the Swing API, anything from drag-and-drop to arcade games was within easy reach. Then along came server-side Java and primitive frameworks like Struts, which made it possible to — what?!

— return to the 1960s and implement mainframe-like forms. No drag-and-drop, no arcade games, and not much fun anymore, once we were thrown back to the stone age of programming. That's why I love Google Web Toolkit. In this short series, I'll walk you up the GWT learning curve by implementing a desktop-like application. WidgetsRemote procedure calls (RPCs) and database integrationComposite widgetsEvent handlersAjax testing Places: An Ajaxified, database-backed, Web services mashup The places application that I'll build with GWT lets you view places.

Figure 1. Figure 2. Widgets. Google Web Toolkit (GWT) MVP Example. Here at Hive Development, I'm currently working on the GWT based UI for a new website/RIA monitoring service called SiteAlright. I recommend you head over and check it out. As you might expect we try to follow best practises when developing our apps and there's been quite a lot of talk recently on GWT Google Groups regarding the use of elements from the recent talk by Ray Ryan at Google I/O 2009 entitled Google Web Toolkit Architecture: Best Practices For Architecting Your GWTApp. This excellent talk laid out several best practise approaches for architecting your GWT application based on the team's experiences while developing the new AdWords interface. Some of the key recommendations were: The aim of this tutorial is to demonstrate these GWT best practises by applying them the default starter application generated by the Google Plugin for Eclipse. There are many benefits to these patterns and I'll leave it to the links above to go into these in detail.

Let's begin. 01. <? 03. 05. 06. 08. 35. GWT MVP (Model View Presenter) - Link directory. GWT Domain Model. In this blog I'd like to discuss an age old problem that almost all developers and architects face when building client-server applications - whether it's web based RIA technologies like GWT or a client-server Swing applications : How much data to send to the client? This is a frequently asked question on the GWT forums and its really a hard problem to come up with an elegant solution. The Problem You have a rich domain model that contains a network of associated entities. Thanks to JPA and ORM libraries like Hibernate, mapping these domain classes to a database is greatly simplified.

This then brings us the the next question of whether to use Data Transfer Objects (DTO) or not - another highly debated subject. In my earlier Introduction SmartGWT EE blog I mention that SmartGWT EE eliminates the need for DTO's. How does it solve the problem? The developer creates a simple xml DataSource descriptor exposing the fields that need to be returned to the client. Here's the DataSource definition : Gwt-mosaic-xul - Project Hosting on Google Code. Advanced GWT Components. Hello UiBinder. Patterns + GWT + Ajax = Usability! Rated by the Jargon, Acronyms, and Buzzwords (JAB) index, the title of this article scores high, but all the terms do come together. This article examines several programming patterns, that together with GWT and Ajax, can produce a better user Web experience with faster response times. And don't worry if you aren't familiar with the JAB index: I just invented it!

Usability Let's work through the equation in the title from right to left, starting with usability. Ajax Ajax allows a client to retrieve data from the server in the background, providing a more streamlined feeling to the user; a well-designed Ajax Web application can look and feel just like a standard (installed) program. The Google Web Toolkit The GWT is a fully open source Java™ development framework that lets you create Ajax applications working exclusively with the Java language.

GWT applies Ajax transparently. Patterns Now, what's a pattern? Back to top The test database Listing 1. Figure 1. Figure 2. Figure 3. Listing 2. Gwt-debug-panel. The primary intent of the Debug Panel for the Google Web Toolkit (GWT) is to provide the developer of a GWT application performance data about the application as well as tools to debug the client side application code. Once a GWT application is deployed, the client side code is run, well, on the client.

This means that the developer no longer has control over the execution environment, which makes it difficult to find and diagnose problems in the application. The Debug Panel allows the developer of a GWT (version 1.6+) application to run the application in the client environment and get runtime data that will help diagnose the application. The Debug Panel is useful in these various aspect and stages of the development of an application: Development: The Debug Panel will provide the developer with performance statistics and debug information (such as exception details) while developing the application both in web mode and hosted mode.

Getting Started Building the Source Check Out the Example. Scala on Google App Engine playing it nice with Java GWT and JDO. Few days ago I gave a short review on the SF Bay Area Google App Engine Developers meetup about Scala on the Google App Engine. If you would like to dive into it, here are some of the details with examples taken from the code of the newspipes app available at GitHub. Scala playes out very nicely with GAE with the same pros and cons a Java application would have. There is one thing Scala can't do which is to take part in any GWT related code. It has nothing to do with GAE since GWT is designed to work only with Java code. If you wish to use GWT for the front end and still use Scala for the back end - no problems.

You write your GWT code with Java, write the GWT service interface with Java so the GWT compiler will be happy, and implement the service with Scala. The service implementation is hooked up with GWT in the web.xml as the http end point. Next step will be using JDO. Now we need to compile it all. That's about it. Dragging and dropping with gwt-dnd | GWT Site. Today, we are going to take a look at adding drag-and-drop to our GWT applications.

I’ve seen quite a few solutions for adding drag-and-drop, including a few tutorials that show how roll your own solution. But why reinvent the wheel when there is a perfectly good drag and drop library like gwt-dnd? This library by Fred Sauer provides a whole host of cool features. I took some time to play with it this past week and I will show you how to get started using the library by creating a simple shopping cart example. To install, download the latest gwt-dnd jar file, add it to your build path and add the following line to your GWT application module file. In this demo, we’re going to allow users to drop books into a shopping cart. (com.gwtsite.dnd.client.Book) Book is a GWT composite widget that will display the book’s title, image, and price. Dragging is handled by implementing the DragController interface. (com.gwtsite.dnd.client.ShoppingCartDemo) (com.gwtsite.dnd.client.CartDropController)

GWT Overview And Feature Preview. Design patterns and GWT. We have a calculator EntryPoint implementation that places a CalculatorWidget on the RootPanel, so we now need to provide this widget. This will be our own widget, composed of basic GWT components. CalculatorWidget will contain the view for our calculator application, a simple data and logic layer as the model, and an intermediary controller between these layers.

This, of course, means we'll be using MVC and GWT together - keep in mind that all of these components will end up distributed to the client. MVC will be the overarching pattern for the macro level of our application. Additionally, we'll use some other common object-oriented (OO) patterns on other levels because of the general benefits these approaches provide. For example, we'll use the Observer pattern for event handling as part of the mechanism of communication between our model and our view. We'll also use the Strategy pattern within the logic and operations parts of our model.

MVC and GWT Creating a widget 14. super(); 08. GWTruts. UiBinder - google-web-toolkit-incubator - UI Binder Use Cases. I would like to propose a use case: to use XHTML to define GWT widget/panels inside an XHTML host page. Here an example of what I mean: <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " xml:lang="it" dir="ltr" xmlns=" xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:gwt='urn:import:com.google.gwt.user.client.ui'> <head> <title>Use case for GWT + UiBinder + XHTML</title> <script type="text/javascript" src="mymodule/mymodule.nocache.js"></script> </head> <body> <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position: absolute; width: 0; height: 0; border: 0"></iframe> <div id="sample_content_1"> <!

-- same example of the hello world --> <ui:UiBinder> <div> Hello, <span ui:field='nameSpan'/>. </div> </ui:UiBinder> </div> <div id="sample_content_2"> <! Hope this is interesting and that this will be read by the right GWT developers ;-) Gwt-mvc - Google Code. GWT MVC project's aim is to create a layer on top Google Web Toolkit's widget library capable of implementing RIAs in easier and more guided way based on a Model-View-Controller design pattern for the client part.

The MVC of gwt-mvc is a client-hierarchical-mvc Project Goals Easy to read controller Different actions available on a controller are described with an enumeration. History Tokens The user actions are managed as the browser actions, making the bookmarking easier. Test Driven Development The controllers are testable with simple Test Case (not Gwt Test Case). Hierarchical MVC The controller hierarchy allows to delegate a part of a controller responsibilities to its children. Loading notification The notification of a long process or an asynchronous call is simplified by a 'maskable', that could be called at each MvcEvent Lazy Initialisation Each component has a mechanism to differ the initilalisation from the constructor. Forms gwt-mvc contains facilities to build and validate forms. Gwt-dnd - Google Code. GWT: Better Layouts Through Subclassing. Here’s a way to handle your layouts a little differently in GWT.

Let’s go beyond the canned tutorials that feature a single Panel layout and imagine the following structure. Here we are using a DockPanel as a top-level container, with various other panels embedded inside of it: It’s easy to imagine the contents of each embedded panel changing as a result of actions taken against widgets in other panels, but for purposes of this post, let’s just consider each sub-panel contains a static label. For the tabbed panel, we define two tabs. If you consider the way most tutorials and textbook examples are written, you might describe this layout with code like this: Looks messy, but functional.

There are accessor methods for each panel here since, realistically, you will need them in order to build on this functionality. Due to the nature of GWT, our options for improvement are limited. Interesting, no? As you can see, there’s not much to it. Etcetera. What I described above is just a start. Vaadin.com. Google Web Toolkit. Feedback and corrections are welcomed! Email mark at ociweb dot com. Contents Introduction Who is using it? Installing Creating a New Project Implementing a New Project Internationalization Running Testing Deploying and Using Ant Formatting With CSS Widgets Containers Listeners/Adapters Server Calls Error Handling JavaScript from Java Client-side XML Processing Custom Widgets Creating Reusable Modules Resources Introduction GWT is a Java-based framework for creating Ajax web applications that makes writing web applications similar to writing Swing applications.

The main benefits of using GWT over other web app. frameworks are: Client-side code is primarily written using a subset of Java. The client-side code is "compiled" into HTML and JavaScript. Internationalization of text is supported through two mechanisms. Server-side code can be written using practically any programming language. A benefit of the GWT approach is that web applications are easier to maintain. Who's Using It? Running top. GWT Yellow Fade Technique. This is a quick example of a fading technique which notifies that a change or update in your GWT app has happened. Seems like every ajax site out there uses a technique similar to this to notify the user that something has happened. As I write this post, Google Docs flashes up a yellow “Saving…” box for a couple of seconds to let me know my document was automatically saved.

This “Saving…” flash box functionality is actually something I was about to put into an application, so I did some searches to see what kind of information was out there. I found nothing on doing it in GWT, actually all you’ll see out there is a bunch of finger pointing and chest bashing about who came up with the technique first (who cares?). In case the iframe doesn’t show up in your browser you can see and try the example here. First, let me explain how it’s all done. AddStyleName(java.lang.String style)andremoveStyleName(java.lang.String style) The FadeObject class The YellowFadeHandler class and GWT in Practice. Advanced GWT Components - Tutorial.

GWT: Building A Model.