You are not logged in.
Pages: 1
Hi,
here is a suggestion for a generic design for an inventory system.
I do not intend to imply that glpi should be redesigned.
in fact, for all I know - this may be exactly how it's implemented already.
I`d love to hear what you guys think.
so here goes:
the system need to support any type of component (be it a computer, a car, a motherboard or a bike).
to support something this generic, we need to talk in generic terms:
objects and classes, and we want the user to be able to define and manipulate objects and classes.
a class defines a template for objects.
objects are always an instance of a class and should have all the properties of their class filled in.
for example, we can have a motherboard class with the following properties:
class : Gigabyte GA-EP35-DS3R
manufacturer = Gigabyte
model = GA-EP35-DS3R Intel® P35 Express Chipset LGA 775
num_pcie_ports = 2
max_ram = 4gb
and so on.
we can have an instance of this class (an actual motherboard) with those properties:
mobo_1 : instance of Gigabyte GA-EP35-DS3R
bought_from : CompsAreUs (computers store)
bought_date : 08/12/2007
warranty : 3 years
price : 100$
we can also have composite items, which are composed of other items, for example a computer:
class : Computer
Motherboard : any
CPU : any
RAM : any
DVD : any
Hard drives : list
Additional peripherals : list
an instance of a computer will need to have all the properties populated
desktop1 instanceof Computer
Motherboard : mobo1
CPU : cpu1
RAM : 1gb_ram_chip1, 1gb_ram_chip2
DVD : none
Hard drives : hd1
Additional peripheral : webcam1
The advantage of such a system is that a user can create his own taxonomies. both of classes (inheritance) and of objects (composition).
the disadvantage is that it's hard to display and manipulate those taxonomies without having the ui feel very generic.
this can be solved by packages that defines classes and also defines renderers for those classes,
which knows how to display objects of specific classes.
thoughts?
Offline
Pages: 1