Skip to content

Commit

Permalink
Rename to ReactiveKit
Browse files Browse the repository at this point in the history
  • Loading branch information
Srđan Rašić committed Nov 5, 2015
1 parent 2f2eb36 commit 2f9e243
Show file tree
Hide file tree
Showing 38 changed files with 684 additions and 799 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# rKit - A Swift Reactive Programming Kit
# ReactiveKit

__rKit__ is a collection of Swift frameworks for reactive and functional reactive programming.
__ReactiveKit__ is a collection of Swift frameworks for reactive and functional reactive programming.

* [rKit](https://github.com/ReactiveKit/rKit) - A core framework that provides cold Stream and hot ActiveStream types and their derivatives - Tasks, Observable and ObservableCollection types.
* [rFoundation](https://github.com/ReactiveKit/rFoundation) - Foundation framework extensions like type-safe KVO.
* [rUIKit](https://github.com/ReactiveKit/rUIKit) - UIKit extensions (bindings).
* [ReactiveKit](https://github.com/ReactiveKit/ReactiveKit) - A core framework that provides cold Stream and hot ActiveStream types and their derivatives - Operation, Observable and ObservableCollection types.
* [ReactiveFoundation](https://github.com/ReactiveKit/ReactiveFoundation) - Foundation framework extensions like type-safe KVO.
* [ReactiveUIKit](https://github.com/ReactiveKit/ReactiveUIKit) - UIKit extensions (bindings).

## Observable

Expand All @@ -22,12 +22,12 @@ name.value = "Jim Kirk" // prints: Jim Kirk
name.bindTo(nameLabel.rText)
```

## Task
## Operation

`Task` type is used to represents asynchronous work that can fail.
`Operation` type is used to represents asynchronous work that can fail.

```swift
func fetchImage() -> Task<UIImage, NSError> {
func fetchImage() -> Operation<UIImage, NSError> {

return create { sink in
...
Expand All @@ -46,7 +46,7 @@ fetchImage().bindTo(imageView.rImage)

```

Each call to task's `observe` method performs separate work. To share results of a single call, use a `shareNext` method.
Each call to operations's `observe` method performs separate work. To share results of a single call, use a `shareNext` method.

```swift
let image = fetchImage().shareNext(on: Queue.Main.context)
Expand All @@ -57,10 +57,10 @@ image.bindTo(imageView2)

## Streams

Both Task and Observable are streams that conform to `StreamType` protocol. Streams can be transformed, for example:
Both Operation and Observable are streams that conform to `StreamType` protocol. Streams can be transformed, for example:

```swift
func fetchAndBlurImage() -> Task<UIImage, NSError> {
func fetchAndBlurImage() -> Operation<UIImage, NSError> {
return fetchImage().map { $0.applyBlur() }
}

Expand Down
559 changes: 559 additions & 0 deletions ReactiveKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// THE SOFTWARE.
//

public extension ObservableCollectionType where Collection == Array<Generator.Element> {
extension ObservableCollectionType where Collection == Array<Element> {

public mutating func append(x: Collection.Generator.Element) {
var new = collection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// THE SOFTWARE.
//

extension ObservableCollectionType where Generator.Element: Hashable, Collection == Set<Generator.Element> {
extension ObservableCollectionType where Element: Hashable, Collection == Set<Element> {

public func contains(member: Collection.Generator.Element) -> Bool {
return collection.contains(member)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
public protocol ObservableCollectionType: CollectionType, StreamType {
typealias Collection: CollectionType
typealias Index = Collection.Index
typealias Element = Collection.Generator.Element

var collection: Collection { get }
mutating func dispatch(event: ObservableCollectionEvent<Collection>)
Expand Down
File renamed without changes.
Loading

0 comments on commit 2f9e243

Please sign in to comment.