Skip to content

Organizing Your JavaScript Code: Add more context as to why objects are useful for organizing code #27375

Open
@takinabradley

Description

@takinabradley

Checks

Describe your suggestion

I feel that the content in the Organizing Your JavaScript Code section of the curriculum rushes into all sorts of fancy ways to create objects, inherit methods, and encapsulate code, without ever giving very clear explanations or examples of why we're doing it and how it's all that useful in the first place.

I think a good place to start addressing it might be in the Object and Object Constructors lesson.

Things I think could be improved:

  • The "Objects as a design pattern" section of this lesson really just shows a simple example of how objects are commonly used to group related data. While I think do think this is probably a useful reminder coming in, I think it would be helpful to learners to also start introducing the idea/importance of grouping related functionality into an object as well by adding methods and using the this keyword. A nice little example might be creating an object literal with a simple Rock Paper Scissors interface on it.

Though, I honestly feel it might be nice to have a dedicated lesson previous to this one on the topic, and adding additional resources on the idea that meets learners at their level, if anyone has good resources. That might require a bit of restructuring of the Objects and Object Constructors lesson, though.

I'm very open to working on this, sharing my ideas, and discussing what could be done further. I really do feel a lot of learners are struggling with understanding the point of the content here. I previously got the Building A House From The Inside Out article added to the Tic Tac Toe lesson, and I think that's helped a lot of learners, but I think there's more we could do here.

Path

Node / JS

Lesson Url

The first couple lessons of the Organizing Your JS Code section

(Optional) Discord Name

takinabradley

(Optional) Additional Comments

No response

Metadata

Metadata

Assignees

Labels

Status: StaleThis issue/PR has been inactive for over 30 days and will be closed if inactivity continues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions