Book a Demo

Author Topic: Is it possible to inherit pckages?  (Read 3828 times)

peter king

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Is it possible to inherit pckages?
« on: November 18, 2009, 02:47:19 pm »
hi friend,

I'm developing an ERP in it i need to include three systems, Applicatant management System (AMS), Candidate Management (CMS)System and Employee Management System (EMS)

In each model of the system, there are common classes such as :
Contact, Certification, Health bascically all the classes of AMS should be inherited / associated by CMS and EMS....

what would be the best apprach to design the systems:
1. Should i put all the classes in AMS in a package, assume it's called
ERP.AMS, then inherit it package to ERP.CMS and ERP.EMS packages?

2. Any better suggestions? : )

Thanks  

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Is it possible to inherit pckages?
« Reply #1 on: November 18, 2009, 05:07:06 pm »
Peter,

If I remember correctly generalization between packages is not possible. I think the generalization is a binary relation between two classifiers, and a package is not a classifier. (I could be wrong, haven't checked).

Are you really sure you need to subclass all common classes?
Why don't you reference the common package from both CMS and EMS, and only subclass the common classes if really necessary?

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Is it possible to inherit pckages?
« Reply #2 on: November 18, 2009, 05:31:11 pm »
Quote
[size=18]...[/size]
I think the generalization is a binary relation between two classifiers, and a package is not a classifier. (I could be wrong, haven't checked).
[size=18]...[/size]
Geert
I did... and you're not (wrong).

The Superstucture, while not explicitly saying this, makes a Package an Element.  But it isn't a Classifier only a PackageableElement.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

son-of-sargasso

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Re: Is it possible to inherit pckages?
« Reply #3 on: November 18, 2009, 08:55:14 pm »
Yeah, it all sounds a bit north of Hobart to me.  I mean which cousin inherits what?  Who's genes override whose genes?  And where did these 11 fingers come from?
 ;D
[clue]As Geert says
Quote
if really necessary
[/clue]
b
« Last Edit: November 18, 2009, 08:58:08 pm by barrydrive »

peter king

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Is it possible to inherit pckages?
« Reply #4 on: November 19, 2009, 12:06:21 am »
Hi friends,

I think S-O-S has good sense of humor lol... yep i got paola point i need to put common classes in to one package and inherit them in others ....

Thanks

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Is it possible to inherit pckages?
« Reply #5 on: November 19, 2009, 08:37:20 am »
The equivalent of a generalization between two packages (at least in the MOF metamodel) would be a package merge.

See http://www.sparxsystems.com.au/uml_tool_guide/uml_dictionary/pkgmerge.html.

Although, that means you'll have to work out the mapping to code for yourself.
« Last Edit: November 19, 2009, 08:39:45 am by simonm »

peter king

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Is it possible to inherit pckages?
« Reply #6 on: November 19, 2009, 02:52:03 pm »
Hi simon,

Thanks for the link it's informative, however i dont use EA to do reverse or forward engineering... i use EA to draw four basic modeling diagram and convert the static to ERD....

ofcourse you can use EA to do reverse and forward engineering :)

thanks