Blog

Juno Eclipse Demo Camp 2012 @ Siemens in Munich

1

 

I am happy to announce the Juno Eclipse Demo Camp 2012 @ Siemens in Munich, Germany. Again, excellent speakers with interesting demos/talks will make this demo camp an Eclipse fest! Last year we had 170 attendees, this is the mark to top this year. The latest event details and agenda you always find at the Wiki page and the registration page.

Location
Location: Siemens AG, Forum 1, Otto-Hahn-Ring 6, 81739 Munich, Germany
PDF with directions: Siemens Munich MCH_P campus
Google Maps: Siemens Munich MCH_P campus

Date and Time
Thursday, June 21, 2012 from 5:00 PM – 11:00 PM (GMT+0100)

Agenda (Under construction, may change, please stay tuned…)

  • 05:00pm – 05:30pm Meet and Greet
  • 05:30pm – 05:40pm Welcome/Intro
    Ralph Müller (Eclipse Foundation) + Kai Tödter (Siemens Corporate Technology)
  • 05:40pm – 06:00pm JavaFX/Swing Renderers for the Eclipse 4 Application Platform,
    Kai Tödter (Siemens Corporate Technology)
  • 06:00pm – 06:20pm e(fx)clipse: JavaFX for Eclipse
    Tom Schindl (BestSolution.at)
  • 06:20pm – 06:50pm Xtext and Xtend: What’s Hot and New
    Sebastian Zarnekow (itemis)
  • 06:50pm – 07:10pm BREAK (with beer, soft drinks, coffee & snacks)
  • 07:10pm – 07:30pm Applause 2 (Working title, might change)
    Peter Friese (Zühlke)
  • 07:30pm – 07:50pm Git + Mylyn (Working title, might change)
    Benjamin Muskalla (Tasktop)
  • 07:50pm – 08:10pm EMFstore – Released
    Maximilian Kögel (EclipseSource)
  • 08:10pm – 08:30pm FastFix – Monitoring Control for Remote Software Maintenance
    Tobias Röhm (TU München)
  • 08:30pm – 08:50pm BREAK (with beer, soft drinks, coffee & snacks)
  • 08:50pm – 09:10pm No Black Magic: Push info to the Browser with redVoodo
    Ekkehard “Ekke” Gentz (Freelancer)
  • 09:10pm – 09:30pm Writing Native Mobile Apps with RAP
    Ralf Sternberg (EclipseSource)
  • 09:30pm – 09:50pm Jubula (Working Title, might change)
    Speaker from Bredex
  • 09:50pm – 10:10pm EMF Client Platform – Revolutions
    Jonas Helming (EclipseSource) — Probably with Kinect Fun!
  • 10.10pm – 12:00pm Networking (with beer, soft drinks and warm buffet)

Registration
At democampmunich2012.eventbrite.com you find the current list of attendees and you can register. Registration is free: beer, soft drinks and (warm) buffet is sponsored by Siemens AG and EclipseSource! Let’s make this demo camp great!

See you all in Munich…

Kai

You find me on Twitter and Google+.

OSGi Vaadin Demo now on GitHub

0

After EclipseCon I made some changes in my dynamic OSGI Vaadin demo, and I decided to put it on GitHub. You find it here: https://github.com/toedter/osgi-vaadin-demo

I added a progress indicator with polling (Thx Jani Laakso). Now starting and stopping bundles on the server will automatically be reflected in the client. I will talk about the demo at the JAX conference next week.

CU at JAX 2012!

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

EclipseCon: Here I come (Update)

0

EclipseCon is one of my favorite conferences. Tomorrow morning I’ll take a flight from Munich to Dulles, US. I’ll plan to be at the EclipseCon location around 5:00 pm.
I am going to give 2 presentations:

  • Monday: Eclipse 4 Application Platform Tutorial. Here you will learn all the important fundamentals of the Eclipse 4 Application Platform. After the tutorial you will be able to start with Eclipse 4 based rich client development. Update: Got already 121 registrations 🙂
  • Wednesday: Dynamic RIAs with OSGi and Vaadin. Here you will learn how to create dynamic and modular UIs for Web Applications that use server-side OSGi and Vaadin.

