gizmola Posted January 19, 2017 Share Posted January 19, 2017 Benanamen: I believe that reading this series might help you understand the philosophy behind much of the advice you received in this thread: http://fabien.potencier.org/what-is-dependency-injection.html Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted January 19, 2017 Share Posted January 19, 2017 The name “LoginAttemptsLog” is unfortunate, because it implies that the class is very generic and pretty much the only valid implementation. But it's the exact opposite: It's highly specialized and just one of many possible implementations. There could also be a file-based logger, a MongoDB logger and whatnot. How are you going to name those? So something like “SQLLoginAttemptsLog” is more appropriate. My preference is to list the common name first. So something like "LoginAttemptsLog-SQL", "LoginAttemptsLog-MongoDB", etc. That way if all your include files are stored in the same directory, the login attempt classes are grouped together when the files are sorted alphabetically. Quote Link to comment Share on other sites More sharing options...
benanamen Posted January 19, 2017 Author Share Posted January 19, 2017 That makes more sense to me but my OOP experience is extremely limited at this point. That is also the same type of style I have used in naming database columns and header and footer files. E.g. name_first name_last url_facebook url_twitter page_header page_footer Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.