Yes, might be. Again these are not any rules you have to follow, but these are the method that many developers use. There may be another way to optimize your code that you have to find out based on your requirement.