2

Seeing as how there is a pretty cool XPage open source development community, I was wondering something. Are there any special conventions that we should be adhering to other than the java specific ones? I am referring to those regarding package names, class names etc.

Greg
  • 714
  • 4
  • 16

2 Answers2

3

To my knowledge, there aren't any really strong conventions among XPages development on top of the usual Java ones (name your packages after your DNS name, etc.). The only ones I can think of off the top of my head are minor and optional things, like using an "xsp" sub-package for frameworks/utilities that are XPage-specific (e.g. "com.ibm.xsp", "org.openntf.xsp", etc.). Beyond that, things are a conflicted mess, even just looking at what ships with XPages: some interfaces named "IFoo", some just "Foo"; some classes named "Foo", some "FooImpl", some "FooImplEx2".

In lieu of a community standard, I un-biased-ly advise you to adopt all of my personal conventions, as reflected in the frostillic.us framework and (mostly) the OpenNTF Domino API. So: no Hungarian notation, no "IFoo", no "FooImpl" (barring a compelling reason), Java code style similar to https://code.google.com/p/google-styleguide/source/browse/trunk/eclipse-java-google-style.xml , and final method parameters.

Jesse Gallagher
  • 4,461
  • 13
  • 11
2

We name our java classes: com.domain.whatever.Name

In faces-config I always want to capitalize my Managed Beans:

<managed-bean>
    <managed-bean-name>CurrentJob</managed-bean-name>
    <managed-bean-class>com.domain.inventory.Job</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
</managed-bean>

That's all I have really. :)

David Leedy
  • 3,583
  • 18
  • 38
  • I was really referring to conventions other than the basic java stuff like , like how you always capitalize your beans. That type of stuff is good to try to standardize. :) – Greg Jul 02 '14 at 13:54