LISTSERV mailing list manager LISTSERV 16.5

Help for CODE4LIB Archives


CODE4LIB Archives

CODE4LIB Archives


CODE4LIB@LISTS.CLIR.ORG


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

CODE4LIB Home

CODE4LIB Home

CODE4LIB  August 2008

CODE4LIB August 2008

Subject:

Re: what's friendlier & less powerful than phpMyAdmin?

From:

Casey Durfee <[log in to unmask]>

Reply-To:

Code for Libraries <[log in to unmask]>

Date:

Sun, 10 Aug 2008 11:08:50 -0400

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (88 lines)

I think it's extremely hard to appreciate both the advantages and
disadvantages of a framework if you haven't done a bunch of stuff both with
and without one.  If you want to be a great developer you do need to know
how to do stuff at a low level, no question.  But for most developers and
most projects, I strongly believe you're better off using a framework even
if you are an expert.  Tim can be at least as productive writing PHP by hand
as I can using Django, but most of us can't be Tim.  Most of us need to
exploit every unfair advantage and shortcut we can find.

For a beginner/intermediate developer, not having to know or think too much
about SQL is a huge advantage, conceptually and practically.  It can
actually lead to *better* code.  You can be totally ignorant of SQL
injection issues and be just fine using Rails or Django.  That's certainly
not true if you're working at a lower level -- where you have to be both an
expert and very careful not to make a mistake.  And I'm unconvinced writing
SQL by hand teaches you about the limitations of MySQL any better than using
a framework -- writing SQL by hand does not automatically make you a good
database administrator.  (Heck, being a good DBA does not automatically make
you a good MySQL administrator).  In some cases if you're not an expert the
net result of doing it by hand may actually be worse, as I'm willing to bet
that the person that wrote the framework's database interface knows all
about the limitations of MySQL, and its code has been tested in the real
world by thousands of users.  It's all about getting people smarter than you
to write and test as much code as possible for you.

When there are performance issues, the process of dealing with them is
pretty much the same both ways -- look at the queries being run and figure
out where the troublesome spots are and optimize them.  A framework can
actually make that easier rather than harder -- you can log all the SQL run
on a page and how long it took by changing one config file and go from
there.

But concentrating too heavily on the SQL/ORM aspect misses all the other
things that frameworks do.  Even if you are a database expert, you should
still use a framework most of the time in my book.  Nobody can be an expert
on everything.  You shouldn't have to be an expert on XSS, CSRF or SQL
injection to be protected against them.  You shouldn't have to be an expert
on character sets and encodings to have your app handle them right.  You
shouldn't have to start from scratch to add standard boilerplate stuff like
an admin interface or RSS or comments or internationalization to your
project.

I'm not saying you shouldn't be wary of the things that a framework (or any
tool) hides from you, of course.  But in my experience the things that a
framework will save you from (like getting hacked because you forgot to
sanitize some input data in one tiny little place) far outweigh the
downsides, and the time you save by doing as little from scratch as possible
can be spent becoming a MySQL guru if and when you need to.  Or you can bail
on MySQL if it becomes a problem and switch to a better DBMS.  You can do
that without changing any of your code if you use a good framework because
the database layer is totally abstracted.  I wish we could do that at
LibraryThing.

But to answer the original question, I'd recommend Django.  Using Django to
supply a simple CRUD interface by no means rules out doing the interesting
part of the project however you want to [1].  We have stuff at LibraryThing
where the front end is PHP (written by hand) and the back end/admin
interface is Django.  It works great.  And Django (especially with the newly
revamped admin code) provides a far better and more powerful admin interface
than CodeIgniter or others, in my book.

--Casey

[1] http://jeffcroft.com/blog/2006/jul/14/django-admin-your-php-app/


On Wed, Jul 30, 2008 at 8:07 AM, Tim Spalding <[log in to unmask]> wrote:

    This gets religious quickly, but, in my experience, programmers who
    learn on a framework miss out on their understanding of database
    necessities. They may not matter much when you have a low-traffic,
    low-content situation, but as your traffic and data grow you're going
    to want an understanding of how MySQL optimizes queries, what's
    expensive and what's not, and so forth. Although anyone can learn
    anything, experience is the best teacher, and, in my experience,
    frameworks encourage you to avoid that experience.

    For example, the Ruby programmers I've worked with have been unaware
    that MySQL only uses one index per table per select, causing them to
    index far more than they need, how joins work across different MySQL
    data types, the advantages of ganging your inserts together, etc. This
    stuff adds up fast.

    Of course, the same arguments could be leveled against PHP in favor of
    C, against C in favor of assembly, etc.. Abstraction always has merits
    and demerits.

    Tim

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
December 2003
November 2003

ATOM RSS1 RSS2



LISTS.CLIR.ORG

CataList Email List Search Powered by the LISTSERV Email List Manager