I am also planning to have a BOF together with Tom Schindl (and hopefully other e4 committers) to discuss the future of the Eclipse Application Platform regarding rendering engines for JavaFX (and Swing?).

If anyone wants to visit Washington DC on Sunday, please let me know.

I am looking forward to meeting you at EclipseCon!

 

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

Eclipse 4 got some UI Love

12

I am a UI guy, meaning UI is very important to me. Both in terms of usability as well as in terms of design. I have to admit that I am not the biggest fan of the new Eclipse 4 design, but I want to point out that I do see improvements from 4.2 M5 to 4.2 M6. Firstly, the splash screen. I did not like the original Eclipse 4 splash screen at all (no offense). The current splash screen looks much better imho. My personal color reception has some small issues with the (azure blue) background in conjunction with the (more purple) Eclipse logo but overall I like the new splash screen.

Here is the old 4.2 M5 splash screen:

and here is the new 4.2 M6 splash screen:

You might think: Who cares about the splash screen? Actually many people do care because that’s the first thing you see when you launch a new software product. I you like it and find it great, then it is more likely that you also like the actual software.

Another improvement is the enabling and disabling of some icons. The picture below shows 4.2 M5. The disabled save and save-all icons are rendered monochrome.

In 4.2 M6 it looks much better:

You might also notice that now the Package Explorer tab got a gradient background. These are little things but In my point of view they sum up. And all these little things make the overall experience more delightful and give the product a more professional touch.

My last question  is: Do you think I am a nitpicker or do you agree with me?

CU at EclipseCon!

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

Eclipse 4 Talk for Java User Group Munich

2

Today (March 12th 2012) I am going to give a talk for the Java User Group Munich.

Title: “Das Eclipse 4.x Rendering Konzept: Trennung von Application Model und UI Toolkit
Language: German
When: Monday, March 12th, 7:00pm
Where: mgm technology partners – Frankfurter Ring 105a – D-80807 München – 3. OG
More info: http://jugm.de/index.htm

CU there!

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

JavaFX 2.1 Beta: Improved Font Rendering

14

In the current JavaFX 2.1 Beta preview (Build 12), the font rendering on LCD screens improved a lot due to sub-pixel font anti-aliasing. Here are 2 screen shots from my Eclipse 4 JavaFX rendering demo:

JavaFX 2.0.2 (without sub-pixel font anti-aliasing):

JavaFX 2.1 Beta Build 12 (with sub-pixel font anti-aliasing):

I really like this improvement!

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

Eclipse 4.x talk for JUG Ostfalen

0

If you are interested in the Eclipse 4.x Application Platform and happen to live close to Braunschweig (Germany), join my talk for the JUG-Ostfalen:

Was ist neu bei der Eclipse Rich Client Platform 4.x?

When: Friday, January 20th, 7:00 pm
Where: CKC Braunschweig, Am Alten Bahnhof 13, 38122 Braunschweig
Language: German

After my session there is another talk: “Agile Review” (Eclipse Plugin) by
Malte Brunnlieb, Philipp Diebold, Thilo Rauch und Peter Reuter.

The event is free: Registration and info is here: http://eclipse4.eventbrite.com/

Would be great to see you there!

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

GWT Contacts Demo with MVP and Testing

2

On Monday, January 23th, I am going to talk about some cool features of the Google Web Toolkit (GWT) at the OOP 2012 conference in Munich. To have a live demo for discussion, I implemented a GWT port of my Eclipse 4 Contacts Demo. In this blog post, I talk a bit about my experience with Google’s MVP (Model View Presenter) approach, including activities, places and event bus. Furthermore about UIBinder in combination with GWT Designer and Presenter testing using Mockito.

You can find the latest source of the demo at https://github.com/toedter/gwt-mvp-contacts. Here is a screen shot, as you see, I did not focus on nice design. Click on the image to see it in original size.

Model View Presenter (MVP)

The Model View Presenter Pattern has different flavors: “Passive View” and “Supervising controller“. In Passive View there is no dependency between model and view, Supervising Controller is not so strict and allows e.g. data binding from model to view. In GWT, presenters are represented by Activities, views are implemented by GWT UI classes. There are 2 common ways to define the binding between views and presenters: Either the presenter defines a display interface that the view has to implement, or the view interface provides a presenter interface. The latter one is often used in GWT when the UI is created with UIBinder, because it makes it easier for the view to call back to his presenter. In the contacts demo, the view interface for the list view looks like

public interface IContactListView extends IsWidget, AcceptsOneWidget {
  public interface Presenter {
    void goTo(Place place);
    void select(int index);
    void select(Contact contact);
  }

  void setPresenter(Presenter presenter);
  void selectInitialContact(Contact contact);
  void initialize(List contacts);
}

As you see, for laziness reasons I don’t use “Passive View” since I pass a domain object (Contact) to the view. A good introduction into GWT MVP you find at the GWT Web site. If you have a more application-like layout with kind of toolbar and several display regions, you might think you will need nested presenters/activities, but you don’t have to nest them. Thomas Broyer wrote a nice article about this issue, and I used his approach in my demo.

UIBinder and GWT Designer

UIBinder splits a UI component into a Java part and an XML/CSS part. That makes it easier to separate concerns and helps designers and developers working together. GWT Designer is a nice and free GWT UI Editor for Eclipse. One feature is the automatic creation of MPV related infrastructure, like corresponding activities and places. In the demo I have several implementations of the list view and the details view. You can change them by altering the ClientFactory implementation. The screen shot below shows a small details view example in GWT Designer, klick on it to see the image in original size.

Presenter Testing with mockito

One advantage of MVP based approaches is the good testability. For that purpose I wrote a few exemplary tests using mockito as Mocking framework. The reason for using plain JUnit tests together with mocks is mostly speed. With mockito it is pretty easy to mock all the involved GWT MVP infrastructure like activities, places, event bus and even a GWT Remote Procedure Call. Here is an example for a presenter test:

@RunWith(MockitoJUnitRunner.class)
public class ContactListActivityTest {

	@Mock
	private IClientFactory clientFactoryMock;

	@Mock
	private PlaceController placeControllerMock;

	@Mock
	private IContactListView contactListViewMock;

	@Mock
	private AcceptsOneWidget acceptsOneWidgetMock;

	@Mock
	private IContactServiceAsync contactServiceAsyncMock;

	@Mock
	private EventBus eventBusMock;

	private List contacts;
	private Contact contact1;
	private Contact contact2;

