openactive / open-booking-sdk-documentation

Documentation for the Open Booking SDK
0 stars 0 forks source link

Expand tutorial time-frame #1

Open thill-odi opened 3 years ago

thill-odi commented 3 years ago

Various implementers - most recently Spawtz - have indicated that the roadmap timeframe is unrealistic: Day 1 ends up taking at least two days, and Day 5 takes at least 3. The tutorial as a whole should be expanded into a longer sequence of more granular steps to maintain the day-by-day approach over a realistic span of time.

matdavies commented 3 years ago

Here is a bit of a brain dump with regards to how long it's taken me (Spawtz) to do the tutorial. Bit of a brain dump, so apologies for the format. TL;DR: Days 1 -7 have taken around 17 days in total, though it must be said that into a greenfields project, it would probably have taken less than that.

Here are my notes:

Day 1: Installing and running the test suite, pointing at the reference installation. This took a few hours as not 100% up to speed with Node and npm, and then once I had installed the correct version of Node there was a failure when running the application which turned out to be a race condition which was quickly fixed. The next step was to install the OpenActive.Server.NET packages - this took a day and a bit of battling dependency version differences and finding the correct combination of redirects and package references etc. Not anything that can be fixed or detailed in a tutorial really, but there is definitely a "day 0" which is missing here, which is to set up the environment and install the required packages into the product. This took at least a day to do in itself.

Then the process of copying all the required files into the application, including the correct references etc and took a few hours, and then when getting the data feeds, got this error:

Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Which was eventually solved by this SO answer: https://stackoverflow.com/a/60176344/448129

All in all, day 1 took about 3 days

Day 2: We had already completed the process of serving data feeds, but none the less there were 2 days of work here to rework some of how we were doing that, and to ensure the data within the feeds contained all the required properties. However, on Day 2 I ran into the issue that we have chosen strings as our id type, and therefore the FakeDatabase implementation did not work when I changed the types on our FacilityOpportunity to be string based, everything stopped compiling, and therefore I either had to abandon the FakeDatabase, or convert it to use strings in order to both set up our correct implementation details (strings) and get past day 2. This took a couple of days. Also found that the built in RpdeGenerators don't contain or allow for any cache-ability to be set for the feeds, so stuck with our already rolled controllers/data feed repository for this purpose.

Day 3: Implementing the test interface probably did take about a day to do. But at this point, everything had rather been "hacked" together just to get it working, so then went back and did things properly, which took a couple of days.

So Days 1 - 3 took about 8 days to implement

Day 4: Took a couple of days (and we are a single seller system), much of that time trying to understand the difference between OpportunityHasInsufficientCapacityError and OpportunityCapacityIsReservedByLeaseError and ensuring that the right values are returned for the required tests on this day.

Day 5: I think this could be split into 3, or at least 2 days - one for leasing and one for booking.

Day 6: Again, a couple of days here, as there are some features that are rather glossed over (SellerRequestedCancellation and Custoemr NoticeSimulateAction), meaning it was a case of inferring from the FakeDatabase what was needed here. Though it could probably be argued that having studied the spec a bit better would have helped here.

Day 7: Relatively straight forward, and did take around a day

MISSING: Day 7.5: Run all the tests in the suite relating to all the features you're implementing as I don't think the core features, or any to do with payment recon, T&Cs, privacy policy etc etc are mentioned anywhere in the tutorial, and the so the test suite won't generate a certificate for you unless you get all those tests passing too.

Day 8: Not got there yet.

So in total, I've spent about 17 days on the tutorial so far. More work to do on tidying up things that were hacked in to get it working too.