You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Jörn Nettingsmeier <ne...@apache.org> on 2007/02/23 14:09:38 UTC
what are module dependencies?
how do we use the <depends/> relation in module.xml?
does it only list java dependencies that will prevent compilation if
unsatisfied, or also functional dependencies where stuff will break at
runtime?
if the former, i think the dependency of default/defaultusecases on
sitemanagement is erroneous. can anyone confirm that?
if the latter, workflow should depend on sitemanagement, because it
provides jxtemplates that call sitemanagement usecases. that would also
mean we have a circular dependency, because sitemanagement depends on
workflow already.
waiting for enlightenment,
jörn
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: what are module dependencies?
Posted by Andreas Hartmann <an...@apache.org>.
Jörn Nettingsmeier schrieb:
> how do we use the <depends/> relation in module.xml?
> does it only list java dependencies that will prevent compilation if
> unsatisfied,
Yes.
> or also functional dependencies where stuff will break at runtime?
No. This would be nice, but I guess it's almost impossible to
implement.
> if the former, i think the dependency of default/defaultusecases on
> sitemanagement is erroneous. can anyone confirm that?
Maybe the dependency is obsolete.
Does it compile without the dependency?
> if the latter, workflow should depend on sitemanagement, because it
> provides jxtemplates that call sitemanagement usecases. that would also
> mean we have a circular dependency, because sitemanagement depends on
> workflow already.
Hmm, maybe some templates are in the wrong places.
I found it very hard to modularize some things without a total
redesign of some concepts. There will be some tradeoffs in the
codebase, I don't think we can achieve a perfect modularization
in 1.4. But please correct me if I'm wrong :)
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: what are module dependencies?
Posted by Joern Nettingsmeier <ne...@folkwang-hochschule.de>.
Andreas Hartmann wrote:
> Joern Nettingsmeier schrieb:
>> by the way, this issue is a perfect example of why it is preferrable to
>> first *document* any convention and then implementing it.
>
> Well, it is generally very hard to specify first and implement later.
> Most specifications are built based on real products which were
> developed over many years.
i disagree. i'm not talking about grand schemes like xquery or xhtml2,
but about code layout and encapsulation.
if you do refactoring work, you have a certain idea in mind, which
sometimes is obvious and sometimes is not :)
so it would be really helpful if every committer who does some cleanup
or tries new ways of implementing things tosses out a small readme so
that people can follow the lead and not mess things up with old habits.
put yourself in my shoes: i still know very little about lenya
internals. i want to add my own code, and i want to do it in a clean,
maintainable and well-modularized fashion that is consistent with
current best practice, plus i want it to be correct. how am i to learn
about that if there's loads of legacy code and loads of really good
code, but i can't tell which is which, and best practices are not
documented?
take locking: some editors don't lock at all (the wyona module didn't),
some lock the current node, some lock a whole bunch of nodes.
if somebody who knows what he's doing just added a smallish comment to
their code saying "this is how it's done, because ....", everything
would be fine and dandy.
>> frankly the lenya codebase is not very good in sticking to its own
>> conventions,
>
> Yes, as soon as they proved useful (see above) ...
even if a defined "best practise" turns out to be crap, it's a lot
better than having none, because moving from a bad but constitently used
practice to a good practice is a whole lot easier that starting with no
common ground at all.
>> and it's by a huge margin the most difficult-to-learn
>> project i have ever worked with, because you can't learn from the code
>> since the code often does it wrong.
>
> I don't think its that bad. We have quite a lot of complexity and
> different technologies, so the learning curve is steep.
> One problem is that there are often many ways to do something,
> and that people have different "best practises" depending on their
> preferences and needs. No idea if we can do something about that.
simple: agree on the one true way and hit everybody on the head who does
not comply.
i know that's a little far-out, but often when somebody complains about
lenya not working, people keep saying it's a "framework", not really a
end-user application.
a framework should be so consistent under the hood that people look at
it and know how to use it properly. that is a noble goal, but not
realistic. so the users need to be pointed at the good code to learn
from it, or (if there are no perfect bits of code), there must be
documentation stating how it should be.
>> there will always be legacy code in
>> any project and that's fine, but i have no chance in hell to find out
>> what is legacy and what is current best practice.
>
> How can we improve this?
like so?: http://svn.apache.org/viewvc?view=rev&revision=510954
let's comment every method that we implement, spell out the assumptions
and what it's supposed to do, and then people can look at it and verify
that it indeed does what it's supposed to do.
let's not commit placeholder stuff. if a field/method/whatever is
currently not needed, don't implement it. we have metric shitloads of
zombie code all over the place that nobody knows about anymore.
if a placeholder must go in, comment it.
let's meet f2f and talk about where we want lenya to go, and where we're
going to get the manpower to pull it off. let's make lenya fun to work
with.
don't implement a quick new feature if it leads to code duplication.
instead, abstract the current code properly. don't add the feature if
you're not willing to do that.
for lenya 2.0, let's start from scratch. i don't mean re-write the
entire thing, but copy-and-paste every single file. review it. ditch
what nobody understands anymore. don't drag a single line of legacy code
along.
start a new default publication from scratch.
reduce the number of different cocoon mechanisms used by the lenya core
(specifically, toss out xsp).
use the wiki to document what we're doing. as soon as it's set in stone,
add proper docs.
ditch the current publishing mechanism for the lenya website, or find
somebody who developers can throw website patches at - i have no time
and no incentive to learn the current method.
best,
jörn
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: what are module dependencies?
Posted by Andreas Hartmann <an...@apache.org>.
Joern Nettingsmeier schrieb:
> by the way, this issue is a perfect example of why it is preferrable to
> first *document* any convention and then implementing it.
Well, it is generally very hard to specify first and implement later.
Most specifications are built based on real products which were
developed over many years.
It is very good that you comment on the modularization and dependency
resolving, so we have the chance to improve them.
> frankly the lenya codebase is not very good in sticking to its own
> conventions,
Yes, as soon as they proved useful (see above) ...
> and it's by a huge margin the most difficult-to-learn
> project i have ever worked with, because you can't learn from the code
> since the code often does it wrong.
I don't think its that bad. We have quite a lot of complexity and
different technologies, so the learning curve is steep.
One problem is that there are often many ways to do something,
and that people have different "best practises" depending on their
preferences and needs. No idea if we can do something about that.
> there will always be legacy code in
> any project and that's fine, but i have no chance in hell to find out
> what is legacy and what is current best practice.
How can we improve this?
-- Andreas
> Jörn Nettingsmeier wrote:
>> how do we use the <depends/> relation in module.xml?
>> does it only list java dependencies that will prevent compilation if
>> unsatisfied, or also functional dependencies where stuff will break at
>> runtime?
>>
>> if the former, i think the dependency of default/defaultusecases on
>> sitemanagement is erroneous. can anyone confirm that?
>>
>> if the latter, workflow should depend on sitemanagement, because it
>> provides jxtemplates that call sitemanagement usecases. that would
>> also mean we have a circular dependency, because sitemanagement
>> depends on workflow already.
>>
>> waiting for enlightenment,
>>
>> jörn
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: dev-help@lenya.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: what are module dependencies?
Posted by Joern Nettingsmeier <ne...@folkwang-hochschule.de>.
by the way, this issue is a perfect example of why it is preferrable to
first *document* any convention and then implementing it.
frankly the lenya codebase is not very good in sticking to its own
conventions, and it's by a huge margin the most difficult-to-learn
project i have ever worked with, because you can't learn from the code
since the code often does it wrong. there will always be legacy code in
any project and that's fine, but i have no chance in hell to find out
what is legacy and what is current best practice.
Jörn Nettingsmeier wrote:
> how do we use the <depends/> relation in module.xml?
> does it only list java dependencies that will prevent compilation if
> unsatisfied, or also functional dependencies where stuff will break at
> runtime?
>
> if the former, i think the dependency of default/defaultusecases on
> sitemanagement is erroneous. can anyone confirm that?
>
> if the latter, workflow should depend on sitemanagement, because it
> provides jxtemplates that call sitemanagement usecases. that would also
> mean we have a circular dependency, because sitemanagement depends on
> workflow already.
>
> waiting for enlightenment,
>
> jörn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org