[forge-dev] automatic dependency detection problem
fruehbeck at aon.at
Sat Feb 11 22:53:31 EST 2012
I understand absolutely, that you didn't want to open an _impl_.
It is important to know, that it's not my fault, that it's not working.
I do (not) think that your faces plugin is limited:
No: I am really impressed by the power of the plugin, the integration of
Metawidget is a great showcase!
Yes: when trying to apply Forge to an existing persistence model I was
confronted with some interesting questions :)
After having applied the reverse engineer to my database, I found that
the legacy primary keys were not picked up by the system.
At first I thought, that some minor changes to the templates and the
widgets would suffice, but then I realized, that the changes would be
too much distributed all over the impl.
The options I reviewed so far:
- redesign the DB: not so bad, but more than one project use the
entities - very bad
- accept the (preferred) generation of "id" strings an remap the
generated ID via JPA-annotations to the physical XXID
Downside: a lot of legacy code (e.g. HQL statements) to refactor, very
few tests :/
- use the PK-names from legacy persistence model so I can reuse legacy code
a) when importing the legacy model, the scaffold will not use my PK, but
render the PK as normal fields
b) when changing only the templates and some widgets, the application
will break between view and bean layer
The beauty of Forge is the possibility to continuously use it to develop
In my case it would be kind of generate-repair-use-cycle (which is not
so much fun) mainly because of the primary key handling.
So I decided to investigate the situation in more detail and I think
that I found a kinda viable solution by implementing some changes to the
inspectors, widgets, templates ....
I am sure you know what I mean, you did the really big part, isn't it :-)
That's where I am now and I am really grateful for the insights I got
into the inner workings of this bunch of brand new technology.
So I decided to start a new plugin project based on the faces scaffold
as close as possible, being able to follow your development without
interrupting your progress. I don't know if and when I can spend enough
time to get it working.
In short: after having analyzed the problem I think that the primary key
handling is to be fixed.
Forge is a great tool and I think it's worth spending some time on this.
I have started to do so, and I would be very grateful if you could take
the time and have a look at it - when it works :-)
Any remarks, hints appreciated,
> We intentionally block this module because there should not be direct
> access to the implementation classes. I know that the current Scaffold API
> is very limited, but I think that in most cases, we can add SPIs and
> extension points in order to give you access to what you need.
> We can try to figure out a non-impl specific way to do this depending on
> what you need. Otherwise we could consider exposing the impl, but I think
> that should be a last resort.
> What is it that you are trying to access in the impl, and why?
More information about the forge-dev