NSA on Python Frameworks ?

129 views
Skip to first unread message

Johan Mutsaerts

unread,
Apr 5, 2017, 9:07:18 AM4/5/17
to Google App Engine
Hi, 

Starting your own company is never easy. A dream and a good idea is needed but not sufficient. In my case, enterprise software development skills for non-web applications need to be brushed up, so careful choices to be made:
1. GAE PaaS : AFAIK great value for little money, it simply works, always, anywhere, no need for sysops
2. Python : AFAIK highest productivity language, modular, functional, object-oriented, popular 
3. Framework ? web2py, pyramid, django, web2app, jinja2 ? I need high productivity, efficient use of Datastore noSQL, MVC ?, templates, scaffolding, boilerplate code generation ...  
I want to invest the time and effort to re-tool and up-skill, but as a Newbie Seeking Advice on Python Frameworks, I could use some solid advice from you.

Thx & BR.

Jun

unread,
Apr 5, 2017, 11:48:04 AM4/5/17
to Google App Engine
Hi Johan,

Regarding the framework you want to use, it really depends on your use case and how comfortable you feel working with. That said, both Django [1] and Jinja2 are quite good and has been included in App Engine [3]. In the meanwhile, you can also take a look at the Flask [4] at App Engine, which can be a good choice, too. Please notice that it is always a good practice to test them out at your end to find out the most comfortable and confident framework that you're going to use.


Jun

Alex Martelli

unread,
Apr 5, 2017, 11:48:04 AM4/5/17
to google-a...@googlegroups.com
Of course these questions are quite connected with personal opinion, and since I'm the author of "Python in a Nutshell" (3rd edition due out any day now), you can guess where my bias lies:-). Still, FWIW, here are my opinions (hope others chime in!-)...:

On Wed, Apr 5, 2017 at 8:21 AM, Johan Mutsaerts <joh...@b-advised.org> wrote:
Hi, 

Starting your own company is never easy. A dream and a good idea is needed but not sufficient. In my case, enterprise software development skills for non-web applications need to be brushed up, so careful choices to be made:
1. GAE PaaS : AFAIK great value for little money, it simply works, always, anywhere, no need for sysops

