Enterprise Architecture Patterns

Four Elements of Programming Recap

Enterprise Architecture Patterns

Check out a free preview of the full Enterprise Architecture Patterns course

The "Four Elements of Programming Recap" Lesson is part of the full, Enterprise Architecture Patterns course featured in this preview video. Here's what you'd learn in this lesson:

Lukas reviews how the four elements of programming have been used to build a light-weight state management module. The code is using the same architecture patterns as other state management libraries like Redux or NgRx.


Transcript from the "Four Elements of Programming Recap" Lesson

>> What I've basically done and by we, is that starting at nothing, we have essentially built a version of Redux. Like this is not too far off, I've actually used a variation of this when I'm just simulating, essentially state management while I am, or I'm testing something out and I just used it so Redux is a pattern is very simple.

This is why I think Redux is so amazing is because I could have hand wrote this in less than 10 minutes. If we were not in the middle of a conversation about how to do it. I wasn't trying to trick everybody for as long as possible about what we were up to.

We have taken an incredibly simple pattern that somebody could write in 10 minutes. And we're using this pattern to manage state its scale. I have uses on very large fortune. One hundred companies, like this pattern works. So. In terms of state management. We have just now arrived at one of the most important patterns for state management that I can think of.

There's variations of it. But when it comes to managing state, control flow, and code volume this, I just can't think of anything that is more succinct and elegant. Than this particular pattern, not only that, is that in the course of like, let's talk about programming in the most basic, simplest terms.

We have incrementally put together and assembled a state management library that we could use to do almost anything. And so, this is where, at the beginning of the day I said we're gonna wax off, we're gonna wax off, we're gonna paint the fence. Because when you understand how Redux and NGR x in these patterns work, then it's a lot easier to effectively implement them in your projects.

And if you actually went and took the time to click through the source code. You would find that there's actually not a lot to the source code on these particular libraries. And so, for me, this is where I get really excited. That when I say when I am programming I'm doing for things.

Nouns, I'm describing things. I'm doing things verbs. I'm making decisions, and I'm iterating over those, so I'm doing something more than once. That in its simplest possible form, we're able to take these ideas and build an incredibly powerful a central state management pattern or a library that we can use and so we finally got to this point we can see here that we're creating with store.

We're able to update the store by dispatching an action. And then we're able to select state off that store and surface it. So with that said. Kind of this conclusion to the four elements of programming. Does anybody have any questions about what I have done, up to this point?

And congratulations, everybody just wrote Redux from scratch, which I think is cool.
>> That was amazing.
>> Thank you. The question was, that was amazing. That was amazing. Just kidding. Thank you very much. High five, every time that I do this, people are like, my goodness, they just kind of lean back.

Are you serious? Like, we're doing this. And then it's like just give me two, three hours. And we're actually gonna build something cool and in this case like this is something that is helpful and useful.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now