#reactivex
Explore tagged Tumblr posts
Text
Staff Mobile Engineer II
like React Native, Flutter, Ionic Moya, Firebase, Alamofire, Fastlane, ReactiveX- RxSwift, Combine, CoreData, Swinject MVC… Apply Now
0 notes
Text
"Harnessing the Power of Observables: Advanced Angular Data Management"
Introduction Observables are a fundamental concept in Angular’s ReactiveX library, which allows you to handle asynchronous data streams in a scalable and maintainable way. In this tutorial, we will explore the power of observables and learn how to harness them to manage complex data scenarios in our Angular applications. Prerequisites Familiarity with Angular fundamentals Understanding of…
0 notes
Text
A long intro to Kotlin Coroutines
301:
This blog has moved here.
#coroutines#kotlin#talk#concurrent#tutorial#introduction#intro#samples#example#test#explained#thread#suspend#function#java#reactivex#rxjava
2 notes
·
View notes
Link
안드로이드 라이브러리를 찾던 중, 함수형 프로그래밍의 장점을 그대로~~ 이식 가능한 것을 발견했다!!!
https://github.com/JakeWharton/RxBinding 이랑 추가해서 쓰면 될 듯.
처음 써보는 사람들은 누구나 할 수 있는 RxJava, 지금 시작하기!, RxAndroid로 리액티브 앱 만들기 #1를 참고하면 될 듯.
0 notes
Text
Angular 2 그리고 웹 프론트엔드 (1/2)
한동안 마무리 지어야 하는 일때문에 정신이 없다가 이제서야 정리를 할 시간이 오게 되었다..
이 포스트에서는 Angular가 무엇인지 모르는 분들을 위해 Angular를 설명하는 내용을 채울까 한다.
Angular 2 그��고 웹 프론트엔드 (1/2) - 현재 글
Angular 2 그리고 웹 프론트엔드 (2/2)
Angular는 구글에서 만든 자바스크립트 프레임워크이다.
프레임워크이기 때문에 일반적으로 여러분이 아시는 jQuery, underscore, lodash 보다 규모가 큰 프로젝트다. (지원되는 기능의 폭도 넓으며 채택한 의존 라이브러리들도 많다.)
한글 발음으로 “앵귤러 제이에스"라고 발음하면 되며 여기서 Angular는 “앙상한" 이라는 단어를 가지고 있는데,
아무래도 뼈대를 갖춰주는 프레임워크라는 의미로 사용했을 것이라고 생각된다.
Angular 공식페이지에 기재된 워딩이 “One framework” (하나의 프레임워크)인데, 이는 Mobile까지 대응하겠다는 Angular의 목표가 깃들어있다.
Angular에 대해서 대체 무슨 프레임워크인가, 어떤 목적과 장점을 가지고 있는가에 대해서 궁금증이 많으실 것이라 생각된다.
사실 이 물음을 풀어드리기 위해서는 앞서 웹 프론트엔드 개발 동향을 먼저 설명해야 할 것 같다.
웹 프론트엔드의 변화
현재 웹 프론트엔드 개발에서 사용되는 툴이 많다! 너무 많다! (그리고 많아지고 있다!!)
(필자는 이 사진에 보여지는 앱보다 많은 앱을 사용했음에도 전체에 비해서는 절반도 채 되지 않는다.)
일부 개발자는 전통적인 프론트엔드 개발 방식대로 html과 javascript 그리고 css를 개발하고,
javascript 엘리먼트를 쉽게 찾을 수 있는 jQuery와 jQueryUI를 연동하여 서비스를 완성 했을 것이다 그리고 그렇게 개발하는 방법에 큰 불편함이 없었을 것이다.
결과적으로 오늘에서 이렇게 개발을 도와주는 앱이 많아진 것은 ECMA 5에서 ECMA 6로 자바스크립트 표준이 변경되고 있는 상황과,
Node.js 보급으로 인해 백엔드 서버 개발자가 점점 javascript를 사용하게 되면서 백엔드 기술 프론트엔드와의 경계가 허물어지고 있는 점.
그리고 거대한 웹 서비스 벤더사(구글, 페이스북)에서 프론트엔드 프로젝트에 기여를 하고 있는 점 이것들이 뭉치면서 아래와 같은 결과를 내었다.
웹 프론트엔드 개발에 백엔드 개발에서 요구되던 기능이 추가되고 있다.
ECMA6의 지원을 위한 서브 툴이 생겨나고 있다.
많은 모바일기기 지원으로 보다 빠른 웹을 시장이 원하고 있다.
많은 기존 자바스크립트 라이브러리들이 최신 기술을 수용하고 있다.

