Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #37798 > unrolled thread

Circular dependencies between packages?

Started byVictor Porton <porton@narod.ru> (Victor Porton)
First post2017-12-10 02:48 +1200
Last post2017-12-18 19:17 +0100
Articles 4 — 4 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Circular dependencies between packages? Victor Porton <porton@narod.ru> (Victor Porton) - 2017-12-10 02:48 +1200
    Re: Circular dependencies between packages? Arne Vajhøj <arne@vajhoej.dk> (Arne Vajhøj) - 2017-12-09 20:09 +1200
      Re: Circular dependencies between packages? Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> (Jukka Lahtinen) - 2017-12-12 00:04 +1200
    Re: Circular dependencies between packages? Brixomatic <brixomatic@yahoo.com> - 2017-12-18 19:17 +0100

#37798 — Circular dependencies between packages?

FromVictor Porton <porton@narod.ru> (Victor Porton)
Date2017-12-10 02:48 +1200
SubjectCircular dependencies between packages?
Message-ID<229507883@f38.n261.z1.binkp.net>
Circular dependencies between packages are impossible in Java, aren't them?

--
Victor Porton - http://portonvictor.org

[toc] | [next] | [standalone]


#37802

FromArne Vajhøj <arne@vajhoej.dk> (Arne Vajhøj)
Date2017-12-09 20:09 +1200
Message-ID<1601562742@f38.n261.z1.binkp.net>
In reply to#37798
On 12/9/2017 7:48 PM, Victor Porton wrote:
> Circular dependencies between packages are impossible in Java, aren't them?

You will need to build the two packages together (or so some real ugly stuff).

But I would reconsider the design.

Arne

[toc] | [prev] | [next] | [standalone]


#37822

FromJukka Lahtinen <jtfjdehf@hotmail.com.invalid> (Jukka Lahtinen)
Date2017-12-12 00:04 +1200
Message-ID<634697636@f38.n261.z1.binkp.net>
In reply to#37802
Arne Vajhøj <arne@vajhoej.dk> writes:
> On 12/9/2017 7:48 PM, Victor Porton wrote:

>> Circular dependencies between packages are impossible in Java, aren't them?

> You will need to build the two packages together (or so some real ugly
> stuff).

It could happen if a.jar depends on b.jar, and when you already have some
version of both, you add something to b.jar that depends on a.jar.

> But I would reconsider the design.

Definitely.

--
Jukka Lahtinen

[toc] | [prev] | [next] | [standalone]


#37861

FromBrixomatic <brixomatic@yahoo.com>
Date2017-12-18 19:17 +0100
Message-ID<MPG.349f0fee5f1564619896c7@news.aioe.org>
In reply to#37798
In article <229507883@f38.n261.z1.binkp.net>, Victor Porton 
(porton@narod.ru) says...
> 
> Circular dependencies between packages are impossible in Java, aren't them?

No.
You can have a package com.acme.foo that depends on package com.acme.bar 
and at the same time com.acme.bar can depend on com.acme.foo. 

This is kind of tolerable, if the package names are just used to bundle 
things of the same kind that belong to the same solution, which means 
the packages are just used for namespacing. 
like.foo.acme.model.business.nytonix
like.foo.acme.model.business.hugheshelicopter
like.foo.acme.model.business.softwarearts
It's kind of tolerable if some parts of the business logic of a customer 
is referring to the same practice of another customer and vice versa, 
but only if that's so engraved in the way you speak about the different 
customer's business implementations in your company, that it would be 
more confusing for everyone to pull out a common package that both refer 
to. Unidirectional dependencies should be preferred in general - and 
they would be a must, if the software was delivered to the customer, 
instead of you being a provider.

Its of course not okay to have cyclic dependencies, if the packages are 
used to bundle different functional parts of the programs like:
com.foo.acme.common.model
com.foo.acme.server.validation
com.foo.acme.server.client.view

Kind regards,
Wanja

-- 
..Alesi's problem was that the back of the car was jumping up and down 
dangerously - and I can assure you from having been teammate to 
Jean Alesi and knowing what kind of cars that he can pull up with, 
when Jean Alesi says that a car is dangerous - it is. [Jonathan Palmer]

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web