From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,8bd3cfbb5617f5ee X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-04-12 06:43:49 PST Path: gmd.de!nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!cs.utexas.edu!usc!hookup!ames!olivea!news.bu.edu!taco.cc.ncsu.edu!adm!mauney From: mauney@adm.csc.ncsu.edu (Jon Mauney) Newsgroups: comp.unix.osf.misc Subject: Re: RPC Naming Conventions Date: 12 Apr 94 13:43:49 GMT Organization: North Carolina State University Message-ID: References: <2o17ms$57gl@lochness.uhc.com> NNTP-Posting-Host: adm.csc.ncsu.edu probert@cuda.uhc.com (Paul Roberts) writes: >I have recently been putting much thought into >naming conventions within a DCE application. >Specifically, the naming of functions within >DCE to aid in maintaining the application and >to foster re-use of the functions in other >applications. ... >An example would be a server that defines an interface >called "db". All DCE functions within that server >would have "db" as the prefix (i.e. db_load, db_insert, >etc). >I see as a positive with this convention in that I can >tie a specific DCE function name to an interface. But >that is also a negative. What if after, or during, the >design phase I decide to move that function out of that >interface to a different one? I don't see any of this as a big issue, or at least not one that changes much with the introduction of RPC, as opposed to ordinary procedures. Function names should be chosen to make the code readable. If the module structure of the code is well-designed, then including the module name in the function name will probably enhance the understanding of the function. Including the module name also reduces the likelihood of a clash with a name exported by some other module. The same considerations apply if the module represents a remote service. I don't think that moving a function to another interface is much of an issue. First, I doubt that it will happen very often. Second, I don't think that changing the name of a function is very costly. If you are still in the early development phase, you just need to do some global find-and-replace operations in the editor. If you are beyond that point, you have other considerations. Remember that if you move the function, you'll have to revise the IDLs of both interfaces and recompile all affected servers and clients. Any client that imported the first interface but not the second will now have to also import the second interface, and will have to consider how this changes server binding. If the clients programmers can put up with this, then they can put up with renaming a function while they are at it. -- Jon Mauney mauney@csc.ncsu.edu Mauney Computer Consulting (919) 828-8053 "Have TGT, will travel"