Well, yes. Did my best to do good design practices, writing modular and not too fancy code, using cleanly designed core data structures, interfaces and and documentation. That's also why there is this huge example code for the data in the data.py file. It is basically a representation of the XML data we get from mal, just converted to a python dict to make it easily usable. There is also a variation of this structure, which is only a further nesting for category separation, but I kept this incarnations short lived (they are used where they are created).
Understanding the above data structure is half understanding how the applitation works. Basically we pass around a reference to an anime_data instance. The anime_data class handles the data. It saves/loads the file, fetches and pushes data to the server and is used as data interface for the rest of the application. That's why I tried to make it as clean as possible, and that's why it is quite nicely built.
I have a writing of a white paper or description of the core data structure somewhere on my schedule. Quite at the top. Maybe it would be a good idea for someone else to try writing this, as it would show me where the code is not clear enough, so if someone tries it, nice, if not I'll probably do it sometime soon too.
About the cookies. Did not want to make them too difficult either. We are not writing a banking client here. If we would start to talk about serious security, then I would start with SSL and co. But of course cryptography is another hobby of mine and writing a design that would be a threat to the host system or the data would completely violate my principles -.- No, seriously, you did quite a good analysis on the working of the mynamielist login part there. Came up on development. Did a series of tests, and as the application only keeps the cookies as long it lives (i mean the app), so it was a viable option not to initiate a new cookie handler for every sync, just validating again, just in case the login credentials were invalidated somewhere on the way. Makes it more stable. Especially since we want to use it more later on. Accessing system wide cookies is not something I would like to do. Definitely not. ^^
It's late here, I'm half asleep already. I'll probably add something more comprehensive later -.-
Thanks for analysis.
-s |