	@SuppressWarnings("unchecked")
	@Before
	public void setUp() throws Exception {
		when(clientFactoryMock.getPlaceController()).thenReturn(placeControllerMock);
		when(clientFactoryMock.getContactListView()).thenReturn(contactListViewMock);
		when(clientFactoryMock.getContactService()).thenReturn(contactServiceAsyncMock);

		// Mock a GWT RPC
		Answer answer = new Answer() {
			@Override
			public Void answer(InvocationOnMock invocation) {
				Object[] args = invocation.getArguments();
				AsyncCallback> asyncCallback = (AsyncCallback>) args[0];
				contact1 = new Contact();
				contact1.setFirstName("Kai");
				contact1.setLastName("Toedter");
				contact1.setEmail("kai@toedter.com");
				contact2 = new Contact();
				contact2.setFirstName("Kai2");
				contact2.setLastName("Toedter2");
				contact2.setEmail("kai2@toedter.com");
				final List contacts2 = new ArrayList();
				contacts2.add(contact1);
				contacts2.add(contact2);
				asyncCallback.onSuccess(contacts2);
				return null;
			}
		};

		doAnswer(answer).when(contactServiceAsyncMock).
                getAllContacts(any(AsyncCallback.class));

		// set the real contacts object, when clientFactory.setContacts is
		// called
		Answer setContactsAnswer = new Answer() {
			@Override
			public Void answer(InvocationOnMock invocation) throws Throwable {
				contacts = (List) invocation.getArguments()[0];
				// System.out.println("answer() to setContacts(): " + contacts);
				return null;
			}
		};

		doAnswer(setContactsAnswer).when(clientFactoryMock).setContacts(any(List.class));

		// Return the real contacts object, when clientFactory.getContacts is
		// called
		Answer> getContactsAnswer = new Answer>() {
			@Override
			public List answer(InvocationOnMock invocation) throws Throwable {
				return contacts;
			}
		};

		doAnswer(getContactsAnswer).when(clientFactoryMock).getContacts();
	}

	@Test
	public void testGotoPlace() {
		ContactListActivity contactListActivity = 
                new ContactListActivity(new ContactPlace(null), clientFactoryMock);

		ContactPlace contactPlace = new ContactPlace("kai@toedter.com");
		contactListActivity.goTo(contactPlace);

		verify(placeControllerMock).goTo(contactPlace);
	}

	@Test
	public void testStartWithEmptyToken() {
		clientFactoryMock.setContacts(null); // force RCP
		ContactListActivity contactListActivity = 
                   new ContactListActivity(new ContactPlace(""), clientFactoryMock);
		contactListActivity.start(acceptsOneWidgetMock, eventBusMock);

		verify(contactListViewMock).setPresenter(contactListActivity);
		verify(contactListViewMock).initialize(contacts);
	}

	@Test
	public void testStartWithToken() {
		String token = "kai@toedter.com";
		clientFactoryMock.setContacts(null); // force RCP

		ContactListActivity contactListActivity = 
                new ContactListActivity(new ContactPlace(token), clientFactoryMock);
		contactListActivity.start(acceptsOneWidgetMock, eventBusMock);

		verify(contactListViewMock).setPresenter(contactListActivity);
		verify(contactListViewMock).initialize(contacts);
		verify(contactListViewMock).selectInitialContact(contact1);
		verify(eventBusMock).fireEvent(any(ContactViewEvent.class));
	}

	@Test
	public void testMayStop() {
		ContactListActivity contactListActivity = 
                new ContactListActivity(new ContactPlace(null), clientFactoryMock);
		contactListActivity.start(acceptsOneWidgetMock, eventBusMock);
		contactListActivity.mayStop();

		verify(contactListViewMock).setPresenter(null);
	}

	@Test
	public void clientFactoryTest() {
		List testList = new ArrayList();
		clientFactoryMock.setContacts(testList);
		Assert.assertNotNull(clientFactoryMock.getContacts());
	}
}

If you are interested in above stuff and happen to be in Munich on January 23th 2012, join my Night School, 6:30pm at the OOP 2012.

Have Fun!

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

My Upcoming Events & Sessions

2

In the next months I am going to give sessions/trainings at several conferences and other events, mostly Eclipse related. I’d be happy to meet you there.

January 20th, 7:00 pm (free event):
Java User Group Ostfalen, Braunschweig, Germany:
Was ist neu bei der Eclipse Rich Client Platform 4.x?“,

January 23th, 6:30 pm:
OOP 2012, Munich, Germany:
Google Web Toolkit: Ausgewählte coole Features“,

January 26th, 11:00 am (free event):
Oracle Developer Day, Munich, Germany:
JavaFX 2.0 Integration with the Eclipse 4.x Application Platform“,

March 26th, 1:00 pm:
EclipseCon 2012, Reston, USA:
Creating Rich Clients with Eclipse RCP 4.x“,
3 hour tutorial

