As a developer, I can find code for a particular domain under a corresponding Xcode group so that I can easily navigate the project
Closed, ResolvedPublic

Description

  • 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.*
BGerstle-WMF updated the task description. (Show Details)
BGerstle-WMF raised the priority of this task from to Needs Triage.
BGerstle-WMF added a subscriber: BGerstle-WMF.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 26 2015, 5:02 PM
BGerstle-WMF set Security to None.
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptNov 4 2015, 4:10 PM

@Mhurd @Fjalapeno please take a look. would like to set aside a little bit of time to briefly discuss this so we can get it done soon. once the localization stuff (T95733) is merged, this won't be blocked

BGerstle-WMF triaged this task as Normal priority.Nov 13 2015, 11:12 PM
JMinor added a subscriber: JMinor.

Can we move this back to Engineering Backlog, given that we didn't vote this as a priority for beta?

Mhurd claimed this task.
Mhurd closed this task as Resolved.
Mhurd reopened this task as Open.
Mhurd moved this task from Ready for PM Signoff to Doing on the Wikipedia-iOS-App-Development board.
Mhurd added a comment.Dec 1 2015, 6:47 PM

@BGerstle-WMF I like your proposed groups!

Mhurd updated the task description. (Show Details)Dec 1 2015, 6:54 PM
Mhurd updated the task description. (Show Details)
Mhurd updated the task description. (Show Details)
Mhurd updated the task description. (Show Details)Dec 1 2015, 6:57 PM
Mhurd removed Mhurd as the assignee of this task.
Mhurd updated the task description. (Show Details)
Mhurd renamed this task from As a developer, I can find code for a particular domain under a corresponding folder/group so that I can easily navigate the project to As a developer, I can find code for a particular domain under a corresponding Xcode group so that I can easily navigate the project.Dec 1 2015, 7:01 PM
MBinder_WMF closed this task as Resolved.Feb 8 2016, 7:32 PM