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

Andrew Jaquith commented on JSPWIKI-38:
---------------------------------------

Janne -- let's start with the things we agree on.

I agree that there are a few classes in the top-level (ecyrd) package that need 
to be moved to sub-packages. Moving, for example, TextUtil to the .util package 
was a good thing. There will be others. So, let's agree that is a good thing. 
But it's not really the core issue here.

I also agree that renaming *is* fairly trivial. My point was that we strive for 
simplicity where we can get it. A straight rename from com.ecyrd.jspwiki to 
org.apache.jspwiki would be a good goal, even though in practice any third 
party will need to do some work. I'd just prefer to make it easier.  

As for creating a separate source folder for the API classes, it sounds like 
this is something we are both indifferent about, but are open to.

Now, to the core issue. I am not sure how you can argue that today's top-level 
package is a mess, with too much stuff in it -- and then suggest what we 
*really* need is a single "stable" .api package with -- guess what? -- lots of 
stuff in it. *Other* stuff, to be sure, but still things that are only related 
in the sense that we declare them to be stable. How do you manage what goes 
into the top-level package, and where do you stop? Does FilterException belong 
there? No, it probably belongs in the .filter package. As for additions, let's 
say we decide UserDatabase needs to be a "stable" API. Do you move that to the 
.api package? What about the RSS generators? The WikiActionBean interface? 
After a while that .api package will get pretty crowded too.  See what I mean? 
You're just replacing one bag of unrelated stuff with another.

By contrast, the "package hierarchy-plus-interface" paradigm, supplemented by 
additional .impl subpackages, is a well-understood convention. The package 
hierarchy itself gives developers contextual information.

I do not understand how "saying interfaces are stable" could be a bad thing. 
They are *supposed* to be stable. This is what Bloch has been saying for years: 
http://lcsd05.cs.tamu.edu/slides/keynote.pdf

I gave you two specific examples of projects that used this convention: slf4j 
and the J2EE packages. Let me give you 2 more: the J2SE itself (e.g., 
Collections API), and Stripes.

Can you give me one example of a Java project that uses the approach you 
suggest?


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

Reply via email to