rfp response for website development

2022.03.25

rfp response for website development

Many developers,Whether it is the front end、The backend or the mobile terminal will be known from various waysResponse programmingThis concept,Because many frameworks have begun to claim to support response development。When we realize this,Everyone will try to search for various article information to understand what the response is programmed.,But the Internet information is really too“rich”In,Enrich to you seeing for a long time,Maybe you can't touch your mind,Because the response theory is rebuilt the entire concept system from the bottom floor of the problem,A concept involves another concept,Then more and more concepts,It's easy to wrap people。This article tries to comb my response programming,Strive to clear,Reference for everyone to study in-depth research。

To understand the pulse of response programming,Just split this word into two parts:Response and Program

Program

ProgrammingProgramming paradigm,Computer language develops to today,Many programming paradigms(See Wikipedia),Responsive programming is popular in recent years。In addition to responsive programming,Our usual programming paradigm hasOrdinary programmingAnd expand on or on orderedObject-Oriented Programmingas well asFunctional programming

  • Ordinary programmingAlso known as instructional programming,Can understand as an operational statement,loop statement,Conditional branch statement and unconditional branch statement(gotoStatement)Formal programming。

  • (RFP Response for Website Development)Object-Oriented ProgrammingAdded an object extension on the ordered programming basis。

  • Functional programmingThe most important basis isλCalculate(lambda calculus)。Compared to ordered programming,Its more emphasizes the results of the proceedings rather than execution,Advocacy to make the calculation results continue to gradually take advantage of several simple execution units,Properly derive complex operations,Instead of designing a complex execution process,andλThe calculation function can accept the function as an input(Quoter)And output(Outgoing value)。

therefore,in conclusion,Now popular programming paradigm:Ordering、Object-oriented、Functional and response。

Response

In order to program,For statement:a:=b+c,When the statement is executed,aGet the results of the statement,Thereafter,parameterbandcAny changeaNo effect。In response programming,For statement:a:=b+c,ParameterbandcChanging,aWill automatically change,Don't need to re-execute the statement。

Some intuitive examples can better understand“response”,Such as:ExcelIn the form,When a cell changes,Other cells also produce corresponding changes。APPAutomatically appear when receiving a transaction record from the serverUIInterface。

Response type as a design idea different dimensions at different levels can have different applications。Apply to normal data stream,that isReactive Stream;If applied to the service flow level,Responsive micro service;used inWebThere is a response in designWebdesign;Used in the architecture level is the response architecture。

Response programming

Response programming is an asynchronous programming example for data streaming and change propagation,Data flow can beI/O,Event, etc.。

usually,Some specific programming languages tend to specific programming paradigms,Such asFortranLanguage is the command-programming language,JavaObject-oriented programming,HaskellIs a functional programming language,andScalaSupport function and object-oriented programming。Response programming does not have a specific programming language,Its implementation is based on existing programming languages.,Therefore there is:

  • (RFP Response for Website Development)Command response programming(imperative reactive programming)

  • Object-oriented response programming(object-oriented reactive programming)

  • Function response programming(functional reactive programming)

Implementation

Response programming theory,There are two types of current mainstream implementation:One isFunction response programmingFPR,One is a response implementation with a function style——Response function programmingRFP(reactive-functional programming)。

(RFP Response for Website Development)Notice,This is two different implementation,Function response programmingFRPIs built in the response implementation on the function programming;Response function programmingRFPIs an abstraction on the ordered operating system,Learn from the functional programming style,Used to process asynchronous and event-driven scenes,At the same time, you can avoid thinking about problems like computers need to have complex states across threads and network boundaries.。

Function response programmingFPRBe based onScalaLanguage implementationAkka-Streams,Response function programmingRFPhaveReactiveXandReactorWait。

ReactiveX

rfp response for website development

(RFP Response for Website Development)ReactiveX,which isReactive Extension,Response expansionRx。

EricAt2007SummerMicrosoftcreatedRx,2009year11moon18dayRx.Netrelease,And ported toMicrosoft.Phone.Reactive for Windows Phone 7。Jafar HusainAt2011LeaveMicrosoftjoin inNetflix,StartingRxInNetflixClientUIStack fully realizes asynchronous flow processing。Then,He began to promote responsibilityNetflixmiddle layerAPIofBen ChristensenuseRx。BenAt2012BeginningRxJavaIn2013The year is migrated toGithub。

along withRxMore and more popular in the industry,EricAt2012LeaveMicrosoftAnd createdApplied Dualitycompany,Put all energy into build standardized cross-language,Cross-platform asynchronous real-time data flow processingAPI,which isReactiveX.io。

current,RxincludeRxJava,RxJS,Rx.Net,RxScala,RxClojure,RxSwiftWait18Language implementation。

