Skip to main content
Jump to: navigation, search

Difference between revisions of "Scout/Concepts/Type of application"

(See also)
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{ScoutPage|cat=Concepts}}
 
{{ScoutPage|cat=Concepts}}
  
During the creation of  {{ScoutLink|HowTo|Create_a_new_project|a new Scout Project}} in the {{ScoutLink|Concepts|ScoutSDK|Scout SDK}}, it is possible to chose the type of application that should be created. This page gives an overview of the different types.
+
During the creation of  {{ScoutLink|HowTo|Create_a_new_project|a new Scout Project}} in the {{ScoutLink|SDK}}, it is possible to chose the type of application that should be created. This page gives an overview of the different types.
  
 
== Single form application ==
 
== Single form application ==
Line 12: Line 12:
 
In this type of application, the main window displays a form. In this example (Swing, Nimbus look and feel, Windows), the menu bar is displayed in this main window on top of the main form.
 
In this type of application, the main window displays a form. In this example (Swing, Nimbus look and feel, Windows), the menu bar is displayed in this main window on top of the main form.
  
The SDK creates:
+
During the initial project creation the SDK creates:
* In the Scout client plugin: A {{ScoutLink|Concepts|Form|form}}, called DesktopForm.  
+
* In the Scout client plugin: A {{ScoutLink|Concepts|Form|form}} (DesktopForm.java).  
* In the Scout server plugin: A {{ScoutLink|Concepts|Process_Service|process service}}, called DesktopProcessService
+
* In the Scout server plugin: A {{ScoutLink|Concepts|Process_Service|process service}} (DesktopService.java)
* In the Scout shared plugin: The process interface IDesktopProcessService and the a {{ScoutLink|Concepts|FormData|form data}} (a kind of DTO), called DesktopFormData
+
* In the Scout shared plugin: The process interface (IDesktopService.java) and the a {{ScoutLink|Concepts|FormData|form data}} (DesktopFormData.java)
* The necessary wiring to open the DesktopForm in the client applications' {{ScoutLink|Concepts|Desktop|desktop}}.
+
* The necessary wiring to open the DesktopForm in the client applications' {{ScoutLink|Concepts|Desktop|desktop}} (method execOpened in Desktop.java).
  
 
The desktop form is opened on client startup.  
 
The desktop form is opened on client startup.  
 
Before it is displayed in the client application frame, the wiring provided with the single form application fetches data from the Scout server using the desktop process service.
 
Before it is displayed in the client application frame, the wiring provided with the single form application fetches data from the Scout server using the desktop process service.
 +
For this, the Desktop's method ''execOpened'' is implemented as follows:
 +
 +
<source lang="java">
 +
  @Override
 +
  protected void execOpened() throws ProcessingException {
 +
    //If it is a mobile or tablet device, the DesktopExtension in the mobile plugin takes care of starting the correct forms.
 +
    if (!UserAgentUtility.isDesktopDevice()) {
 +
      return;
 +
    }
 +
    DesktopForm desktopForm = new DesktopForm();
 +
    desktopForm.setIconId(Icons.EclipseScout);
 +
    desktopForm.startView();
 +
  }
 +
</source>
  
 
See the {{ScoutLink|Tutorial|HelloWorld|'Hello World' tutorial}} to read more about the creation of a single form based application.
 
See the {{ScoutLink|Tutorial|HelloWorld|'Hello World' tutorial}} to read more about the creation of a single form based application.
Line 36: Line 50:
 
** A page on the right
 
** A page on the right
  
The SDK creates:
+
During the initial project creation the SDK creates:
* In the Scout client plugin: A {{ScoutLink|Concepts|Form|form}}, called DesktopForm.  
+
* In the Scout client plugin: An {{ScoutLink|Concepts|Outline|outline}} (StandardOutline.java)
* In the Scout server plugin: A {{ScoutLink|Concepts|Process_Service|process service}}, called DesktopProcessService
+
* In the Scout server plugin: An {{ScoutLink|Concepts|Process_Service|outline service}}, (StandardOutlineService.java)
* In the Scout shared plugin: The process interface IDesktopProcessService and the a {{ScoutLink|Concepts|FormData|form data}} (a kind of DTO), called DesktopFormData
+
* In the Scout shared plugin: A service interface (IStandardOutlineService.java)
 +
* The necessary wiring to open a tree form on the left and a table form on the right in the client applications' {{ScoutLink|Concepts|Desktop|desktop}} (method execOpened in Desktop.java).
 +
 
 +
 
 +
The Desktop's method ''execOpened'' is implemented as follows:
 +
 
 +
<source lang="java">
 +
  @Override
 +
  protected void execOpened() throws ProcessingException {
 +
    //If it is a mobile or tablet device, the DesktopExtension in the mobile plugin takes care of starting the correct forms.
 +
    if (!UserAgentUtility.isDesktopDevice()) {
 +
      return;
 +
    }
 +
 
 +
    // outline tree
 +
    DefaultOutlineTreeForm treeForm = new DefaultOutlineTreeForm();
 +
    treeForm.setIconId(Icons.EclipseScout);
 +
    treeForm.startView();
 +
 
 +
    //outline table
 +
    DefaultOutlineTableForm tableForm = new DefaultOutlineTableForm();
 +
    tableForm.setIconId(Icons.EclipseScout);
 +
    tableForm.startView();
 +
 
 +
    if (getAvailableOutlines().length > 0) {
 +
      setOutline(getAvailableOutlines()[0]);
 +
    }
 +
  }
 +
</source>
  
  
Line 48: Line 90:
 
Frequently, it is used to provide access to different entities.
 
Frequently, it is used to provide access to different entities.
 
In a ''Customer'' outline, the top level elements in the tree could be Companies, Persons, Communications, Tasks etc.
 
In a ''Customer'' outline, the top level elements in the tree could be Companies, Persons, Communications, Tasks etc.
 +
 +
See the {{ScoutLink|Tutorial|Minicrm_Step-by-Step|'Hello World' tutorial}} to read more about the creation of a single form based application.
  
 
== Empty application ==
 
== Empty application ==
Line 61: Line 105:
 
== See also ==
 
== See also ==
 
* {{ScoutLink|HowTo|Create a new project|How to create a new application}}
 
* {{ScoutLink|HowTo|Create a new project|How to create a new application}}
 +
* {{ScoutLink|HowTo/3.9|Create a minimal Standalone Client|How to create a minimal standalone client}}
 
* {{ScoutLink|Concepts|Desktop|Desktop}}
 
* {{ScoutLink|Concepts|Desktop|Desktop}}
 
* {{ScoutLink|Concepts|Outline based application|Outline based application}}
 
* {{ScoutLink|Concepts|Outline based application|Outline based application}}

Latest revision as of 11:21, 20 November 2013


Scout
Wiki Home
Website
DownloadGit
Community
ForumsBlogTwitterG+
Bugzilla
Bugzilla


During the creation of a new Scout Project in the SDK, it is possible to chose the type of application that should be created. This page gives an overview of the different types.

Single form application

As shown in the example screenshot below, form based applications are well suited for smaller and simpler applications. To cover many entities and allow for sophisticated navigation (see example below), table and tree based applications are usually a better match.

Scout single form application.png

In this type of application, the main window displays a form. In this example (Swing, Nimbus look and feel, Windows), the menu bar is displayed in this main window on top of the main form.

During the initial project creation the SDK creates:

  • In the Scout client plugin: A form (DesktopForm.java).
  • In the Scout server plugin: A process service (DesktopService.java)
  • In the Scout shared plugin: The process interface (IDesktopService.java) and the a form data (DesktopFormData.java)
  • The necessary wiring to open the DesktopForm in the client applications' desktop (method execOpened in Desktop.java).

The desktop form is opened on client startup. Before it is displayed in the client application frame, the wiring provided with the single form application fetches data from the Scout server using the desktop process service. For this, the Desktop's method execOpened is implemented as follows:

  @Override
  protected void execOpened() throws ProcessingException {
    //If it is a mobile or tablet device, the DesktopExtension in the mobile plugin takes care of starting the correct forms.
    if (!UserAgentUtility.isDesktopDevice()) {
      return;
    }
    DesktopForm desktopForm = new DesktopForm();
    desktopForm.setIconId(Icons.EclipseScout);
    desktopForm.startView();
  }

See the 'Hello World' tutorial to read more about the creation of a single form based application.

Outline based application

Outline based application are well suited for larger business applications that cover many elements, user roles, complex navigation, etc.

Scout outline based application.png

In example screenshot above (Swing, Nimbus look and feel, Windows), the main window provides:

  • A menu bar
  • A way to switch between the outlines attached to the desktop
  • A representation of the active outline:
    • A tree on the left
    • A page on the right

During the initial project creation the SDK creates:

  • In the Scout client plugin: An outline (StandardOutline.java)
  • In the Scout server plugin: An outline service, (StandardOutlineService.java)
  • In the Scout shared plugin: A service interface (IStandardOutlineService.java)
  • The necessary wiring to open a tree form on the left and a table form on the right in the client applications' desktop (method execOpened in Desktop.java).


The Desktop's method execOpened is implemented as follows:

  @Override
  protected void execOpened() throws ProcessingException {
    //If it is a mobile or tablet device, the DesktopExtension in the mobile plugin takes care of starting the correct forms.
    if (!UserAgentUtility.isDesktopDevice()) {
      return;
    }
 
    // outline tree
    DefaultOutlineTreeForm treeForm = new DefaultOutlineTreeForm();
    treeForm.setIconId(Icons.EclipseScout);
    treeForm.startView();
 
    //outline table
    DefaultOutlineTableForm tableForm = new DefaultOutlineTableForm();
    tableForm.setIconId(Icons.EclipseScout);
    tableForm.startView();
 
    if (getAvailableOutlines().length > 0) {
      setOutline(getAvailableOutlines()[0]);
    }
  }


Outlines may be used to group application functionality by business needs (Customer, Order management, Reporting), user roles (Sales, Marketing, Backoffice), or any other criteria.

Trees and pages are used to provide access to the content and functionality of an outline. In the screenshot above, the tree is used to represent categories. Frequently, it is used to provide access to different entities. In a Customer outline, the top level elements in the tree could be Companies, Persons, Communications, Tasks etc.

See the 'Hello World' tutorial to read more about the creation of a single form based application.

Empty application

The empty application templates allows for maximum flexibility. However, the developer needs to know exactely what she/he is doing.

This type of application correspond to a minimal client server application.

  • Empty desktop client application frame
  • No forms in the Scout client
  • No related form services in the Scout server

See also

Back to the top