r/programming • • Jan 05 '11

Drupal 7 released.

http://drupal.org/drupal-7.0
222 Upvotes

259 comments sorted by

View all comments

Show parent comments

21

u/skeww Jan 05 '11 edited Jan 05 '11

Wordpress isn't a lightweight compared to Drupal.

X:\wordpress-3.0.4>cloc *
     565 text files.
     563 unique files.
       7 files ignored.

http://cloc.sourceforge.net v 1.53  T=9.0 s (61.8 files/s, 23006.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
PHP                            291          20399          41225          97013
Javascript                     159           4159           2619          22097
CSS                             88           2381            479          14448
HTML                            17            258              7           1927
XML                              1              7              0             37
-------------------------------------------------------------------------------
SUM:                           556          27204          44330         135522
-------------------------------------------------------------------------------


X:\drupal-7.0>cloc --force-lang="PHP",module --force-lang="PHP",install --force-lang="PHP",inc --force-lang="PHP",engine *
     852 text files.
     847 unique files.
     221 files ignored.

http://cloc.sourceforge.net v 1.53  T=10.0 s (62.9 files/s, 22984.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
PHP                            404          14828          66433         127260
CSS                            116            810           1098           8909
Javascript                      84            815           2808           5085
Bourne Shell                     8            172              3           1060
XML                             12              3              0            441
HTML                             3              4              0             69
ASP.Net                          1              3              0             40
SQL                              1              0              0              1
-------------------------------------------------------------------------------
SUM:                           629          16635          70342         142865
-------------------------------------------------------------------------------

As you can see, Wordpress isn't significantly smaller. Wordpress is merely ~24% less code (with ~38% less comments).

Edit: I didn't include the "test" files, since these are unit tests and the code is never executed on a regular website.

-2

u/richardjohn Jan 05 '11

If you're customising it, the unit tests should be executed on a regular website.

3

u/skeww Jan 05 '11

Why would you run the tests on your live system? This only makes sense if you also develop on your live system, which would be even more stupid.

Having tests is a big plus. Don't try to make it look like a disadvantage.

1

u/richardjohn Jan 06 '11

By no means did I mean the tests were a negative - I don't think the number of files is relevant to much at all.

What I meant was, if Drupal has test coverage, use them if you're customising it.

I didn't mention running them on a live system?

3

u/skeww Jan 06 '11

I didn't mention running them on a live system?

Well...

[...] executed on a regular website.

Your test installation isn't a regular website.

→ More replies (2)