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

Separated data from presentation #110

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open

Separated data from presentation #110

wants to merge 2 commits into from

Conversation

morgansoftware
Copy link

Edits made:

  • Moved all project information into a JSON object
  • Used JS to read items from JSON and build HTML list items programmatically
  • Updated README to explain how to add new projects

Reason for edits:

If you have the same HTML copy-and-pasted dozens of times, there will be errors made, and those errors will be hard to find. By separating the data (project information) out from the presentation (HTML), we've guaranteed that the HTML will be identical for every instance, and we've made the data easier to read/modify/add/delete because it's in a JSON object, not a buried in HTML. Any future HTML changes will only need to be made once, not dozens of times. And a project that belongs to multiple groups won't need to be duplicated, you just add another tag to the JSON object and it instantly appears in both groups.

Conclusion:

Feel free to reject/accept this as you wish. I think this will make the list easier to maintain going forward.

}

function addProjectToProjectList(tag, project) {
var element = '';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You think we can use a template generator here? Like Handlebars?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I do agree that is simple as create the template with element variable. Just thinking here...

@rands0n
Copy link
Collaborator

rands0n commented Jul 24, 2018

Wow @kyleraymorgan, what a great change! Thanks for making these changes, I also think that is good to maintain because it's a simple JSON 😆.

Can you fix the conflicts so I can proceed with the review? Also @azat-co what do you think about it?

@morgansoftware
Copy link
Author

@rands0n Absolutely, a template generator would be a much better approach. But I wouldn't want to introduce dependencies without approval from the project owner. I'll resolve the conflicts tonight.

@morgansoftware
Copy link
Author

Sorry, I'm not gonna have time to work on this anytime soon

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

Successfully merging this pull request may close these issues.

2 participants