I concur (but I'm biased on this one too:-).
 
2. Python : AFAIK highest productivity language, modular, functional, object-oriented, popular 

Ditto (in fact I'm right now in Florence, Italy, about to present a keynote at Pycon Italia Otto on Friday:-).
 
3. Framework ? web2py, pyramid, django, web2app, jinja2 ? I need high productivity, efficient use of Datastore noSQL, MVC ?, templates, scaffolding, boilerplate code generation ...  

My bias here is for *lightweight* frameworks, of which Flask is the most popular (webapp2, bottle and falcon are fine too) -- I devote an entire chapter in the Nutshell 3rd ed to these four frameworks (templating, esp. jinjia2 which works well with them all but especially Flask, is another chapter -- no sense to have templating as PART of a framework, any more than it would to have the kitchen sink in there, IMNSHO:-).

I've wasted too much time in my life debugging boilerplate code resulting from code generation: nowadays I insist on writing the code myself in the first place (less likely to need debugging, and if it does at least I should know why I coded the way I did, right?-). For Datastore access, I use ndb (comes with App Engine Python, and was originally authored by Guido van Rossum), not any framework that was designed to talk SQL and gets shoehorned into NoSql willy-nilly:-)...
 
I want to invest the time and effort to re-tool and up-skill, but as a Newbie Seeking Advice on Python Frameworks, I could use some solid advice from you.

HTH!

Alex
 

Thx & BR.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/0297273b-5c6e-4586-96a9-72f78f4a34d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Johan Mutsaerts

unread,
Apr 6, 2017, 1:55:35 AM4/6/17
to Google App Engine
Thanks Jun, 

I hear Django is great, but not on GAE if you want to use the NoSQL Datastore (I do) ? Django Admin is not compatible ? Django is slow on startup in GAE because of dynamic instantiation and framework body mass ? 
Isn't Jinja2 more of a template engine and not a full framework ? Still, I hear Jinja2 is beautiful, blazing fast, and works great on GAE ? What about a best of breed ? separate template engine and framework ?
I can't quite see the trees through the forest in terms of Bottle, Flask, Can & perhaps even Keg :-)  Which is old, which is new ? Which has most (useful) features ? Which is actively maintained ? Which is popular ? 
I will for sure do my fair share of trying and testing, but I can't afford to do that for too many candidate frameworks. What can I already eliminate based on your experience ? too small, too complicated, too old ... ?

TIA, Johan.

Op woensdag 5 april 2017 17:48:04 UTC+2 schreef Jun:

Johan Mutsaerts

unread,
Apr 6, 2017, 2:10:56 AM4/6/17
to Google App Engine
Thanks Alex, 

Great you concur on GAE & Python as good choices for the enterprise web application developer's toolkit (perhaps a good title for a new book?).
You seem to be in favor of a best of breed approach in separating template engine and framework, which eliminates the need for heavy lifting of full frameworks (like Django) in favor of leaner (faster) frameworks ? 
I find it difficult to sort candidates in terms of obsolescence, popularity (community support), feature set, learning curve, GAE compatibility ... e.g.: pylons, pyramid ? webapp2, wbe2py ? jinja2, mako ? bottle, flask ? 
Is Django really the only framework for developers 'on a deadline' ? on GAE ? using NDB ? If I read you right, your preference goes to Flask and Jinja2 ? Can you elaborate a bit on the why's ? 

Good luck with the book and the conference. 
TIA, Johan


Op woensdag 5 april 2017 17:48:04 UTC+2 schreef Alex Martelli:
Of course these questions are quite connected with personal opinion, and since I'm the author of "Python in a Nutshell" (3rd edition due out any day now), you can guess where my bias lies:-). Still, FWIW, here are my opinions (hope others chime in!-)...:
On Wed, Apr 5, 2017 at 8:21 AM, Johan Mutsaerts <joh...@b-advised.org> wrote:
Hi, 

Starting your own company is never easy. A dream and a good idea is needed but not sufficient. In my case, enterprise software development skills for non-web applications need to be brushed up, so careful choices to be made:
1. GAE PaaS : AFAIK great value for little money, it simply works, always, anywhere, no need for sysops

I concur (but I'm biased on this one too:-).
 
2. Python : AFAIK highest productivity language, modular, functional, object-oriented, popular 

Ditto (in fact I'm right now in Florence, Italy, about to present a keynote at Pycon Italia Otto on Friday:-).
 
3. Framework ? web2py, pyramid, django, web2app, jinja2 ? I need high productivity, efficient use of Datastore noSQL, MVC ?, templates, scaffolding, boilerplate code generation ...  

My bias here is for *lightweight* frameworks, of which Flask is the most popular (webapp2, bottle and falcon are fine too) -- I devote an entire chapter in the Nutshell 3rd ed to these four frameworks (templating, esp. jinjia2 which works well with them all but especially Flask, is another chapter -- no sense to have templating as PART of a framework, any more than it would to have the kitchen sink in there, IMNSHO:-).

I've wasted too much time in my life debugging boilerplate code resulting from code generation: nowadays I insist on writing the code myself in the first place (less likely to need debugging, and if it does at least I should know why I coded the way I did, right?-). For Datastore access, I use ndb (comes with App Engine Python, and was originally authored by Guido van Rossum), not any framework that was designed to talk SQL and gets shoehorned into NoSql willy-nilly:-)...
 
I want to invest the time and effort to re-tool and up-skill, but as a Newbie Seeking Advice on Python Frameworks, I could use some solid advice from you.

HTH!

Alex
 

Thx & BR.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.

Alex Martelli

unread,
Apr 6, 2017, 6:02:36 AM4/6/17
to google-a...@googlegroups.com
On Thu, Apr 6, 2017 at 8:10 AM, Johan Mutsaerts <joh...@b-advised.org> wrote:
Thanks Alex, 

Great you concur on GAE & Python as good choices for the enterprise web application developer's toolkit (perhaps a good title for a new book?).
You seem to be in favor of a best of breed approach in separating template engine and framework, which eliminates the need for heavy lifting of full frameworks (like Django) in favor of leaner (faster) frameworks ? 

Yes, jinja2 (while similar to Django templates) is superior, there's no need to compromise on the templating front.
 
I find it difficult to sort candidates in terms of obsolescence, popularity (community support), feature set, learning curve, GAE compatibility ... e.g.: pylons, pyramid ? webapp2, wbe2py ? jinja2, mako ? bottle, flask ? 

Django's by far the most popular Python web framework -- 1.7M web hits for a search [python django]. jinja2's also popular, but just 380k hits; flask, 570k. You can do more searches if you want to base your choice on popularity. Other indications is that there are conferences entirely devoted to Django but not ones entirely about other Python web frameworks.
 
Is Django really the only framework for developers 'on a deadline' ? on GAE ? using NDB ? If I read you right, your preference goes to Flask and Jinja2 ? Can you elaborate a bit on the why's ? 

jinja2 gives me complete, accurate control of templating -- I'd never downgrade to any other templating system (if I am templating server-side at all -- these days it's often better to write the server side as a REST or other API server, and do all the UI work, templating or otherwise, on the Javascript client side on the browser).

As for the framework (templating apart), I think flask is objectively superior, with a sharp and simple, though powerful, architecture. However personally I'm more used to webapp2, having used it for years, so if I'm doing a simple web app I'm more likely to reach for it -- habit's a powerful force:-). In any case, it will be a lightweight system because I don't have to "buy into" lots of architectural and design choices imbued in a rich/heavy framework, but rather can make my own choices depending on where I'm going to deploy and what (if anything) I need to optimize for. (Often, e.g for an internal dashboard which will have a few dozen users at most, there's no optimization needed at all -- then I can emphasize simplicity and speed of deployment -- just as an example).
 

Good luck with the book and the conference. 

Thanks,

Alex

 
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.

timh

unread,
Apr 8, 2017, 5:39:52 AM4/8/17
to Google App Engine
I will chuck in my 2c worth ;-)

I prefer pyramid. (and chameleon)

T

Johan Mutsaerts

unread,
Apr 9, 2017, 5:22:23 AM4/9/17
to Google App Engine
OK, but why ? Based on previous comments I am inclined to start learning Flask & Jinja2. 
I am still wondering about a Forms engine though (WTForms ?) 

BR,
Johan

Op zaterdag 8 april 2017 11:39:52 UTC+2 schreef timh:

Alex Martelli

unread,
Apr 9, 2017, 5:47:49 AM4/9/17
to google-a...@googlegroups.com
On Sun, Apr 9, 2017 at 11:22 AM, Johan Mutsaerts <joh...@b-advised.org> wrote:
OK, but why ? Based on previous comments I am inclined to start learning Flask & Jinja2. 
I am still wondering about a Forms engine though (WTForms ?) 

I don't have much experience with them, but it seems flask and WTForms integrate well, e.g, see http://exploreflask.com/en/latest/forms.html .


Alex
 
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages