Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: OOP developement
Home

[Freeciv-Dev] Re: OOP developement

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Bryon Lape <brainmuffin@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, freeciv-java@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: OOP developement
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Thu, 23 Jan 2003 09:35:17 +0100

On Wed, Jan 22, 2003 at 08:08:21PM -0800, Bryon Lape wrote:
> I am attempting to make a .Net port of FreeCiv using
> C#.  I was wondering if those who have done OO ports
> such as Java make more or less a direct translation of
> the C code or do they map out the functionality and
> use a more OO approach?  I had first thought of making
> UML diagrams for the functionality as well.  Does this
> already exist somewhere?

[ I didn't develop on any OO version of freeciv. ]

Problems I see with a more "normal" OO development is that you may
have problems classifying the functions which are in
common/*. Example (from common/city.h):

  bool is_friendly_city_near(struct player *owner, int x, int y);

Shouldn't this function be moved to Map or Player?

However if you solve this you will have a clearer interface
afterwards.

Also note that if you start with a client you have less C code to
copy. If you develop a server you have to copy (transform it 1:1) a
lot of C code to comply with the "offical" server. With a client you
only have to share the network interface and some constants.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Of course, someone who knows more about this will correct me if I'm
  wrong, and someone who knows less will correct me if I'm right."
    -- David Palmer (palmer@xxxxxxxxxxxxxxxxxx)



[Prev in Thread] Current Thread [Next in Thread]