Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The one thing I don't agree too much with is splitting in many small files. This slows down refactoring and long files are handled properly in good editors.


The reasons for this are a couple I can think of:

1. Large web applications will eventually demand this of you to break the large solution into smaller chunks (components/modules).

See this methodology: http://coding.smashingmagazine.com/2012/04/16/a-new-front-en...

SASS will help you follow whatever standard/methodology your team may be following.

2. And having multiple files will ease development on a large team. Having multiple frontend developers checking in code, it helps to organize, and alleviate one developer stepping on another when checking in SASS files into source control. No conflicts, if developer A is working on the footer, and developer B is working on the header, which are separate SASS files.

I don't agree that it slows down refactoring, and would argue it speeds it up. In the end, the multiple SASS files will probably (depending on how you do it, and your situation), compile down into one file. SASS also has options that allow you to say what the output looks like too (nested, expanded, compressed).


Dev a working on the header and dev b working on the footer is an ideal case that actually never occurred to me. Most of the time they work on both. And any good versioning tool properly used should help avoid conflict, no matter if the coffee is in the same file or not.

It's not like we are doing c or java under cvs, we don't have to split in minuscule files, therefore maybe we shouldn't, in python, js, or css dialects.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: