Thread: [Publex-developers] A Question
Status: Alpha
Brought to you by:
cyqotiq
|
From: Jason S. <jns...@gm...> - 2007-01-17 02:17:34
|
I've almost got the SharpDevelop code converted into a stripped-down version that will work with PubleX. In doing so, I've managed to tear the SharpDevelop code apart and gain a better understanding behind why and how the constructed it the way the did. This leads me to something of a problem. I thought I'd pose this question in an open form to see what you think. At this point, we have two options. Option 1 is to continue forward and use what I've stripped down, possibly only using much of it once and creating our own classes and interfaces from here on forward. Option 2 is to reconstruct the SharpDevelop code and only strip out the debugging and compiling support and use the XmlEditor as the native TextEditorControl instead of a generic TextEditorControl (as it is in SharpDevelop). The benefit of option1 is that we can get started on writing our own code very soon, and we will have a ground-up understanding of how it works. The benefit of option 2 is that most of what we'll need has already been done in SharpDevelop, and we simply need to add support for advanced functionality with XML/HTML/SGML and exporting to PDF/DOC/Postscript. We would also need to add the customized CVS, security (for TCP/IP communications), and document tracking (SQL). We would have a functional Alpha-stage product quicker by reusing the bulk of SharpDevelop's code (option 2), but anyone who helps with the development would need to get to know the code. For the sake of understanding, I'll provide a list of the more common classes in the existing SharpDevelop code with a brief description of each one. If you've already looked into all of this before, then I appologize. SharpDevelop is broken into 3 main sections. These are the Addins, Libraries, and the Main code segments. Each of these breaks down further as follows: #################### Addins - Some of this code is unnecessary for SharpDevelop to work properly and can be omitted completely. ###### * Backend Addins - This handles backend bindings (code formatting, language-specific options, code completion, etc) for various programming languages (C#, Boo, VB.NET, ILAsm) - This can more or less be dropped. * Display Binding Addins - Provides the Form Designer, Resource Editor, and XmlEdit windows. (This is the XmlEditor that I've been trying to use) * Miscellaneous Addins - Various other addins that provide debugging, addin management, file type registeration with Windows, highlighting, HtmlHelp, Mono interfaces, PInvoke management, RegularExpressions toolkit, SharpQuery (#SQL), the StartPage, and Unit Testing. Several of these addins could be useful to PubleX. #################### Libraries - Most of this code can remain as it is ######### * Build Tasks - Handles compiling projects through .NET, Mono, reading ILASM assemblies, locating and exposing the Global Cache, and other higher-level Assembly related features. This can be replaced by our publishing engine. * TextEditor - This provides the SharpDevelop generic text editor. We've seen this before. * NRefactory - Handles parsing using a customized Parser and Lexer class, as well as getting the output from these classes. This will basically be our engine for parsing and validating markup langauges. * WinFormsUI - This handles subclassing Windows controls ( System.Windows.Forms namespace) and exposing some "high-tech" professional style controls from them. Useful to PubleX. #################### Main - Most of these sections will be modified to be specific to PubleX #### * Core - This code handles creating the Addin Manager, Core Services, and Utilities - AddIn Manager - This creates a collection of addins, and maintains properties that determine if they should be loaded or not. This also exposes the Addins project above. - Services - This code allows addins and native SharpDevelop classes to manipulate files managed by the Core library, logging, menus, messaging (to the user), property creation and retrieval, resources, string parsing (formatted text), and toolbars - Util - Provides interfaces for handling commands between SharpDevelop and Addins, Clipboard management, and Right-To-Left language support * SharpDevelop - This code provides interfaces to SharpDevelop-specific areas. - Commands - Provides interfaces for executing SharpDevelop-related tasks such as Autostart, Building, Configuration, Layout, Strings, Debugging, Editing, Files, Menus, TabStrips, Help commands, SideBars, Tools, and Windows - DOM - Document-related interfaces to Classes, Code Completion, Expressions, File editing, Code Folding, Attributes, Comments, Syntax Highlighting, members, Fields, Methods, parameters, parsing, language (C#, VB.NET, etc) properties, regions, tags, and XML documentation (such as the /// <summary>...</summary>) - GUI - Provides construction and management for XML Forms (XML UI in PubleX), Workbenches (the main SharpDevelop window), ViewContent (the text area of an editor control), tree grids, various dialogs - Internal - Code related to internal SharpDevelop functions: conditional evaluators, doozers ("builders"), managing exteral tools, templates, Undo/Redo - Project - Manages Projects, solutions, and interacts with the Build Tasks library from above. - Services - Manages services that handle browsing classes, debugging, file information and functions, language (English, German, Spanish, etc), parsing, project loading/saving, refactorization (this would be good for managing links dynamically), status bar messages, icon resources - TextEditor - This would be modified for PubleX to handle XML/HTML/SGML instead of C# or VB.NET code, but the rest of the functionality would stay this same. This code manages the TextEditorControl and handles bookmarks, code folding, highlighting, search/replace, encoding, formatting... almost anything related to TextEditor that is specific to SharpDevelop (the application). - Util - Handles interaction between SharpDevelop and external tools * Startup - This provides the entry point Main() function for the application. This code is responsible for initializing the rest of the code. ------------------------------------------------------ Having said all of that, I know it's a lot to read, but that's the rough break-down of what lies within the SharpDevelop code. As you can see, a LARGE portion of this code can be reused by PubleX... much of it as-is. So what do you think we should do? Should we go ahead and make use of as much of the project as we can, and use the SharpDevelop AddIn manager, XmlEditor/Styler, #SQL, Property Management, XML Forms, Messaging/Logging Services, and then just modify the Project classes to support our own customized "Project"? If we decide to go this route, then the Solution/Project relationship can still be maintained. An XML instance would be a "Project". This would include the XML file, any stylesheets, graphics, and other external files required to display or print that XML file. It would also include files that aren't necessary, but are relevant to an instance, such as comment pages or notes. All of the instances together that made up a manual or document collection would be the same as a Solution. Instead of compiling the code into a binary file, the "Build" functions would collect all of the instances together and create a publishing package... which would then be compressed, burned to a CD, printed, or placed off into a directory to await further action. The two largest components that we would need to build to have a functional demonstration would be task tracking (the database and tracking "who has what") and the CVS system. So what do you think? |