Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.04; 'frameworks': 0.04; 'instance': 0.05; 'perl,': 0.05; 'subject:Python': 0.06; 'elements.': 0.07; 'forms,': 0.07; 'postgresql,': 0.07; 'specifying': 0.07; 'turbogears': 0.07; 'python': 0.08; '(mysql,': 0.09; 'chose': 0.09; 'clean,': 0.09; 'default.': 0.09; 'framework,': 0.09; 'hash': 0.09; 'protocols.': 0.09; 'sql,': 0.09; 'underlying': 0.09; 'pm,': 0.10; 'programmer': 0.11; 'wrote:': 0.14; 'defined': 0.14; 'criticized': 0.16; 'imho,': 0.16; 'indent': 0.16; 'json,': 0.16; 'mappings.': 0.16; 'orm': 0.16; 'sqlalchemy,': 0.16; 'sqlite,': 0.16; 'structures,': 0.16; 'style,': 0.16; 'submit,': 0.16; 'surprising': 0.16; 'validation,': 0.16; 'processor': 0.16; 'apache': 0.17; 'language': 0.18; 'always,': 0.19; 'level,': 0.19; 'mapping': 0.19; 'perl': 0.19; 'programming': 0.19; 'insert': 0.19; 'header :In-Reply-To:1': 0.21; 'column': 0.22; 'stuff': 0.22; 'moreover,': 0.23; 'objects,': 0.23; 'parse': 0.23; 'received:209.85.210.174': 0.23; 'received:mail-iy0-f174.google.com': 0.23; 'objects': 0.23; 'code': 0.24; "doesn't": 0.25; 'libraries': 0.25; 'modules': 0.26; 'example': 0.27; 'work.': 0.28; 'message-id:@mail.gmail.com': 0.28; 'be.': 0.29; 'tables': 0.29; 'subject:?': 0.29; 'elements': 0.29; 'interpret': 0.29; 'variables': 0.29; 'class': 0.29; 'code,': 0.29; 'all,': 0.30; 'fact': 0.30; 'module': 0.30; 'clear,': 0.30; 'logic': 0.30; 'sun,': 0.30; 'toolkit': 0.30; 'changes': 0.30; 'ago': 0.31; 'define': 0.31; 'usually': 0.32; 'anyone': 0.32; 'done': 0.32; 'app': 0.32; "skip:' 10": 0.32; 'cases': 0.32; 'does': 0.33; 'to:addr:python-list': 0.33; 'list': 0.33; 'external': 0.33; 'lines': 0.33; 'things': 0.33; 'daniel': 0.34; 'force': 0.34; 'all.': 0.35; 'example,': 0.35; 'there': 0.35; 'explicit': 0.35; 'maintained': 0.35; 'which,': 0.35; 'using': 0.35; 'from:': 0.36; 'several': 0.36; 'created': 0.36; 'table': 0.37; 'received:google.com': 0.37; 'something': 0.37; 'received:209.85': 0.37; 'checks': 0.37; 'element': 0.37; 'skip:: 10': 0.37; 'pretty': 0.37; 'reasons': 0.37; 'could': 0.38; 'but': 0.38; 'data': 0.38; 'subject:: ': 0.38; 'some': 0.38; 'doing': 0.39; 'should': 0.39; 'easier': 0.39; 'received:209': 0.39; 'flexibility': 0.39; 'to:addr:python.org': 0.39; 'allows': 0.40; 'listed': 0.40; 'generate': 0.60; 'results': 0.60; 'more': 0.60; 'best': 0.60; 'you.': 0.62; 'apps': 0.63; 'ever': 0.64; 'overload': 0.67; '11:47': 0.84; 'datetime': 0.84; 'flexibility,': 0.84; 'integrates': 0.84; 'pyramid': 0.84; 'structures.': 0.84; 'subject:Why': 0.84; 'subject:choose': 0.84; 'subject:its': 0.84; 'urls,': 0.84; 'controller': 0.91; 'dozens': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=Akwfp0aiRXT5KB+e4qGzn4VcDEuvlnJ+H65jwqQoEfo=; b=jyUF1rYbK1MZU9oUj25J0Q/3/zlZq7AW9mQTUGtzC17IDp3VA0Whgzzcxuz5R8yVbK hgE18cmSzVCp7tYCtR7hkSMyeldW0uU9jUpRdCBMcQ1GYDFuFm8KluEhQ9Uvosl85GOY Qjdx6TfWtlokfRlD9oK3Nv7g5BPO8pfjFY6Uo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=HuhUjPTxoifvNEzxWRBLx8Lw4q3pigZEZ7pFDkA61esj83OwNbleafgUvVFftBW6ko DGuqqwoZLZMl05YIa2HTpS1H15idf15ZmgsStf0TQzBh4R+lHktitl/wyyOnz1qEnzFL OYkha9kgZ7xYRkpv6g7H2mQzq7N24OxDWA9QI= MIME-Version: 1.0 In-Reply-To: <12225671E9654FECB49613D915FAEC19@teddy> References: <80d59383-36a3-4744-85c4-1a0577f1d3a6@dr5g2000vbb.googlegroups.com> <9CDC4B2CD1F445E994119A50F65155DF@teddy> <12225671E9654FECB49613D915FAEC19@teddy> Date: Mon, 23 May 2011 10:42:50 +1100 Subject: Re: Why did Quora choose Python for its development? From: Daniel Kluev To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 80 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306107773 news.xs4all.nl 49174 [::ffff:82.94.164.166]:48344 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6026 On Sun, May 22, 2011 at 11:47 PM, Octavian Rasnita wro= te: > From: "Daniel Kluev" > I am talking about that flexibility which was criticized in the previous = messages telling that this flexibility allows any programmer to use his own= way. > Perl doesn't force anyone to indent the code, don't force the programmer = to define a hash element before using it, allow the programmer to interpret= the variables in strings directly. These things should be not used always,= but if in some cases if the programmer wants to use them, he can use them = with no problems. And this means flexibility. This is syntax-level flexibility, which, IMHO, does not affect 'advanceness' of modules at all. At language level, python is far more flexible than perl with its magic methods and hooks, allowing to overload any underlying language principles and protocols. > First, this is a bad style of mapping urls, because this list must be mai= ntained every time the programmer changes something in a controller that ma= kes the app need to use other urls. Explicit is better than implicit. One of reasons why I chose Pylons/Pyramid as my standard toolkit is that it allowed me to define mappers in any way I needed them to. If you want automatically defined mappers, there are lots of other python frameworks and modules which do exactly that. Moreover, even Routes itself (module, which does url mapping in Pylons) allows you to use automated mappers, via :controller/:action tokens. It allows pretty much everything you listed as 'features' of catalyst mappings. If you prefer to stuff routing logic into controllers and have default routing based on controllers and method names, you can use TurboGears framework, which has exactly that mindset, or you can use its mapping modules in Pyramid application. > The module DBIx::Class which is used usually as an ORM can create the cla= ss files for all the tables from a database (MySQL, Oracle, PostgreSQL, SQL= ite, MS SQL, etc), and it can be used to search using unions, sub-selects, = can define views at ORM level, can accept to insert different types of obje= cts like DateTime objects and can also return those type of objects, and ma= ny other things, and most of the things it can do can be done without using= SQL code at all, but only standard Perl code and Perl data structures. There are lots of Python modules which do exactly this and much more. SQLAlchemy, SQLObject, Web2Py's DAL, and so on. They are integrated into frameworks by default. > HTML::FormFu form processor is one of the most used form processors in Ca= talyst applications and it can generate and parse forms created directly in= the code of the application, or as external configuration files defined us= ing JSON, or YAML, or Apache configuration style, or Perl data structures, = or XML... > The forms defined are very easy to create and the elements from those for= ms, for example the list of elements in a combo box can be taken directly f= rom a database by specifying just a few configuration elements. The results= of a form submit can be also inserted in a database using a connector with= DBIx::Class without specifying any database table column name in the progr= amming code, and for doing this are required just a few lines of code that = checks if the $form->submitted_and_valid() and that does the redirection af= ter the submit, the insertion in the database requiring just: Once again, there are dozens of such modules in python. FormAlchemy integrates directly with SQLAlchemy, for example, and does all form generation, parsing, validation, and instance updating/inserting for you. > Yes, for web apps I have seen more things which can be done much better i= n Perl, much easier and clear, with less code, and not because the programm= er needs to do not-recommended tricks for shortening the code, but because = there are very many modules on CPAN that do the hard work. I doubt you had enough experience with python frameworks like Pyramid/Pylons or Web2Py. They have all features you listed, and code is as trivial and clean, as it could ever be. Its surprising that you present trivial ORM as 'advanced modules and libraries which are not available for Python', while in fact it have been done long time ago and in several flavors. --=20 With best regards, Daniel Kluev