Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break up Amber::Router::Cookies module #1014

Closed
dwightwatson opened this issue Dec 30, 2018 · 6 comments
Closed

Break up Amber::Router::Cookies module #1014

dwightwatson opened this issue Dec 30, 2018 · 6 comments

Comments

@dwightwatson
Copy link
Contributor

dwightwatson commented Dec 30, 2018

Description

The file for Amber::Router::Cookies contains multiple class and module definitions, and Amber::Router::Cookies may not even need to be a class itself. I think it would be beneficial for the classes and modules defined in the namespace to be broken up into individual files so that it's easier to find.

I suspect that there may be other instances of file/class inconsistencies that would be good to address as well.

  • Amber::Router::Session::Store located in amber/router/session/session_store.cr
  • Amber::Pipe located in amber/pipes directory
@drujensen
Copy link
Member

@eliasjpr wdyt?

@eliasjpr
Copy link
Contributor

eliasjpr commented Jan 1, 2019

I thought of doing that previously. I think is a good idea

@dwightwatson
Copy link
Contributor Author

Was looking at renaming Amber::Pipe to Amber::Pipes versus renaming the directory to amber/pipe.

There might be room for discussion around naming and seeing if we can develop some consistency between the module names.

image

One option might be to aim for singular names. It may be better to go from Amber::Validators to Amber::Validation.

Amber::CLI
Amber::Controller
Amber::DSL
Amber::Environment
Amber::Exception
Amber::Extension
Amber::Pipe
Amber::Router
Amber::Server
Amber::Support
Amber::Validation
Amber::WebSocket

@robacarp
Copy link
Member

robacarp commented Jan 8, 2019

Some will always be singular, server for example. But I think any namespaces/folders which represent a collection of things should be plural. Validations, Extensions, Support, etc.

Is Support plural? Whatever...

@eliasjpr
Copy link
Contributor

eliasjpr commented Jan 9, 2019

I was in the past proposing the idea to modularized the code further, to something maybe towards this I know the team was hesitant to do so then. I am not sure how the team feels now, to slowly organize and document the project so we can generate crystal docs.

@drujensen
Copy link
Member

@dwightwatson I agree with @robacarp. It depends on what the purpose of the module is. If it is name spacing a collection of items, it should be plural but if it's used to be included in a class, it's more than likely singular.

Closing this issue. Thanks for the contribution!

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

No branches or pull requests

4 participants