Monday, October 15th, 2007

Ajax meet OSGi: Expanding Universes Collide with Eclipse RAP 1.0

Category: Java, JavaScript, Toolkit

<p>Ben and I have been surprised at how the universe of Ajax continues to expand. This redshift which has taken it past the browser onto the phone, the Wii, and the server is amazing.

Another technology that has done a similar thing is OSGi in the Java space. It started as a component model for devices, but has since grown to the desktop with Eclipse, and now the server.

To ties these together, the Eclipse Foundation has announced Eclipse Rich Ajax Platform (RAP) 1.0:

RAP 1.0 is the first Ajax platform that allows developers to create Rich Internet Applications (RIA) using the Eclipse component model, based on the OSGi standard. OSGi is a service-oriented, component-based environment that promotes the interoperability of applications and services. Organizations using RAP are now able to create Ajax and RIA applications that are component-based and integrate into existing enterprise systems.

RAP 1.0 includes features well-suited for enterprises that are building a large number of new applications based on Ajax and RIA technologies. These features include:

  • The ability to create and deploy RIA or RCP applications from the same Java code base, allowing organizations the flexibility to create browser-based RIA application or desktop-based rich client applications.
  • Support for creating Ajax applications based on the OSGi component model.
  • Java development tools that tightly integrate with the Eclipse platform and allow developers to quickly develop, test, debug and deploy RIA applications.
  • A complete set of frameworks for creating Ajax applications that support scalable user interfaces, complex widgets, databinding and loose coupling for UI elements.

Jochen Krause sat down with me to chat a little about what RAP is about. He talked about how the target audience for RAP is Java developers in the enterprise setting. If you know RCP/SWT and you want to develop rich browser applications, you are set. Jochen says that his company has seen that they can share the same base of code (~80%) for products that deploy to the web and the desktop. You get the benefit of using the same workbench and extension points that you know and love from RCP.

RAP is very different to something like GWT. RAP runs the logic on the server, and emits JavaScript for the controls at runtime (as opposed to compile-time). An implementation of SWT runs on the server and people can extend your views and perspectives to add functionality.

Jochen also thought that JSF wasn’t as well suited to Ajax development due to its history as a document-centric technology. Many in the community would disagree with that (just ask the Seam folk!).

When developing your RAP applications, forget about the web a little. You can’t style things with CSS as their needs to be a stricter mapping between the Java and JavaScript components. They do have a properties system that is similar to CSS in some ways.

Tooling is a definite benefit. You get all of the Eclipse tooling joy, and there is future work being done by many companies such as NEC to give you a rich DB -> client UI experience. This isn’t done just for RAP, but for Eclipse in general, and RAP gets to piggy back on the work.

All in all it is interesting to see what happens with the marriage of OSGi and Ajax!

Related Content:

Posted by Dion Almaer at 7:00 am
9 Comments

+++--
3.4 rating from 29 votes

9 Comments »

Comments feed TrackBack URI

Salute to RAP from Java2Script team for its 1.0 release.

Java2Script, now also 1.0.0, is providing pure JavaScript version of Eclipse SWT library for browser not server side. Java2Script has the same goal with RAP, to provide ways for developers to share the same base of code for products that deploy to the web and the desktop.

OSGi may be an interesting specs. But what really interests me is that RAP is for Java developers in the enterprise setting. Yes, we all know that enterprise business matters. And for further thoughts, I find myself just wondering what kind of businesses RAP is pointing at. And this is a tough question for Java2Script too.

From my knowledge of other Eclipse projects, such as ATF, GEF, RSE, they all get their dedicated fields and goals very clear. When under comparisons, it seems that RAP is a little vague on fields and goals. RAP’s demos tell something about its goals but still not in a clear way ( Well, RAP’s demos are not quite fast. And actually, Java2Script’s demo is very slow too ).

It is also interesting to see that RAP and Java2Script have 2 very similar demos: RAP’s RWT Control Demo and Java2Script’s SWT Control Examples.

BTW: Java2Script do considers providing pure JavaScript JFace and RCP library besides existed JavaScript SWT library, but in near futures.

Comment by Zhou Renjian — October 15, 2007

i am also sure, that osgi and ajax both have a big future together. do you have some examples showing Eclipse RAP technology? would be very interesting

Comment by matthias — October 15, 2007

Hi Java2Script team,
salute back for your 1.0 release. It is great to see Eclipse technology adopted in so many open source projects!
Fur us, OSGi is more than an interesting spec – it is what makes Eclipse work. SWT is powerful widget toolkit, but Equinox, the OSGi reference implementation of Eclipse makes the difference when it comes to Eclipse as a platform. The platform has proved to be very powerful as a tooling platform (based on OSGi) and is increasingly successful as an application platform. This is not only on the client, but also on the server (many of the java app servers are using OSGi as their kernel). With RAP we are just complementing the existing Eclipse technology and try to make Equinox a more complete platform for all sort of applications.

Comment by Jochen Krause — October 15, 2007

@ Jochen: Let’s say I’ve standardized on a specific client-side Ajax library and I want to use RAP. Is that possible? Can I use Dojo, Ext or Backbase as the client-library? Or doesn’t that make sense because RAD handles client-side events on the server and the client-side engine only provides some widgets? Thanks, Jep

Comment by Jep Castelein — October 15, 2007

Let’s see – RAP supports SWT, doesn’t support css – what’s Ajax-ian about that? This seems like a Borg-like attempt to assimilate Ajax into the heavyweight Java development environment that is Eclipse. I posted my response here:

http://www.keeneview.com/2007/10/ajax-needs-eclipse-like-hole-in-head.html

Comment by c keene — October 15, 2007

A nice getting started screencast on RAP:
http://www.thescreencast.com/2007/10/first-look-at-eclipse-rich-ajax.html

Comment by David — October 16, 2007

When builders first started using steel, they built brick buildings that had steel supports. That incremental approach made sense for existing builders, but it came nowhere near utilizing steel to its fullest potential.

In a similar way, Silverlight, Apollo and RAP are trying to make a rich web interface look just like a PC client interface. There is nothing wrong with this, but it is a way to make the future look like the past. One thing we know for sure about the future is that it rarely looks like the past….

Comment by c keene — October 16, 2007

Hi Jep, if you have standardized on a JavaScript framework (that is not qooxdoo) it is difficult to integrate with RAP. You can absolutely add existing JS into RAP as components, but combining frameworks is probably not worth the effort. If you are a Java shop I would however recommend having a look at OSGi (Equinox), as it is a great way to componentize your backend.

Comment by Jochen Krause — October 18, 2007

The building analogy is really great! If you want to build a really fancy building go for steel and glass, but you need to be able to afford it, and have a team with the right skills (no bricklayers). Tools will only help so much. Most other buildings are still build “conventionally”. Conventional buildings are now much easier to build with the combination of brick (or wood or concrete) and steel. Throwing the “old stuff” away is often not the best option.
It is great that you want to enable web developers to build the best ajax apps, but I can’t see anything wrong in enabling java developers to do the same.

Comment by Jochen Krause — October 18, 2007

Leave a comment

You must be logged in to post a comment.