Я начал личный проект по разработке простой Cocoa IDE для программирования микроконтроллеров на Mac OSX Snow Leopard. Поскольку программирование не является проблемой, у меня возникли некоторые трудности с выбором архитектуры для создания высокоуровневых блоков приложения. Я думал о:
- Have the possibility to set project details, similar to what XCode does when user creates a new project; probably the possibility to include accessory views for project details that might be stored in user defaults or plists.
- Have the possibility to save the project in a custom, specific filetype, with a specific extension that the app will be owner of (document-based app).
- Have the possibility to add new files to the project, in particular h-file headers that will be automatically included for compilation; when choosing new file, to have the possibility to choose the type of file (similar to XCode);
- Have a simple editor, text-view-based, for example, without syntax coloring, check, highlighting; however to design it in such a way to allow future development of syntax coloring/ check, via a
NSScanner, for example; - Have the possibility to auto generate a Makefile for compilation, based on any persistence method at choice.
- Have the possibility to log compiler verbosity into a logging view (text view?) either via
stdoutor other better approach; - Using an
NSOutlineViewwith a tree controller (for example) for file browsing (similar to the XCode's project files on left pane); - Having the project packaged into folder-like project files, with
NSFileWrapperfor example (that will include the main.c file, additional header, the autogenerated Makefile and a plist for project settings etc); - Having settings persistence using
NSUserDefaultsfor project settings and application preferences via application-shared singleton (for example); - Using some classes in the model component to connect with microcode compiler via
NSTaskand display compilation and upload results in the logging text view; - etc
Если бы кто-нибудь из вас, обладающий гораздо большим опытом, чем я, взялся бы за такой проект, какие бы вы выбрали архитектурные компоненты? То же самое (разделенные представления, текстовые представления, NSTask, файловые обертки, представления структуры с древовидными контроллерами, отдельный делегат приложения от документа и общий экземпляр контроллера документа и т. д.), или вы бы выбрали другой подход? Гораздо проще?
Я был бы признателен за любой возможный намек на это. Спасибо, что уделили время. Если кому интересно, буду держать в курсе о ходе.