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


Groups > comp.lang.java.programmer > #37861

Re: Circular dependencies between packages?

From Brixomatic <brixomatic@yahoo.com>
Newsgroups comp.lang.java.programmer
Subject Re: Circular dependencies between packages?
Date 2017-12-18 19:17 +0100
Organization Aioe.org NNTP Server
Message-ID <MPG.349f0fee5f1564619896c7@news.aioe.org> (permalink)
References <229507883@f38.n261.z1.binkp.net>

Show all headers | View raw


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]

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

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

csiph-web