UI Browser 3 Project Plan

Continuing the discussion from UI Browser Documents:

  • Reading
  • Swift Third-Party Documentation
    • Frameworks
    • Applications
  • Example Code
    • Frameworks
    • Applications
  • Swift Code Structure Documented Principles
    • Implement PFAssistive Framework as a Swift framework named PFAssistiveFramework4

      • "Swift classes can be disambiguated based on the module they reside in. For example, the fully qualified name of a Swift class named DataManager in a framework named MyFramework is MyFramework.DataManager.”

      Excerpt From: Apple Inc. “Using Swift with Cocoa and Objective-C (Swift 3.1 Edition).” iBooks. https://itun.es/us/utTW7.l

      • “If you’re working with frameworks, make sure the Defines Module (DEFINES_MODULE) build setting under Packaging is set to “Yes”.”

      Excerpt From: Apple Inc. “Using Swift with Cocoa and Objective-C (Swift 3.1 Edition).” iBooks. https://itun.es/us/utTW7.l

      • “A module is a single unit of code distribution—a framework or application that is built and shipped as a single unit and that can be imported by another module with Swift’s import keyword.”

      Excerpt From: Apple Inc. “The Swift Programming Language (Swift 3.1).” iBooks.

      • “Each build target (such as an app bundle or framework) in Xcode is treated as a separate module in Swift. If you group together aspects of your app’s code as a stand-alone framework—perhaps to encapsulate and reuse that code across multiple applications—then everything you define within that framework will be part of a separate module when it is imported and used within an app, or when it is used within another framework.”

      Excerpt From: Apple Inc. “The Swift Programming Language (Swift 3.1).” iBooks.

      • “A source file is a single Swift source code file within a module (in effect, a single file within an app or framework). Although it is common to define individual types in separate source files, a single source file can contain definitions for multiple types, functions, and so on.”

      Excerpt From: Apple Inc. “The Swift Programming Language (Swift 3.1).” iBooks.

      • “You typically use open or public access when specifying the public interface to a framework.”

      Excerpt From: Apple Inc. “The Swift Programming Language (Swift 3.1).” iBooks.

      • “You typically use internal access when defining an app’s or a framework’s internal structure.

      Excerpt From: Apple Inc. “The Swift Programming Language (Swift 3.1).” iBooks.

      • “When you develop a framework, mark the public-facing interface to that framework as open or public so that it can be viewed and accessed by other modules, such as an app that imports the framework. This public-facing interface is the application programming interface (or API) for the framework.

      NOTE

      Any internal implementation details of your framework can still use the default access level of internal, or can be marked as private or file private if you want to hide them from other parts of the framework’s internal code. You need to mark an entity as open or public only if you want it to become part of your framework’s API.”

      Excerpt From: Apple Inc. “The Swift Programming Language (Swift 3.1).” iBooks.

    • Implement UI Browser as a Swift application

      • “A Swift app target is a module itself, so the fully qualified name of a Swift class named Observer in an app called MyGreatApp is MyGreatApp.Observer.”

      Excerpt From: Apple Inc. “Using Swift with Cocoa and Objective-C (Swift 3.1 Edition).” iBooks. https://itun.es/us/utTW7.l

      • “You can import external frameworks that have a pure Objective-C codebase, a pure Swift codebase, or a mixed-language codebase. The process for importing an external framework is the same whether the framework is written in a single language or contains files from both languages. When you import an external framework, make sure the Defines Module build setting for the framework you’re importing is set to “Yes”.”

      Excerpt From: Apple Inc. “Using Swift with Cocoa and Objective-C (Swift 3.1 Edition).” iBooks. https://itun.es/us/utTW7.l

      • “You can import a framework into any Swift file within a different target using the following syntax: import FrameworkName”

      Excerpt From: Apple Inc. “Using Swift with Cocoa and Objective-C (Swift 3.1 Edition).” iBooks. https://itun.es/us/utTW7.l

  • Ui Browser Plan Overview
    • Build accessibility framework and application code in tandem
      • For the application code, maintain the UI Browser 3.0.0 Change Log
      • For the framework code, write it from scratch, starting with the basics needed to run UI Browser to its current state.
    • Create Playgrounds and unit tests in tandem
    • Document the process by features and functionality rather than code organization
    • Keep up-to-date Change Logs in traditional form
  • UI Browser Coding Process
    • Framework
      Rewrite PFAssistiveFramework4 from scratch in Swift. Use it in the new UIBrowser3 application.
      • Create a new PFAssistiveFramework4 project. The UIBrowser3 project and workspace were created at the same time, and the PFAssistiveFramework4 project was added to the workspace alongside the UIBrowser3 project.
      • Framework Issues
        • Swift is a statically typed language, so in the AccessibilityElement class’s init() method I cannot assign a RootAccessibilityElement class type to self when a newly created element has an AXRole of application. This is therefore a good time to get rid of the RootAccessibilityElement subclass and use AccessibilityElement for all AXUIElementRef (AXUIElement in Swift) instances just as the Accessibillity API itself does.
    • Application
      Rewrite the UI Browser application from scratch in Swift using storyboards and container views, revise and modernize the user interface, refactor and update the class structure, and add new features. Use the new PFAssistiveFramework4 in it.