HowTo build your UI with redView
To ease the development and to understand the redView concepts, we provide some examples.
We tried to create examples for different areas of redView – you can think of them like Snippets. But its more then a snippet, because there’s the redView model, the ‘normal’ SWT View and java classes for databinding, handling events and more. Then you can take a look at the redView model using the Designer Editor from inside the IDE and also try the dynamic rendering from Runtime using a Launch configuration.
redView uses SWT Views – if you’re not familiar with SWT – please take a look at the SWT Snippets.
If you know about SWT and also Riena Ridgets then the good news is: forget to write the code normaly needed. After designing your redView models the rest will be done by magic from redView 🙂
SetUp the Example Workspace
The detailed installation instruction will be found here: https://redview.wordpress.com/howto/installation/installation-as-redview-user-developer/
HowTo use the Examples
The example create a View with Databinding from scratch is a special one: it starts with a new empty project and then you define a SWT View together with a new redView model. After you followed the tutorial, you launch your own example the same way as the prepared examples from org.redview.examples….
Your workspace should contain some or all redView examples (they will grow over time – if you miss a specific example please open a request)
At first you should try if they run well. To do so please launch an Eclipse Application as usual:
If the Application is running, please open the example Views: Window -> Show View -> Other… -> redView Examples should present you a selection like this:
Please open and play around with them. Each Example is explained in detail below. While running the Eclipse Application its best to look at the example code in your IDE workspace.
The projects from org.redview.examples… have a structure similar like this one:
- If its an example with databinding, all Beans and/or POJOs are in a separate package (org.redview.examples.simplebinding.datamodel).
- The Eclipse SWT Views are also in a separate Package (org.redview.examples.simplebinding.viewstore).
- All Icons and Images are stored in a folder <projectroot>/icons and all redView view models are stored in a folder <projectroot>/viewstore. Both folder are also defined as extensions in plugin.xml. More informations about Icons and Images are here.
- Of course there’s a MANIFEST.MF and a plugin.xml.
- Each SWT View (from src-folder …views) has a corresponding redview model (from <projectroot>/views) and there must be extensions defined in the plugin.xml. More information on this you’ll find here.
Hint: all these examples are TECHNICAL examples, no UI- Design examples – we’re developers and software architects, but no visual designers 😉 The only goal of these examples is to help you to understand the technology.
- create a View with Databinding from scratch
- customizing redview: extending the metamodel – examples
There will be more examples from red-open project if you want to integrate redView into a model-driven workflow and generate the View models from your domain models. But before trying the red-open examples you should work through the examples described here at redView project. You should also take a look at screenshots and screencasts (videos) to understand the concept of redView.
If you have questions feel free to ask at the Forum or ask for professional support.