Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [riena-dev] FacadeFactory - How it works

Hi Elias,

> -----Ursprüngliche Nachricht-----
> Von: riena-dev-bounces@xxxxxxxxxxx [mailto:riena-dev-
> bounces@xxxxxxxxxxx] Im Auftrag von Elias Volanakis
> Gesendet: Donnerstag, 12. August 2010 22:49
> An: Riena Developers list
> Betreff: [riena-dev] FacadeFactory - How it works
>
> Hi Stefan,
>
> first: thanks for the tests.

Unfortunatly, they fail when run as a pluging test unless the FacadeFactory is made public :-(
I just run them as simple unit test!

>
> Regarding your proposal, I've to disagree.
>
> The facade factory only works because of some careful bundle /
> classpath engineering on my part. It is crafted for one particular use
> - picking between RWT / RWT. I'll spill the tricks below. I don't see
> any way of making this generic -- however the pattern could be reused
> in other contexts.
>
> Here are the prerequisites:
>
> - Three bundles are necessary. Two of them have different dependencies
> (swt vs rwt)
> - FacadeFactory and the facade implementations are in the same package
> in all three bundles
> - The .swt.rap and swt.rcp bundles are buddies to o.e.r.ui.swt so that
> the FacadeFactory has access to their classpaths and can instantiante
> classes from the common package.
> - There is a naming convention <FacadeName>RAP <FacadeName>RCP
>
> There are the tricks, but I don't think it can be made generic.

Yes, that´s right.

>
> If you need a generic mechanism, I would rather look into OSGi
> services (an alternative way of accomplishing this). As you know one
> service can have multiple implementations.

Yes, something like this!

>
> Hope this helps,
> Elias.

Tschüß,
Stefan

>
> On Thu, Aug 12, 2010 at 6:20 AM, Liebig, Stefan
> <Stefan.Liebig@xxxxxxxxxxxx> wrote:
> > Hi Elias,
> >
> > This is really great! The RAPified Riena app is really impressive.
> >
> > As far as I understand there are several facades which handle the
> RAP/RCP specific implementations. Those facades use the FacadeFactory
> to create the specifc facades.
> > Currently, the FacadeFactory is in the bundle
> org.eclipse.riena.ui.swt because it has a dependency to SWT (it uses
> SWT.getPlatform() to discriminate). This is the only "thing" that stops
> it from being moved e.g. to riena.core.
> > I assume that we could use the FacadeFactory also for non-UI stuff
> like the navigation model. So, another home for it would be nice.
> > Within riena.core we have a ContainerModel that can tell whether the
> code is running on the server or the client side. I wonder whether we
> could just use this (or some other mechanism) to discriminate between
> RAP/RCP?
> >
> > What do you think?
> >
> > Tschüß,
> > Stefan
>
> --
> Elias Volanakis | Technical Lead | http://eclipsesource.com
> elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | @evolanakis
> _______________________________________________
> riena-dev mailing list
> riena-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/riena-dev

-------------------------------------------------------------
compeople AG
Untermainanlage 8
60329 Frankfurt/Main
fon: +49 (0) 69 / 27 22 18 0
fax: +49 (0) 69 / 27 22 18 22
web: http://www.compeople.de/

Vorstand: Jürgen Wiesmaier
Aufsichtsratsvorsitzender: Christian Glanz

Sitz der Gesellschaft: Frankfurt/Main
Handelsregister Frankfurt HRB 56759
Ust-Ident.-Nr: DE207665352
-------------------------------------------------------------



Back to the top