As you might know there are various frameworks that give us the chance to develop Web Applications using the Java language. For example Seam, Wicket or JSF. But today I’ll be showing the basic concepts of the Google’s framework to develop Web Applications, GWT.
MODULES and ENTRY POINTS
The GWT web apps are called MODULES. A module “myModule” is described by a configuration file “myModule.gwt.xml”. Each module can have one or more Entry point classes. An Entry Point class has the onModuleLoad() method that would be the main() method in analogy with a standard Java program.
Every single module is connected with a HTML page, which is called “host-page”. The code for a GWT web application executes within this HTML document. The UI components of the host-page can be placed into “div” containers. Other way of placing the UI components is by assigning them to the body of the HTML page. Some of the classes related to the placement of an UI component into the host-page are: VerticalPanel, HorizontalPanel and RootPanel (Body) amongst others.
Mostly, the web apps developed using GWT have ONLY ONE ENTRY-POINT and ONE HTML this is because one can changed the UI components dynamically by changing the WIDGETS and LAYOUTS.
WIDGETS and LAYOUTS
If you are not familiarized with the terms, here you have a simple definition of each one.
Layout: refers to the dimensioning of content in a device display. Layouts end up being visual content frameworks, that can be fixed, they can use relative measure units or they can provide fluid layout with proportional dimensions. The concept of the layout it’s a very wide and powerful one, because when we take the role of web designers we don’t know the size of the web browser window. The browser could be in a cellphone, Ipad, laptop amongst other devices. Thanks to layouts we don’t have to think for each case of window size.
Widget: is a stand-alone application. This Application can be embedded into third party sites by any user on a page in which they have authorship rights. For example, in personal blog you could a “Twitter Widget” to show all your tweets.
That would be all for the moment ;)…