HNHacker News
TopNewBestAskShowJobs

tomchristie

2,252 karma · joined January 31, 2011

submissionscomments
tomchristie··on Django REST framework 3.1 released
At the moment it's on hold - I certainly won't be doing anything with Flask until the Kickstarter work is all complete. I'm undecided after that.

It'd be interesting to get your opinion on what your take would be on using Django/Django REST framework if it had decent built-in support for use with SQLAlchemy.

tomchristie··on Django REST framework 3.1 released
Thanks Alex, I think that's a great point.

Please do feel free to follow this up by raising an issue on the repository - it'd be good to talk through some specifics about areas to improve.

tomchristie··on Django REST framework 3.1 released
The 3.0 release notes are the place to start for looking at upgrading. They go into quite a bit of detail about this.
tomchristie··on Django REST framework 3.1 released
Broadly, we aiming for it to be a mature, sustainable and well-supported general purpose Web API framework.

We tend to be fairly aggressive about keeping the scope manageable in order to keep to that. For example 3.1 moves some functionality out into third party packages, so that we can concentrate on the quality of the core framework.

Some of the longer term feature work:

* Admin style interface - See https://www.kickstarter.com/projects/tomchristie/django-rest...

* Fuller support for alternative storage backends. Eg. Easier to integrate with SQLAlchemy, as an alternative to the Django ORM.

* Hypermedia support & client library. (Too involved to go into detail here.)

tomchristie··on Django REST framework 3.1 released
Of course you can use many to many fields with ModelSerializer.

I'm not sure what you mean here, but I'd suggest opening an issue if you believe there's a problem - we're pretty comprehensive about dealing with incoming issues.

tomchristie··on Building Microservices: Free Ebook from O’Reilly and NGINX
Note that the full copy is now available to purchase in both ebook and hardcopy: http://shop.oreilly.com/product/0636920033158.do

(No side-interest here, just found it confusing that the page mentioned "hardcopy expected to be published in May")

tomchristie··on Django Rest Framework general model serializer
The model / model manager layer is the right place at which to design your state changing API. REST framework absolutely you to work with the grain there. Some good practice I'd recommend...

* Write the `create()` and/or `update()` methods explicitly on the serializer class.

* Push logic into the model and model manager where possible and only have the serializer `.save()` as a thin layer on top of that.

That way a serializer class still has all the behavior it needs to map both ways between persisted objects and their corresponding native python representations, but you still have a well separated model API.

tomchristie··on A redesign of the Django websites
I'm sure they'd appreciate any feedback & examples on accessibility issues. If you've got some time consider raising it on the issue tracker.
tomchristie··on Django REST framework 3.0
Flask API is certainly on pause while 3.1 and 3.2 are addressed yes.

After that it depends on what I feel is the most productive use of my time. Perhaps general purpose Python API tooling, that includes Flask as one of the options, or perhaps work on hypermedia stuff that I've got in my head.

tomchristie··on Django REST framework 3.0
I guess from my side it feels like it's something of a different business relationship to the usual case. There's enough trust from backers that over-funding will ensure a better product, even when the details of that are underspecified.

I wouldn't particularly mind things being more nailed down, eg "Here's my day rate, and you'll get weekly updates" but there's still a bit of a sense that OSS development needs to be apologetic for being properly sustainable, and it is awkward to navigate that you know stacks of people who're also putting in hard work, and not having the privilege of being paid to do so in working hours.

I think there's also a trade off - not having to justify decisions case-by-case does mean that I can just focus on stuff done, however I think that's best spent.

I also think we need to redefine our expectations. The amount of money this project raised on Kickstarter is huge by OSS standards, but in terms of business investment it's actually what I'd consider a sensible amount, and I'd hope to see it become more normalized. If you look how an individual backing compares to contractor day rates, the investment most of our backers are making is clearly worth the deliverable they're getting at the end of it.

tomchristie··on Django REST framework 3.0
Yes it does, but probably best to take this sort of thing onto the discussion group... https://groups.google.com/forum/#!forum/django-rest-framewor...
tomchristie··on Django REST framework 3.0
> Any update on how the money was spent?

So this is only 1/3 of the Kickstarter to date. The two stretch goals are planned as releases 3.1 and 3.2.

We were significantly overfunded, and I'll treat the extra time/budget flexibly depending on whatever seems highest priority, but it's mostly going towards ensuring I've got headroom for keeping the quality bar super high. (Plus extra time available for general support, triage, etc...)

For transparency I plan to be ending up with treating 10% of the amount received as profit - the rest of the funding is simply covering the costs for the time I'm not working on client projects at DabApps (minus Kickstarter's cut and some taxes of course).

I probably won't give a full time-spent breakout of how long each task has taken, I've not had requests from backers to do that, and not doing so frees me up to spend it however I think best without feeling like I need to justify things on a blow-by-blow basis.

