[Tutorial] How to write readable and maintainable code
#18

You should've included PAWN OOP, more people should start doing some OOP with PAWN, it's really easy. How to do it is simple:

Start a new gamemode normally, then include all pawn includes, then basically add something like this:
PHP Code:
#include "../Assets/class.database.pwn" 
the path will be **THE SERVER DIR**/Assets/class.database.pwn
I would've use y_hooks to have a more readable code in the classes, a simple class of a database manager would be like:
http://pastebin.com/wVui4Met

It makes all files much more readable and easy to edit small parts without having to search by 100.000lines, it will be much more documentated without any effort needed.
Reply


Messages In This Thread
How to write readable and maintainable code - by BiosMarcel - 11.12.2016, 16:42
Re: How to write readable and maintainable code - by Vince - 11.12.2016, 17:01
Re: How to write readable and maintainable code - by BiosMarcel - 11.12.2016, 17:08
Re: How to write readable and maintainable code - by Eoussama - 11.12.2016, 17:10
Re: How to write readable and maintainable code - by BiosMarcel - 11.12.2016, 17:14
Re: How to write readable and maintainable code - by Vin Diesel - 11.12.2016, 17:21
Re: How to write readable and maintainable code - by coool - 12.12.2016, 16:27
Re: How to write readable and maintainable code - by X3nZ - 14.12.2016, 03:35
Re: How to write readable and maintainable code - by Swedky - 14.12.2016, 03:53
Re: How to write readable and maintainable code - by BiosMarcel - 14.12.2016, 05:18
Re: How to write readable and maintainable code - by iLearner - 14.12.2016, 05:32
Re: How to write readable and maintainable code - by GoldenLion - 14.12.2016, 05:37
Re: How to write readable and maintainable code - by NaS - 24.12.2016, 10:04
Re: How to write readable and maintainable code - by BiosMarcel - 24.12.2016, 10:24
Re: How to write readable and maintainable code - by NaS - 24.12.2016, 10:38
Re: How to write readable and maintainable code - by BiosMarcel - 24.12.2016, 10:47
Re: How to write readable and maintainable code - by BiosMarcel - 24.12.2016, 11:01
Re: How to write readable and maintainable code - by Luicy. - 24.12.2016, 11:02
Re: How to write readable and maintainable code - by BiosMarcel - 24.12.2016, 11:05

Forum Jump:


Users browsing this thread: 1 Guest(s)