You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by "Xavier Hanin (JIRA)" <ji...@apache.org> on 2007/03/14 16:46:10 UTC

[jira] Commented: (IVY-434) refactor Ivy source code to improve readibility

    [ https://issues.apache.org/jira/browse/IVY-434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480828 ] 

Xavier Hanin commented on IVY-434:
----------------------------------

This first step consists mostly in package renames / class moves. I've
tried to make the new structure cleaner and easier to understand, but
it still requires work on the classes themselves.

The main idea of the new structure is there:
org.apache.ivy.core
---------------------------
core of ivy, used internally to provide the main features of Ivy
This package contains a subpackage for each main feature of Ivy
(settings, resolve, retrieve, deliver, publish, install, ...). It also
contains subpackages for some core data:
+ core.module.id is used to group classes storing Module related identifiers
+ core.module.descriptor is used to group classes used to represent a
Module Descriptor in memory (i.e. usually the result of the parsing of
an ivy.xml file)
+ core.event is used for classes related to Ivy event mechanism

org.apache.ivy.plugins
-----------------------------
everything that is pluggable in Ivy can be found here. The rationale
behind the isolation in a separate package is to help people who want
to develop a plugin find the base classes and interfaces without too
much trouble, and without being confused by Ivy internals found in
core.
Under this package, there is a subpackage for each kind of plugin.

org.apache.ivy.ant
-----------------------------
everything related to ant is located here, i.e. mainly ant tasks.
Nothing has been moved in this package during the refactoring

org.apache.ivy.util
-----------------------------
Here you can find helper classes which are not directly related to
Ivy, which could be isolated in separate projects or reused for other
purpose.

org.apache.ivy.tools
-----------------------------
Here lies tools related to Ivy, but not really part of Ivy core
itself. Maybe this should better be kept in a separate project, for
the moment there is only an attempt to create an automatic Ivy file
generator from jars, leveraging the jarjar utility.

> refactor Ivy source code to improve readibility
> -----------------------------------------------
>
>                 Key: IVY-434
>                 URL: https://issues.apache.org/jira/browse/IVY-434
>             Project: Ivy
>          Issue Type: Task
>    Affects Versions: 1.4.1
>            Reporter: Xavier Hanin
>             Fix For: 1.5
>
>
> Ivy needs some refactoring to ease the understanding of its code base for new developers. The migration to ASF is good moment to make this refactoring.
> Note that I open this issue really too late because most of the work is already done, but I want to keep track of what has been done in something easier to include in the release notes than the mailing lists.
> So I will copy some info from the mailing list to this issue:
> On 1/29/07, Xavier Hanin <xa...@gmail.com> wrote:
> Main focus:
>     + split the Ivy class by features in:
>     ++ IvySettings, which will be the result of the configure step (I do
>     not use configuration to avoid confusion with module configurations)
>     ++ ResolveEngine, which will be responsible for dependency resolution
>     ++ RetrieveEngine, responsible for the retrieve step
>     ++ and so on for each features/tasks
>     The Ivy class will preserve an API similar to the existing one, but
>     will only be a Facade to other classes. Moreover, methods taking too
>     many parameters (like resolve) will be refactored to take a fewer
>     number of parameters, using a class (like ResolveOptions for instance)
>     to group those which are not first class parameters
>     I will also work on the dependency resolution algorithm, and
>     especially on IvyNode. I will split it into at least two classes, one
>     representing the node in the dependency graph, and one with data
>     related to the traversal of this graph during the resolution process.
>     Another thing I'd like to address is to reduce the number of classes
>     in the same package, and the number of packages of the same level
>     (namely org.apache.ivy.* packages), to move to something more
>     structured and hopefully less confusing.
>     This refactoring will introduce many API incompatibilities, but it
>     should hopefully help people to understand the code.
>     This is only the big picture, I'll keep you informed of my progress,
>     and try to process by steps to allow frequent feedback and
>     discussions.

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