What do you prefer: single or multiple files for the SDK?

Trackmania Forever public API and its open source PHP SDK.

Moderator: NADEO

Post Reply

What about a SDK with multiple files ?

I hate it! I want a single file.
6
40%
I can live with it.
2
13%
I really don't care.
5
33%
I would love multiple files instead of one big file.
2
13%
 
Total votes: 15

User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

What do you prefer: single or multiple files for the SDK?

Post by gouxim »

Hey fellow coders,

I was thinking about the futur of the SDK. For now it's one big file, for simplicity's sake. But I was wondering whether you guys prefered multiple files.

On the one hand, a single file is easy to integrate in your project, and to update. But it's a bit cumbersome to browse the code.

On the other hand, multiple files are nice because you can have one class per file, so you'll quickly browser the code. But it's a bit more complicated to update (well, not really, it's just a matter of updating a directory of files...).

Answer the poll !
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
User avatar
w1lla
Posts: 2287
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: What do you prefer: single or multiple files for the SDK

Post by w1lla »

I dont mind to use one file or seperate files.

Its just a way for developers to code based on one file or seperate files.

However in the single file its better to understand the functions and you can just use one method to call the function. As for the multiple files it will be that you need to call the file call the function and export the output.
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
tcq
Posts: 2645
Joined: 15 Jun 2010, 11:02

Re: What do you prefer: single or multiple files for the SDK

Post by tcq »

I'm not actively coding with it,but out of my experience it's usually easier if you have multiple files for the understanding of the code.
User avatar
fastforza
Posts: 850
Joined: 15 Jun 2010, 11:19
Contact:

Re: What do you prefer: single or multiple files for the SDK

Post by fastforza »

Bad practice. I'd never store more than one class in a single file. The only exception to this would be inner classes. :ugeek:
Mania Exchange - Share your maps!

ASUS Maximus IV GENE Z / i7 2600K 3.40Ghz QC / 16GB G.Skill Ripjaws DDR3 / GTX 560 Ti

Need technical help for ManiaPlanet? Click here. :)
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

Re: What do you prefer: single or multiple files for the SDK

Post by gouxim »

fastforza wrote:Bad practice. I'd never store more than one class in a single file. The only exception to this would be inner classes. :ugeek:
I generally agree. This is what we did in ManiaLib and ManiaLive, and all our internal codebase is like that too.

For the SDK, it's a bit different IMO. I see the SDK more as a DLL than as a project like ManiaLib ; therefore having one single file with the API is like having one DLL that you include in some project.
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
User avatar
fastforza
Posts: 850
Joined: 15 Jun 2010, 11:19
Contact:

Re: What do you prefer: single or multiple files for the SDK

Post by fastforza »

gouxim wrote:This is what we did in ManiaLib and ManiaLive, and all our internal codebase is like that too.
The structure of ManiaLib was good, at least I think it was. I don't use it any more (I have my own framework in .NET) though, so I can only guess from previous versions I used. :ugeek:
gouxim wrote:For the SDK, it's a bit different IMO. I see the SDK more as a DLL than as a project like ManiaLib ; therefore having one single file with the API is like having one DLL that you include in some project.
Poor PHP, doesn't have the luxury of library referencing. :lol: I understand how you want it done, I guess it wouldn't really bother people in the long run. Beggars can't be choosers! :P

Yes I'm the beggar in this case, begging for multiple files. But I'll concede for a single file. :) Not that I'll use the PHP one anyway, I just like weighing in on these things. :mrgreen:
Mania Exchange - Share your maps!

ASUS Maximus IV GENE Z / i7 2600K 3.40Ghz QC / 16GB G.Skill Ripjaws DDR3 / GTX 560 Ti

Need technical help for ManiaPlanet? Click here. :)
Post Reply

Return to “Trackmania Forever Web Services”

Who is online

Users browsing this forum: No registered users and 0 guests