Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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; 'perl,': 0.05; 'typing': 0.05; 'subject:Python': 0.06; 'elements.': 0.07; 'forms,': 0.07; 'modules.': 0.07; 'postgresql,': 0.07; 'specifying': 0.07; 'transform': 0.07; 'python': 0.08; '(mysql,': 0.09; 'apps,': 0.09; 'chose': 0.09; 'executed': 0.09; 'hash': 0.09; 'sql,': 0.09; 'pm,': 0.10; 'programmer': 0.11; 'wrote:': 0.14; 'defined': 0.14; 'chained': 0.16; 'criticized': 0.16; 'duplicates': 0.16; 'expressions,': 0.16; 'impose': 0.16; 'indent': 0.16; 'json,': 0.16; 'mappings.': 0.16; 'matched': 0.16; 'orm': 0.16; 'processed,': 0.16; 'sqlite,': 0.16; 'structures,': 0.16; 'style,': 0.16; 'submit,': 0.16; 'processor': 0.16; 'apache': 0.17; 'language,': 0.17; 'language': 0.18; 'always,': 0.19; 'level,': 0.19; 'mapping': 0.19; 'perl': 0.19; 'programming': 0.19; 'insert': 0.19; 'template': 0.19; 'column': 0.22; 'request,': 0.22; 'example.': 0.23; 'globally': 0.23; 'objects,': 0.23; 'parse': 0.23; 'statement,': 0.23; 'translated': 0.23; 'objects': 0.23; 'received:209.85.161.46': 0.23; 'received:mail- fx0-f46.google.com': 0.23; 'creating': 0.24; 'code': 0.24; "doesn't": 0.25; 'values': 0.25; 'libraries': 0.25; 'specify': 0.25; 'modules': 0.26; 'specified': 0.26; 'received:209.85.161': 0.26; 'object': 0.26; 'example': 0.27; 'work.': 0.28; 'helpful': 0.28; 'urls': 0.28; 'tables': 0.29; 'subject:?': 0.29; 'elements': 0.29; 'interpret': 0.29; 'variables': 0.29; 'class': 0.29; 'code,': 0.29; 'all,': 0.30; 'do.': 0.30; 'module': 0.30; 'actions.': 0.30; 'clear,': 0.30; 'filtering': 0.30; 'important,': 0.30; 'second,': 0.30; 'sun,': 0.30; 'x-mailer:microsoft outlook express 6.00.2900.5931': 0.30; 'changes': 0.30; 'define': 0.31; 'programmers': 0.31; 'separate': 0.31; "didn't": 0.31; 'seem': 0.32; '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; 'regular': 0.34; 'force': 0.34; 'there': 0.35; '"we': 0.35; 'change,': 0.35; 'changes.': 0.35; 'like:': 0.35; 'maintained': 0.35; 'module.': 0.35; 'languages': 0.35; 'using': 0.35; 'record': 0.36; 'from:': 0.36; 'certain': 0.36; 'created': 0.36; 'table': 0.37; 'apps': 0.63; 'our': 0.63; 'please,': 0.64; 'actions': 0.65; 'view': 0.66; 'show': 0.66; 'here': 0.66; 'engine': 0.70; 'anything,': 0.73; '(based': 0.84; 'about?': 0.84; 'datetime': 0.84; 'dispatching': 0.84; 'flexibility,': 0.84; 'flexible,': 0.84; 'i18n': 0.84; 'labels': 0.84; 'structures.': 0.84; 'subject:Why': 0.84; 'subject:choose': 0.84; 'subject:its': 0.84; 'urls,': 0.84; 'controller': 0.91; 'locally': 0.91; 'render': 0.91; 'conditions,': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:from:to:references:subject:date :mime-version:content-type:content-transfer-encoding:x-priority :x-msmail-priority:x-mailer:x-mimeole; bh=5aD2Ko5f21M/nDhKJyeZIBwJiwgATKk/1rURs8IVysw=; b=VjZRp70wJ0EoU7pwDNxNT6ycijwD8WJ8Aifcj1mNzpC59p0qIWzyyde701gYD20dpn Pr1+oJUlcR/uwWTW1ItoOhGHPGnmlPMfOoeLrT2lTvWS+73z7ou/6DqrpWYf9U0VcHsH qFoCS5u8hfSx4yamAxPKYl7ejTNi9Z6iX9zVI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:references:subject:date:mime-version :content-type:content-transfer-encoding:x-priority:x-msmail-priority :x-mailer:x-mimeole; b=H/csRX/hUGmUjMSgjxIPitBSjpgmhNMgb7PX48gMApQZrvggHdZ9alfvfE1w82gm+I jcdYzPjuvsrhChwOb0qFkOB8shABq+eTenlX3HJPyXmS/AxD480yTtnmBX3/3iWZTy1S wrhLM8DnCG52XfeOzKF/K2E9mXK2sLnkTCmbA= From: "Octavian Rasnita" To: References: <80d59383-36a3-4744-85c4-1a0577f1d3a6@dr5g2000vbb.googlegroups.com><9CDC4B2CD1F445E994119A50F65155DF@teddy> Subject: Re: Why did Quora choose Python for its development? Date: Sun, 22 May 2011 15:47:33 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 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: 111 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306068468 news.xs4all.nl 49184 [::ffff:82.94.164.166]:45736 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5972 From: "Daniel Kluev" > On Sun, May 22, 2011 at 6:44 PM, Octavian Rasnita = wrote: >> Because of its flexibility, Perl offers more advanced modules and = libraries which are not available for Python. >=20 > What 'flexibility' are you talking about? This seem to be very biased > statement, based on lack of according python experience. 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. > There are many python web frameworks which allow you to use w/e > interfaces, template languages and ORMs you want - Pyramid/Pylons is > good example. > 'Very powerful' and 'great' are 'very useless' descriptions of these > modules. Please, show us what exactly is so 'advanced' about them > which cannot be done in python. Every language can do almost anything, so this is not important, because = the Python programmers didn't chose Python because it can do what other = languages cannot do. It is important how easy is to create an app with it, and while Python = offers helpful features for creating desktop apps, for creating web apps = Perl is better. Here is a text from the documentation of Pyramid/Pylons: "We finally need to add some routing elements to our application = configuration if we want our view functions to be matched to application = URLs. ...=20 # routes setup=20 config.add_route('list', '/')=20 config.add_route('new', '/new')=20 config.add_route('close', '/close/{id}')=20 " ... First, this is a bad style of mapping urls, because this list must be = maintained every time the programmer changes something in a controller = that makes the app need to use other urls. Catalyst don't need this overhead and don't need to specify the url = mapping in a separate module. If the controllers change, then the url = dispatching also changes. Second, this way of url dispatching is not so flexible, because it = doesn't allow as many types of url mappings. Catalyst allows to dispatch the urls to actions based on controllers and = subroutines names, globally or locally (based on the current = controller), it allows dispatching based on regular expressions, it = allows a chained dispatch where more actions are executed in a certain = order on a single request, and all these without typing code outside of = the subroutines that do the actions. The module DBIx::Class which is used usually as an ORM can create the = class files for all the tables from a database (MySQL, Oracle, = PostgreSQL, SQLite, 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 objects like DateTime objects and can also return = those type of objects, and many 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. HTML::FormFu form processor is one of the most used form processors in = Catalyst applications and it can generate and parse forms created = directly in the code of the application, or as external configuration = files defined using 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 = forms, for example the list of elements in a combo box can be taken = directly from 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 programming 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 after the = submit, the insertion in the database requiring just: $form->model->create; or $form->model->update( $db_record ); ...after that record was defined using just something like: my $db_record =3D $c->model( 'DB::TableName' )->find( $record_id ); And HTML::FormFu can do filtering based on many conditions, impose the = specified constraints, specify different inflators/deflators from the = inserted strings to their corresponding object types, do a validation = eventualy based on a database query that checks for duplicates or other = things, transform the data automaticly after the form was processed, can = use I18N for displaying the field labels or values translated in the = active language, have its own rendering engine or can render custom form = fields made using Template-Toolkit, etc. Yes, for web apps I have seen more things which can be done much better = in Perl, much easier and clear, with less code, and not because the = programmer needs to do not-recommended tricks for shortening the code, = but because there are very many modules on CPAN that do the hard work. Octavian