This is my talk on ReactiveCocoa at @cocoaheads_at in Vienna. I gave an introduction to reactive programming with RAC and an overview of signals and subscribers, and how they can be used to create useful patterns.
Presented at YOW! Connected 2015 (Melbourne) by Jeames Bone & Mark Corbyn:
"There are many great resources for getting started with Functional Reactive Programming and ReactiveCocoa, but what’s the next step? ReactiveCocoa is not just a nice wrapper for KVO, Signals can be used to model many common problems in Cocoa including managing the state of your UI, notifications and even business logic. Adopting ReactiveCocoa can make for more modular, self-documenting code — while still integrating easily with other APIs and your existing code. We would like to share with you some interesting, practical examples where we’ve used ReactiveCocoa to solve problems in our app. Our goal is to inspire you to consider how ReactiveCocoa can be applied in your own apps."
ReactiveCocoa is an elegant framework that radically changes the way we structure our applications and handle flows of data. However, it's beauty is somewhat marred by Objective-C!
In this talk Colin will cover the basics of ReactiveCocoa and the principles of Functional Reactive Programming. Through simple practical examples he will show how ReactiveCocoa and Swift form a beautiful partnership.
Introduction to reactive programming & ReactiveCocoaFlorent Pillet
A short introduction to the concepts of functional reactive programming, and their implementation in ReactiveCocoa, a framework for iOS and OS X developers.
This speech was given at CocoaHeads Paris, October 9th 2014
En vieux bourlingueur du langage Swift, Grégoire Lhotellier viendra nous présenter les séquences et les collections du nouveau langage d’Apple. Il nous briefera sur l’essentiel de ce qu’il faut en savoir et ce qu’elles changent par rapport à leurs équivalent Objective-C.
Presented at YOW! Connected 2015 (Melbourne) by Jeames Bone & Mark Corbyn:
"There are many great resources for getting started with Functional Reactive Programming and ReactiveCocoa, but what’s the next step? ReactiveCocoa is not just a nice wrapper for KVO, Signals can be used to model many common problems in Cocoa including managing the state of your UI, notifications and even business logic. Adopting ReactiveCocoa can make for more modular, self-documenting code — while still integrating easily with other APIs and your existing code. We would like to share with you some interesting, practical examples where we’ve used ReactiveCocoa to solve problems in our app. Our goal is to inspire you to consider how ReactiveCocoa can be applied in your own apps."
ReactiveCocoa is an elegant framework that radically changes the way we structure our applications and handle flows of data. However, it's beauty is somewhat marred by Objective-C!
In this talk Colin will cover the basics of ReactiveCocoa and the principles of Functional Reactive Programming. Through simple practical examples he will show how ReactiveCocoa and Swift form a beautiful partnership.
Introduction to reactive programming & ReactiveCocoaFlorent Pillet
A short introduction to the concepts of functional reactive programming, and their implementation in ReactiveCocoa, a framework for iOS and OS X developers.
This speech was given at CocoaHeads Paris, October 9th 2014
En vieux bourlingueur du langage Swift, Grégoire Lhotellier viendra nous présenter les séquences et les collections du nouveau langage d’Apple. Il nous briefera sur l’essentiel de ce qu’il faut en savoir et ce qu’elles changent par rapport à leurs équivalent Objective-C.
As presented at DevDuck #6 - JavaScript meetup for developers (www.devduck.pl)
----
Looking for a company to build your app? - Check us out at www.brainhub.eu
An exploration into RxJava on Android for the experienced, yet uninitiated software engineer. This presentation explores Declarative vs Imperative programming paradigms and expands the discussion into Functional Reactive Programming. It explains the benefits of the observer contract, high-order functions, and schedulers available in RxJava. It also explains the purpose of the Android integration libraries: RxAndroid, RxLifecycle, and RxBindings.
Intro to RxJava/RxAndroid - GDG Munich AndroidEgor Andreevich
The RX libraries have gained great popularity among developers lately. RX solves asynchronous programming elegantly based on the Observer pattern. This is especially helpful on Android where lots of interactions are asynchronous to the UI. Speaker: Egor Andreevici
This talk was given at JSSummit 2013. Entitled "Avoiding Callback Hell with Async.js", my talk focused on common pitfalls with asynchronous functions and callbacks in JavaScript, and using the async.js library and its advanced control flows to create cleaner, more manageable code.
This talk was delivered at JavaOne 2013, together with Andrzej Grzesik. We mention the new Date APIs, changes to Collections as well as Streams APIs and of course... Lambdas!
Pieter De Baets - An introduction to React Nativetlv-ios-dev
Presented on the TLV iOS Developers Meetup - 02/08/2015.
Slides Credit: @nicklockwood
Facebook introduced React Native in the beginning of this year, bringing the popular React.js framework to native applications. Pieter will explain how JavaScript might be the future of native development and why React's functional UI pattern matters as much in native as on the web.
As presented at DevDuck #6 - JavaScript meetup for developers (www.devduck.pl)
----
Looking for a company to build your app? - Check us out at www.brainhub.eu
An exploration into RxJava on Android for the experienced, yet uninitiated software engineer. This presentation explores Declarative vs Imperative programming paradigms and expands the discussion into Functional Reactive Programming. It explains the benefits of the observer contract, high-order functions, and schedulers available in RxJava. It also explains the purpose of the Android integration libraries: RxAndroid, RxLifecycle, and RxBindings.
Intro to RxJava/RxAndroid - GDG Munich AndroidEgor Andreevich
The RX libraries have gained great popularity among developers lately. RX solves asynchronous programming elegantly based on the Observer pattern. This is especially helpful on Android where lots of interactions are asynchronous to the UI. Speaker: Egor Andreevici
This talk was given at JSSummit 2013. Entitled "Avoiding Callback Hell with Async.js", my talk focused on common pitfalls with asynchronous functions and callbacks in JavaScript, and using the async.js library and its advanced control flows to create cleaner, more manageable code.
This talk was delivered at JavaOne 2013, together with Andrzej Grzesik. We mention the new Date APIs, changes to Collections as well as Streams APIs and of course... Lambdas!
Pieter De Baets - An introduction to React Nativetlv-ios-dev
Presented on the TLV iOS Developers Meetup - 02/08/2015.
Slides Credit: @nicklockwood
Facebook introduced React Native in the beginning of this year, bringing the popular React.js framework to native applications. Pieter will explain how JavaScript might be the future of native development and why React's functional UI pattern matters as much in native as on the web.
Donner le goût du ReactiveCocoa. L’objectif de la présentation étant de nous expliquer comment migrer du code lié au KVO vers une implémentation ReactiveCocoa. Cette approche du KVO par ReactiveCocoa permet de comprendre très facilement les bases et l’intérêt de ce nouveau framework et de s’y mettre facilement et progressivement.
The basics of Reactive Cocoa. The tips and tricks in this presentation will cover almost all the use cases for Reactive Cocoa. Demo here: https://github.com/rob-brown/Demos/tree/master/RACDemo.
Functional reactive programing - what is it and what you would use it for?
ReactiveCocoa
- reactive programing in Objective-C
- how it works within Objective-C
- advantages and disadvantages of its use
- reactive programing code samples
- usage within Swift
«ReactiveCocoa и MVVM» — Николай Касьянов, SoftWeare-Legion
В докладе расскарывается тема использования функционально-реактивного подхода для разработки iOS- и Mac-приложений, его достоинства и недостатки. Также рассказано об использовании паттерна Model-View-View Model для улучшения архитектуры и повышения тестируемости GUI-кода.
Structured concurrency with Kotlin Coroutines
1. Theory
- Coroutines
- Suspending functions
- Asynchronous Flows
- Channels
2. Practice
- Business lookup feature implementation in TransferWise app for Android
ReactiveCocoa is the first and most commonly used implementation of the reactive paradigms in Cocoa, with a lot of bindings to UIKit/AppKit frameworks to help connecting reactive signals to UI elements. I was lucky to work on a huge Objective-C codebase with heavy use of ReactiveCocoa prepared to be released for millions of users, so I have some pros and cons in my pocket even for that scale. I'd like to discuss the state of ReactiveCocoa in 2016, to help people to understand their possibilities especially if they are in the phase of moving to Swift. I'd like to share the main differences of the new ReactiveCocoa Swift API with code snippets. What are the conceptual changes, in comparison to the v2 Objective-C API. Some examples of other libs, like RxSwift and what are the main differences in usage.
Building Scalable Stateless Applications with RxJavaRick Warren
RxJava is a lightweight open-source library, originally from Netflix, that makes it easy to compose asynchronous data sources and operations. This presentation is a high-level intro to this library and how it can fit into your application.
Managing State in React Apps with RxJS by James Wright at FrontCon 2019DevClub_lv
Redux is one of the most popular technologies for the management of shared state across entire React applications, which can be complemented by Redux Observable to describe asynchronous side effects with RxJS. This approach, however, adds cognitive load when balancing the varying concepts across these three libraries. What if we could use RxJS exclusively for managing state in our React apps? This talk will demonstrate this possibility and the benefits it provides.
Similar to ReactiveCocoa Goodness - Part I of II (20)
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Launch Your Streaming Platforms in MinutesRoshan Dwivedi
The claim of launching a streaming platform in minutes might be a bit of an exaggeration, but there are services that can significantly streamline the process. Here's a breakdown:
Pros of Speedy Streaming Platform Launch Services:
No coding required: These services often use drag-and-drop interfaces or pre-built templates, eliminating the need for programming knowledge.
Faster setup: Compared to building from scratch, these platforms can get you up and running much quicker.
All-in-one solutions: Many services offer features like content management systems (CMS), video players, and monetization tools, reducing the need for multiple integrations.
Things to Consider:
Limited customization: These platforms may offer less flexibility in design and functionality compared to custom-built solutions.
Scalability: As your audience grows, you might need to upgrade to a more robust platform or encounter limitations with the "quick launch" option.
Features: Carefully evaluate which features are included and if they meet your specific needs (e.g., live streaming, subscription options).
Examples of Services for Launching Streaming Platforms:
Muvi [muvi com]
Uscreen [usencreen tv]
Alternatives to Consider:
Existing Streaming platforms: Platforms like YouTube or Twitch might be suitable for basic streaming needs, though monetization options might be limited.
Custom Development: While more time-consuming, custom development offers the most control and flexibility for your platform.
Overall, launching a streaming platform in minutes might not be entirely realistic, but these services can significantly speed up the process compared to building from scratch. Carefully consider your needs and budget when choosing the best option for you.
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Looking for a reliable mobile app development company in Noida? Look no further than Drona Infotech. We specialize in creating customized apps for your business needs.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
AI Genie Review: World’s First Open AI WordPress Website CreatorGoogle
AI Genie Review: World’s First Open AI WordPress Website Creator
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-genie-review
AI Genie Review: Key Features
✅Creates Limitless Real-Time Unique Content, auto-publishing Posts, Pages & Images directly from Chat GPT & Open AI on WordPress in any Niche
✅First & Only Google Bard Approved Software That Publishes 100% Original, SEO Friendly Content using Open AI
✅Publish Automated Posts and Pages using AI Genie directly on Your website
✅50 DFY Websites Included Without Adding Any Images, Content Or Doing Anything Yourself
✅Integrated Chat GPT Bot gives Instant Answers on Your Website to Visitors
✅Just Enter the title, and your Content for Pages and Posts will be ready on your website
✅Automatically insert visually appealing images into posts based on keywords and titles.
✅Choose the temperature of the content and control its randomness.
✅Control the length of the content to be generated.
✅Never Worry About Paying Huge Money Monthly To Top Content Creation Platforms
✅100% Easy-to-Use, Newbie-Friendly Technology
✅30-Days Money-Back Guarantee
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIGenieApp #AIGenieBonus #AIGenieBonuses #AIGenieDemo #AIGenieDownload #AIGenieLegit #AIGenieLiveDemo #AIGenieOTO #AIGeniePreview #AIGenieReview #AIGenieReviewandBonus #AIGenieScamorLegit #AIGenieSoftware #AIGenieUpgrades #AIGenieUpsells #HowDoesAlGenie #HowtoBuyAIGenie #HowtoMakeMoneywithAIGenie #MakeMoneyOnline #MakeMoneywithAIGenie
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
10. AUTHORS (GITHUB FOLKS) SAY:
ReactiveCocoa (RAC) is an Objective-C framework inspired by Functional
Reactive Programming. It provides APIs for composing and transforming
streams of values.
11. THE IDEA TO CREATE REACTIVECOCOA SEEMS
TO HAVE COME FROM RX (MICROSOFT .NET),
WHICH IS SIMILAR.
12. RAC ALLOWS US AN EVENT-BASED
PROGRAMMING MODEL WHICH MAKES STATE
TRACKING OBSOLETE - in theory.
13. ONE THING IS CERTAIN:
IT MAKES STATE EASIER TO MAINTAIN.
14. SOME PEOPLE THINK RAC IS ALL ABOUT THIS...
// Keeps someObject.property synced with
// otherObject.other.property
// -> one-way binding
RAC(someObject, property) =
RACObserve(otherObject, other.property);
24. MOST TRIVIAL SIGNAL THAT SENDS VALUES:
RACReturnSignal
// All subscribers will immediately receive an
// empty array as 'next' value on subscription.
RACSignal *returnEmptyArrayOnSubscription =
[RACReturnSignal return:@[]];
32. ZIP
// If signalOne and signalTwo have both
// sent a value, signalOne's value is passed on.
[RACSignal zip:@[signalOne, signalTwo]
reduce:^id(RACTuple *t) {
return t.first;
}];
33. MERGE SIGNALS
// No matter if the user or a notification
// provokes a value send, the value is passed
// on in both cases.
[RACSignal merge:@[userTriggerSignal,
notificationCenterTriggerSignal]]
34. FLATTEN OR MAP/FLATTEN SIGNALS
// First maps all freshly sent requestParams to a new
// signal that will eventually send a server response.
// Then applies flatten such that we get all those
// server responses directly as values.
RACSignal *currentUsers = [requestParamsSignal
flattenMap:^RACStream *(NSDictionary *requestParams) {
return [MMAPI.sharedInstance
allUsersWithParams:requestParams];
}
];
37. CONCAT SIGNALS
// Catches any error in signal, waits 1 second,
// then passes on the error, and then immediately
// retries (= resubscribes). Forever.
[[signal catch:^(NSError *error) {
return [[[RACSignal
empty]
delay:1.0]
concat:[RACSignal error:error]];
}] retry];
38. SCAN/REDUCE
// Starts off with a mutable array, and adds all
// events that are ever sent by the 'events' signal.
// E.g. for infinite scrolling.
RACSignal *combinedEventsInAllPages = [events
scanWithStart:NSMutableArray.new
reduce:^id(NSMutableArray *running,
NSArray *eventsInPage) {
[running addObject:eventsInPage];
return running;
}];
39. SKIP VALUES
// RACObserve immediately sends the current
// property value. Skip:1 'swallows' that one.
[[RACObserve(self, someProperty)] skip: 1];
40. TAKE X VALUES AND STOP
// Only sends the first 3 text values.
// Then the signal is disposed of.
[textField.rac_textSignal take: 3];
41. DISTINCT UNTIL CHANGED
// Does only send distinct (= first and new) values.
[RACObserve(self, isUserLoggedIn) distinctUntilChanged];
43. SIGNALS CAN SWITCH THREADS
RAC(self, results) = [[[[RACReturnSignal
return:@[@(M_PI), @(M_E), @(M_SQRT1_2)]]
deliverOn:RACScheduler.scheduler]
// All that follows happens on a background thread
map:^NSNumber *(NSNumber *specialNumber) {
// Do expensive calculations
// NSNumber *result = ...
return result;
}]
// All that follows (RAC assignment) happens
// on the main thread
deliverOn:RACScheduler.mainThreadScheduler];
45. SIGNALS CAN BE HOT OR COLD
A hot signal is a signal that sends values (and
presumably does work) regardless of whether it
has any subscribers.
A cold signal is a signal that defers its work and
the sending of any values until it has a
subscriber.
Hot signals often don't send subscribers all
values of all time, but only values after their
subscription time.
47. SUBSCRIBE WITH A BLOCK
// Prints current date & time every second
RACSignal *dates = [RACSignal interval:1.0
onScheduler:RACScheduler.mainThreadScheduler];
[dates subscribeNext:^(NSDate *date) {
NSLog([NSDateFormatter
localizedStringFromDate:[NSDate date]
dateStyle:NSDateFormatterShortStyle
timeStyle:NSDateFormatterFullStyle]);
}];
48. SUBSCRIBE WITH A PROPERTY (KEYPATH)
// RAC() is a clever macro that abuses
// subscripting to let subscription look
// like a left-hand assignment
RAC(self.proxyObject.awesomeArray) =
[RACReturnSignal return:@[]];
49. INJECT BLOCK-BASED SIDE-EFFECTS
// doNext: is 'woven' into the signal chain,
// the side-effect becomes part of the signal.
// Dangerous, but sometimes necessary!
parametersOnRefreshOrParameterChanged =
[parametersOnRefreshOrParameterChanged
doNext:^(NSDictionary *parameters) {
@strongify(self)
self.isRefreshing = YES;
}];
50. SUBSCRIBE WITH A METHOD
// Calls updateAuthorizationWithAuthToken: when
// RACObserve() sends a value. RACObserve()
// will btw immediately send the first value,
// synchronously.
[self rac_liftSelector:
@selector(updateAuthorizationWithAuthToken:)
withSignals: RACObserve(MMSession.sharedSession,
currentCredentials.authToken), nil];
72. RAC'S CODE IS REALLY ADVANCED STUFF,
BUT HAVING A LOOK AT IT IS WORTH IT.
73. A WORD ABOUT SWIFT:
RAC can be used with Swift (didn't test it yet),
but a pure Swift implementation will take a while.
Also, KVO will not work without NSObject anyway.
Proof of concept is currently being merged into RAC:
https://github.com/jspahrsummers/RxSwift
74. IF YOU WANT TO LEARN RAC:
1. First have a look at how subscriptions work
2. Read through RAC's Github issues (mostly RAC Q/A)
3. Start slow, create a lot of intermediate properties
4. Go wild!
75. IF YOU ARE STUCK,
PING ME AT
@MANUELMALY
NO REALLY. DO IT!