Hi Steve,
Typically, you wouldn't want to define multiple entrypoints but instead use
a single entrypoint, and potentially divide your project into multiple
modules. More replies inlined to your post below:

Should this be implemented as 4 separate entry points? Should it be
> one entry point and one page with all interfaces on it, showing and
> hiding them as appropriate? If so won't this get bulky?


Using a single EntryPoint class, you could define four main panels that
represent each of the four pages you described above. You could then add
these panels to a TabPanel, for example, where each tab corresponds to one
of the four panels, and clicking on the tab opens up that panel. There are
many other options for how you can set this up, but the TabPanel example is
one that is hopefully easiest to visualize and understand. From the
functionality you described so far, designing the application this way would
probably not be too bulky, in terms of both size of your code base and
initial download size of your application for your user.

However, as your code base grows and you add features, you might want to
start separating your code into different modules to make clearer
distinctions between them and also make modules reusable in other components
of your application. This is when you can consider splitting your code into
multiple modules, where the module containing your entry point class
inherits from whichever other modules it needs to use. You can read more
about creating more modules for your application by checking out the doc
linked below.

See "Dividing code into multiple modules" section:
http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideModuleXml

For the question about whether this will become bulky for the user, the
answer is, it will. Which is why we're working on the new code splitting
runAsync() feature in GWT 2.0. Using the runAsync() feature, you can control
you can split up your code into individual parts and control when they get
loaded. This way, you might have the login and "add new member" panel coded
to load as soon as the user visits your application, but split out the "edit
existing user" and "reminder email" panels downloaded as separate fragments
in the background to reduce the initial download of your application. Until
GWT 2.0 releases and you can use the feature in a stable release, you can
either work from GWT trunk if you want to use the feature now (probably not
the best thing to do since you're just getting started with GWT), or design
your application following the principle of on-demand widget creation (link
below). Your user will still pay for the initial download size, but at least
you will cut down on rendering time and memory usage at a given moment. You
should also be able to revisit areas of your code where you lazily loaded
your components and replace these by runAsync() calls when GWT 2.0 lands.

On-demand widget creation:
http://googlewebtoolkit.blogspot.com/2008/11/improving-performance-with-on-demand.html

Are the HTML pages I add after the main entrypoint always pure html?
> or can I add GWT goodness to them?


In general, you won't be adding HTML pages to an GWT application through the
entrypoint. Once you've coded your GWT application and run the GWT compiler
over the code base, it will generate a number of JavaScript and HTML files,
one of which is the JS bootstrap file. Your main HTML page (the page your
users land on when they visit your site) will include a <script> tag
referencing this JS bootstrap file and load your GWT application in the
page. You could instead add another HTML page into your GWT module through a
Frame widget, but that would only be done in very specific situations.

You can add a GWT component to an existing part of an application by
defining an element in your host HTML page that your GWT component can bind
to. For example:

index.html:

<div id='gwtComponent'></div>

MyEntryPoint.java:

public class MyEntryPoint implements EntryPoint {

  public void onModuleLoad() {
    VerticalPanel mainPanel = new VerticalPanel();

    // Add components to the main panel, and other stuff...

    RootPanel.get("gwtComponent").add(mainPanel);
  }
}

Hope that helps,
-Sumit Chandel

In general it would be great to have some guidance as to entry points,
> multiple entry points and how they should be used. I've read all the
> documentation I can find and haven't seen this explained for someone
> at a basic level as me.
>
> Thanks in Advance
> Steve
>
> >
>

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

Reply via email to