Monday, December 20, 2010

Eclipse RAP Single Sourcing Awesomeness (with EMF Editor and Teneo+Hibernate as bonus!)

Eclipse Rich Client Platform has come a looong way since it was first introduced (and used in Eclipse IDE). The new Eclipse RAP (Rich Application Platform) is also becoming more and more attractive for deploying existing or new Eclipse RCP applications to the web.

One of my the projects I'm working on is developed on top of Eclipse RCP. It uses additional plugins such as EMF (Eclipse Modeling Framework) including EMF Editor UI, Teneo (EMF Persistence for Relational Databases), and Hibernate.

After some work, I managed to run the whole application on both Eclipse RCP (desktop) and Eclipse RAP (web-based). See the screenshots for proof.

Thanks to the recently released EMF Support for RAP I don't have to let go any of the nice EMF generated editor UIs for the web-based RAP version.

What's amazing is how little the work I have to do to port the RCP app to RAP.

The changes I needed to do is not changing code, but juggling dependencies to plugins and/or packages. Also creating a few platform-specific plugins (different based on whether I deploy on RCP or RAP).

It boils down to:

  1. Do not hard-depend on org.eclipse.ui plugin. Either depend on both org.eclipse.ui and org.eclipse.rap.ui plugins as optional dependencies, or import the specific packages. I prefer optional dependency on both plugins because it's much faster and easier.
  2. Be aware that there will be multiple sessions at once.
  3. 2D Drawing functions are not yet fully available. (and I guess will never be available)

See the Eclipse RAP FAQ on Single Sourcing for more information.

14 comments:

  1. Hi Hendy,

    thanks for this nice report!

    With regards to graphics support, what exactly are you missing? The RAP team is still improving the GraphicsContext implementation, and even work on Draw2D/GEF has started in the RAP Incubator.

    Best regards, Ralf

    ReplyDelete
  2. @Ralf :

    Thanks for reading and commenting my article! (wow! a RAP committer is reading AND commenting on my blog, I feel so honored :)

    Actually I don't mind much about the 2D/GEF features... probably because I don't use it yet. I'm quite content (though 'quite' is an understatement really, I should say 'extremely') with the standard EMF editors already available on RAP.

    Though GEF/GMF is a plus. I'm sure someday we'll see Graphiti and Papyrus editors running on RAP, without any browser plugins (i.e. pure HTML5). Yahoo Pipes proved the technology is possible and practical. So what's left for us is the real work. ;-)

    What I'm *really* missing is:
    1. the Console view (org.eclipse.ui.console)
    2. Navigator view

    RAP's integration with Firebug/Chrome AJAX console is awesome though! But I'd love to have the traditional Console view available too, it's such a versatile tool.

    ReplyDelete
  3. biasa aja ah, gw aja gak pernah denger nama Ralf Sternberg

    :-D

    ReplyDelete
  4. mas,ada sample source code aplikasi yang diatas ga?
    ntu diconvert ya dari rcp ke rap?
    ada ym nya mas?rencananya mo jadiin skripsi...mohon bimbingannya.

    salam
    dendy

    ReplyDelete
  5. @dendy no.

    utk sample RAP apps bisa coba2 samples dari http://www.eclipse.org/rap/

    ReplyDelete
  6. I will be therefore glad this internet point functions along with your report actually reduced the problem. Usually takes you high on which residence suggestions you

    RS Gold
    Buy RS Gold
    Cheap RS Gold
    Buy Cheap RS Gold
    RSGold
    Runescape Gold for Sale

    ReplyDelete
  7. Wow, this is beautiful. Imagine all the reading and writing you could do... Cold in the winter though.

    ReplyDelete
  8. Truly I do not thoughts much Buy Cheap RS Goldconcerning the 2D/GEF functions... most likely since I don't utilize it nevertheless. I am just very content material (however 'quite' is an understatement actually, I should declare 'extremely') with the common EMF publishers by now Sell Runescape Goldon RAP.

    ReplyDelete
  9. Welcome to mmoggg website to buy WoW Gold Kaufen, offer a lot, of course, Diablo 3 Gold or Cheap Diablo 3 Gold and RS Gold, to be purchased at any time, at any time shipment, and look forward to your visit!

    ReplyDelete
  10. First, you should know the geniuses because geniuses are highly important buy gw2 gold WOW Arena. Death Knight has three basic precedences, including guarding the healer, putting pressure on the other team and punishing the enemy team even when they make a mistake on cheap guild wars 2 gold.

    ReplyDelete
  11. With all the recognized world-wide Cheapest GW2 Gold release of Guild Conflicts a couple of approximately 48 hrs apart, try out actions and neighborhood strain inspections have provided many people the glance in the Diablo 3 Gold Farming they could be capable of count on once the entrances accessible and in addition video game goes live.

    ReplyDelete
  12. This comment has been removed by the author.

    ReplyDelete
  13. Nice article, thanks for the information. It's very complete information. I will bookmark for next reference
    jaring futsal | jaring golf | jaring pengaman proyek |
    jaring pengaman bangunan | jaring pengaman gedung
    http://www.jual-jaring.blogspot.com/
    http://www.agen-jaring.blogspot.com/
    http://www.pancasamudera-safetynet.blogspot.com/
    http://www.toko-jaring.blogspot.com/
    http://www.pusat-jaring.blogspot.com/
    http://jualjaringpengaman.blogspot.com/
    https://pancasamudera.wordpress.com/
    https://pasangjaringfutsal.wordpress.com/
    https://jualtambangmurah.wordpress.com/
    https://tokojaring.wordpress.com/
    https://jualjaringfutsal.wordpress.com/
    https://jaringfutsal.wordpress.com/


    ReplyDelete
  14. RAP's integration with Firebug/Chrome AJAX console is awesome though! But I'd love to have the traditional Console view available too, it's such a versatile tool.
    meizu pro 5
    meizu mx5
    xiaomi mi5

    ReplyDelete