tomchristie··on Django REST framework 3.0
I'm not sure at the moment, we'll see once the remaining bits of the kickstarter work (releases 3.1 and 3.2) are done and released.
tomchristie··on “Start Rails 5 development”
Personally I think they're going to remain strong. More single page apps? Fine, but they still need to be backed by an API and, in most cases, a relational database. Yes there will be more frontend templating, and yes more mature fuller stack JS alternatives will emerge, but those role those frameworks fulfill is still needed, backend template rendering or not.
tomchristie··on W3C HTML JSON form submission
So, y'know, raise it on their issue tracker. :)
tomchristie··on W3C HTML JSON form submission
How would you deal with rendering arbitrary form encodings in the browser? A proposal adding support for form submission of arbitrary encodings could be valid, but it'd have to just be a single form input with the data included verbatim.

This proposal allows regular HTML forms with multiple input elements, but submitting over JSON. I can't see how you could define that for arbitrary encodings without first defining how the form fields map to the encoded data for all the encodings you'd want to support.

tomchristie··on W3C HTML JSON form submission
Sure, yes. In Python land for example Django and Flask both present the request parameters in a dictionary-like data structure that supports lookup of the complete list of values passed for a given name. Regular lookups will give you just a single value, but they also present an interface to get the complete list.
tomchristie··on W3C HTML JSON form submission
JSON Pointer isn't quite the same thing.
tomchristie··on W3C HTML JSON form submission
Seems pretty decent. Also neat that the nesting style could be repurposed to support nested structures in regular form-encoded HTML forms.

Main limitation on actually being able to use this is that `GET` and `POST` continue to be the only supported methods in browser form submissions right now, so eg. you wouldn't be able to make JSON `PUT` requests with this style anytime soon.

Might be that adoption of this would swing the consensus on supporting other HTTP methods in HTML forms.

tomchristie··on W3C HTML JSON form submission
Think that's fair point, yup. Very easy to do unintentionally, and it's non-intuitive that it'll suddenly change the return type.

It's not clear if this style is really necessary. Why not just use the indexed syntax in this case?

I guess it may be the authors intention to mirror form encoded submissions, that would send all of these values to the server.

I'd suggest raising the point on the issue tracker so that it at least gets sufficient design discussion.

https://github.com/darobin/formic/issues

tomchristie··on Django REST framework 3
Hiya, I've just removed the limits on the higher levels of backing. See the 'Day 1 - Funded!' update here... https://www.kickstarter.com/projects/tomchristie/django-rest... - There's been so much support that it just seems unnecessarily restrictive.
tomchristie··on MacDown: Open-source Markdown editor for OS X
I find having a live preview really gives me a better feel for the flow of the document. I love Markdown for it's simplicity, but that doesn't mean I only ever want to see it rendered in plain text.
tomchristie··on Please reconsider the Boolean evaluation of midnight
So ignoring the hype, here's the outcome-to-date...

The ticket was reconsidered, reopened and classified as a bug. http://bugs.python.org/msg212771

Nick Coghlan's dissection of the issue here: https://mail.python.org/pipermail/python-ideas/2014-March/02... is pretty much perfect - wonderful piece of technical writing!

Donald Stufft has expressed an interest in making the patch for this happen, and assuming all goes as planned this usage will raise a deprecation warning in 3.5 and be fully fixed in 3.6.

News in brief: User raises issue. Issue gets resolved.

tomchristie··on Flask API – Browsable Web APIs for Flask
Quite an endorsement; I'll have to try to make the time to check that out properly. :)
tomchristie··on Flask API – Browsable Web APIs for Flask
They don't need too, but it sure-as-hell improves accessibility & usability.
tomchristie··on Flask API – Browsable Web APIs for Flask
> one example returns json array, what about JSON venerability?

Side point: I don't have a reference for this, but from what I understand the JSON array vulnerability has long since been closed in all sane browsers.

tomchristie··on Flask API – Browsable Web APIs for Flask
> Any dates for 1.0 release?

If anyone wants to give me a coupla days paid work on this, then yah I'm sure that could be arranged. :)

tomchristie··on Flask API – Browsable Web APIs for Flask
Most welcome! For anyone on this thread who's interested in contributing I'd suggest opening a ticket citing your interest, so that we've then go a place we can start the discussion from.
tomchristie··on Flask API – Browsable Web APIs for Flask
Built in pagination isn't something that's planned atm, tho typically I'd always return objects as the top level representation, and embed the pagination links inside that.
tomchristie··on Flask API – Browsable Web APIs for Flask
Looks nice.

I am considering factoring the core of both Flask API and Django REST framework out into a library that could be integrated with any Python web framework - But that's not going to happen right away, so probably not much use to you in the immediate future.

Flask API is pretty simple tho - so there might be bits you can borrow from - perhaps the content negotiation implementation, browsable API implementation, or some of the general API style/separation of concerns that Flask API and Django REST framework both share.

The big win would be having more than one project sharing the same APIs for renderers, parsers, authentication, permissions and throttling policies - that way there'd be scope for writing at least some libraries that work cross-framework.

← PreviousPage 3 of 5Next →