GWT is built uppon a subset of Java 1.5/1.6... but it is not
mandatory , as a java2js translator, to be only compliant with Java...
We see in many concurrent solutions like Flex, Silverlight,
Wickets, ..., that these solutions abuse of XML (mxml, xaml, ...) to
describe declaratively their interface... It corresponds surely to a
need to clerly decorrelate UI definition from the background logic. We
don't have up to now such a thing in gwt... but I personnaly don't
want this in the ways taken by the previous mentionned
technologies...
I would prefer a more homogeneous way, ie an extension of the java
language enabling to describe declaratively a GUI, but by the way
enabling to integrate smoothly java code for the logic concern.
We could use for instance groovy if GWT would start from the bytecode
instead of the source code... But we also could , and it is my
preferred way, extend the java syntax in the gwt parser to rake into
account a subset of JavaFX, ie only the way how javafx describe a GUI
in a declarative manner... I think it is more cleaner than xml ,and
more powerful too. It is also a discriminant wrt to the other
solutions.

Example  of JavaFX syntax (we don't need the vectorial stuff) :
Group {
    content:
    [View {
        content: Button {
            cursor: DEFAULT
            text: "Browse"
            action: operation() {
                var fc = new JFileChooser();
                var filter = new FileNameExtensionFilter("Images",
["jpg", "gif", "png"]);
                fc.setFileFilter(filter);
                var returnVal = fc.showOpenDialog(null);
                if(returnVal == JFileChooser.APPROVE_OPTION) {
                    url = fc.getSelectedFile().toURL().toString();
                }
            }
        }
    },
    View {
        transform: translate(68, 2)
        content: TextField {
            columns: 30
            value: bind url
        }
    },
    ImageView {
        transform: translate(0, 25)
        image: Image { url: bind url }
    }]
};

Canvas {
    content: ImageLoadNode { url: "http://blogs.sun.com/chrisoliver/
resource/tesla.PNG" }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to