[Grouptime-developers] some more comments
Status: Pre-Alpha
Brought to you by:
sauanimal
|
From: Lucas R. <lu...@uf...> - 2002-09-09 12:13:01
|
hi all!
i have some more comments about coding standards.
In section 2 (Standard) it should be "introduce" and not "introduces".
A doubt: so in resume, we agreed with 4 spaces. Is that right?
i dont agree with uppercase html tags. Lowercase html tags makes the writing of documents
easier. Why using capitalized ones? I dont know why...
the class files problem still exists...
Putting '_' (underscore) in file names is ugly! i suggest:
MyClass.class.php for class MyClass
or
myclass.class.php for class MyClass (this is worse)
whats the problem with filenames having capitalized letters? When we want
to instanciate an instance of a class, do we forget to capitalize the right letter? I dont think so...
This stands for filesnames too.
I have an idea for classes handling. We could use something like the import contruct of java.
Do you know this? Its like this:
For example: supose that i want to use the class MyClass in my php script. So i write:
<?
import("net.sourceforge.grouptime.MyClass");
$myInstance = new MyClass;
?>
this will import the MyClass definition to my script so i can use it normaly.
In this case the class file would be in the directory classes/net/sourceforge/grouptime/
where classes directory is our class repository.
This is used to avoid classes with the same names but with diferent implementations. This
is done using and URI that is normaly defined based on the application URL.
What do you think? Have you ever worked with java?
About why i suggested MyFunctions.func.php instead of MyFunctions.fun.php, this is only because
of the number of letter used in class filenames (class - 4) and for functions filenames (fun - only 3).
Thats why, but this is only litle details! :-P
In section 2.2 (Functions, classes, methods) theres an error in classnames example:
the name of contructor method must have the same name than the class (in this case
MyClassName and not myClassName). Ok? :-)
the rest is OK!!! :-)
peace!
--lucasr
|