Client Side Application Compile

Hello.
After reading Vaadin 7 (Client Side Developing) Book i’m confused.

I’ve created vaadin 7 app from maven arch. (from wiki). Then edited AppWidgetSet.gwt.xml


<module>
	<!--
	    This file is automatically updated based on new dependencies by the
	    goal "vaadin:update-widgetset".
	-->

	<!-- Inherit DefaultWidgetSet -->
	<entry-point class="com.bellski.MyVaadinUI" /> 
    
</module>

Then edited MyVaadinUI


public class MyVaadinUI implements EntryPoint {

    @Override
    public void onModuleLoad() {
        VButton b = new VButton();
        b.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent eevent) {
                VLabel label = new VLabel(";)");
                RootPanel.get().add(label);
            }
        });
        
        RootPanel.get().add(b);
    }
    
}

And after that i stucked. How to compile Application. I can’t find DevMode class as it’s written in the book Tutorial.
Can some one explain how to compile Application for Clinet Side.
Thanks.

I haven’t used Vaadin 7 with maven. However if it is the same as doing it with Vaadin 6, you can use these instructions to compile your widgetset (=compile the client side):
Using add-ons with Maven
. It’s about using add-ons, but it is the same as developing your own client side. After both you have to compile your widgetset to be able to use the client code.

Thanks i’ll try :wink: And a few more questions.

How to use data binding on a client side. I want to create application which grab all data from server for using it on client side. Like standard Gwt application.

P.S. We’re talking about pure Client Side Vaadin Application.

I think these will help you to accomplish what you want to do:

Mini tutorials for Vaadin 7

If I’m not mistaken. Mini tutorials has 2 tutorials for Client Side. I don’t see any tutorial about "Data binding on a client side ".
Widget VForm doesn’t have any method, which would be able to implement work with data, like Property, Beans on a Server-side…

Check ou the tutorials about “Using Shared State for communication” and “Sending events from the client to the server using RPC”

I’m not sure if I’ve heard anyone doing a
pure
client side application with vaadin. A maybe more feasible case is that you do a pure gwt and use some components from Vaadin. Maybe your target might work as well. Vaadin 7 makes it much more possible, but there is one quite big showstopper for that. Almost none of the components have been rewritten to the new structure where you have server side, client side and connector. All still uses the legacy method where you only have client and server part, and vaadin communication is intertwined into the client part. Having Vaadin calls withing the widgets might make it very hard to use them on their own. Button and Label are the only components that I know of that uses the new structure. Table will be rewritten in 7.1 and other components will follow.

Several parts of Vaadin are server-side only, including the Vaadin data binding framework.

You can create client only applications using Vaadin 7 JARs, but at the moment only GWT classes and a small subset (expanding by 7.1) of the com.vaadin.client.* and com.vaadin.shared.* classes (in the vaadin-client and vaadin-shared JARs) are usable without Vaadin server side parts, and e.g. loading of themes may need a little bit of work from your side in a pure client side application.

Thanks, i see.

I just want to minimize communication with a server-side by any event. It’s not cool when i clicking on “close modal window” and waiting server response, or any other things.
I want to manage communication with a server. Like, grab data from a server and working with it on a client side, coz we have heavy logic on a server (parsing xml and many other things) and if 100500 clients would be working with our service they would have a huge delay on any event.

Do I understand correctly that client side widgets can solve my problem?
I like to develop on Vaadin after any other Gwt Framework. But delay on any event, very upsetting to me.

If you really need to customize everything, you can use Vaadin as an improved version of GWT (with more improvements and widgets on the client side coming after 7.0).

Then again, even without customizing communication, Vaadin can scale quite high if you serve static resources separately (e.g. a front-end server) and think carefully about potential bottlenecks. Some custom components and customized communication where it is really needed might be an option.

See e.g.
this scalability study
. It is highly tuned for the application with some custom components and a carefully designed architecture, but mostly uses standard Vaadin communication and standard components. When you go to tens or hundreds of thousands of simultaneously active users, Vaadin is probably not the optimal technology.

The patterns of interaction, data needed for each component/operation, security/performance constraints etc. can depend a lot on the application so some quick test/profiling before selecting the final solution is probably in order, and profiling should be continued if bottlenecks are found. Premature optimization usually wastes a lot of time and money, but so do late architectural changes.

In your case, can e.g. the parsing results be cached for the client, stored internally in another format on the server while the user is interacting with the data? For instance, a customized Container on the server side for a Tree or a Table with the correct level of caching might make a big difference.