-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor of Prebid #349
Merged
Merged
Refactor of Prebid #349
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* remove small helper functions for readability * remove bidmanager.setBidderMap (not used) * remove createEmptyBidResponseObj (just return object literal) * remove pb_preBidders as unused * refactor pbjs.requestBids and adaptermanager.callBids * refactor bid count, rearrange getPriceBucketStrings * refactor of targeting to set and clear before and after ad server call
Merged
…rnal callback in array, object destructuring in requestBids method signature restored
…so move `getBidderCodes` to utils
I see a few changes to adapter code in here - appears that bidmanager was changed significantly? Will adapters need to update and pull request for this? |
* remove small helper functions for readability * remove bidmanager.setBidderMap (not used) * remove createEmptyBidResponseObj (just return object literal) * remove pb_preBidders as unused * refactor pbjs.requestBids and adaptermanager.callBids * refactor bid count, rearrange getPriceBucketStrings * refactor of targeting to set and clear before and after ad server call
…rnal callback in array, object destructuring in requestBids method signature restored
…so move `getBidderCodes` to utils
merge `getBidResponses` to map some more helper functions fixtures and tests
@Studnicky |
… of querystring params more fixtures and tests
…o fp_refactor * 'fp_refactor' of https://github.com/prebid/Prebid.js: Restore getBidResponsesForAdUnitCode()
- Don't export getPriceBucketString - Test 'dense' price bucket mode integration
# Conflicts: # test/fixtures/fixtures.js
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The core JS of Prebid is refactored to implement functional programming patterns in the bid/request cycle and in handling of DFP slot targeting. This paves the way for handling concurrent bid requests, improving analytics tools, increasing test coverage, reducing LOC and so on.
An effort was made to reduce the data structures to as few as possible and then use
map
,reduce
and other ES5 language capabilities to derive data. Therefore this PR means IE8 is no longer supported (it hasn't been "officially" supported forever, but this will break it). It is possible to usees5-shim
if we decide it's needed. ES6 is supported already through use of the Babel transpiler, and some of these language features are used here as well.The data structures are documented fairly well in the fixtures module, and consist of
adUnits
,bidsRequested
,bidsReceived
and DFP slot targeting as defined by the GPT targeting spec. A set of these data structures will comprise anauction
, and the auctions will be managed in a queue, thus giving us a stream of auction instances with a unique set of data structures. Auctions can then be run in sequence without clobbering each other (concurrent bids) and reported on in batches with analytics libraries. This is part of a pending PR and the scope of this refactor PR is limited to functionality equivalence with current master branch.Deprecations
pbjs.requestBidsForAdUnit
@deprecated - removed, usepbjs.requestBids
pbjs.requestBidsForAdUnits
@deprecated - removed, usepbjs.requestBids
pbjs.setTargetingForAdUnitsGPTAsync
@deprecated - removed, usepbjs.setTargetingForGPTAsync