tag:blogger.com,1999:blog-5094340343398123932.post2066653556547779102..comments2023-02-21T09:52:10.243+01:00Comments on coding is like cooking: DjangoEmily Bachehttp://www.blogger.com/profile/07321005413961705103noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5094340343398123932.post-87416627299392259072010-12-13T08:37:27.071+01:002010-12-13T08:37:27.071+01:00Thanks for all that information, Andrew, I'm s...Thanks for all that information, Andrew, I'm sorry you couldn't make the meeting!<br /><br />I hope you have some success with Selenium. It's the best thing I know of for testing webapps with client side javascript, but it's not that great really. I've written code it's been unable to test :-(<br /><br />I look forward to you telling us about your experiences at a future GothPy meeting!Emily Bachehttps://www.blogger.com/profile/07321005413961705103noreply@blogger.comtag:blogger.com,1999:blog-5094340343398123932.post-1050762387151586652010-12-10T23:11:50.433+01:002010-12-10T23:11:50.433+01:00Wish I had been there! I've been using Django ...Wish I had been there! I've been using Django for the work I'm doing, and I have mixed feelings. What you might want to do is look at some package which used Django well, and see how they implement things. For example, I've been working with OSQA, and that code is very clean and well written. I've learned a bit about how to write web apps that way.<br /><br />I can answer some of the questions you've had about Django. As far as I can tell, "views.py" is simply the wrong word. http://www.linuxjournal.com/article/9738 says "both Django and Rails use an approach that is best known as MVC (model, view, controller) developed in the Smalltalk community but adopted by many other languages and frameworks since then. These terms, used verbatim in the Rails world, are called models, templates and views in the Django world, and they form the bulk of a Django-based site." And in http://translated.by/you/the-django-book-2-0/original/ "# views.py (the business logic)."<br /><br />Here's another reference from "Ajax: the definitive guide": "When I say 'loosely based MVC' I am echoing what Django's developers stated: that they "feel like the design of Django had to feel right, and [they] will not be bound to a particular design pattern." As a result, the controller in a typical MVC framework is the "view" in Django, and the view is instead called the "template." "<br /><br />DJango's way of using small apps was a bit of a revelation. After using it I really like how you can have an installed Python module, independent of the main web system, which can provide app services, and all you need to make it work is a couple of lines.<br /><br />They made a design choice to exclude the ability to embed Python code in a template. Here's a recent post on why some people like "dumb" template languages: http://pydanny.blogspot.com/2010/12/stupid-template-languages.html . There were a number of blog posts responding to it.<br /><br />I've not used the Django test client but the documentation suggests it probably wasn't the right tool.<br /><br />I'm have to investigate the testing options for me now since I have written client-side Javascript which talks to a embedded Java app and does an AJAX call to the server to put things into the database and the filesystem. I think I'll try Selenium.Andrew Dalkehttps://www.blogger.com/profile/17091314849699854287noreply@blogger.com