Thread: Packaging Structure

Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1 Packaging Structure 
    Registered Member

    Join Date
    Sep 2010
    Posts
    1,248
    Thanks given
    536
    Thanks received
    179
    Rep Power
    106
    Hi,

    I've recently been trying to organize and clean my folders, classes etc. and I've been trying to reference other well structured releases but I'm confused on some of them esp. client sided.

    This topic is really to ask the community how they structure their sources in terms of packaging.

    i.e.
    Why are game content in the world direrctory in some releases but in the players directory for others, or really where should it really be.
    e.g.
    game.content.minigames
    game.models.players

    Client's also much more confusing as there are many classes that are simply named class36, and many other classes that seemed to be linked but are in different directories.

    So really, can you show me your packaging and explain why its like that?

    Sorry if this is in the wrong section or its worded badly.
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    At the end of the day, it all comes down to personal preference on where you want stuff to go. There really is no right/wrong way to package something if its for your eyes only.

    Most packaging start with domain end, then domain name. Such as for me, 'net.zamorak'. From there you can structure of how you want it to be.

    net.zamorak.core;
    net.zamorak.network;
    net.zamorak.world;
    net.zamorak.utils;

    Would be the base idea, though it doesn't HAVE to be this way.

    The client is challenging to package without first refactoring the class names at the least. Check out my Zamorak release if you need a little help.
    Reply With Quote  
     

  4. Thankful user:


  5. #3  
    Registered Member

    Join Date
    Sep 2010
    Posts
    1,248
    Thanks given
    536
    Thanks received
    179
    Rep Power
    106
    Quote Originally Posted by Mobster View Post
    At the end of the day, it all comes down to personal preference on where you want stuff to go. There really is no right/wrong way to package something if its for your eyes only.

    Most packaging start with domain end, then domain name. Such as for me, 'net.zamorak'. From there you can structure of how you want it to be.

    net.zamorak.core;
    net.zamorak.network;
    net.zamorak.world;
    net.zamorak.utils;

    Would be the base idea, though it doesn't HAVE to be this way.

    The client is challenging to package without first refactoring the class names at the least. Check out my Zamorak release if you need a little help.
    What about within, like what factors decide in a class for it to be in core or network and even within them subfolders? Some files go into several area's. Thanks for your reply I will download and check it out.
    Reply With Quote  
     

  6. #4  
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    Quote Originally Posted by Kurdz View Post
    What about within, like what factors decide in a class for it to be in core or network and even within them subfolders? Some files go into several area's. Thanks for your reply I will download and check it out.
    If it has to do with a certain piece of content, it probably belongs there. Can you list an example of what you mean by 'Some files go into several area's.'?
    Reply With Quote  
     

  7. #5  
    Registered Member

    Join Date
    Sep 2010
    Posts
    1,248
    Thanks given
    536
    Thanks received
    179
    Rep Power
    106
    Quote Originally Posted by Mobster View Post
    If it has to do with a certain piece of content, it probably belongs there. Can you list an example of what you mean by 'Some files go into several area's.'?
    For example:
    • I created a Godwars class, and I'm having trouble putting it into a Mob folder or a content folder, because the things inside really handle the interface, wearing god armour bonuses etc. and not much to do with mobs.
    • Handling potions e.g. drinking, mixing etc. is in the content folder but it seems to me that it should be near the Herblore skill. Same with eating > Food.


    --------------------------

    I guess I'm either having trouble naming specific folders or I've got extra classes that do not need to exist seperately.

    What do you think?
    Reply With Quote  
     

  8. #6  


    Major's Avatar
    Join Date
    Jan 2011
    Posts
    2,997
    Thanks given
    1,293
    Thanks received
    3,556
    Rep Power
    5000
    Quote Originally Posted by Kurdz View Post
    I created a Godwars class, and I'm having trouble putting it into a Mob folder or a content folder, because the things inside really handle the interface, wearing god armour bonuses etc. and not much to do with mobs.
    Is this class a type of Mob, or is it a piece of content?

    Quote Originally Posted by Kurdz View Post
    Handling potions e.g. drinking, mixing etc. is in the content folder but it seems to me that it should be near the Herblore skill.
    The Herblore skill itself should be in the content folder, because skills are content.

    Quote Originally Posted by Kurdz View Post
    game.content.minigames
    game.models.players
    I think you have missread the 'model' folder as 'models'. 'Model' comes from the MVC interface design pattern
    Reply With Quote  
     

  9. Thankful users:


  10. #7  
    Registered Member

    Join Date
    Sep 2010
    Posts
    1,248
    Thanks given
    536
    Thanks received
    179
    Rep Power
    106
    Quote Originally Posted by Major View Post
    Is this class a type of Mob, or is it a piece of content?



    The Herblore skill itself should be in the content folder, because skills are content.



    I think you have missread the 'model' folder as 'models'. 'Model' comes from the MVC interface design pattern
    Godwars class is in the content directory as it has practically 5% mob coding.

    I guess thats quite a logical approach, its just sometimes I feel like I've placed the class in a wrong location which bugs me out.
    Reply With Quote  
     

  11. #8  
    Packaging Structure



    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    30
    Posts
    16,307
    Thanks given
    7,215
    Thanks received
    12,308
    Rep Power
    5000
    personal preference and common software architectural patterns like MVC

    Quote Originally Posted by Kurdz View Post
    practically 5% mob coding.
    laughed irl

    Attached image
    Reply With Quote  
     

  12. Thankful user:


  13. #9  
    Left to be damned

    Join Date
    Nov 2014
    Age
    27
    Posts
    119
    Thanks given
    28
    Thanks received
    6
    Rep Power
    26
    It's personal preference and a little bit of MVC naming conventions, I guess.
    Mine's like this;
    Reply With Quote  
     

  14. #10  
    Packaging Structure



    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    30
    Posts
    16,307
    Thanks given
    7,215
    Thanks received
    12,308
    Rep Power
    5000
    Quote Originally Posted by Dominicus View Post
    It's personal preference and a little bit of MVC naming conventions, I guess.
    Mine's like this;
    in what way is any of that mvc? and mvc isnt a 'naming convention', nor does it enforce any naming conventions

    Attached image
    Reply With Quote  
     

  15. Thankful users:


Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Got Java's Server Package! V2.8
    By Got Java? in forum Downloads
    Replies: 28
    Last Post: 06-10-2008, 10:58 AM
  2. Beginners Package.
    By s0cc3r in forum Tutorials
    Replies: 10
    Last Post: 08-26-2007, 06:15 PM
  3. Ultimate Server Package!
    By Alex in forum Tools
    Replies: 19
    Last Post: 08-26-2007, 05:59 AM
  4. Pmgz Server Package
    By Real pmgz in forum Downloads
    Replies: 5
    Last Post: 08-18-2007, 03:33 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •