5 ms·
> What do you mean by "heavyweight"? Rails latest release (7.0.4) have 386,970 lines of code in total, 310,779 of it being Ruby code. 3000 files in total. Jus
by capableweb 4y ago
> What do you mean by "heavyweight"?
Rails latest release (7.0.4) have 386,970 lines of code in total, 310,779 of it being Ruby code. 3000 files in total. Just the `lib` directory of `activerecord` has 33,036 lines of code, across 369 files.
By most metrics, RoR is pretty heavyweight, as their literal taglines are "Ruby on Rails scales from HELLO WORLD to IPO" and "A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern", so it needs to be pretty big to support those use cases.
Full `cloc` report in case someone is curious:
4268 text files.
3839 unique files.
511 files ignored.
github.com/AlDanial/cloc v 1.96 T=1.25 s (3079.1 files/s, 434339.6 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Ruby 3013 73152 54669 310779
Markdown 92 19324 388 45525
JavaScript 87 2974 2170 20955
YAML 171 406 350 3679
CSS 23 347 152 2409
ERB 386 303 9 2244
CoffeeScript 12 97 125 413
JSON 11 7 0 372
HTML 21 15 3 200
Bourne Shell 2 20 25 167
Text 7 0 0 51
yacc 1 4 0 46
SQL 1 6 0 43
Dockerfile 1 7 7 40
SVG 7 0 1 36
builder 3 1 0 10
DTD 1 0 0 1
-------------------------------------------------------------------------------
SUM: 3839 96663 57899 386970
-------------------------------------------------------------------------------
- quest88 4y agoI don't know why something with many LOC is a problem. Why does OP care about LOC?
- capableweb 4y agoMore code, more liability. If you can get away with achieving the same with less code, things tend to be harder to turn into big messy piles of code.
- weatherlight 4y agoI'm not a huge fan of rails but, you can generate apps that don't include active record example of all the flags you can pass to rails when initializing a projects. --skip-git Skip git init, .gitignore, and .gitattributes --skip-keeps Skip source control .keep files --skip-action-mailer Skip Action Mailer files --skip-action-mailbox Skip Action Mailbox gem --skip-action-text Skip Action Text gem --skip-active-record Skip Active Record files --skip-active-job Skip Active Job --skip-active-storage Skip Active Storage files --skip-action-cable Skip Action Cable files --skip-asset-pipeline Skip Asset Pipeline --skip-javascript Skip JavaScript files --skip-hotwire Skip Hotwire integration --skip-jbuilder Skip jbuilder gem --skip-test Skip test files --skip-system-test Skip system test files --skip-bootsnap Skip bootsnap gem
- fknorangesite 4y agoYeah and Rails is modular enough that you can easily pare it down even further - you don't need to `require` everything.
- weego 4y agoWhat does liability mean in the context of a batteries included app framework? If you ever plan on becoming liable for the framework code you're doing something very wrong.
- 4y ago