Thursday, June 13, 2013

Back On Track with RESTful Pyramid Experiment

In the time since I started writing this series I've learned a lot about REST and am continuing to learn more. While there is nothing intentionally incorrect in these blog posting, after reading Roy Fielding's thesis I'm not satisfied with the coupling of the technologies in this example, and believe that Dr. Fielding's work describes a simpler and much more elegant solution. Use these blogs with that in mind and I will be back when I have an example of REST with Python that I feel best represents Dr. Fielding's idea.

After much experimentation, documentation reading and refactoring of code I was able to get async calls to my Pyramid view handler methods to succeed. I'm not too proud to admit that my error was the cross-domain request being made from the index.html and the pyramid instance. Once I moved the index.html to a mako template that was being served from within the pyramid application my async calls started working. In the process of investigating the async issue improved the way that JSON was returned from the MongoDB results, and found an issue with how the responses where being constructed with the JSON that I also corrected. So look for the next installment in my RESTful Pyramid experiment soon.

No comments:

Post a Comment