Skip to content

Examples for writing Apps with OOP by using the OOSwift repositories (OOBase, OOFoundation, OOUIKit, ...)

License

Notifications You must be signed in to change notification settings

ObjectAlchemist/OOExamples

Repository files navigation

OOExamples

Description

This repository contains examples that show how to implement object oriented. For that it uses the OOSwift object libraries (OOBase, OOFoundation, OOUIKit, ...)

Object orientation

All objects follow these rules:

  • they are immutable, except
    • the 'Memory' objects, these are low level in memory stores
    • some bridge objects to the apple api
  • they implement a protocol that defines the api of the object
    • an object is only allowed to implement one protocol
    • only a decorator may implement a second one
  • they use dependency injection, but only protocols will be injected
  • they are final, except
    • the 'Wrap' objects, these objects are designed to derive for object compositions
  • they do not end to -Client, -Model, -er
  • they do not provide any optional access
    • no optionals in protocols
    • no optionals in public initializers
  • they fail early in case of misuse

Additional OOP rules for applications

An ideal application only contains 'Wrap' compositions of objects.

Usage

Clone it and fetch dependencies with carthage by calling "carthage update".

Regenerate project

The xcodeproj can be generated by using Phoenx.

About

Examples for writing Apps with OOP by using the OOSwift repositories (OOBase, OOFoundation, OOUIKit, ...)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published