=== To receive more articles 👉 join the newsletter on the blog ===
Building scalable software is a challenging task. When we think about scalabili...
For further actions, you may consider blocking this person and/or reporting abuse
Do you have a Github repo for exemple of this architecture for tests and review ?
I was thinking the same... would be great to see a working example!
Hey, I just uploaded an example wich looks similar to this architecture: github.com/cmandamiento/angular-ar...
It's not exactly the same example, but you can clone the coide and modify it according your requirements.
Did you get the Guthub Repo link? It would be super helpful
guthub
Best post about Angular architecture ever!
I've was already doing something similar, but without the Facade in the middle.
Thanks so much!
Hi @yeraycat ,
The facade pattern in this context helps you create a layer between the state management library. Depending on the complexity of your application you can apply it or not, my recommendation of course is that if you apply it. As I said, this post from @pietrucha is simply great.
Yes, if the application is simple enough it can be an overkill, but I like it because the state management strategy can be changed at any time without affecting the components, and I was afraid about how hard would be to change to another state management library/approach when I started adding NgRX to my projects.
I'm implementing the facade layer asap, so it won't be a problem in the future.
That is true, and this is the reason why I'm using... Maybe Akita will be the new bomb?
Great article! I got some inspirations in mind:
index.ts
andpublic-api.ts
to determine what to expose explicitly.ChangeDetectionStrategy.OnPush
in dumb components is usually underrated.I was so excited to read this article as it caught my eyes on twitter,but sorry to say I lost you in the middle of the post & it actually confused me more than helping.Nice examples though..!
Thanks for the comment!
Can I help you get back on track?
Where did you get lost?
I'm on my third reading now and it gets a little more clear each time.
I wish there were practical tutorials to go along with this, that taught other things and followed these practices.
Often a tutorial author is obsessed with how simple everything is as a measure of quality. I want to learn best practices not just the most flimsy of examples.
This is a great article.
Hi Matthew, thanks for your comment.
Actually I am considering an online course that teaches these practices.
Stay in touch.
Best,
Bartosz
great article, thank you!!
microcomment: let's petition to no longer call them "s̶m̶a̶r̶t̶" and "d̶u̶m̶b̶" components (essentialist, ableist rhetoric), but rather "meta" and "object" components (e.g. "metacomponent" and "object component") as part of Hypermedia-Oriented Design
philosophers will enjoy this terminological sanction too
Why the Angular team is making more complications in last few year updates. Its very complicating they are doing. For very most example is - what they did for Urlsearchparams() to Httpparams(). last 5 year am working as a full stack developer with frontend Angular. Updation of this, what they are doing means. Its totally complicating everything.
I was referred to this article to help expand my horizon about Angular architectures that employ the use of smart and dumb components. But overall, what a resource! Thank you.
On an extra note, this brilliant piece of work, deserves a link to a repo that implements this architecture as a practical example. Well done!
Great article!! One thing that is not clear to me, since it's unidirectional, can the core layers communicate with each other? The flow is only top to bottom and never left to right? So from a component i have to call a facade, then call an api service, then return data to the facade, call a service where i manipulate the data according to my business logic, then send it back to my facade and then update the state, right?
It is a great post. Could you tell me where better to handle api and user errors?
Thanks! How about ErrorInterceptor?
I thought about it already))). Thanks!
I have a more technical question. How do you prevent direct communication between layers which should not communicate directly, according to the abstractions? Let's say, importing the API services into components? I guess, even if you would neatly organize everything into modules, nothing prevents a less caring/enthusiastic dev to import a whole wrong module, if I am correct. (And on bigger / longer term projects, there will inevitably be some of those devs.) Anyone any thoughts on that? Is it only code review, or is there a more automated way?
(I know I am late to the game, but hope someone is still around here.)
Hi Alex! Yes, code review is the most important practice here. However, writing a tool that would automatically prevent from breaking the abstractions is possible but I personally don't know any.
I have heard recently (I think on the podcast adventures in angular) that one option would be to set up some TSLint rules to prevent this sort of thing. Might be worth looking into.
Great article, thank you.
This is very helpful, thanks!
One of best article i have read about angular architecture.
it really going to help me out in my coming project.
Thank you.
Wow, Such a great article about Angular and very joyful to read till the end!
This is a post to teach in my Angular's University course!
Congrats!
Your publication helped me a lot, thank you very much!!
💪🤗💥
Today I've been massively schooled !
You are welcome!
We were just discussion how to properly design and cut a large application. This article is just great and helps a lot, thanks!
Really helpful article. Helped us structure our Feature Modules in a clean and manageable way. I question though. I was thinking to use the same facade pattern to manage the application wide state. Like user, language and data that have a application wide scope. Is that also something you would recommend?
Would you consider a dialog/modal a smart or dumb component?
Dumb if simple, smart if complex.
Thanks for sharing this, I've learnt a lot
Great!
What a great post, ty!
How would you handle server side validation for reactive forms?