17 karma · joined Jan 31, 2023 (3y ago) · 4 submissions
comment 1y ago · link · parent
comment 2y ago · link · parent
There are things like:
* in-advance-known closeouts
* sporadic closeouts (e.g. due to the bad weather conditions)
* sell-outs
* varying availability by date/start time
* links to partner services who can partially reduce the availability count
* allotments (availability quotas for different sellers)
* resources linked to availabilities (which is another dimension)
* the list goes on and on...
Anyway, back to the data structures.
After many iterations I've settled with using Guava's Table (yes, we use Java). There are many ways to model this, e.g. you can have start times as rows and dates as columns.
It might not sound as sexy as you'd expect but it's super easy to visualise the model in your head and read/maintain the code later.
Then you can use Guava Range functionality for dates or times and do intersections etc. Hope this helps.
comment 3y ago · link · parent
For example they say nobody wants to learn a new query language. I worked with Hibernate's QL as well as Ebean's QL and have to say none require any special training. Sure, the syntax differs somewhat but you can achieve what you want fairly quickly by looking at examples. And they all look like simplified SQL anyway.
Also the page says one has to invent DAO layer but again - neither Hibernate nor alternatives require this. On the contrary, for example if you look at the canonical Playframework/Ebean examples they suggest static finders inside POJO classes, which work just fine.
comment 3y ago · link · parent