Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd pay at least 30$ for a book that does an analysis of the Flask's source code explaining the basics of the http protocol and restful apis.

For example, I use jsonp and I use a decorator from the Flask snippets (http://stackoverflow.com/questions/16134164/jquery-ajax-json...), however, I have no idea how this works and why jsonp is better than json...

Then I would like the book to link these learning to building secure and well tested web applications.

The reasons why I would pay for this are: 1. I would like to build a spreadsheets sharing app but I am very scared of handling sensible data if I don't know very well (by very well I mean the source code) my tech stack and also I know little about web security 2. I would like to contribute to Flask development one day (because it's cool, let' be honest) 3. It takes too much time for me to find out these things on my own and I would gladly pay for the time I save with a book



Basically JSONP is used by API providers, so that theirs API might be called by JavaScript running in browser. Until CORS[1] got supported by current browsers, JSONP was used to get some JSON from an API located on different domain (well it of course can be used today for browsers that don't support CORS) The code snipped you linked just wraps standard JSON response making it an executable script that when included on the page calls the supplied callback's name passing the JSON.

1. http://www.w3.org/TR/cors/


I don't know much about JSONP except it allows cross-domain JSON data access. To learn more than I know, check out this: http://stackoverflow.com/questions/2067472/what-is-jsonp-all...


My concern would be that by analyzing the Flask source in addition to patterns and best practices for developing apps the book would lose focus.

It is something that I'll keep in mind in writing, but I think it might be better for another project.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: