[MonoDevelop] Assembly reorganization

Lluis Sanchez lluis at ximian.com
Mon Jul 25 09:57:45 EDT 2005


This is a proposal of reorganization of the MD assemblies. Hopefully,
this would be the last big API change before MD 1.0. The goal of this
change is to improve the modularization of the MD API, and provide a
more coherent, easy to use and reusable API.

MD is not just another GTK# application. It provides a public API that
addins and other applications can use and extend. When we release MD 1.0
this API will be frozen and only incremental changes will be allowed
until MD 2.0, which may take quite a lot of time. That's why we need to
make sure that MD 1.0 API covers most of the usage scenarios of MD.

The basic idea is to split the API in (at least) three assemblies:

      * MonoDevelop.Core: it would be the core runtime of MD. It would
        contain what it has right now plus some services moved from
        MonoDevelop.Base. It would not contain anything related to the
        GUI.
      * MonoDevelop.Gui: This assembly would contain user interface
        components for displaying, browsing or managing the information
        from the MD runtime, together with other utility classes.
      * MonoDevelop.IdeApplication: This would implement the MonoDevelop
        IDE, based on the previous assemblies.

Some namespaces should also be renamed. A basic rule we should follow is
that namespaces implemented in an assembly should have the assembly name
as prefix.

OK, so that's the structure of assemblies and namespaces I propose:

MonoDevelop.Core.dll
--------------------

      * MonoDevelop.Core 
              * The Runtime object, which would provide access to all
                those services. 
      * MonoDevelop.Core.Addins 
              * All API needed to load and manage addins. 
              * Codons not related to GUI. 
      * MonoDevelop.Core.Services 
              * Basic infrastructure of services. 
              * The property Service 
              * Project service (removing everything GUI related). 
              * Task service. 
              * StringParserService 
              * Logging service. 
              * SystemAssemblyService. 
              * ProcessService 
              * FileService (removing everything GUI related). 
      * MonoDevelop.Core.Parser 
              * Parser classes. 
      * MonoDevelop.Core.Projects 
              * Everything from MonoDevelop.Internal.Project (which
                includes Combine, CombineEntry, Project, IFileFormat and
                related classes). 
      * MonoDevelop.Core.Serialization 
              * Everything from MonoDevelop.Internal.Serialization.
      * MonoDevelop.Core.ProgressMonitoring 
              * IProgressMonitor and support classes. 

This assembly would not contain anything related to the GUI. It would
have the minimal runtime you need to use MD features. For example,
implementing a command line tool for building MD projects should be as
easy as:

public static void Main (string[] args)
{
  Runtime.Initialize ();
  Project project = (Project) Runtime.ProjectService.ReadFile (args
[0]);
  project.Build (new ConsoleProgressMonitor ());
}

> mcs builder.cs /r:MonoDevelop.Core


MonoDevelop.Gui.dll
-------------------

      * MonoDevelop.Gui 
              * The DispatchService, which should probably be changed to
                a helper static class, instead of a service. 
              * MessageService. 
              * Management of stock icons and resources. 
      * MonoDevelop.Gui.Completion 
              * Code completion window. 
      * MonoDevelop.Gui.Content 
              * Content interfaces (IEditable, IPositionable,
                IParsableContent, etc.) 
      * MonoDevelop.Gui.Dialogs 
              * Option dialogs and panels for Project and Combine. 
              * Other dialogs.

This could be an example of usage, which would display the options
dialog of a project:

public static void Main (string[] args)
{
  Runtime.Initialize ();
  Project project = (Project) Runtime.ProjectService.ReadFile (args
[0]);
  if (ProjectDialogs.ShowOptionsDialog (project))
     project.Save ();
}

MonoDevelop.IdeApplication.dll
------------------------------

      * MonoDevelop.IdeApplication 
              * The Ide class: a root class for accessing all IDE
                services (like we have Runtime for the core services).
      * MonoDevelop.IdeApplication.Gui
              * Everything related to IWorkbench, IWorkbenchLayout, pads
                and views. 
              * Status bar and toolbar. 
      * MonoDevelop.IdeApplication.Gui.Pads:
              * The main pads: project pad, class pad, task pad, file
                pad, etc. 
      * MonoDevelop.IdeApplication.Gui.Search:
              * The search GUI.
      * MonoDevelop.IdeApplication.Commands:
              * Implementation commands and command IDs.
      * MonoDevelop.IdeApplication.Services:
              * The CommandService
              * Management of external tools. 
              * The Parser Service. 
              * MonodocService (maybe rename to HelpService?)

I'm not using MonoDevelop.Gui.Ide as assembly name because it would
conflict with the Ide class. Other name proposals (for this and other
assemblies and namespaces) are welcome.

Other assemblies
----------------
      * MonoDevelop.Startup: no changes.
      * ICSharpCode.SharpAssembly: no changes.
      * ICSharpCode.SharpRefactory: no changes.
      * MonoDevelop.Base: removed.
      * MonoDevelop.Dock: No changes.
      * MonoDevelop.Gui.Utils: It's very small. Maybe it could be marged
        with another assembly (MonoDevelop.Gui?)
      * MonoDevelop.Gui.Widgets: no changes.


Please, comment on this.
Thanks!
Lluis.




More information about the Monodevelop-list mailing list