11.7
I wonder how I should do naming of classes.
I have classes that is used on client site, where there are no db involved. I also have calsses where db is involved. If both classes involve i.e Customer, how would you name them?
I have used PROPATH (naming classes i.e. myClass) instead of using (oo.myclass), is that good or bad?
best regards, Geir Otto
Depends what the classes do. But I would choose to separate them with different package names. Divide the client and server code.
Thanks, what about classes that do things like date converting, small methods that you are using in the daily, that is not connected to any db?
What about caption? should we use small (thinking of serverbased code that is placed on linux)...
each class should do one thing, and do it well. So I would have a namespace (folder!) of Converting with classes of Date, Number, String etc
Converting/Number.cls
def var convertingNumber as Converting.Number no-undo.
etc
A close buddy principe or the single responsibility principle is the Separation of Concerns principle.
I think it's good to google those two when starting with OO.
Also checkout the AutoEdge The Factory example or (if you have access to them) the OO courses on the Progress website. It might answer a few of these questions for you.