incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Janne Jalkanen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JSPWIKI-38) Rename packages to "org.apache.jspwiki"
Date Mon, 22 Dec 2008 08:34:44 GMT

    [ https://issues.apache.org/jira/browse/JSPWIKI-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658466#action_12658466
] 

Janne Jalkanen commented on JSPWIKI-38:
---------------------------------------

Andrew,

using J2SE and/or J2EE as examples is not valid, since they are *specs* and they are implemented
by applications in a completely different hierarchy.  For example, Tomcat implements the J2EE
API using its own org.apache.catalina -hierarchy, and Sun implements J2SE in com.sun.* -hierarchy.
 Same goes with e.g. JCR, which is specified in the "javax.jcr.*" -hierarchy, but the actual
implementation could be in "org.apache.jackrabbit.*"  This provides a clear, visual separation
for people when they are using the "official" API classes, and when they are using the implementation-specific
classes.  Remember, anything under "java.*" is official and won't change.

We can sub-package the org.apache.jspwiki.api -package as needed, e.g. org.apache.jspwiki.api.acl
to put the ACL stuff in it.  It would essentially be a "root" package, not a generic grab-bag
of things.  We can design it to be a smart hierarchy with things grouped together logically
and still keep it independent of any refactorings we do with the implementation classes. 
This would not be true if they were all under the same hierarchy.

However, if we keep both the implementations and interfaces in the same package, *logically*
and *visually* these are going to be equivalent for the developer.  And, if we put all the
implementations under .impl, then we have to put all of our 350+ classes under a hierarchy
structure which starts with impl, essentially adding a layer of pain to us JSPWiki dev team,
just so that we can keep a handful of classes in the main hierarchy.

With the interfaces in a separate package, it is *clear* to the developer immediately when
he sees the import-statements on the top of the file whether he is depending on internal classes.

What I am looking for here is that I strongly believe that API classes should be isolated
in their own package hierarchy in order to provide a clear visual and logical separation of
the implementation classes.  It does not have to be called "org.apache.jspwiki.api" - it could
also be called "org.jspwiki" or "org.apache.wiki" - whatever.

> Rename packages to "org.apache.jspwiki"
> ---------------------------------------
>
>                 Key: JSPWIKI-38
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-38
>             Project: JSPWiki
>          Issue Type: Task
>            Reporter: Janne Jalkanen
>            Assignee: Janne Jalkanen
>             Fix For: 3.0
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message