- Joined
- Nov 16, 2009
- Messages
- 866
- Reaction score
- 580
Guys, this isn't another phpretro. Don't expect it to be plug-n-play. To use this you'll have to know at least some code and be able to read error messages.
Anyway, I want to comment on the code. There are a few things I'm not a fan of; many rewritten functions that is in the php library already, some parts are extremely messy, the wrong usage of capitalization, how the config has been handled, how the "library" is being loaded. Those things are what i'm personally not a fan of, that does not make it bad code, just what I personally wouldn't have done if I was the developer.
Cons:
Rewriting PHP functions:
Why waste the RAM, CPU which equals execution time in production mode, and time in development mode when what you're doing is already included in the PHP library? The config parser for instance. Why cant you just use parse_ini_file() or json_decode() instead of handling it with a custom parser?
How the "library" is loaded:
Why get all the books from your local library if you're just going to use one of them for your science project at school? You are just going to use the ones that are necessary so why bother carrying them in your bag/backpack home or the place you're staying. What I mean by this; load the classes that you KNOW you need, then load the rest as there is need for them. This way you're going to save specs and execution time.
How the config has been handled:
Same thing as the library. Why bother carrying around your books if you're not going to use them. If you absolutely want to, at least get them from a sql query or cache the results instead of opening and reading 10 files on each web request.
Pros:
Static classes:
Absolutely amazing that you've chosen to build this upon static classes! Static classes are something that occurs once. In this script all classes are only used once. I personally prefer instances due to how messy static classes can get sometimes, but this is the right way.
Framework:
What you've made is actually a framework for Habbo retros, all actions happens inside already written classes. This makes it so much easier for others to work with it and for newbies to learn. People can for example do Users::Add('ZenLulz', 'zenlulz@ragezone.com', 'password', 'M') instead of preparing a sql statement, writing the query, executing the query, closing it and so on. That often makes up to 10-20 lines of extra code which is absolutely a waste of time and makes the code look ugly. You've just made the life for developers so much easier (if they just have the brain to use this).
Template system and routing:
Beautiful, can't say anything else.
Now! You're probably not going to be bothered to read all of this. I recommend doing it though, you might learn something
:fanny:
Anyway, I want to comment on the code. There are a few things I'm not a fan of; many rewritten functions that is in the php library already, some parts are extremely messy, the wrong usage of capitalization, how the config has been handled, how the "library" is being loaded. Those things are what i'm personally not a fan of, that does not make it bad code, just what I personally wouldn't have done if I was the developer.
Cons:
Rewriting PHP functions:
Why waste the RAM, CPU which equals execution time in production mode, and time in development mode when what you're doing is already included in the PHP library? The config parser for instance. Why cant you just use parse_ini_file() or json_decode() instead of handling it with a custom parser?
How the "library" is loaded:
Why get all the books from your local library if you're just going to use one of them for your science project at school? You are just going to use the ones that are necessary so why bother carrying them in your bag/backpack home or the place you're staying. What I mean by this; load the classes that you KNOW you need, then load the rest as there is need for them. This way you're going to save specs and execution time.
How the config has been handled:
Same thing as the library. Why bother carrying around your books if you're not going to use them. If you absolutely want to, at least get them from a sql query or cache the results instead of opening and reading 10 files on each web request.
Pros:
Static classes:
Absolutely amazing that you've chosen to build this upon static classes! Static classes are something that occurs once. In this script all classes are only used once. I personally prefer instances due to how messy static classes can get sometimes, but this is the right way.
Framework:
What you've made is actually a framework for Habbo retros, all actions happens inside already written classes. This makes it so much easier for others to work with it and for newbies to learn. People can for example do Users::Add('ZenLulz', 'zenlulz@ragezone.com', 'password', 'M') instead of preparing a sql statement, writing the query, executing the query, closing it and so on. That often makes up to 10-20 lines of extra code which is absolutely a waste of time and makes the code look ugly. You've just made the life for developers so much easier (if they just have the brain to use this).
Template system and routing:
Beautiful, can't say anything else.
Now! You're probably not going to be bothered to read all of this. I recommend doing it though, you might learn something
:fanny: