Welcome Guest, Not a member yet? Register   Sign In
rules for the name of subfolders?
#1

[eluser]searain[/eluser]
Is there a rule for the subfolder name?

I named my subfolder as "business_links".

CI has the rule for the variable names, for the class names etc. How about subfolder name?

Is there a rule or "best practice" in naming the subfolder?

Thanks!
#2

[eluser]Dam1an[/eluser]
There's nothing mentioned in the style guide on folder names, so you should be ok
The only think I would make sure to do (which you've done in this example) is all lower case, with underscores for word seperators
That's the most consistent method from what I've seen
#3

[eluser]searain[/eluser]
How about the file name?

Say I have a class

class Article_categories extends Controller {
}

The file name for this class in the controllers

as
artcilecategories.php

or
article_categories.php

It make sense to use
article_categories.php

But I always trying to avoid underscore "_" if this file name will be in the url before. Should I still stick with this rule or not necessary?

In simple words, for the file name that will be in the url, do we use underscore or not.
#4

[eluser]SardiorDragon[/eluser]
Quote:article_categories.php

The above is what I would suggest.

Why do you not use the "_" in urls? It is better than doing spaces and it helps break up the urls so it isn't a huge string of text.

isthiseasytoreadseriously

or_is_this_easier_to_read
#5

[eluser]searain[/eluser]
It is an very old habit, I was trying to avoid "_" in url. In the old time, some not computer oriented people may think there is a space there instead of "_", if they type in the url in case, they got error. But I think there will be no such people left now or if there are, they are not our target clients anyway.

Yes. I will use "_" in the url from now on.




Theme © iAndrew 2016 - Forum software by © MyBB