Vaddin 7 Book

Could anybody tell me where can I find book for Vaadin 7?

not sure if the book is there yet myself.
you can get started however with the tutorials
here

Work has started on updating Book of Vaadin for Vaadin 7, but it is still far from completed.

Currently the best source of documentation is probably the mini-tutorials that Arnold linked to, the
Migration guide
and in some cases the internal
design documents
though they are often not very up to date with the final implemented feature.

is there a way to get a alpha, beta of this book?

i would like to start a new application with vaadin 7, without book it’s hard.

I detected the first samples
released
lately :slight_smile:

That svn repository has been migrated to git:
http://dev.vaadin.com/git/?p=documentation/book-of-vaadin.git;a=summary

Hi Leif!

I could not find any info on Vaadin+CDI here either. Will there be a similar approach in Vaadin7 to CDI like this:


public class MyApplicationRoot extends Root {

    public static class RootApplication extends Application {
        private static final long serialVersionUID = -1099516579868329607L;
        
        @Override
        protected Root getRoot(WrappedRequest request) throws RootRequiresMoreInformationException {
            return new MyApplicationRoot();
        }
    }
    
    @WebServlet(urlPatterns="/*")
    public static class Servlet extends AbstractApplicationServlet {
        private static final long serialVersionUID = -1386739418720898885L;

        @Override
        protected Application getNewApplication(HttpServletRequest request) throws ServletException {
            return new RootApplication();
        }

        @Override
        protected Class<? extends Application> getApplicationClass() throws ClassNotFoundException {
            return RootApplication.class;
        }
    }
    
    private static final long serialVersionUID = 7428504147931595620L;

    @Override
    protected void init(WrappedRequest request) {
        VerticalLayout view = new VerticalLayout();
        view.addComponent(new Label("Hello Vaadin!"));
        setContent(view);
    }
}

See also similar thread over
here
.
As there is a huge confusion on how to attach Vaadin to EJB implementations, I would really appreciate some more info on that asap.

Please help!!

TIA

The book examples for Vaadin 7 are at
http://demo.vaadin.com/book-examples-vaadin7/book/
.

Many of them do not work and much of the migration is still to be done. Work in progress.

The book for Vaadin 7 is on the way and there should be a preview version available in mid-July.

I don’t have much experience with CDI, but you example seems sensible.

I think you could avoid defining your own subclass of Application if you could inject the root class name to the “root” parameter that is passed from the servlet init parameters to Application through Application.start.

Thank you for trying to help me out :slight_smile:

This is exactly where it stops: AbstractApplicationServlet operates on Application, but V7 basically operates starting at Root.

Its not problem to inject Root - but how do I then return an application in the AbstractApplicationServlet.getNewApplication with my injected Root?

Thanks for posting the V7 book!!

Could you please make a chapter on CDI and V7? I have asked for this lots of times before, and still think that it is a pretty common scenario, to replace a existing UI with Vaadin UI, keeping the EJB layer as it is.

Does Vaadin support the posted approach, which also has been officially posted over
here
?

True, that just shows how little CDI experience I have. I didn’t take into account that the Root instance created by Application should be an instance managed by the CDI system.

Is your example working, or is there something in the framework that completely blocks CDI integration? What would be needed to make CDI integration seamless while still working perfectly well without CDI?

The main focus of the framework is still that it should work in a simple Servlet 2.4 environment without requiring anything resembling CDI or Spring. We are currently mainly relying on the community for figuring out how to integrate with various other techniques while we’re reacting to specific issues that make integration cumbersome or simply impossible.

I could also mention that we’re far from sure that the structure with a Root created by an Application which in turn is created by a Servlet is the model that will be used in the final version of Vaadin 7. As we are moving parts of the framework around (most recently introducing a
Page class
), the importance of Application and Root seems to be diminishing. Another fact is that the AbstractApplicationServlet will most likely be significantly redesigned.

As a concrete example, we are investigating the thought of throwing out the concepts of Application and Root and instead letting the programmer define any subclass of Component as the main entry point (“root layout” or something similar) with something resembling AbstractApplicationServlet as a secondary entry point when more flexibility is needed. There is still much uncertainty in these ideas, but I think this particular approach could work pretty well with CDI as some of the intermediate control points are eliminated?