Comments (6)
Hi, we have quite a lot of posts on this project on the Artsy blog: http://artsy.github.io/blog/categories/eidolon/
from eidolon.
I have read some articles, but still can't understand about the detail implementation. Just hope that you can add some notes about Auction List this project in your free time
from eidolon.
Hi there, what details are you having a hard time with? By "auction list" do you mean the list of artworks for sale in an auction? It has mostly to do with UICollectionView and isn't the best implementation. If I were writing this from scratch it would use RxDataSources. I'll try to answer any specifics, but my "free time" is quite limited 😉
from eidolon.
https://github.com/artsy/eidolon/blob/master/Kiosk/Auction%20Listings/ListingsViewModel.swift#L93 this is the most hard to deal with, how is it work? It seem that
1. fileprivate func recurringListingsRequest() -> Observable<Array<SaleArtwork>>
2. fileprivate func allListingsRequest() -> Observable<[SaleArtwork]>
3. fileprivate func retrieveAllListingsRequest(_ page: Int) -> Observable<Any>
4. fileprivate func listingsRequest(forPage page: Int) -> Observable<Any>
these funcs all have some relationships,how they work together? 🙏
from eidolon.
Hmm, yeah those should definitely be better documented 😅 I'll give you a brief description here:
recurringListingsRequest
This is the top-level function that returns an observable that gets all the new listings every 60 seconds. It then checks to see if the number of sale artworks has changed and if so replaces the array, otherwise updates them in-place.
allListingsRequest
This does a few things: it handles scheduling JSON parsing in the background to avoid stalling the UI, bootstraps the initial call to retrieveAllListingsRequest
(which is recursive), and concatenates all the results of API calls together into one array.
retrieveAllListingsRequest
A recursive call that fetches a page of sale artworks, and fetches that page + 1 if we got back the same number that we expected to. For example, if there are 41 artworks and we fetch 20 at a time, then we recurse twice: once after the first page, and once after the second. Then the third page returns only one sale artwork so we know we have exhausted the list.
listingsRequest
The simplest one, it just makes the actual network request.
Each one of these does a lot, and if I were writing code fresh I'd break them into their own objects. There's a lot to understand, so it's natural if it feels unfamiliar or intimidating. I'll try my best to answer an specific follow-up questions, but I'm travelling right now and don't have a tonne of availability.
Also, if after studying the file you were to send a PR adding comments explaining everything for the next person, that would be swell. But no pressure!
from eidolon.
I think this issue is addressed, so I'm going to close it. Feel free to re-open if you have any follow-up 👍
from eidolon.
Related Issues (20)
- Can not run project using Xcode 8.2.1 HOT 4
- App crashes during registration in Staging (version 5.6.1)
- Grid layout reacts abnormally when switching filters (version 5.6.1)
- Old comment? HOT 2
- App unable to connect to newer card readers HOT 2
- Remove Mixpanel integration (in favor of Segment) HOT 3
- [!] The 'Pods-Kiosk' target has frameworks with conflicting names: artsy_uifonts. HOT 1
- Someone should watch this WWDC HOT 2
- Add a link to this in the README?
- Adopt iOS 11 Kiosk API
- Issue in doing bundle install HOT 2
- Issue with 'bundle exec fastlane oss' HOT 7
- question about newTokenRequest HOT 2
- CI is failing HOT 1
- bundle exec fastlane oss fails HOT 4
- Dimming buttons when popover / child controller is presented HOT 6
- bundle exec fastlane oss Fails HOT 5
- Can't build in xCode. It's searching for a Pods folder that doesn't exist HOT 8
- Adopt inclusive language
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eidolon.