A friend suggested, instead of having a backend class that checks the user's permission in each public function (the results are cached and not static), I should have a more streamlined site. When I deleted the backend, I also deleted the database code and combined them into the corresponding user permissions (basic user, logged_in_user, moderator).
Now the site code looks better, so merging them reduced LOC (tons of LOC actually), and I will write Method () instead of backend.Method (), which increases readability. However, now that I don't have a backend, how can I suggest unit test my code? and what about things like downloading a user file with different extensions? (txt vs jpg vs FLAC)
user34537
source
share