Feature organization #223

Open
bryanp opened this Issue Feb 14, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@bryanp
Member

bryanp commented Feb 14, 2017

Features include all the parts to make a particular part of your app work, including routes, models, views, and assets. For example, you could implement authentication as a self-contained feature rather than alongside the other code in your app. This promotes a more reusable architecture.

Here's an example structure:

app/
  features/
    auth/
      session_model.rb
      session_resource.rb

      presentation/
        assets/
          styles/
            sessions.scss
        templates/
          sessions/
            new.html
        
      views/
        new.rb

Later, Plugins will build on top of the Feature architecture to make it possible to install third-party features into an app. Behind the scenes, features will likely be implemented as a separate app mounted within the current environment. This is to help enforce isolation between features (required if you want to move the feature into a plugin in the future).

There are still a few details to iron out, so this work should begin with some additional discovery.

@bryanp bryanp added the enhancement label Feb 14, 2017

@bryanp bryanp added this to the 1.0 milestone Feb 14, 2017

@bryanp bryanp removed this from the 1.0 milestone Nov 28, 2017

@bryanp bryanp removed the enhancement label May 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment