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

javascript/organizing_your_javascript_code/factory_functions_and_module_pattern.md - revamps the lesson #26339

Merged

Conversation

Lofty-Brambles
Copy link
Contributor

Because

Addresses the problems with the general disorganization of the lesson as mentioned in #26225 and revamps the included resources.

This PR

  • Removes the link to an article on why constructors are bad to a dedicated section and adds it in the assignement.
  • Provides more in-lesson text, explaining scopes and closures and moves them before factory functions to reduce jumping around.
  • Removes this video and this article which create a pseudo assignment section out of nowhere and adds explanations in lesson, along with links to MDN and Wesbos's articles on them in the assignments, which are far more accurate and detailed.
  • Adds a proper section on the problems with constructors instead of a bleak mention in introductions.
  • Adds a simpler and extensible example to factories at first and rewords the private variables section.
  • Extends on previous examples to showcase inheritance. Adds the mention of the word "prototypal" with inheritance to make it more precise.
  • Moves this Eric Elliot article to additional resources since it has some references that can be confusing to the learner at this stage.
  • Removes the pseudo-assignment section under "The module pattern" subheading. Moves the introduction article to a knowledge check point with more in-text explanation. Removes the second article since it is a near repetition of the third. Adds the third and fourth points under assignments.
  • Adds a properly marked section explaining the basics of namespacing, and also what encapsulation is, which has not been discussed by far.
  • Adds a dedicated "Assignement" section.

Issue

Closes #26225

Additional Information

N/A

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project Contributing Guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

@github-actions github-actions bot added the Content: JavaScript Involves the JavaScript course label Sep 16, 2023
@01zulfi 01zulfi requested review from a team and wise-king-sullyman and removed request for a team September 20, 2023 14:01
Copy link
Member

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

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

Awesome work on this so far 🚀

I was only able to partially go through it right now but I wanted to get started on it while I had a chance. Feel free to make (or discuss) the changes I've suggested so far now if you'd like to, but if you'd rather wait until I finish up (should be able to in the next few days) that is fine too.

@Lofty-Brambles
Copy link
Contributor Author

@wise-king-sullyman I fixed all the reviews for now, will check on it soon.
Here's a preview in case you need one, with the codeblocks fixed.

@Lofty-Brambles
Copy link
Contributor Author

@wise-king-sullyman, I think this should wrap it up, if you're done with the reviews?

Copy link
Member

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

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

Yep looks great, thanks for all your work on this!

@wise-king-sullyman wise-king-sullyman merged commit 2e01c8a into TheOdinProject:main Oct 7, 2023
1 check passed
@JoshDevHub JoshDevHub linked an issue Jan 2, 2024 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: JavaScript Involves the JavaScript course
Projects
None yet
3 participants