Architecting an Angular application

Just as is the case with most engineering projects, software projects also need to have a process for designing and architecting applications. The typical way to start is to break down whatever you're building into separate chunks of work. In Angular's vernacular, this means that we need to break down our application into separate components, each of which is responsible for certain things, such as displaying the result of a calculation, or accepting user input.

Once we have a list of components that we need to use (whether they are third-party components or custom components), we need to treat them as black boxes—or mathematical functions. Let me explain what I mean by this.

When I say we need to treat our components as black boxes, I'm suggesting that we should not let our mind be consumed with their implementation at this stage (that is, when we are simply listing them). We'll concern ourselves with building our components a little later in the chapter, but for now, treating them as black boxes is all we need to do.

When I say we need to treat our components as mathematical functions, I'm merely suggesting that we think about what the output is going to be, and what inputs are needed for the function (that is, our component). The inputs and outputs of our components make up their public interfaces. We'll be taking a closer look at component interfaces a bit later in this chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.65.212