Random ramblings about web2py, python,
Zope and (sometimes) bit of Windows.
Home | web2py | Who am I? | Contact Me | Lenguaje: Espanol |   

Last 10
Older Posts
External Links

[Back to the Homepage]

Added Aug 28 2009 , Modified Aug 28 2009 - 04:15 PM

For the folks that are starting with this great framework I've seen several questions regarding this in the Google groups page, what is the "best" way of coding web apps in web2py?

First, web2py already makes it easy for you as far as the separation of your HTML code, your modules and your controllers, it is all nifty placed in their own directories of your web2py installation. Please note that I only cover editors that work with Linux, OS X has its own set of editors that I am sure are superb, and for windows, well, I frankly don't care about it (I *do* have my reasons for the previous rant, I'll explain them in another post).

GEdit - If using GNOME, you can get away by using it to edit your HTML and python scripts, make sure that you:

  • Enable line numbers
  • Follow the guidelines of Python's PEP-8 and use 4 spaces for your tab clicks and change your settings to use spaces instead of tabs in your code (extremely important), in fact this will also be okay for editing and indenting your HTML files. (You do indent your HTML code, right?)

For the most part you'll be fine. GEdit out-of-the-box contains syntax highlighting, smart indenting, and other features of a good text editor.

Komodo Edit - ActiveState Komodo Edit is the free version of the Komodo IDE suite, Komodo Edit is an impressive source code editor that supports a myriad of options, needless to say it includes everything GEdit does and then some, it is based in Mozilla's Gecko engine, it was itself written (at least partly) in Python and is the one that I am currently using to develop several of my applications.

Wing IDE - Wing IDE is the "eclipse" for the masses, this is, an easy to use, but incredible powerful IDE which provides not only source code editing capabilities but debugging, breakpoints, integrated shell and everything you come to expect from a professional IDE. Wing IDE is not free by any means, but they provide you with a "free" license if you prove to them that you will be using it to develop open source applications. Here is a screenshot from it in action while debugging pyforum.org locally in my PC (click on the image for a larger version):

Wing IDE

Conclusion

This is just an incredible small subset of all source code editors available, however they are the ones I've used to develop several applications (including pyForum.org, zForum.org, aiastudios.com) and they are proven to be excellent for RAD development.

c o m m e n t s    f o r
web2py Developement Environment(s)
Added Aug 30 2009 , Modified Aug 30 2009 - 07:35 PM By ri..@gmail.com
hi Julio,

Saw a link to your blog from the web2py group.

I have also been using Komodo Edit and agree it's great.
So far I have been using it as I would for standard Python code. Do you have any tips for developing a web2py application with it?
Also have you tried the full version of Komodo? My impression is the features are roughly equivalent to Wing IDE.

Richard
Added Aug 31 2009 , Modified Aug 31 2009 - 10:20 PM By JulioFS
Well, I've used Wingware for "Heavy Lifting" debugging web2py, although I have to say that I am really fond of Komodo Edit for day-to-day source code editing. I'd say that my web2py development has been 60% Komodo, 40% Wing, where Wing is used for debugging stubborn bugs, I honestly am not really against any other editor (up to a year ago I used to be a Vim/GVim/cream nut, and I still use it every now and then for example).

So if you keep on using Komodo, I am pretty sure you will be fine, I think one of the strengths of Komodo is that is very easy to use and the syntax highlight feature is right-on out-of-the-box for python, [x]html, SQL, etc, make sure to tweak it to display line numbers, my personal preferences include changing tabs to spaces (regardless if it is python, hey, this is not 1980 anymore), set tab stops to 4 spaces, and also keep the line where the cursor is highlighted.

So my next "big" (open source app) is being developed in Komodo, but Wing will probably have its turn as soon as an oddity in my code shows up (which is quite frequently anyway).

JulioF

Add a Comment | Back to the Homepage

 

TechFuel.net | Web Standards xhtml 1.1 and css 2.1 | Rel 16