- Flatten filesystem folder mess so code lives in single directory and we can just use Xcode groups for organization
- Draft new folder structure (see below)
- Implement new folder structure (in Xcode groups)
- Run [Venmo Synx sync filesystem with Xcode groups (maybe later)
Folder Structure
Keeping with the Single Responsibility Principle and it's corollaries, I propose we organize the project by domain. Domain is intentionally abstract, since some code doesn't belong to a specific "feature," but instead to something non-functional, such as networking, HTML parsing, etc. We don't need to perfectly identify & organize everything into domains, but we should be able to get pretty far with some intuitive groups. Here's a straw-man for how this might work in practice:
Appearance/ |- Colors/ |- UIColor+WMFStyle |- UIColor+WMFStyle |- Fonts/ |- Views/ |- Buttons/ |- UIButton+WMFConvenience.* |- UIBarButtonItem+WMFConvenience.* |- Controllers |- WMFStyleManager(?) Article/ |- View Controllers/ |- WMFArticleContainerViewController.h |- WMFArticleContainerViewController.m |- Private/ |- WMFArticleContainerViewController_Private.h |- WMFArticleContainerViewController+TOC.swift |- Web/ |- WebViewControllerDelegate.h |- WebViewController.h |- Table Of Contents/ Collections/ |- View Controllers/ |- Collections/ |- WMFArticleListCollectionViewController.* |- WMFPagingCollectionViewController.* |- Data Sources/ Core/ |- Models/ |- MWKSite |- MWKSiteInfo |- Title/ |- MWKTitle |- MWKLanguageLink |- Image/ |- MWKImage |- ImageInfo/ |- Article/ |- MWKArticle |- Section/ |- MWKSection |- Networking/ |- Legacy/ |- FetcherBase.* |- MediaWiki |- Requests/ |- Responses/ |- WikipediaZero/ |- Images / |- WMFImageController.* Home/ Images/ |- Downloading |- UIImageView+WMFImageFetching |- Gallery/ |- Fullscreen/ |- View Controllers/ |- WMFImageGalleryViewController |- Networking/ |- MWKImageInfoController.* |- Mini/ |- View Controllers/ |- WMFArticleHeaderImageGalleryViewController.m |- Offsets and Centering/ |- UIImageView+WMFContentOffset.* Search/ |- WMFSearchViewController.* |- UIViewController+WMFSearchButton.* |- History/ |- View Controllers/ |- Data Source/ |- Views/ |- Results/ |- Data Source/ |- Views/ |- WMFSearchResultCell |- Models/ |- WMFSearchResults(?) Web/ |- HTML/ |- NSString+WMFHTMLParsing.* |- JS Bridging/ |- UIWebView+WMFJSContext.*