Jump to content


Photo

New custom base module


  • Please log in to reply
5 replies to this topic

#1 k1000o

k1000o

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationMadrid

Posted 01 March 2012 - 08:20 PM

Hi Jason

As part of the application I am customizing over zurmo, I am evaluating like to create a module very similar to zurmo to define bases clases, views and controlers that can be reused.

For example define a base class called animal that can be used to define later Mamals, Insects, Reptiles, etc... all of them will have a very similar structure with some basic fields, an image module, a colors module, etc...
Something to the usage of person in the zurmo base module.

Can you give me some guidelines on how to proceed? (for model, view and controllers), or if you have a better idea it'll be welcomed.

Thanks,

k1000o

#2 Jason

Jason

    Administrator

  • Administrators
  • 819 posts
  • LocationChicago

Posted 02 March 2012 - 04:07 PM

Here is what i would do. Can you make a UML or some sort of diagram showing the relationships and how they use the same pieces? You can use gliffy.com to do this. Then you can share the diagram. I would recommend that for the models you can extend parent models, like Account extends OwnedSecurableItem, and this way the 'owner' attribute is pushed back and reused by other models. I am not sure about extending the Module class and having another intermediate class. This can be done, but i would like to see the specifics of what you are doing before making that recommendation.

Regarding views and controllers, we can do something similar as well once we determine what the correct inheritance is conceptually for these modules/models.

Jason Green
Zurmo Team
Need support? Upgrade now


#3 k1000o

k1000o

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationMadrid

Posted 04 March 2012 - 06:19 PM

I am beginning to design the application, but here you will find a mockup of what I expect to do

The idea is create a base class called product to easily extend later any type of product (Style, Fabric, Trim, etc..) and allow the selection on the bill of materials of any type of product.
The idea is very similar for the variation, as of today I am using independant elements for color,size and option but the parent should be the same to easily allow the election on the product.

Posted Image

#4 Jason

Jason

    Administrator

  • Administrators
  • 819 posts
  • LocationChicago

Posted 04 March 2012 - 06:37 PM

Camilo,
A couple questions and thoughts. You should add in HAS_ONE or HAS_MANY etc. on the diagram on the lines to explain the relationships better. For example, i assume Bill of Materials HAS_MANY products. But does Product HAS_MANY Variations? I think I understand what you are trying to accomplish. I believe it will be simliar to the Activities module. Where you have notes, meetings, tasks extending Activity. Also the way you have BOM HAS_MANY on Products will be like how Activity MANY_MANY is on Items. I can explain this last part more as we get farther.

So next step is to add the relationship information to the diagram.

Jason Green
Zurmo Team
Need support? Upgrade now


#5 k1000o

k1000o

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationMadrid

Posted 04 March 2012 - 08:11 PM

Hi I added some details on the optional links, the end and begin symbol of the links are supposed to be self-explanatory, the problem with the links in Gliffy is that they allow only one comment in the relation so we do not know to which end it applies.
3 Examples
1) The the link between Product and the file manager module states that a product only has one file manager and a file managers only linked to one product.
2) The link between "Bill of Materials" and BOMLink states that a BOMLink always has to be linked to a "Bill of Materials" but we can have a "Bill of Materials" with no BOMLink.
3) The Link between Product and Variation states that a Product can have Zero or many Variations (Colors, Sizes) and a Variation can be references by multiple Products (Same color for different products).
Did you want to have more details?, I can add some labels if required.

#6 Jason

Jason

    Administrator

  • Administrators
  • 819 posts
  • LocationChicago

Posted 07 March 2012 - 04:26 AM

I think now we should schedule some time to chat. You can ping me on skype and I can try to give you more direction. Then we can post the progress here on the forums or even make a wiki article for it.

Jason Green
Zurmo Team
Need support? Upgrade now





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users