It is currently 25 Apr 2024, 17:34
   
Text Size

Packages?

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Packages?

Postby silly freak » 31 Aug 2009, 19:34

I guess this issue already came up, but I want to push it again. what do you think about using a package structure for forge? i can imagine some pros and cons:

  • how are the packages determined? That's probably one of the harder things, because everyone sees that different.
    The first thing here is that everything has to be in a package, because of imports. the easiest thing would be a package "forge" where everything is in.
    I'm more involved in the GUI, and my suggestion there is that all the GUI components are in the same package, and the classes related to every component are in a separate package, say the class forge.gui.NewGame (I also suggest skipping the prefixes) and a package forge.gui.newGame for things like action listeners and such
  • how is this very, very major change synchronized with code in development? well, I think dennis could do that before making the next release. so there's no pending code while doing the changes. it's not much effort, i think, because eclipse does everything besides the moving
  • let's come to the pros. It helps a lot for filtering the classes you are interested in. I use a separate source folder for the classes I edit, so that I can view it faster. that would make it much easier to keep the overview
  • I'm somewhat afraid of creating new classes. It feels like making the program even harder to handle. Packages would take this feel, because in a package it's easier to spot changes

so what do you think about it? i'd like to hear your opinions!
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: Packages?

Postby mtgrares » 03 Sep 2009, 18:16

Right now packages probably seem unnecesary. I like the idea of packages but it complicates compiling the source code.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Packages?

Postby silly freak » 03 Sep 2009, 21:06

actually, i don't see the reason for that. compiling the source code with eclipse, or even the command line i think, is exactly the same with packages.

as a "light" version, we could at least move everything to a "forge" package. that way, there are no import problems for new classes, which i'd like to create straight into a meaningful package.

what about that?
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: Packages?

Postby mtgrares » 10 Sep 2009, 19:19

I'm glad that eclipse handles packages well but if you try to compile packages from the command line you have to put the packages in their specific directory. I might try out eclipse, although my computer is a couple of years old.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Packages?

Postby silly freak » 10 Sep 2009, 20:13

that's the same with eclipse. a package structure is equivalent with a folder structure. eclipse's advantage at that topic is that it automatically creates/changes the package statements & imports for you when moving.

I would definitely give eclipse a try. installation is just downloading and unpacking, no registry entries or similar that could permanently change your system. if you don't like it (what i doubt) or it's too slow, just delete the eclipse folder and the workspace folder
don't hesitate to ask me for help, but better in this thread ;)
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 82 guests


Who is online

In total there are 82 users online :: 0 registered, 0 hidden and 82 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 82 guests

Login Form