AliSoftware / Dip

Simple Swift Dependency container. Use protocols to resolve your dependencies and avoid singletons / sharedInstances!
MIT License
978 stars 75 forks source link

Grand renaming #105

Closed ilyapuchka closed 8 years ago

ilyapuchka commented 8 years ago

With Swift3 API guidelines in mind here is what I propose to rename in public API:

  1. ObjectGraph -> Shared, Prototype -> Unique. These names will make it more clear how these scopes affect instances
  2. resolveDependencies -> resolvingProperties
  3. DefinitionKey properties: protocolType -> type, associatedTag -> tag, argumentsType -> typeOfArguments. Additional words in original names do not add any value to understanding meaning of these properties.
  4. resolve method parameter withArguments -> arguments
  5. switch places for scope and tag parameters in register method. This does not break API in Swift2 but with Swift 3 will require to follow the order from declaration (SE-0060). register(.Shared, tag: "some") looks nicer than register(tag: "some", scope: .Shared)

There are also some internal methods renaming, but obviously its not that critical.