- [ ] Draft new folder structure (see below)
- [ ] Implement new folder structure (in Xcode)
- [ ] Run [Venmo Synx](https://github.com/venmo/synx) sync filesystem with Xcode groups
---
== 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:
```
// Each "level" in the hierarchy should be ordered alphabetically:
Appearance/
|- Colors/
|- UIColor+WMFStyle
|- UIColor+WMFStyle
|- Fonts/
|- Views/
|- Buttons/
|- UIButton+WMFConvenience.*
|- UIBarButtonItem+WMFConvenience.*
|- Controllers
|- WMFStyleManager(?)
Article/
|- View Controllers/
|- Container/
|- WMFArticleContainerViewController.h
|- WMFArticleContainerViewController.m
|- Private/
|- WMFArticleContainerViewController_Private.h
|- WMFArticleContainerViewController+TOC.swift
|- Web/
|- WebViewControllerDelegate.h
|- WebViewController.h
|- Table Of Contents/
|- Networking/
|- WMFArticleFetcher.*
|- WMFArticle(Request|Response)Serializer.*
Core/
|- View Controllers/
|- Collections/
|- WMFArticleListCollectionViewController.*
|- WMFPagingCollectionViewController.*
|- Data Sources/
|- Models/
|- MWKSite
|- MWKTitle
|- Article/
|- MWKArticle
|- Elements/
|- MWKSection
|- Images/
|- MWKImage
|- MWKImageInfo
|- Meta/
|- MWKLanguageLink
|- User/
|- MWKUser
|- MWKHistoryList
|- Meta
|- MWKSiteInfo
|- Generic/
|- MWKList.*
|- Networking/
|- Legacy/
|- FetcherBase.*
|- MediaWiki
|-
|- Images/
|- WMFImageController.*
|- Web/
|- HTML/
|- NSString+WMFHTMLParsing.*
|- JS Bridging/
|- UIWebView+WMFJSContext.*
Home/
Images/
|- Gallery/
|- Mini/
|- View Controllers/
|- WMFArticleHeaderImageGalleryViewController.m
|- Views/
|- Offsets and Centering/
|- UIImageView+WMFContentOffset.*
|- Downloading
|- UIImageView+WMFImageFetching
|- Fullscreen/
|- View Controllers/
|- WMFImageGalleryViewController
|- Networking/
|- MWKImageInfoController.*
Search/
|- View Controllers/
|- WMFSearchViewController.*
|- UIViewController+WMFSearchButton.*
|- Views/
|- WMFSearchResultCell
|- Models/
|- WMFSearchResults(?)
|- Search History/
```