5 ms·
Example: I'm working on a "large" CakePHP application (similar to Rails) with 24,000 lines of our own code, 57,000 lines of code from community plugins, and 240
by deizel 13y ago
Example: I'm working on a "large" CakePHP application (similar to Rails) with 24,000 lines of our own code, 57,000 lines of code from community plugins, and 240,000 lines of core framework code.
- jiggy2011 13y agoI am the sole maintainer of a framework free PHP codebase with ~100K lines. Who's jealous? It could probably be rewritten down to about 10-20K lines (maybe less) if I had a spare month or two.
- deizel 13y agoIf you are saying the size of your application could be reduced by rewriting it to using a framework (an existing one or one of your own creation), I think this is the point we are all trying to make here. Assuming one uses all the features of a framework, the total complexity of my 24K line framework application (counting only code I've written) could be compared to that of a 321K line non-framework application (counting all the code in my project). Thankfully I only have to write/maintain 8% of the codebase, as the remaining 92% is kept up-to-date by typing `composer update` on a weekly basis.
- jiggy2011 13y agoIn this case, simply refactoring to remove duplication would probably work. For example there are at least 3 different ways to send email. There is a lot of code in there that is really "framework" but it's completely baked into everything else so not really separable. There's probably at least 2 different and distinct attempts at creating a framework, and you can tell the age of the code by which it uses. The main reason it hasn't been significantly refactored is that it is astonishingly reliable considering how bad the code is.
- dscrd 13y agoIt would be 2-10 times less lines of code on Django (and also on Rails). Lines of code comparisons do not scale between programming languages.
- deizel 13y agoI'm not sure I agree. All the frameworks just mentioned do more or less the same thing and have comparable lines of code counts. - Django - 215,000 LOC (.py) - Ruby - 232,000 LOC (.rb) - CakePHP - 240,000 LOC (.php)
- steveklabnik 13y agoRails is about 110,000 LOC, last I checked right before the 4.0.0 release, where'd you get that number?
- deizel 13y ago$ git clone https://github.com/rails/rails.git https://github.com/rails/rails.git && cd rails $ find . -name '*.rb' | xargs wc -l | tail -1 232424 total Maybe I should have said LOCC (lines of commented code)?
- evilduck 13y agoThat does include all of their unit tests code though. I wouldn't personally define unit tests as "core" framework code since I can deploy a Rails app without them (they never show up in a stack trace). It's going to come down to your own semantics since Rails wouldn't exist as it is today without them either.
- steveklabnik 13y agoAhhh, you know what? I just realized I was confused: the diff for rails 4 was about +110,000 / -100,000, that's what I'm remembering that number from. My bad!
- berntb 13y ago>>It would be 2-10 times less lines of code on Django (and also on Rails) [Compared to CakePHP]. Interesting claim. Do you have references? (An account with a couple of hundreds of Karma making extreme claims? Please surprise me by not being a troll. :-) )