(웹 프론트엔드 개발자들은 공부할 것이 엄청나게 늘어나 버렸다.)
또한 이러한 변화가 프론트엔드의 러닝커브를 늘렸으며,
기존 개발 환경에 익숙하여 최신 동향을 살펴보지 않는 개발자들은
자리를 위협받는 상황이 오지않았나 조심스럽게 추측해본다.
웹 프론트엔드 도구들
그러면 아까 사진에 보여드린 수많은 앱 들이 도대체 무슨역할을 하나?
그리고 그것이 반드시 필요한가에 대해서도 설명을 드릴까 한다.
상당히 지루하고 딱딱한 내용이 될 것 같아 많은 링크와 사진을 첨부했다.

1. npm, bower, yoman, yarn
이 4가지 서비스는 Pakcage Manager(패키지 매니저)라고 부르는 서비스다.
(yoman은 정확히 말하면 스캐폴딩(Scaffolding - 실제 작업을 하기 전 철골을 덧대듯이 작업에 필요한 최소한에 구조를 만들어주는 단계)만 해주는 서비스.)
쉽게 풀어보자면 프로젝트에 사용할 라이브러리를 직접 찾아 해당 파일을 원격지에서 다운받아 로컬 파일에 옮기지 않아도, 간단한 명령어로 추가/수정/삭제를 지원하고 의존성(Dependency)을 관리해주는 서비스들을 의미한다.
또한 라이브러리 배포와 호스팅/빌드/테스트 스크립트 정의도 가능하다.

2. Typescript, Flow
타입스크립트는 자바스크립트에서 발생할 수 있는 문제(타입 검증)를 해결해주는 동시에 ECMA6의 스펙을 포함하여 지원하고 있으며 Microsoft와 Google이 협력하여 개발하고 있는 언어이다. Typescript를 통해 개발을 진행하게되면 런타임 단계에서 발생할 수 있는 오류를 미연에 방지할 수 있고 OOP 지향한 개발과 Dependency Injection(DI)등의 패턴을 구현할 수 있게 된다. React 프로젝트의 Flow또한 타입 검증을 지원해준다.