March 28th, 1:30 pm:
EclipseCon 2012, Reston, USA:
Dynamic RIAs with OSGi and Vaadin“,

April 16th – 19th:
Jax 2012, Mainz, Germany:
“Dynamische RIAs mit Equinox und Vaadin”,

April 20th, 9:00 am:
Jax 2012, Mainz, Germany:
Rich-Client-Entwicklung mit Eclipse RCP 4.x“,

April 23th, 9:00 am:
3 days training in Munich, Germany:
Eclipse Rich Client Platform 3.x: Fundamentals“,

April 26th, 9:00 am:
1 day training in Munich, Germany:
Eclipse Rich Client Platform 3.x: Advanced“,

April 27th, 9:00 am:
1 day training in Munich, Germany:
Rich Client Development mit der Eclipse 4 Application Platform“,

Have Fun!

Kai

You find me on Twitter and Google+.

JavaFX 2.0, Swing & SWT Renderers for the Eclipse 4.x Application Platform

27

I wish you all a Happy New Year!

During the last weeks I had a bit of spare time and started experimenting with new rendering engines for the Eclipse 4.x Application Platform. Based on my experiences with  JavaFX 2.0 renderers in e(fx)clipse (by Tom Schindl from BestSolution.at, great JavaFX support for Eclipse), I started an experiment: Would it be possible to create a generic rendering engine that only has dependencies to the Eclipse 4.x workbench model and then delegate all UI toolkit specific logic to the UI toolkit specific renderers?

When I took a deep look at the projects org.eclipse.e4.ui.workbench.swt, org.eclipse.e4.ui.workbench.renderers.swt and org.eclipse.e4.ui.workbench.addons.swt, I figured out that most of the workbench model related code could be useful for other renderes, too. But there is a very strong coupling to SWT, so it is not possible to reuse any code without copying it. My approach is a simple generic rendering engine, that also provides a generic e4 application. Then, for every supported UI toolkit, just a derived application and new renderers have to be implemented. The basic bahavior is driven only by model changes, the renderes have to react on those changes. The engine also takes care of letting each renderer do the binding from the specific UI toolkit back to the model.

Currently I have implemented simple rendering engines for JavaFX 2.0, Swing, and SWT. I also started the same approach with a generic MinMax model addon. The addon gets the additions needed to adapt to a specific UI toolkit through DI.

I reimplemented my e4 contacts demo and split it into a generic project that contains the workbench model, the domain model and all parts, which are not UI toolkit specific. Then I created a UI toolkit specific implementation for JavaFX 2.0, Swing and SWT. The Details and the Table widgets I had to implement with the UI toolkits natively. Here are a few screen shots of the results, click on them to see the images in original size.

JavaFX 2.0 based contacts demo with 3 different CSS based themes:

     

Swing based contacts demo with Nimbus and Napkin Look & Feel (Napkin is my favorite Look & Feel to show prototypes to the management :)):

  

SWT based contacts demo (my new rendering engine) with 2 different CSS based themes:

  

The current alpha version 0.0.1 you find at GitHub: https://github.com/toedter/e4-rendering

If you want to run the JavaFX 2.0 Contacts Demo, you also need to have the latest version (0.0.11 or better) of e(fx)clipse installed. The easiest way is to download the pre-configured Eclipse 4.x SDK from http://efxclipse.org/install.html#the-lazy-ones and then clone the above git repository.

Right now this is just a proof of concept, only very basic stuff is implemented. But I am planning to enhance the engine and UI toolkit specific renderers until EclipseCon 2012. If there is enough interest in the community, I would love to organize a BOF at EclipseCon to discuss the pros and cons of this approach.

What do you think?

Stay tuned!

Kai

You find me on Twitter and Google+.
If you are interested in in-house Eclipse RCP 3.x or 4.x training,
please contact me…

Page 3 of 12«12345»10...Last »