Fork me on GitHub

0.8 Module Design Question: Breakup or Shutup?  Bottom

  • Alrighty Everyone...
    Question for those savvy with the 0.8

    I have been working on a game module I want to build.
    I have 29 tables setup, I spent a bit o-time working on the foundation.
    I wanted to utilized a class-based arrangement for alot of it, but .7.6.2 just isn't class-enabled.
    Well, I stumbled across some documentation on 0.8 and instantly fell in love.
    I have installed a 0.8 on my host for testing and experimenting and am enjoying that.

    But now I find myself at a weird stand-still.
    DEPENDENCIES!

    I realize now that I could break up ALOT of this module in smaller modules and make this thing a package of modules.
    It would make coding this thing easier.
    It would make Hooks better suited for it.
    It would make MY life easier.

    But I don't know that this is good programming practice.

    For instance.
    In my module I have the following tables / objects:
    Accounts: Each USER can create a game account... as many as they want.
    Empire: Each Account can create a SINGLE Empire. Until it's destroyed.
    Government: Each Empire can select from various Governments.
    etc...

    There are more...
    But, for my purposes, I am thinking...
    I could create a Module for Accounts.
    I could THEN create a Module for Empires and make it dependent on Accounts.
    I could THEN create a Module for Government and make it dependent on Empires.
    and so on and so on.

    This way I could get Hooks to trip for Account CREATION, EDIT, and DELETION...
    as well as the other 'Objects' involved.

    So my question is...
    For those who have been doing this longer than I...
    Would it be smarter to break my current Module / Table design into smaller Modules?
    Or keep it like it is?

    I would like to have hooks for the smaller objects...

    I hope that explains it.

    Help me if you can.

    --


    With the advent of modern technology, sites like Twitter, and the Facebook Virus...
    I think we should all breathe a collective sigh of relief that I got here in time...
    - randomblink
  • Quote

    Would it be smarter to break my current Module / Table design into smaller Modules?
    Or keep it like it is?


    That really depends and there is not set "right" or "wrong" here. The question you should ask yourself is "will the sub-modules be be used by anthing else other than my game?" If the answer is "yes", then it may make sense to split up your module. If the answer is "no" then I would suggest you leave things in 1 big modules.

    Using the 0.8 class loading approach will provide proper separation of code anyhow while not incurring the overhead of loading multiple modules. Splitting things into multiple modules would not fundamentally change this so you might as well keep things in 1 module ...

    Greetings
    R
  • as far as pncommerce is concerned on this topic the module will be in more small sub parts

    shop (main)
    reporter
    configrator
    connector

    A good idea at all .. you may release more in small cycles .. especially when the DB structure doesnt change.

    Greets
    Sebastian
  • Excellent...

    rgasch

    "will the sub-modules be be used by anthing else other than my game?" If the answer is "yes", then it may make sense to split up your module.

    Yes they will... I plan on creating additional 'things' for the game that would interact with the various 'Objects' of the game, so I think the Multiple Modules will be my direction.

    eckerl

    A good idea at all .. you may release more in small cycles .. especially when the DB structure doesnt change.

    Cycles is the key. I do forsee growth on the game in the future, and mini-modules would be the easier key. See, this is more of a practice game right now. I have a MUCH larger game I have in mind to design, but I wanted to test out postnuke in handling some 'little things' for a smaller modeled game. I am not even sure I want to release this game public, I might want to keep it as a custom module... so many variables that I am just not sure of right now.

    But I appreciate your feedback, both of you.
    Thank you for taking the time to read my question and answer it.
    That helps alot!!!

    --


    With the advent of modern technology, sites like Twitter, and the Facebook Virus...
    I think we should all breathe a collective sigh of relief that I got here in time...
    - randomblink

This list is based on users active over the last 60 minutes.