-
Notifications
You must be signed in to change notification settings - Fork 0
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
Replace ViewModel with MVC Style base class #13
Comments
Admin-ui should use this class and provide an admin-ui specific theme and templates for the views, but overall could use exactly the same controller/config logic. |
👍 to a convenience base class that contains all of this, noting some thinking/discussion about more granular mixins that this MVCModule might be composed of (some of these are pretty minimal gain over just implementing in constructor, and still require coordination in the participating constructor):
|
@loppear to borrow from Rails, the benefit of this class seems to be use of convention rather than explicit configuration. Otherwise, we’re creating two different ways of explicitly configuring templates/routes, etc (this way and the standard direct way
|
I think it makes sense for Storage to get a I think it makes sense to make the convention of "models in ./models, templates in ./templates" automatic if we're going to have this base class. Open question right now of whether it's even possible for the base class to find out the path to the concrete sub-class however, so maybe moot. But I'd really rather not have every sub-class of MVCModule need to state Yes to './client' for client js, and for 'scripts' or 'client' as the general term for 'js for the client side' in method names. Yes to MVCModule making use of |
👍 |
Diving into the details of implementing these route handlers, questions:
|
More details thinking out loud:
|
Offline discussion summary:
|
👍 thanks for documenting |
We do a lot of simple MVC style parts of applications. Rather than writing all the connections between models, views, routes and controller logic, it would be nice to have a helper module base class that automates/reduces the code.
This would expect the following folder structure with models and templates
The following routes would automatically be created. The root is the lowercased, singularized
constructor.name
The text was updated successfully, but these errors were encountered: