Skip to content

Adding Modules #8

Open
mdwiltfong wants to merge 6 commits intoHoliv:mainfrom
mdwiltfong:main
Open

Adding Modules #8
mdwiltfong wants to merge 6 commits intoHoliv:mainfrom
mdwiltfong:main

Conversation

@mdwiltfong
Copy link

This PR will introduce modules, which will help compartmentalize the code

@mdwiltfong
Copy link
Author

Hey @Holiv !

This is great. I really liked your approach to creating this. It took me a while to realize that rendering data on the screen is a completely separate problem, and I like your approach to it here.

This PR will introduce modules, which I think can add more organization to your code base. For example, through modules you can define your Course class, but then instantiate it in the script.js class. This might add more clutter to the script.js file, but at the same time it will isolate the definition of Course .

This approach did introduce some caveats. For example, some of your methods no longer had global scope, and I had to explicitly assign them to the window object.

Finally, have you though of possibly using a Tree Data Structure? It's hard to say how this would impact your code, but it's always a good idea to implement DSA's when you have the chance!

Although I did manually test this PR, I would suggest manually testing it yourself before merging it.

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.

1 participant