Re: [Tutor] web development question
On 21/06/15 18:32, Laura Creighton wrote: If you don't know javascript, and want to code your website in python, you might consider using web2py http://www.web2py.com/ New one on me, looks interesting having viewed the first 4 videos. But not sure how it helps with the UI or Javascript? Its still just Python on the server? Very similar to Flask but with a nice web based IDE. But the UI (View) is still HTML/Javascript - and indeed web2py includes JQuery as a standard toolset. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] web development question
In a message of Sun, 21 Jun 2015 20:09:54 +0100, Alan Gauld writes: On 21/06/15 18:32, Laura Creighton wrote: If you don't know javascript, and want to code your website in python, you might consider using web2py http://www.web2py.com/ New one on me, looks interesting having viewed the first 4 videos. But not sure how it helps with the UI or Javascript? Its still just Python on the server? Very similar to Flask but with a nice web based IDE. But the UI (View) is still HTML/Javascript - and indeed web2py includes JQuery as a standard toolset. Maybe I am wrong, but I thought you could write in nothing but Python and HTML. I am going to start playing with web2py tomorrow, so I will find out how wrong I was. Laura ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] web development question
On 21/06/15 20:50, Laura Creighton wrote: Its still just Python on the server? Very similar to Flask but with a nice web based IDE. But the UI (View) is still HTML/Javascript Maybe I am wrong, but I thought you could write in nothing but Python and HTML. I am going to start playing with web2py tomorrow, so I will find out how wrong I was. Like most Python web frameworks the server side is all Python but the Views(UI ) are in HTML which includes any Javascript you care to write. Web2py doesn't care about that it just sends it to the browser which interprets it as usual. So to write a modern-style web app with responsive UI you still need to wite it in HTML/Javascript using a combination of HTML5 and JQuery for the UI interactions/validations. The connection between the web2py server side bits (in the controllers) is the use of {{...}} markers within the HTML. Anything inside the double curlies gets translated to HTML by web2py, inserted into the View html and the View then gets and sent out along with the boilerplate in the layout (html) file. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] web development
I've used CherryPy on a couple of projects now. I use it with HTMLTemplate (http://freespace.virgin.net/hamish.sanderson/htmltemplate.html) and SQLObject (http://sqlobject.org/). This has the advantage of being about as Pythonic as you can get, since everything you manipulate is represented as an object. HTMLTemplate is especially nice since it completely separates the html from your code. I can, have, and do change the interface frequently with impunity, and vice versa. Contrast this with something like inline PHP. It's also editable in any old wsywig HTML editor. But you are free to choose whatever persistent storage and templating system you like. CherryPy is low level, and will force you to make decisions about what templating you want to use, and what you want to use for a backend. But the upside is, it feels no different than writing any other program. Just do what you've always done, choose supporting packages you like, and it's off to the races. It's even it's own webserver. So edit, run, edit run. Same as always. I can tell you why I didn't choose some others. Zope is a chunky, labyrinth-like framework. My friend runs Plone, built with Zope, and it's easily the most resource heavy thing running on my server. That just sent me running. Webware uses some sort of JSP/ASP/PHP alike, which makes me cringe in horror. HTML and code do not belong together in a big inline spaghetti lovefest. IMHO :) Twisted is an asynchronous networking framework, and I haven't used it, but actually looks fairly small, has it's own webserver, and a very very nice looking templating system which has the same philosophy as HTMLTemplate, but has some really cool feautures like livepage, which seems to be the same thing as AJAX, a la google maps. I just haven't had a reason to check it out, but it would be first on my list to check. It's more of a kitchen sink approach, or general purpose if you prefer, but does seem cool. So if you are looking for something like that, well. Build websites, write chat programs! OK. Enough early morning rambling :) Good luck choosing. On 9/27/05, Don Jennings [EMAIL PROTECTED] wrote: Earlier this month, Kent posted that Jython and Velocity are a good wayto develop dynamic web sites. After a little searching, it seems thatthere are quite a few options for web development in Python (perhapstoo many?). So, rather than ask for recommendations of which one to use, what I would really like to know are how people decided to use anyparticular framework.Thanks!DonP.S. As an aside, does anyone have any experience with django? (Ireally like the name since I am fond of django reinhardt, the jazz guitarist.)___Tutor maillist-Tutor@python.orghttp://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] web development
Subject: [Tutor] web development From: Don Jennings [EMAIL PROTECTED] Date: Tue, 27 Sep 2005 22:13:30 -0400 To: tutor@python.org To: tutor@python.org Earlier this month, Kent posted that Jython and Velocity are a good way to develop dynamic web sites. After a little searching, it seems that there are quite a few options for web development in Python (perhaps too many?). So, rather than ask for recommendations of which one to use, what I would really like to know are how people decided to use any particular framework. Thanks! Don P.S. As an aside, does anyone have any experience with django? (I really like the name since I am fond of django reinhardt, the jazz guitarist.) I've looked at a few of the web development frameworks for Python. I'm thinking I'm going with CherryPy on my next project. Reading the docs, it seems to click with me. Mapping URLs directly to python functions seems pretty simple and flexible. The POST and GET parameters just show up as arguments to your functions. You can even decide weather or not you want to expose the function or not. You can use any HTML templating toolkit you want with it. I'm still deciding on the templating toolkit to use. Here's my take on some of the other frameworks Zope It seems too big for my purposes. If your web apps are going to be high volume, Zope is probably the answer. Quixote It seems a little weird and complex to me. I may look at it again someday. Django Uses the MVC philosophy, and appears to build a directory structure to facilitate that philosophy. I'm not sure I want to go there yet in that you need to work its way and not your way. I've heard that it's very similar to Ruby on Rails. Nevow If I recall, it extracted woven from the Twisted Framework so that it could work on it's own. Kind of reminded me of Quixote. There are many others that I passed on for various reasons. For me, if it looked like a steep learning curve, then I thought I'd be better off with something else. I also wanted something that's been around for a while(stable) with a good size community to help if I got stuck. It had to be fairly easy to install and configure. I didn't want to spend all my time getting it up and running on a development server. Then having problems when it's time to install on a production server or other servers at different locations. Mike ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor