Help on design methods

Discussion in 'Plugin Development' started by Tomato, Aug 24, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Tomato

    Hey everyone,

    I have decided I am getting into plugin making for Bukkit and have a question.

    I am use to using visual studio and the class designer to help me organize my thoughts. However I am new to the Java IDE's and am continously getting lost/disorganised in my own code which results in me doing a complete rewrite many many times.

    My question is: I am asking for advice on the best way to design a layout of the classes in Java and plugin design in general. Or just post on how you go about making a layout for your code :)

    Thanks!

    Edit: I have been using netbeans.
     
  2. Offline

    wwsean08

    well I'm lucky and I have a nice big whiteboard at my disposal so generally i just start off by figuring out what is needed and draw it out on the whiteboard, and how it will interact with the other methods, I find that sometimes visually seeing it sometimes helps even when I have the layout in my head. Also comments, even if it's just javadoc comments so later when you go to update it, you remember what everything does.
     
  3. Offline

    mindless728

    I break my plugins down as far as i can over time, ie if something feels like it doesn't belong, it should probably be a different class or if your data structures start looking like this:
    Code:
    HashMap<Pair<Material, Block>, LinkedList<Pair<Player, Entity>>>
    
    then you may want to break it down into separate classes even if they are essentially c/c++ structs
     
Thread Status:
Not open for further replies.

Share This Page