Simon Tucker
Aug 26, 2017 · 1 min read

I must have poached the name scheme from someone somewhere, but I’ve been using it for quite a while now and definitely like it.

Some immediate benefits:

  1. You’ll always know where everything is in the app
  2. People who are new to the codebase will quickly figure out how to find anything
  3. Imports are always obvious
  4. With an IDE like Sublime/Atom/VSCode, it’s crazy fast to access the file you need. If I want to edit say a screen, I’ll just start searching ‘screen’ without even thinking which screen needs editing and all the screen files pop up in the typeahead

Some people like to split things up by feature. I respect that option, especially when apps get big, but I haven’t felt constrained by this type based structure yet. I find it harder to find stuff or get familiar with a codebase when it’s split by feature. However, if something should be pulled out as its own module, I’ll just pull the code out as a package, but with the same type-based folder structure. Moving those files becomes trivial and imports within the new package don’t need modifying :)

)

    Simon Tucker

    Written by

    Watch out, he’s a byter