Greg
Greg

Reputation: 714

XPage OSGi/Open Source Conventions

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.

Upvotes: 2

Views: 65

Answers (2)

Jesse Gallagher
Jesse Gallagher

Reputation: 4471

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.

Upvotes: 3

David Leedy
David Leedy

Reputation: 3593

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. :)

Upvotes: 2

Related Questions