You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Allen Gilliland <al...@sun.com> on 2006/10/18 19:49:35 UTC

Code reorganization: Move model.* to business package

This isn't necessarily a 3.1 thing, even though to do this should only 
take a matter of minutes, but I wanted to throw out the idea of moving 
all the interfaces in model.* to the business package.

This is possibly just another one of my pet peeves, but I've never 
really understood why all of the manager interfaces needed to be in a 
separate java package.  Is there any real reason for doing that?

To me it makes more sense for those interfaces to be in the business.* 
package somewhere since they are actually part of the business layer and 
can have their implementation class nearby which makes it easier to work 
on the code.  I would also suggest that some of the interfaces in 
model.* may be better off grouped into subdirectories of the business 
package for better organization.  For example, it makes sense to me that 
the IndexManager (used for search) would actually be in the 
roller.business.search package.  Another one would be that the 
ThreadManager would be in the roller.business.runnable package.  This 
way we are grouping the code by functionality, not by type 
(managers/interfaces).

The other, possibly more tangible benefit, is that sometimes you may 
want to define parts of these interfaces with "protected" level access 
to try and confine their activities within a given package, but that is 
not possible with the current layout.  We may never need to do that, but 
I think it should be possible.

So, would anyone object to me drawing up a proposal for shifting around 
some of the classes/interfaces in the business package?  Again, this 
doesn't have to be a 3.1 proposal, but I don't see why it couldn't since 
it's only moving files around without modifying any functionality.

-- Allen

Re: Code reorganization: Move model.* to business package

Posted by Allen Gilliland <al...@sun.com>.
Just so that we are clear.  This is what I'm planning to do ...

move to roller.business:
BookmarkManager.java
ConfigManager.java
FileIOException.java
FileManager.java
FileNotFoundException.java
FilePathException.java
PluginManager.java
PropertiesManager.java
Roller.java
RollerFactory.java
ThemeManager.java
UserManager.java
WeblogEntryEditor.java
WeblogEntryPlugin.java
WeblogManager.java

move to roller.business.pings:
AutoPingManager.java
PingQueueManager.java
PingTargetManager.java

move to roller.business.referrers:
RefererManager.java

move to roller.business.runnable:
ThreadManager.java
ThreadManagerImpl.java

move to roller.business.search:
IndexManager.java
IndexManagerImpl.java

So that is just moving model.* as suggested, with a few of the 
interfaces going into subpackages like pings, referrers, runnable, and 
search.  And I also plan to move a couple of the Impl classes for 
ThreadManager and IndexManager.

I plan to just get this done this afternoon if nobody objects.

-- Allen



Dave wrote:
> +1
> 
> On 10/18/06, Elias Torres <el...@torrez.us> wrote:
>> +1
>>
>> Allen Gilliland wrote:
>> > This isn't necessarily a 3.1 thing, even though to do this should only
>> > take a matter of minutes, but I wanted to throw out the idea of moving
>> > all the interfaces in model.* to the business package.

Re: Code reorganization: Move model.* to business package

Posted by Dave <sn...@gmail.com>.
+1

On 10/18/06, Elias Torres <el...@torrez.us> wrote:
> +1
>
> Allen Gilliland wrote:
> > This isn't necessarily a 3.1 thing, even though to do this should only
> > take a matter of minutes, but I wanted to throw out the idea of moving
> > all the interfaces in model.* to the business package.

Re: Code reorganization: Move model.* to business package

Posted by Elias Torres <el...@torrez.us>.
+1

Allen Gilliland wrote:
> This isn't necessarily a 3.1 thing, even though to do this should only
> take a matter of minutes, but I wanted to throw out the idea of moving
> all the interfaces in model.* to the business package.
> 
> This is possibly just another one of my pet peeves, but I've never
> really understood why all of the manager interfaces needed to be in a
> separate java package.  Is there any real reason for doing that?
> 
> To me it makes more sense for those interfaces to be in the business.*
> package somewhere since they are actually part of the business layer and
> can have their implementation class nearby which makes it easier to work
> on the code.  I would also suggest that some of the interfaces in
> model.* may be better off grouped into subdirectories of the business
> package for better organization.  For example, it makes sense to me that
> the IndexManager (used for search) would actually be in the
> roller.business.search package.  Another one would be that the
> ThreadManager would be in the roller.business.runnable package.  This
> way we are grouping the code by functionality, not by type
> (managers/interfaces).
> 
> The other, possibly more tangible benefit, is that sometimes you may
> want to define parts of these interfaces with "protected" level access
> to try and confine their activities within a given package, but that is
> not possible with the current layout.  We may never need to do that, but
> I think it should be possible.
> 
> So, would anyone object to me drawing up a proposal for shifting around
> some of the classes/interfaces in the business package?  Again, this
> doesn't have to be a 3.1 proposal, but I don't see why it couldn't since
> it's only moving files around without modifying any functionality.
> 
> -- Allen
>