Java naming Convention

Hi all,
I urgently needed your assistance on advice regarding the java naming convention.
i am in the middle of creating a interface class and a implementation class
BusinessAccountIF
and
BusinessAccount
However, I been told is very bad ideal to use the word IF in the ending of interface.
Technical we don’t need to, but I always like my code to be tidy,
hence using the IF in the end of the interfaces class.
Please do let me know what your thought??
Edited by: 846020 on 21-Mar-2011 06:10

846020 wrote:
However, I been told is very bad ideal to use the word IF in the ending of interface. I agree. Smacks to me of those annoying chaps that put 'Int' at the end of all integer variables; it's just noise.
Technical we don’t need to, but I always like my code to be tidy, ...
Please do let me know what your thought??As others have said: keep your names as descriptive as possible.
I would expect an interface called 'BusinessAccount' (which seems perfectly sensible to me) to be extended from an interface called 'Account', and have implementing classes that describe a specific type of business account (eg, 'DepositAccount', 'EquityAccount', 'AssetMaintenanceAccount'), possibly via a "skeleton implementation" class, which by convention, is usually called 'AbstractBusinessAccount'.
Winston

Similar Messages

  • Why System.arraycopy function does not follow java naming conventions ?

    System.arraycopy should be
    System.arrayCopy....
    can anyone tell me why is it so ?

    BigDaddyLoveHandles wrote:
    DogsAreBarking wrote:
    System.arraycopy should be
    System.arrayCopy....
    can anyone tell me why is it so ?Because it dates back to the early days of Java, back when rocks were soft. Note also that java.awt.GridBagLayout has several methods that start with capital letters! Shocking!Hmm, I never noticed that. And in version 1.4 they apparently added identical methods which names that start with lower case. Now that's a funky API :-)
    Along the same line, one thing that irks me is that eclipse keeps suggesting
    Color.blackas the first auto-completion choice when I type
    Color.BThe horror!

  • SAP-Java Naming Conventions?

    Hello!
    ABAP-Programmers should use Z-Namespace for their own ABAP-programms.
    Is it necessary to take notice of any special "SAP Java rules" for writing or deploying Java programms?
    regards
    Harald.

    Hi Harald,
    there is no such equivalent rule in the Java SAP world. Just don't use com.sap or more general com.sap* (for instance: com.sapportals.) as package starting name or deploy names (for instance, in the portal environment, don't name the PARs com.sap).
    Hope it helps
    Detlev
    PS: Please consider to reward points on SDN for helpful answers or be responsive if they haven't been helpful, this also holds for your threads Latest Version-Number of Developer Studio? and Future of ABAP-Workbench? Thanks in advance!

  • Naming Convention (Naming Rule) for CAF GP

    Hi, all.
      Is there any naming convention for CAF GP?
      For its process, action, callable object so and so.
      Web Dynpro for Java has very good naming convention like the following.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e4/d7fb402eb5f76fe10000000a1550b0/frameset.htm
      Could someone provide the information?
      Best Regards.

    Hi Sejoon,
    Sometimes I see GP provided coding examples and it seems that GP does not have some specific naming convention. It's clear that they use sdandart java naming convention. So, you can use it too.
    Best regards,
    Aliaksei

  • Naming convention table name Java

    Dear expert,
    I know that in the ABAP world, when I create a custom table, it have to start with Z.. or Y.. in the name.
    Is this the same when I need to create a table in the Java schema?
    Thanks for you help.
    Mario

    Hi, Ferruccio,
    In the Java world, table naming conventions apply when you define your tables in the Java Dictionary (which is a metadata representation of a real database).
    The names of tables that are defined in the Java Dictionary should:
    - begin with a prefix (for example, the name of a component ‚FI_*’);
    - not exceed 18 characters (including the prefix);
    - not contain Open SQL keywords (for example, SELECT, INSERT, UPDATE, MODIFY and DELETE);
    - contain only permitted characters, i.e. letters, numbers, and underscores.
    I hope that helps!
    Regards,
    Yordan

  • Java platform naming convention

    Hi,
    I am very new to Java. Hence the following question might sound silly. But a reply to this would help me clear my confusion regarding the naming convention used.
    I see many books having titles
    Java 2 : A beginners guide
    Java 2 : A complete reference etc.
    The thing that I am confused about is, does this refer to J2SE or J2EE platform ?
    Your help would be appreciated
    Thanks in advance.

    The thing that I am confused about is, does this
    refer to J2SE or J2EE platform ?Depends on the book. :) Usually it'll be J2SE. To add to the confusion: Java 2 is everything from J2SE 1.2 to 1.4.2. JSE 1.5 is called Java 5.

  • Java bean field naming convention

    I posted this under the Desktop -> JavaBeans, but wasn't sure if that was the right place, so I'm posting here to:
    I have an object with a field "iATANumber".
    I have getters and setters like this:
        public String getIATANumber() {
            return iATANumber;
        public void setIATANumber(String iATANumber) {
            this.iATANumber = iATANumber;
        }In my jsp I'm trying to print it out like this:
    ${foo.iATANumber}and it doesn't work. I just get nothing, while all the other fields on my object work, and it prints out the number I want if I call the getter from a scriptlet.
    Everything works great though if I change the field to iataNumber (note the change in case), and change the getter, setters and jstl to match. Then the jsp works fine.
    The getter and setter names for iATANumber were generated useing IntelliJ, are they not right, and that's why ${foo.iATANumber} won't work?
    Thanks in advance.

    The JavaBeans naming convention falls on its face if a property starts with a lower-case letter followed by an upper-case letter. The commonest way to find this problem is to call your property "eMailAddress" but you have found a different way.
    You also found a solution. Workarounds are the best you can do here.

  • File name naming convention in File Adapter configuration in ID

    Hi All ,
    I have a query related to xml filename created in IDOC-XI-FILE scenario based on value of one of IDOC field .
    The scenario is like this :
    I have to send one xml file per store for material master . In this case how can I define my file name with store name in File adapter configuration in ID .
    Naming convention should be
    <b><storename>_date_masterdataname.xml</b>where store name is one of field of IDOC .
    Plz help me .
    Thanks in Advance
    Regards
    Prabhat Ranjan

    Hi Prabhat,
    take a look at this weblog:
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    you have to specify variable substitution
    (in the file adapter)
    and give the path to the store name (in the variable sustitution table)
    you <b>file name schema</b> (from the file communication channel can look like this)
    %storename%_date_masterdataname.xml
    Regards,
    michal
    Message was edited by: Michal Krawczyk

  • Variable naming conventions

    Hi all,
    I come from a mostly JAVA background. Big emphasis in that arena on encapsulation and modularization of code to help facilitate ease of maintenance and reuse...in theory I sometimes struggle with variable naming conventions within my ABAP code because I'm not all together certain there are any. In C or C++ I might use a derivation of Hungarian notation to name varaibles...and in JAVA I might observe certain object oriented rules regarding varaible naming...I find myself using a combination of those two protocols in my ABAP code. Does anyone have any suggestions for how I might name global and lcoal variables within my code?
    regards,
    Mat

    Hi,
    Please check this links perhaps they may help.
    http://help.sap.com/saphelp_nw04/helpdata/en/92/c2b084bc1d11d2958700a0c94260a5/content.htm
    https://websmp101.sap-ag.de/~sapdownload/011000358700004455192006E/NameConventions.pdf
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/6b0b1f547a11d189600000e829fbbd/content.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/011ccf90-0201-0010-92a7-b319adf89b73
    http://web.mit.edu/sapr3/dev/newdevstand.html
    Regards,
    Ferry Lianto

  • Class naming convention

    many a times i face difficulty with the Action/Class naming convention.
    Say, today ..i wrote a class.....tomorrow i have to rename the name of the class so that it becomes a more meaningful name and becomes unique and understandable with the newcomer classes.
    ...just to do this, i had to change the name of the class very frequently.
    Though i follow few conventions like :
    1) First letter of the class is Captial letter.
    2) use names which is relevant with the classs's functionality.
    but still i fall in problem....
    say, i want to populate a DataBase with my class.....whats the name i should keep ? tommorrow i am going to write another class which also populate the database . what do i do ?
    i first rename the old class with some meaningful name and then i write the new class with some other meaningful name.....but this kills time.....demands lots of changes....and so on...
    you know, i get trouble when my number of classes increases.
    do u feel the same ?
    what are the rules (NOT JAVA RULES but meaningful rules) i should remember to keep a class name ?

    You can name a class based on what it supposed to
    do...
    while naming it follow conventions like the ones
    which are mentioned in the code
    conventions/guidelines of your project.
    You will not be writing the same functionality in two
    different classes... would you??
    In case you may need to refractor(rename the class
    name) you may use java editor with refractoring
    capability to do it..
    With most of the java editors, you get this
    functionality.. e.g. doing a Alt+Shift+R would
    refractor your selected method, class, field etc...
    This applies to Eclipse
    >
    Hope that helps..
    Vaibhav

  • Possible to access bean property without Java Bean conventions?

    Hello,
    I'd like to show a component whenever there is an error message in the Faces context. Naively, I set the component's "rendered" attribute to the following:
    rendered="#{facesContext.messages.hasNext}"
    The object returned by facesContext.messages is an iterator, the properties of which do not follow Java Bean naming conventions. If there was a method called getHasNext() then all would be well. However as it stands, EL cannot evaluate this expression.
    I realise that wrapping this up in a managed bean would solve the problem, but I'd like to avoid this if I am able to do this directly from EL.
    Cheers,
    Chris

    Hi Juergen,
    hasNext actually returns a boolean which EL understands fine. In the end I just wrapped the call within a managed bean, as you suggested, and this works a treat:
      public boolean getHasMessages() {
        // hasNext will return true if there are any messages to be displayed
        return FacesContext.getCurrentInstance().getMessages().hasNext();
      }I suppose I felt compelled to post this entry since I found myself having to write some code for an expression that could be written perfectly well in EL but was limited only by the fact that EL can only access properties that follow the Java Bean convention.
    I thought that may have been some qualifier or method wrapper I could have used to mean 'take this property name literally'. Alas, it seems no such faclility exists.
    Thanks for taking the time to reply,
    Chris.

  • Hard to find ripping naming conventions

    ?In Mediasource Player 3.3, I had a really hard time finding the naming convention settingsdialog. It is in the media folder format settings option. I ended up with a bunch of ripped tracksthat had the track name twice and couldn't find the option. Hopefully this thread will help someoneso they don't have to struggle as much as I did. In the Settings pop-up the PC Music Library tab,and the Properties button under the first item which is the name of your current PC Music libraryname. I had failed to change the last box on the bottom right from track name to none. Ta paj692

    I guess the argument against your argument is that your code should be as self-documenting as possible. In your code, I'll see "Event". Great. java.awt.Event? No (annoyance #1 already). Your base Event? I wouldn't know, need to check the imports first. Aaahh, scrolled up and saw: your special implementation Event it was. Although, I will not see that if I'm not familiar with your package structure and you're doing package imports.
    Create packages for functional groups, otherwise you'll end up with loads of unnecessary public declarations because your helper classes are splattered all over the place and can't just rely on in-package visibility.
    And by the way, using polymorphism properly like you don't seem to do, you'll screw yourself, because you'll in future have to do things like:
    Event ev = new com.mystuff.special.implementation.Event();Because you can't import both the interface/superclass and the implementation. Congratulations.

  • ADF BC naming convention suggestions

    Ok, I havent found too many topics on this matter, but here is a list of naming conventions our team is debating over. I would also like to hear the rest of the community's thoughts.
    Entity: Use underlying table's name and postfix with Eo. If the table is a W view, it should prefix with W.
    eg. EmployeeEo, WEmployeeEo
    View Object (Single entity based): Use the Entity's name postfix with Vo.
    eg. EmployeeVo, WEmployeeVo
    View Object (Multiple entity based): Use the primary entity's name followed by a "busniess task" name.
    eg. DepartmentEmployeeSearchVo (employee search being the task).
    View Object (Non-entity based): Use the primary query table name followed by a "busniess task" name.
    eg.EmployeeCountVo
    View Link & Association: Combine the master entity name and child entity name postfix with Vl/Ao.
    eg. DepartmentEmployeeVl, DepartmentEmployeeAo
    (The issue with this is our legacy tables are not that intuitivly named, so its hard to distinguish the master/child tables. I was thinking of splitting it with lets say 2, like Department2EmployeeVl)
    Application Module: Apply a "busniess process" name and suffix with AppModule.
    eg. AcmeAccountingAppModule.
    If anyone has any suggestions or see any conventions left out please post them.
    Thanks,
    Z

    Without discounting your object name conventions, don't forget the Java package they are placed in helps gives context for the object. This is what I tend to do:
    com.acme.appmodules
    com.acme.entities (all entities)
    com.acme.entities.associations
    com.acme.views (common VOs)
    com.acme.views.links (common VO links)
    com.acme.views.reference (common read only VO lookups)
    com.acme.views.<business task> (to group logical business VOs together)
    com.acme.views.<business task>.links
    ...the last 2 are repeated for each business task area (eg. HR, accounts, etc)
    My ideas partially based on the SRDemo from the JDev team.
    Hope this helps.
    CM.

  • Oracle BPEL standard, best practice and naming convention

    Hi, folks,
    Is there any standard or best practice associated with Oracle BPEL, regarding development, performace, what to avoid, etc? And is there any naming convention for the process, variable partner link name, etc? Similar to naming convention in writing Java code?
    Thanks
    John

    Hi,
    Here is the best practice guide:
    http://download.oracle.com/technology/tech/soa/soa_best_practices_1013x_drop3.pdf
    Thanks & Regards,
    Dharmendra
    http://soa-howto.blogspot.com

  • Naming convention for packages and classes

    Hi all,
    Is there any naming conventions for packages and classes which uses a design pattern ?. If yes what are the conventions used for business delegate,session facade, service locator,DAO and any other patterns.
    rgds
    Anto Paul

    Hi,
    that is a good question and one we have considered also. We dont yet cover the naming conventions for classes based on patterns but maybe will in the future. Currently, in the blueprints apps we tend to do some things like naminga class
    -AccountDAO etc for DAOs
    -For servicelocator we have a class called ServiceLocator viewable at https://adventurebuilder.dev.java.net/source/browse/adventurebuilder/ws/components/servicelocator/src/java/com/sun/j2ee/blueprints/servicelocator/web/ServiceLocator.java?rev=1.4&content-type=text/vnd.viewcvs-markup
    -for session facade, its a bit trickier since the name is so long and we cant add "SessionFacade" to the end of each facade class. I think in general we put "Facade" in the name, usually near the end
    -For Business Delegat, again it seems too long to add to each class name. So in the past we have added
    a "BD" to the names of the delegates. Some examples are at http://java.sun.com/blueprints/patterns/BusinessDelegate.html
    -For transfer objects we usually add a TO to the end of the name. Some examples at http://java.sun.com/blueprints/patterns/TransferObject.html
    Seems like something we could get a bit more consistent about.
    hope that helps,
    Sean

Maybe you are looking for

  • Ordering a phone at retail price from the site, not eligible for upgrade

    I am planning to pay retail for the iPhone once it becomes available for pre-order (judge me as you wish) but I have never ordered a phone from the website before, upgrade or not. I am not the account holder, that is under my mom's account on the web

  • Burn files onto DVD

    Can someone explain how to burn files onto a blank DVD, please?  I have iMac with Lion and DVD-RW.  When I insert the DVD, no icon appears on my desktop.  If I go into the disk utility, the disk shows up there.  Then I click BURN, and a window opens

  • Constant selection in IP planning layout

    Hi everyone, I have a budget planning layout where I'd like to give the user the opportunity to display various planning versions side-by-side. I also want to include the previous year figures (pry). Since reference data might not exist at the time o

  • Visualizer Crashes Randomly

    We have P6 v8.3 Professional that was recently upgraded from v6.2, client instals, not cloud. Our UAT testers are noting that the new Visualizer component crashes when they add multiple projects for testing. I found the following article, "How Many A

  • How to know the DB objects using the particular tablespace

    Hi All I have tablespace which is used by different database objects. I want to know which objects are using that tablespace. How can I know this?? Thanks