3. Reactive Programming
과거에는 웹 페이지 이동 (빈 화면에서 로딩이 걸리고 새로운 페이지가 ��여지는) 없이 데이터를 업데이트 하는 사이트는 드물었지만 지금은 웬만한 서비스에서 이 기술을 적용하고 있다. 이러한 비동기 통신은 콜백함수를 통해 전달이 되어야 했으며 이 때문에 콜백지옥이 발생하기도 했다. RX(ReactiveX) 프로젝트는 이러한 문제를 해결해주며, 옵저버 패턴을 제공하여 서로다른 컨텍스트에 데이터를 동시적으로 제공해줄 수 있다. Redux, Flux 서비스는 이러한 데이터를 효율적으로 대상에게 전달할 수 있다. 참고로 AngularJS 2는 RxJS를 포함 할 수 있다.
4. grunt, gulp, webpack
여러분이 만약 반복되는 작업을 조금이라도 재활용하여 효율적인 프로그래밍을 원했다면 CSS의 작성이 굉장히 피곤하게 느껴졌을 수 있다, LESS와 SASS, Stylus와 같은 기술은 이러한 반복되는 작업을 없애주고 더불어 색상 코드를 특정 % (밝게, 어둡게)와 같은 편의 함수를 제공한다. 다만 결국 브라우저는 CSS 문서만을 인식하기 때문에 .less .sass와 같은 확장자는 빌드단계에서 변경이 이루어져야 한다, 그 밖에도 빌드 단계에서 진행되야 하는 작업들 (ECMA6 파일을 ECMA5 파일로 변경, 문서 최적화, 코드 테스트, 카피라이팅 삽입, 문서 문법 검증, 번들링 등)을 도와주는 도구가 grunt, gulp, webpack과 같은 도구이며 이는 다시 npm등의 패키지 매니저 도구와 연동하여 사용하거나 IDE(통합 개발환경)에서 연동하여 빌드과정을 일관화 시킬 수 있다. 이렇게 되면 파편화 되있는 JS, CSS, HTML 문서를 하나로 합쳐주며 표준코딩을 지향하게 되며 하위 호환 여부 검토가 수월하고 예기치 못한 버그와 사이드이펙트를 미연에 방지 할 수 있게 된다.
5. RequireJS 그리고 CommonJS와 AMD(Asynchronous Module Definition)
Node.js의 영향 중 하나라고 필자는 생각한다.
네이버 D2에서 작성한 글이 보기 좋아 링크를 공유한다.
웹 페이지에서 서비스를 개발할 때 여러 Javascript 라이브러리를 합쳐 하나의 완성된 서비스를 만든다. 이때 이 라이브러리를 하나의 모듈로 볼 때 그 모듈에 대한 표준이 없다는 것이다. 따라서 각각의 라이브러리들은 서로다른 라이브러리 제공방식을 사용하고 있고 이를 이용하는 개발자는 각각의 라이브러리마다 다른 방식의 사용법 (같은 라이브러리라도 버전마다 달라지기도 한다.)을 이용해야하고 또 이러한 부분은 굉장히 비효율적으로 이용된다. (케익 한조각을 먹기위해 케익 전체를 사야하는 상황)
이를 해결하기 위해 나온 모듈 제공 방식이 CommonJS와 AMD이다.
각각의 사용형태가 다른 모듈들을 제공하는 하나의 표준을 만들어 그것을 지향하면 라이브러리 추가와 확장이 훨씬 쉬워지며 이는 큰 프로젝트에서도 모듈의 관리가 용이하며 효율적이다. 하지만 이 방식을 사용해도 마찬가지로 브라우저에서는 지원하지 않기 때문에 (다만 ECMA6는 import 키워드를 제공한다.) 이를 번들링 하기 위한 systemjs, Jspm, Rollup.js, Webpack등의 서비스가 존재한다
6. jasmin, chai, mocha
규모가 큰 프로젝트 일수록 소스관리가 중요하여 자칫 하나의 수정사항이 사이드이펙트(다른 비즈니스 로직에 직/간접적으로 영향이 가는 것)가 발생 할 수 있다.
이는 라이브서비스에 커다란 이슈이며 이를 해결하기 위해 QA와 테스트케이스가 존재한다. 다만 규모가 크고 지원하는 플랫폼이 넓으며 수많은 페이지와 버그가 발생하는 환경을 시연하기 어려운 요소가 발생되면 이러한 테스트는 사람이 직접하기 어렵고 특히 애자일 방법론을 사용하는 개발 환경에서는 이러한 과정이 거의 불가능에 가깝다. 결국 이를 해결하기 위해서는 자동화된 개발 테스트 환경이 필요하다.
프론트엔드 개발도 마찬가지로 유닛 테스트를 지원하는 서비스가 있다. 가상의 DOM Mock에 라이브러리의 모든 케이스를 테스트해보고 결과적으로 테스트의 결과를 확인할 수 있게 제공하여 서비스 배포이전에 모든 기능에 안전성을 검토 할 수 있다.
7. istanbul, blanket, JSCoverage
이전에 말한 유닛테스트는 서비스 되고있는 소스코드의 얼마나 많은 부분을 테스트 해주는지에 대한 부분이 상당히 중요하다. (많은 부분이 자동화 테스트를 지원할 수록 서비스는 안정적이고 신뢰를 보장하기 때문) 하지만 얼마나 많은 부분의 소스코드에 테스트를 지원하는지 사람이 알기에는 어렵다고 볼 수 있다. 이 때문에 얼마나 많은 부분이 테스트가 되었는지, 다시말해 얼마나 코드가 커버(Cover)되었느냐는 커버리지(Coverage)라는 용어를 사용하여 지표를 결정한다. 유닛 테스트 도구와 연동하여 커버리지 도구를 사용하게 되면 커버리지 지표를 리포트로 제공받게 된다.
8. JSDoc
JSDoc은 javascript 모듈에서 사용되는 각각의 클래스, 함수들에 대한 정의를 JSDoc에서 정의한 표준 주석양식에 맞춰 작성하게 되면 그에따른 자동화된 개발 래퍼런스 문서가 만들어지게 된다. 마크다운 문서로 래퍼런스 문서를 제공하여 gitbook 같은 호스팅 서비스에 등재하게 되면 하나의 인쇄물로서 출력도 가능하다. 이러한 방법은 개발자가 일일히 래퍼런스 문서를 만들지 않아도 래퍼런스 문서를 만들 수 있는 이점이 있으며 표준화된 주석 사용으로 협업 및 인수인계가 원할하게 된다. 사실 다른 Doc 툴도 있지만 해당 서비스가 가장 유력하다.
AngularJS 2에 대한 설명을 위한 포스팅이었으나, 최근들어 웹 프론트엔드 개발 동향이 많이 변하고 있어 그 부분을 중점적으로 정리해보았다.
다음시간에는 Angular 2와 Angular 1 그리고 ReactJS를 주제로 중점적으로 다뤄보는 시간을 가져보도록 하자. 아디오스!
#개발#웹 프론트엔드#npm#bower#yoman#yarn#typescript#flow#ecma5#ecma6#requirejs#commonjs#amd#Reactive Programming#ReactiveX#React#jasmin#chai#mocha#istanbul#blanket#JsCoverage#JsDoc#grunt#gulp#webpack#systemjs#jspm#rollup.js#import
5 notes
·
View notes
Text
Clojure transducers from the ground-up: the essence.
This is the first part of an article dedicated to Clojure transducers. I initially wrote this article for uSwitch Labs (my former employer in 2017) but the articles were later removed. This first part illustrates the functional foundations of transducers. The second part contains practical examples of their use in real-life scenarios.
Introduction
Transducers have been introduced in Clojure 1.7 (at the end of 2014) and they never got the attention they deserved. The author of Clojure, Rich Hickey, recently stated in his A History of Clojure paper:
I think transducers are a fundamental primitive that decouples critical logic from list/sequence processing and construction, and if I had Clojure to do all over I would put them at the bottom.
Maybe because of some confusion with Reducers (a similar Clojure feature which focuses on parallelism), or because not all functions in the standard library are transducers-aware, many Clojure programmers are still reluctant to use them extensively. Transducers are still relegated to advanced scenarios, but there are compelling reasons to use them more often, for example to replace some common cases of sequential processing.
In this article I’m going to show you that transducers are essentially a functional abstraction (similar to combining object oriented patterns). They can be derived with a few refactoring moves on top of existing collection processing functions. The fact that Clojure offers them out of the box removes any excuse not to start using them today!
Same function, different implementations
map and filter are very common operation for stream oriented programming (there are many more in the Clojure standard library and the following examples apply to most of them as well). Here's a simplified version of how map and filter are implemented in Clojure:
(defn map [f coll] (when (not= '() coll) (conj (map f (rest coll)) (f (first coll))))) (defn filter [pred coll] (when (not= '() coll) (let [f (first coll) r (rest coll)] (if (pred f) (conj (filter pred r) f) (filter pred r)))))
map and filter clearly share some common traits in terms of iterating the input, building the output, the recursion mechanism and the actual "essence" of the operation:
The access mechanism to the input collection (first, rest, the empty list '() are all specific to the Clojure sequential interface).
Building the output (conj is used to put elements in the final list, but something else could be used).
The recursion mechanism is used to consume the input (note that this is a stack consuming and not tail-recursive loop).
The "essence" of the operation itself, which is the way "mapping" or "filtering" works (filter requires a conditional for example).
There are similar operations for data pipelines in other Clojure libraries. For example core.async is a library inspired by CSP (Communicating Sequential Processes) in which processes exchange information using channels. A common case for the sender is to apply transformations to the outgoing messages, including operations like map, filter and many others. Let's have a look at how they could be implemented in core.async (this is a simplified version of the now deprecated ones that appeared in the initial implementation):
(defn map [f in out] (go-loop [] (let [val ( in)] (if (nil? val) (close! out) (do (doseq [v (f val)] (>! out v)) (when-not (impl/closed? out) (recur))))))) (defn filter [pred ch] (let [out (chan)] (go-loop [] (let [val ( ch)] (if (nil? val) (close! out) (do (when (pred val) (>! out val)) (recur))))) out))
Again, there are similarities and common traits:
The access mechanism uses core.async primitives (!) to read and write to channels.
The recursion mechanism is implemented by the go-loop macro and related recur instruction.
The "essence" of the operation itself is the same as before: map consists of applying "f" to each value and filter uses a predicate on each value in a when condition.
We are going to see one last example inspired by another library: the Clojure Reactive extensions. RxClojure is a library implementing the Clojure bindings for RxJava. Reactive programming is a push-based model based on streams: events (called “observables”) are collected and routed to components "reacting" to compose behaviour. How could map or filter be implemented in this case? The following are not in RxClojure, as they are just calling into the relative Java version. But if we had to implement them in Clojure, they would probably look something like this:
(defn map [f xs] (let [op (operator* (fn [] (subscriber (fn [ v] (catch-error-value v (on-next (f v)))))))] (lift op xs))) (defn filter [pred xs] (let [op (operator* (fn [] (subscriber (fn [ v] (catch-error-value v (when (f v) (on-next v)))))))] (lift op xs)))
We start to see a pattern emerging, once again we can distinguish between:
The access mechanism uses lift to iterate through the incoming sequence "xs" in conjunction with on-next inside the operator implementation.
Building the output is not explicit as before. Events are consumed downstream without accumulating.
The recursion mechanism is implicit. Somewhere else in the code a loop is happening, but it's not exposed as part of the main API.
The "essence" of the operation is the same as before: map consists of (f v) for each value and filter uses a when condition.
Do we need to repeat variants of the same implementation over and over? Is there a better way?
Combinatorial Explosion
By looking at the three implementations of map and filter above, we learned that the essence of the operation and some form of iteration are general aspects. Making access to the input or building the output depends on the specific transport. We just looked at map and filter, but the same isolation of concerns is applicable to other sequential processing functions, for example:
mapcat, remove, take, take-while take-nth, drop, drop-while, replace partition-by, partition-all, keep, keep-indexed map-indexed, distinct, interpose, dedupe, random-sample [...]
The list above should also include any custom functions that you might need beyond what's offered by the Clojure standard library.
The dilemma is; how can we deal with the ensuing combinatorial explosion? Are we doomed to implement the same functions with slight variations for each new type of transport/collection? Could we just write map once and use it everywhere? Transducers are the solution to this problem (and much more).
An exercise in refactoring
To enable reuse of the general aspects of sequential processing, we need to isolate the "essence" of map or filter (or other functions from the list above) and provide a way to run them in a transport-independent fashion. If we succeed, we'll have a recipe to build processing pipelines that can be reused in different contexts.
It turns out that reduce, a well known operation in functional programming, is the key to achieve this goal. Is not a coincidence that Graham Hutton dedicated an entire paper on The universality and expressiveness of fold (fold is another name for reduce). reduce is very general because it encapsulates the prototypical tail-recursive loop. Have a look, for example, at the following "sum of all numbers in a list":
(defn reduce [f result coll] (if (not= '() coll) (reduce f (f result (first coll)) (rest coll)) result)) (reduce + 0 (range 10))
Here reduce accumulates the result explicitly as one of the parameters. This form of recursion is also called "iterative" and once transformed into a Clojure loop-recur, it doesn't consume the stack. The other interesting fact about reduce is that it decouples the iteration mechanism from the transformation semantic, which is part of our plan.
map and filter (as well as many other recursive algorithms) can be rewritten "reduce style". The fact that a stack-consuming algorithm can be rewritten as iterative is a well known property in theory of computation. By rewriting map and filter (and possibly other sequential functions) as iterative, we are offered the possibility to extract the "essence" of the operation:
;; refactoring step 1: iterative recursion style. (defn map [f result coll] (if (not= '() coll) (map f (f result (first coll)) (rest coll)) result)) (map (fn [result el] (conj result (inc el))) [] (range 10)) (defn filter [f result coll] (if (not= '() coll) (filter f (f result (first coll)) (rest coll)) result)) (filter (fn [result el] (if (odd? el) (conj result el) result)) [] (range 10))
"f" is now passed as part of the parameters in our new implementations. If you look carefully, the two functions map and filter are now identical (except for the name). Invoking them requires a more sophisticated "f" function taking two arguments: the result so far (also called accumulator) and the next element to process.
One big plus after this change is that the essence of filtering (or mapping), is now isolated from recursion and input iteration. It is not yet isolated from the way the output is built (conj in both cases) and the actual function (inc and odd? respectively). But let's take baby steps and do some renaming: map and filter can be renamed reduce because that's what they are now. Second, we can extract two new functions called "mapping" for map and "filtering" for filter:
;; refactoring step 2: rename and reuse. (defn reduce [f result coll] (if (not= '() coll) (reduce f (f result (first coll)) (rest coll)) result)) (defn mapping [result el] (conj result (inc el))) (reduce mapping [] (range 10)) (defn filtering [result el] (if (odd? el) (conj result el) result)) (reduce filtering [] (range 10))
reduce encapsulates the iteration and the sequential access mechanism. But there is still a problem with "mapping" and "filtering": if we wanted to use them on a core.async channel for instance, we'd need to abstract conj away (because conj doesn't work on channels). We can't modify "mapping" or "filtering" interface, because it is part of the reduce contract. But we can add a parameter "rf" (for Reducing Function) in a wrapping lambda and return another function of two parameters:
;; refactoring step 3: extract output construction parameter. (defn reduce [f result coll] (if (not= '() coll) (reduce f (f result (first coll)) (rest coll)) result)) (defn mapping [rf] (fn [result el] (rf result (inc el)))) (reduce (mapping conj) [] (range 10)) (defn filtering [rf] (fn [result el] (if (odd? el) (rf result el) result))) (reduce (filtering conj) [] (range 10))
We also need to extract inc and odd? which are just example functions and should be generically passed as parameters. Again, we don't want to alter the two arguments interface required by reduce, so we use another wrapping function and introduce the new parameter "f" (or "pred" for filter):
;; refactoring step 4: extract transforming and predicate functions. (defn mapping [f] (fn [rf] (fn [result el] (rf result (f el))))) (reduce ((mapping inc) conj) [] (range 10)) (defn filtering [pred] (fn [rf] (fn [result el] (if (pred? el) (rf result el) result)))) (reduce ((filtering odd?) conj) [] (range 10))
Finally, let's rename the relevant functions back to map and filter (because this is what they are after all):
;; refactoring step 5: final clean-up. (defn map [f] (fn [rf] (fn [result el] (rf result (f el))))) (defn filter [pred] (fn [rf] (fn [result el] (if (pred el) (rf result el) result))))
This is exactly how the single-arity versions of clojure.core/map and clojure.core/filter appear in the Clojure standard library (modulo some complexity related to multiple sequence arguments in map).
Along with the enriched versions of many sequential processing functions, Clojure 1.7 also introduced a new function called transduce that enables the use of map or filter without necessarily having to call reduce directly. This mainly improves readability:
(transduce (map inc) conj (range 10)) ;; same as: (reduce ((map inc) conj) [] (range 10))
The standard library also provides transducers awareness in other places. The new versions of sequence and into for example, remove the need for an explicit conj:
(sequence (map inc) (range 10)) (into [] (map inc) (range 10))
conj is not explicit because the reducing function can be inferred from the specific call to sequence (because we want to build a sequence) or into [] (we want to build a vector). Now that we have the basic recipe, it's time to put the new construct in practice and see how they can be used for our daily programming.
Conclusions
The article shows that transducers are built on top of a simple functional abstraction and there is nothing magic happening under the hood. Apart from the interesting refactoring exercise, transducers have deeper consequences in terms of reusability, composability and performance that we are going to explore in the second part of this article.
Clojure The Essential Reference
Did you enjoy reading this article? You might find my book Clojure: The Essential Refence also interesting! The book has an entire chapter dedicated to all the functions related to both reducers and transducers. There you can find more examples and insights.
1 note
·
View note
Text
RxJS 快速入门
这是一篇给新手的 RxJS 快速入门,它可能不精确、不全面,但力求对新手友好。
异步与“回调地狱”
我们都知道 JavaScript 是个多范式语言,它既���持过程式编程,又支持函数式编程,两者分别适用于不同的场合。在同步环境下,两者各有优缺点,甚至有时候过程式会更简明一些,但在异步环境下(最典型的场景是一个 Ajax 请求完成后紧接着执行另一个 Ajax 请求),由于无法控制执行和完成的顺序,所以就无法使用传统的过程式写法,函数式就会展现出其优势。
问题在于,传统的函数式写法实在太不友好了。
传统写法下,当我们调用一个 Ajax 时,就要给它一个回调函数,这样当 Ajax 完成时,就会调用它。当逻辑简单的时候,这毫无问题。但是我要串起 10 个 Ajax 请求时该怎么办呢?十重嵌套吗?恩?似乎有点不对劲儿!
这就是回调地狱。
不仅如此,有时候我到底需要…
View On WordPress
0 notes
Text
Knolders review of #venkat_50_50_tour at #DelhiJUG17 meetup

Dr. Venkat Subramaniam celebrates his 50th anniversary with distributing his smiles throughout the world’s Java User Groups (JUG) meetups, conferences, and events. Recently, he was in India and Delhi-NCR Java User Group organized one stop meetup for him. Needless to say, core to our culture of knowledge sharing caring, Knolders were a part of the event. In meetup, Venkat spoke about
Designing…
View On WordPress
#agiledeveloper#code coverage#Code Quality#Functional Programming#Java8#Knoldus@Conference#opensource#reactive programming#reactivex#Refactoring#technology#venkat_s
0 notes
Link
A good place to learn RxJS with a good category and better live code examples.
0 notes
Text
ReactiveX Web and Mobile Application Development Company in India (RxJS)
ReactiveX
Reactive Application Development Company in India (RxJS)

Reactive Application Development
Why to use ReactiveX (RxJS) ?
One question you may ask yourself, is why RxJS What about Promises? Promises are good for solving asynchronous operations such as querying a service with an XMLHttpRequest , where the expected behavior is one value and then completion. The Reactive Extensions for JavaScript unifies both the world of Promises, callbacks as well as evented data such as DOM Input, Web Workers, Web Sockets. Once we have unified these concepts, this enables rich composition.
What is ReactiveX ?
ReactiveX is a library for composing asynchronous and event-based programs by using observable sequences.
It extends the observer pattern to support sequences of data and/or events and adds operators that allow you to compose sequences together declaratively while abstracting away concerns about things like low-level threading, synchronization, thread-safety, concurrent data structures, and non-blocking I/O.
It is sometimes called “functional reactive programming” but this is a misnomer. ReactiveX may be functional, and it may be reactive, but “functional reactive programming” is a different animal. One main point of difference is that functional reactive programming operates on values that change continuously over time, while ReactiveX operates on discrete values that are emitted over time.
Why Use Observables?
The ReactiveX Observable model allows you to treat streams of asynchronous events with the same sort of simple, composable operations that you use for collections of data items like arrays. It frees you from tangled webs of callbacks, and thereby makes your code more readable and less prone to bugs.
///Declare an observable public ISubject<MouseEventArgs> MouseMove; ///Publish data MouseMove.OnNext(args); ///Subscribe to an observable MouseMove.Subscribe(args => Display(args));
What all apps can be benefitials using RxJS ?
Stock quote
Tweets
Computer events
Video Streaming apps
Live feeds/News apps
Geo-location tracking
Web service requests, etc.
Reactive Programming
ReactiveX provides a collection of operators with which you can filter, select, transform, combine, and compose Observables. This allows for efficient execution and composition.
You can think of the Observable class as a “push” equivalent to Iterable, which is a “pull.” With an Iterable, the consumer pulls values from the producer and the thread blocks until those values arrive. By contrast, with an Observable the producer pushes values to the consumer whenever values are available. This approach is more flexible, because values can arrive synchronously or asynchronously.
Write us for more information at
http://www.linkites.com
Reactive Application Development
Software Development Company
Reactive Programming
#reactive #reactivex #reactiveprogramming #linkites #softwaredevelopmentcompany #softwaredevelopment #softwarecompany #india #ReactiveExtensions #Rxjs #androidrxjava #reactiveapplicationdevelopment #reactiveapps #reactivewebapps #Webapplication #indore
#reactive#reactivex#rxjs#reactive programming#software development company in india#reactive web application#reactive mobile applications#reactiveapps#web app#android rx java#rx#reactive extension#functional reactive programming#software development#linkites#tumblr#technology#reactive application development compnay in india
0 notes
Video
youtube
Rx.NET: Implementing the IObservable<T> interface
#reactive#programming#dotnet#csharp#development#software development#computer programming#youtube#video#tutorial#reactive extensions for .net#Rx#Rx.NET#ReactiveX#backend
0 notes
Text

Crucial Tools for Developing iOS Apps in 2023
Mobile applications have become a crucial component of our daily lives in today’s digital world. The demand for iOS app development adelaide is increasing along with the demand for mobile apps, which is constantly rising. An expert team with the necessary tools and skills is needed to create an iOS app. In this article, we’ll talk about the essential tools to develop iOS apps in 2023.
Xcode
The integrated development environment (IDE) Xcode creates resources to develop apps for macOS, iOS, watchOS, and tvOS. One of the most renowned tools for creating iOS apps is Xcode, which offers a user-friendly interface, useful debugging tools, and a strong source code editor. The iOS simulator is also a part of it, enabling developers to test their apps on various iOS devices.
AppCode
Smart IDE AppCode offers top-notch support for Objective-C, Swift, and C++. Code analysis, automated refactorings, and intelligent code completion are just a few of the many features it offers. Large codebase developers should use AppCode as it helps to speed up and improve efficiency in the development process.
Fabric
A platform called Fabric provides an assortment of tools for creating and maintaining mobile apps. It has tools for performance tracking, app distribution, and crash reporting. Real-time analytics offered by Fabric permit developers to quickly find and tackle problems in their apps. For developers who want to produce dependable, high-quality apps, it is a crucial tool.
CodeRunner
Swift and Objective-C are just two of the many programming languages that are supported by CodeRunner, a compact IDE. It is an increasingly prevalent choice for iOS app development because it offers a user-friendly interface, code completion, and debugging tools.
RxSwift
A reactive programming framework called RxSwift makes it easy to create asynchronous, event-driven code. Swift and Objective-C are supported, and it is built on the ReactiveX library. For creating iOS apps that need real-time data processing, like social media and messaging apps, RxSwift is a potent tool.
Flawless
Developers can find and correct visual bugs in their iOS apps with the aid of the visual quality assurance tool Flawless. It offers a pixel-perfect preview of the user interface for the app, thereby rendering it simple for developers to spot visual problems. For developers who want to produce visually stunning and polished iOS apps, Flawless is a crucial tool.
Transporter
Apple gives developers the Transporter tool so they can submit their iOS apps to the App Store. It offers a straightforward drag-and-drop interface that makes it simple for developers to upload their applications. Additionally, Transporter offers validation and error checking to make sure the app complies with App Store standards.
APPlyzer
With the help of the real-time app analytics tool APPlyzer, iOS app developers can monitor the effectiveness of their creations. Developers can make data-driven decisions about their app development strategy thanks to the data it provides on app downloads, revenue, and user engagement.
CocoaPods
An iOS app dependency manager is called CocoaPods. It offers a straightforward method to coordinate outward-facing libraries and frameworks in iOS apps. Developers can save time and effort by automating the process of adding and updating dependencies with CocoaPods.
Conclusion
A variety of skills and tools are needed to create an iOS app. From IDEs to quality assurance tools and analytics platforms, the tools covered in this article offer a full range of features for developing iOS apps. These tools enable developers to accelerate the development cycle, increase productivity, and produce dependable iOS apps.
0 notes
Text
Hands-on with SolidJS | InfoWorld
Hands-on with SolidJS | InfoWorld
SolidJS is a unique approach to reactive front-end JavaScript. It provides a compact set of reactive “primitives” and leverages those to support higher-order functionality. This sounds somewhat like AngularJS and its use of ReactiveX, but it is quite a different experience. SolidJS feels more like the simplicity of AlpineJS, but delivers a far more ambitious set of capabilities. SolidJS just hit…

View On WordPress
0 notes
Text
Role of Flutter in Building Enterprise Mobile Apps
Flutter is well-versed and known for developing applications that yield high performance. With the increasing popularity of Flutter, people are now starting to explore it for developing mobile applications for enterprises to leverage all the exciting functionalities that it provides.Thera are various Flutter based applications that you can consider before crafting your app idea in this field.
Some of the major ways in which Flutter can fuel the building of enterprise mobile apps are:-
Dart programming language with streams, async, ReactiveX, and RxDart integration
State management architecture comprising setState, Redux, BLoC, etc.
Supports Android’s Material widgets and iOS Cupertino widgets to developed interactive UI
High accessibility, internationalization, smooth page transitions, and more for building UI
JSON serialization and deserialization
Making code independent and reusable with Dependency Injection
The high inherent security of native Android and iOS environments
SQLite for a large amount of data
Option to choose the development environment from Android Studio, IntelliJ, or Visual Studio
Continuous integration and continuous delivery solutions are offered.
0 notes
Photo
Curso de Angular - RxJS | map y filter http://ehelpdesk.tk/wp-content/uploads/2020/02/logo-header.png [ad_1] Breve tutorial de Angular con Rx... #androiddevelopment #angular #angular6 #angular7 #angular8 #c #css #curso #dataanalysis #datascience #deeplearning #development #docker #filter #iosdevelopment #java #javascript #machinelearning #map #node.js #operadores #python #react #reactivex #rxjs #unity #webdevelopment
0 notes
Text
NineOldAndroids (https://github.com/JakeWharton/NineOldAndroids)
Copyright 2012 Jake Wharton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Android ViewPagerIndicator (https://github.com/JakeWharton/ViewPagerIndicator)
Copyright 2012 Jake Wharton
Copyright 2011 Patrik Åkerfeldt
Copyright 2011 Francisco Figueiredo Jr.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
OkHttp (https://github.com/square/okhttp/)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Android Asynchronous Networking and Image Loading (https://github.com/koush/ion)
Copyright 2013 Koushik Dutta (2013)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Disk LRU Cache (https://github.com/JakeWharton/DiskLruCache)
Copyright (C) 2011 The Android Open Source Project
Copyright 2012 Jake Wharton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Android Chips Edit Text (https://github.com/klinker41/android-chips)
Copyright (C) 2014 Jacob Klinker
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Otto - An event bus by Square (https://github.com/square/otto)
Copyright 2012 Square, Inc.
Copyright 2010 Google, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Dagger 2 (https://github.com/google/dagger)
Copyright 2012 The Dagger Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Timber (https://github.com/JakeWharton/timber)
Copyright 2013 Jake Wharton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
RxJava: Reactive Extensions for the JVM (https://github.com/ReactiveX/RxJava)
Copyright (c) 2016-present, RxJava Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
RxAndroid: Reactive Extensions for Android (https://github.com/ReactiveX/RxAndroid)
Copyright 2015 The RxAndroid authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Android-Iconics (https://github.com/mikepenz/Android-Iconics)
Copyright 2016 Mike Penz
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Calligraphy (https://github.com/chrisjenx/Calligraphy)
Copyright 2013 Christopher Jenkins
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
google-gson (https://github.com/google/gson)
Copyright 2008 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
LicensesDialog (http://psdev.de/LicensesDialog)
Copyright 2013-2016 Philip Schiffer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Automatic.

0 notes