Comments (2)
Okay, so I began refactoring the application html and application controller, but I ran into some trouble in that the "fetch commits" method is used for multiple different things. This led me down the rabbit hole, and now I'm drawing up model-level assocations that are missing.
I think the easiest way to refactor the codebase would be the following:
- add ActiveRecord associations between models
- move logic for rendering from views to their controllers, where possible
- fetch data needed for the views through for the controllers through associations
- condense views logic where needed
The benefit of this is that it will actually reduce the complexity of the codebase, and allow for new featured to be plugged in easier. Also, if you want to change a feature, it will require you to update code in far fewer places (for example, if you wanted to change how you fetch from fetch_taxonomies, you might have to change logic in 9 files right now).
Also the nice thing about this is that it won't break anything to do any single step. If somebody refactors the db and model associations, it shouldn't affect the controller or views. That way all changes are incremental, and it's not one huge project to do it all. :)
Edit: Anyway, the way I got here is that "fetch_taxonomies" is actually just a replacement for things that ActiveRecord associations do.
from ifme.
I drew a picture. It's a little overwhelming at first so I tried to break it up using whitespace. Are other users capable of commenting on anything besides strategies? I couldn't find anywhere else on the site.
from ifme.
Related Issues (20)
- Fix error raised in `client/app/components/Chart/__tests__/Chart.spec.jsx` HOT 1
- Update to Webpack 5
- navbar is not sticky HOT 15
- Fix keyboard navigation for navigation menu in mobile web
- Mobile Menu not Working HOT 4
- Add a Storybook build to our Circle CI configuration HOT 7
- Implement react-autosuggest alternative HOT 8
- Underline and Strike-through are not applied on in Moment and Strategy posts
- can I translate it into Arabic? HOT 2
- Alert Message is showing after coming back to the Page. HOT 16
- CI feature: integrate pull request preview environments HOT 2
- [BUG]: Error Page when adding allies but the request process is reflected by the system. HOT 3
- [BUG]: Does not receive any confirmation email to complete the account registration. HOT 3
- [BUG]: Does not receive any email confirmation instruction to change the password. HOT 2
- To change the footer on some specific page's HOT 2
- [BUG]: Profile section feels to be broken when the screen size goes to 1200px HOT 2
- [FEAT]: Streamline developer installation setup
- [BUG]: In the footer section "X" is still called Twitter HOT 1
- [I want to work on NavBar and make it sticky]: <title> HOT 1
- Making the navigation menu bar fixed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ifme.