Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Riena Getting started"

(Installation)
m (Redirected page to Riena Project)
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RienaBreadcrumbs|
+
#REDIRECT [[Riena_Project]]
[[Riena_Project | Riena]] | Install & Getting Started | }}
+
 
+
{| align=right
+
| __TOC__
+
|}
+
 
+
How to install Riena, set up the Riena Target Platform, and get started with code examples.
+
 
+
== Installation ==
+
 
+
; All Platforms
+
:
+
:# First install Equinox project SDK and RCP SDK – see instructions below.
+
:# Download the target platform from one of the software update sites given below.
+
:#* Important note: Only install into your target platform, ''not'' into your Eclipse IDE directly!
+
; Windows users
+
: can alternatively install a complete target platform from the links marked "Complete target platform" below.
+
 
+
{| border="1" cellspacing="0" cellpadding="7"
+
|colspan="3"|
+
=== Links for Helios milestones(2.0.0.0) ===
+
|-
+
!Version
+
!Update site
+
!Alternative download, for Windows users only
+
|-
+
|2.0.0.M5
+
|http://download.eclipse.org/rt/riena/2.0.0.M5/update/
+
|not available yet
+
|-| border="1" cellspacing="0" cellpadding="7"
+
|colspan="3"|
+
=== Links for RELEASE (1.2.0.0) ===
+
|-
+
!Version
+
!Update site
+
!Alternative download, for Windows users only
+
|-
+
|1.2.0.0
+
|http://download.eclipse.org/rt/riena/1.2.0.0/update/
+
|[http://www.eclipse.org/downloads/download.php?file=/rt/riena/Riena-target-200912141645-1.2.0.0-win32b.zip Complete target platform]
+
|-
+
|colspan="3"|
+
=== Links for older milestones ===
+
|-
+
!Version
+
!Update site
+
!Alternative download, for Windows users only
+
|-
+
|1.2.0.RC1
+
|http://download.eclipse.org/rt/riena/1.2.0.RC1/update/
+
|[http://www.eclipse.org/downloads/download.php?file=/rt/riena/Riena-target-200912071105-1.2.0.RC1-win32.zip Complete target platform]
+
|-
+
|1.2.0.M3
+
|http://download.eclipse.org/rt/riena/1.2.0.M3/update/
+
|[http://www.eclipse.org/downloads/download.php?file=/rt/riena/Riena-target-200911191810-1.2.0.M3-win32.zip Complete target platform]
+
|-
+
|1.2.0.M2
+
|http://download.eclipse.org/rt/riena/1.2.0.M2/update/
+
| [http://www.eclipse.org/downloads/download.php?file=/rt/riena/Riena-Targetplatform-1.2.0.200910140911NGT-win32-win32-x86.zip Complete target platform]
+
|-
+
| 1.2.0.M1
+
|http://download.eclipse.org/rt/riena/1.2.0.M1/update/
+
|[http://www.eclipse.org/downloads/download.php?file=/rt/riena/Riena-Targetplatform-1.2.0.200908210731NGT-win32-win32-x86.zip Complete target platform]
+
|-
+
| 1.1.0.0
+
|http://download.eclipse.org/rt/riena/1.1.0.0/update/
+
|[http://www.eclipse.org/downloads/download.php?file=/rt/riena/Riena-1.1.0.0-platform-win32.win32.x86.zip Complete target platform]
+
|}
+
 
+
== Set up target platform for Riena apps ==
+
 
+
For a Riena-based application to compile, a certain set of bundles (plug-ins) must be available at compile time. This set of bundles is known as a
+
[http://help.eclipse.org/galileo/topic/org.eclipse.pde.doc.user/concepts/target.htm target platform]. Follow the steps outlined in either of the following two sections to set up the target platform for Riena applications (based on Riena 1.2.0).
+
 
+
=== Beginners: Use the New Target Wizard ===
+
 
+
# Download Eclipse IDE 3.5.x for your platform.
+
# Install the '''Riena Templates Feature''' from http://download.eclipse.org/rt/riena/updatesites/rienawizard
+
#* You might need to uncheck 'Group items by category' to see the Riena Wizard item.
+
# Select a project in your workspace.
+
#* If your workspace is empty, create a new General project first (File > New > Project > General > Project > Next > Enter any name > Finish)
+
# Create the Riena target definition (File > New > Other… > Plug-in Development > Target Definition > Next. File Name: <tt>riena.target</tt>, Template: Riena Target 1.2.0.0. Finish).
+
#* [[Image:riena_new_target_wiz.png|300x300px]]
+
# The Target Definition editor will open. Wait for the "Resolving Target Definition…" job in the status bar (bottom right) to finish. Then click on 'Set as Target Platform'.
+
#* [[Image:riena_target.png|350x350px]]
+
# Done.
+
 
+
=== Experts: Manual Setup ===
+
 
+
# Download Eclipse IDE 3.5.x for your platform and start with a blank workspace.
+
# Create a new Target Platform definition that contains "Equinox Project SDK" and "Eclipse RCP SDK" from the Galileo Software Site (the RCP SDK will be only visible if you uncheck "Group by Category")
+
#* If you'd like to install Riena 1.1.0 from the Galileo Repository add Riena Core SDK and Riena SDK Samples.
+
#* If you'd like to install Riena 1.2.0. from the above update site then there are two entries for "Riena Core SDK" and "Riena SDK Samples" (a temporaray problem). Please select all four entries and add them to your target platform.
+
# Activate the platform.
+
# Done.
+
 
+
== Code Templates and Examples ==
+
 
+
In this section you will get a feel of the Riena framework by building and running applications built with Riena:
+
 
+
* We show you how to build your first Riena application, either using a template or starting from scratch.
+
* We briefly explain what '''Ridgets''' ("Riena widgets") are; an extensive set of snippets will show you how to use them.
+
* Sample applications will give you a glimpse of Riena features such as '''Remote Services''' and of Riena's UI/Navigation approach.
+
 
+
=== Build your first Riena application ===
+
 
+
The easiest way to start building a Riena application is to use a template included in the Riena Templates Feature. Of course, you can also write a Riena app from scratch.
+
 
+
==== Using the 'new project' templates ====
+
 
+
# Install the '''Riena Templates Feature''' from http://download.eclipse.org/rt/riena/updatesites/rienawizard
+
# Create a new Plug-in Project (File > New > Plug-in Project > Next)
+
# Choose a project name > Next
+
# On the Content page:
+
## "This plug-in will make contributions to the UI" => Yes
+
## "Would you like to create a rich client application?" => Yes
+
# The Templates page offers three "Riena" templates (picture below). Choose either one and hit Next or Finish.
+
#* [[Image:Riena_pde_templates.png|350x350px]]
+
 
+
; If you picked the "Riena Hello World" or "Riena Mail Template"
+
: start the resulting project with Run As -> Eclipse Application.
+
; If you picked the "Riena Client/Server Template"
+
: use the launch configurations that are included in the project. Start the server first, then the client.
+
 
+
Look at the code in the projects and have fun.
+
 
+
==== If you prefer to roll your own ====
+
Ralf Ebert has written an excellent tutorial on the first steps of [http://www.ralfebert.de/blog/eclipsercp/riena_tutorial/ how to build a Riena client application from scratch].
+
 
+
=== Try the Riena Snippets ===
+
The [[Riena_Snippets|Riena Snippets]] page contains a growing collection of self-contained code examples that show you how to use '''ridgets''' ("Riena widgets") and what you can do with them.
+
 
+
{{RienaBox|
+
==== What are ridgets? ====
+
A ridget wraps an actual UI widget but offers a higher level of abstraction and it is independent from the UI toolkit (SWT). The idea is to separate the UI (view) from the logic behind it, which is moved to a view controller. The view controller interacts with the actual UI widgets through the ridgets. It
+
should be possible to reuse a view controller with a view that is based on a different UI toolkit (e.g. Swing).
+
 
+
A ridget offers the most commonly-used functionality (like <tt>setText(String)</tt> of a
+
text field) along with some extra convenience functionality like markers. A textfield can be marked as error by adding an ErrorMarker. The marking itself (changing color, setting icons, etc.) is handled
+
by the Riena framework. Another example is the <tt>bindToModel(...)</tt> method for a simple
+
databinding with a JavaBean.
+
 
+
The overall intention is to reduce the complexity for the application developer
+
and to ensure a common look & feel across the application. If the functionality
+
offered by the ridget's interface is not sufficient the developer can always
+
access the actual UI widget. (Then of course he loses the independence from the
+
UI toolkit). The set of ridgets is constantly getting bigger. If necessary it
+
should be possible for applications to add its own ridgets.
+
 
+
In the view you create SWT controls as always and register them with Riena (<tt>addUIControl(...)</tt>). The ridgets will be injected into the controller, where you then have access to the corresponding ridgets.
+
 
+
(Adapted from a [http://markmail.org/message/tklyqqg7biym6uec discussion on riena-dev].) See also [[Riena_Custom_Ridgets#Ridget_Design_Principles|Ridget Design Principles]].
+
}}
+
 
+
=== Try the communication ping pong example ===
+
# File -> Import -> Plug-in Development -> Plug-ins and Fragments -> Next.
+
# Select "Projects with source folders" unter Import As (since it's more fun with source code) -> Next.
+
# In the Plug-ins Listbox, select the 4 plugins <tt>*.communication.sample.pingpong.*</tt> and click Add and then Finish.
+
# In the Run Dialog you can select which of the two components to run (under 'OSGi Framework').
+
#* '''Don't forget''' to press the 'Add required Bundles' button for both of them before you start them!
+
## First, start the Riena Sample PingPong Server.
+
##* The server starts at port 8080, make sure it's not taken.
+
## Then start the Riena Sample PingPong Client.
+
# On success your client will print a message on the console: <tt>PingPong::Client:: [Pong] says = Thx. I got the ping!</tt>
+
# Switch to the server console; it should show a message like this: <tt>PingPong::Server:: [Ping] says = I ping you and you pong me</tt>
+
 
+
=== Try the unit tests ===
+
# Import the project <tt>org.eclipse.riena.tests</tt> from the target platform (same as above).
+
# There are classes like <tt>AllTests</tt> on various levels that you can run as Junit Plugin Tests.
+
# You can also run individual tests as JUnit Plugin Tests.
+
 
+
; Currently there are more than 2000 tests
+
: They should all work. Some of them fail if you click or move the mouse while the tests are running (e.g. focus or UI tests).
+
; Launch Error on starting tests
+
: This sometimes happens when you launch a test as JUnit Plugin Test for the first time. => You will need to modify the launch configuration for this class:
+
:# In the "Main" tab, change the field "Run an application" to "[No Application] - Headless Mode".
+
:# In the "Plug-ins" tab:
+
:## Launch with: choose "plug-ins selected below only".
+
:## "Deselect All"
+
:## Check/select the bundle containing the test you want to run.
+
:## "Add Required Plug-ins"
+
:# Apply. Run.
+
; Classes ending with <tt>*ITest</tt> require a server.
+
: That's the Riena App Sample Server (explained in the next step).
+
 
+
=== Install the Riena Sample App Server ===
+
 
+
Simple server with customer search web service:
+
# Stop any previously started client or server.
+
# Import the projects <tt>org.eclipse.riena.sample.app.server</tt> and <tt>org.eclipse.riena.sample.app.common</tt> from the target platform.
+
# Start Riena App Server from the Run Dialog:
+
#* Don't forget to press the button "Add required bundles".
+
#* This server starts on port 8080, make sure that port is not taken.
+
# That should bring up a relativly simple app server with just the customer search web service.
+
 
+
Server with many more services:
+
# Stop the server again.
+
# Bring up the Run Dialog again, select Riena App Server and select the bundles <tt>org.eclipse.riena.security.services</tt> and <tt>org.eclipse.riena.security.simpleservices</tt> (both found in the target platform).
+
# Press "Add required bundles".
+
# Run it.
+
# Now you can see in the console a lot more (security-related) web services.
+
# Now you can also run the <tt>*ITests</tt> from the <tt>tests</tt> bundle, e.g. <tt>SessionServiceITest</tt>.
+
 
+
=== Run the Riena Example Client ===
+
# File -> Import -> Plug-in Development -> Plug-ins and Fragments -> Next.
+
# Select "Projects with source folders" unter 'Import As' (since it's more fun with source code) -> Next.
+
# In the Plug-ins Listbox, select the plugin <tt>org.eclipse.riena.example.client</tt>, click 'Add' and then 'Finish'.
+
# In the Run Dialog -> Eclipse Application, there are two entries "SWT ExampleApplication" and "SWT ExampleApplication (with alternative Lnf)".
+
# You can launch them both:
+
#* Don't forget to click on Add Required Plug-ins in the Plug-ins Tab.
+
#* Both launchers start the same application based on the same code, but using two distinct Riena Themes (different colors, fonts etc.).
+
# Play with it :-)
+
 
+
There is also a project <tt>org.eclipse.riena.sample.app.client.mail</tt> that you can import and start the same way. (The launcher is "Mail Sample (Riena UI)".)
+
 
+
=== Run the Riena Demo ===
+
# File -> Import -> Plug-in Development -> Plug-ins and Fragments -> Next.
+
# Select "Projects with source folders" unter 'Import As' (again: it's more fun with source code) -> Next.
+
# In the Plug-ins Listbox, select the 3 plugins <tt>org.eclipse.riena.demo.*</tt>, click 'Add' and then 'Finish'.
+
# Run the Riena Demo Server launcher (don't forget Add Required Plug-ins).
+
* Run the Riena Demo Client launcher (don't forget Add Required Plug-ins).
+
 
+
== Next Steps ==
+
 
+
Get started with the [[Riena_Project#Concepts_and_Features|key concepts and features of Riena]].
+
 
+
 
+
[[Category:Riena]]
+

Revision as of 13:32, 27 November 2014

Redirect to:

Back to the top