(RFP Response for Website Development)Reactor

rfp response for website development

(RFP Response for Website Development)ReactorProject isSpringbased onReactive Streamsspecification(Depend on4SimpleJavainterface:Publisher,Subscriber,Subscription and Processor,A text specification and oneTCKcomposition)Provided response implementation,The purpose is to letSpringThe ecosystem can support the industry's increasing response development。

SpringNot directly introducedRxJavaCome as part of its framework,But choose another wheel。fromSpring 5Start,Developers can haveSpring Web ReactiveandSpring Web MVCTwo choices。

current,ReactorProject includedReactor Core,Reactor Test,Reactor Adapter,Reactor Netty,Reactor Extra,Reactor Kafka,Reactor Core .NET and Reactor Core JS。

Rxspecialty

This section is taken from《ReactiveX/RxJavaDocument Chinese version》

RxFrom synchronization setIterable/IteratorReverse evolution,Is a programming interface that uses the observable data stream for asynchronous programming,ReactiveXCombined observer mode、Iterator mode and functional programming。

Use the observer mode

  • create:RxCan be convenient to create event streams and data streams

  • combination:RxCombine and transform data streams using query operators

  • monitor:RxYou can subscribe to any observable data stream and perform actions

Simplified code

  • Function style:Input and output functions for observing data streams,Avoid complicated state in the program

  • Simplified code:RxThe operation is usually simplified to a few lines of code.

  • Asynchronous error handling:traditionaltry/catchNo way to deal with asynchronous calculations,RxProvide a suitable error handling mechanism

  • Easily use concurrent:RxofObservablesandSchedulersLet developers can get rid of the underlying thread synchronization and various concurrency issues

useObservableThe advantages

RxExtended the observer mode to support data and event sequences,Add some operators,It allows you to declare these sequences,No need to pay attention to the underlying implementation:Thread、Synchronize、Thread security、Con concord data structure and non-blockingIO。

existRxmiddle,An observer(Observer)Subscribe to an observable object(Observable)。ObserversObservablePush data or data sequence to respond。This model can greatly simplify concurrent operation,Because it created an observer sentinel in the standby state,Respond at a moment of futureObservableannouncement of,No need to block waitingObservablePush data。

rfp response for website development

Concept and terminology

  • Reactive

Translated into reactive,Active,Translation according to context is generally translated into reactive、Response

  • Iterable

Overlapping object,Support in the form of iterators,There are this concept in many languages.

  • Observable

Observable observable,existRxDefined as a more powerfulIterable,In the observer mode is observed objects,Once the data is generated or changed,Will notify the observer or subscriber in some way

  • Observer

Observer object,monitorObservablePush data and respond,SubscriberIs a special implementation

  • Future

(Take away fromScalaOfficial document)

So-calledFuture,Is an object for referring to an unsuitable value。And this value,It is often the result of a computing process:If the calculation process has not been completed,Let's talk about itFutureNot in place;If the calculation process ends normally,Or throw an abnormality in the middle,Let's talk about itFutureIn place。

FutureThe position is divided into two cases:whenFutureWhen in place with a value,Let's talk about itFutureCarrying calculation results successfully。whenFutureSince the corresponding calculation process throws an exception,Let's say thisFutureFailure to this exception。

FutureAn important property is that it can only be assigned once。Once a certain value or an exception is given,futureObjects become an informal object——Unable to be rewritten。

  • (RFP Response for Website Development)Promise

(Take away fromScalaOfficial document)

(RFP Response for Website Development)if we assumefuturesIs for a result that has not yet existed,And as a type of object type of read-only occupancy,SopromiseIt is considered to be writable,Can realize onefutureSingle assignment container。This means that,promiseIn this waysuccessMethod can successfully implement a valuefuture。The opposite of,Because of a failurepromisepass throughfailureMethods will achieve an abnormalfuture。

  • (RFP Response for Website Development)Push vs Pull

When we use iteration to traverse a collection,We are pulled from the collection(Pull)data。When we use the observer mode on a collection or data stream,Data is pushing to the observer。

  • Sync vs Async

existRxmiddle,Observable observableObservableSupport synchronization and asynchronous implementation。

  • Lazy vs Eager

existRxmiddle,Observable observableObservableIs inert,Only being subscribed,It promotes changes。This is different fromeagerTypeFuture。

  • Concurrency vs Parallel

existRxmiddle,A observable objectObservableThe flow does not support concurrency and does not support parallelism。but,Observe in a set of asynchronous observable objectsObservableStream collection can perform concurrent and parallel processing operations。

in conclusion

This article is roughly combed in the concept system of response programming,In-depth research and practice also need to take a deep excavation along this context。If you are inappropriate, please reply.。

rfp response for website development

返回列表
更多新闻资讯