Watch all the ng-conf: Hardwired presentations/videos at https://videos.ng-conf.org
ng-conf: Hardwired is brought to you by: - https://thinkster.io/ - https://herodevs.com/ - https://angularjs.xlts.dev/
Follow us on twitter https://twitter.com/ngconf Official Website: https://www.ng-conf.org/
All right, everybody. We're here for our Q&A session. Gentlemen, great job on your talks. How are you guys doing? Pretty good. How are you holding up on this? This crazy pandemic? Are you guys doing OK? Your family's OK. Yeah, we were really shelter in place, people. Yeah, California's definitely sheltering place. Mike, where are you at? In Rhode Island, basically shelter in place to begin with. MAN four You're in you're in Austria or Germany. Manfred. You're in Austria or you're in Germany? I'm in Austria currently. Is it crazy over there? Yes, basically stay in shelter in place. So we have to shut down and we shall not leave the home and we have to be our mosques if we go to the grocery. OK. So it's a bit a different situation. OK, cool. Well, we're we're going to ask the audience for a quick everybody. If you look at the crowd cast app underneath the video, there's a Q&A section or questions section. If you click in there, you can actually ask questions and you can upload other people's questions. Currently, all of the questions there have to do with, like live streaming questions and swag and and others have maybe stopped doing those questions for a few minutes and start doing questions had to do with these three gentlemen's talks that just happened, because that's kind of what we're here to talk about. So I guess what questions, gentlemen? Did you guys see Terry? Do USC carriers talk at the beginning? Yes, that's kind of that. Yeah, yeah. The three of you see care stock. Yes. So I go, yeah, yeah, yeah, that's right. You're on deck. So you can see that. All right. So I guess this question I'm going to throw rather at anybody. Are there any good pattern to load components where the component isn't known at runtime? That's a question. So battlelines for unloading components that are not known at runtime will start to question. Yeah. Yeah. It's not known until runtime. Yeah. Amanda Kombai Lawrence. Yeah. Well, no, that's a compiled time. Is there any way? Is there any good patterns for loading components that you don't know until runtime? Some more like a dynamic loading of a component. Oh, yeah, yeah. Now I've got you. Well, of course, you could do this lazy loading I've shown in my presentation. And one thing that makes loading components very, very easy is you seeding back components because the component is just a script and our state has been loaded into the browser. Your chance have a new HD him alibek. Furthermore, there are some workarounds that people try to grade something like Kepler instance them. But currently I would either go away for the easy loading or if that coupons. Gotcha. Gotcha. So, Mike, I know that you you wanted to speak about builders because you felt the frustration of like many others of like trying to know what they are and not being able to find anything. Where do you what's your current take on, like the Builder API? And I know you've done a lot with. What's your current take on it? And like, how how big do you think it's going to be for a community? I think it's going to be pretty big. I mean, so builders exists, existed for a couple of versions now and there was a previous version of builders and like angular six of the C alive that it was it was OK. It was Class-Based. But I think the approach to moving to just functions for this news release makes things a lot simpler and actually lets people, you know, potentially build their own. I know before we had we had in Egypt, man, for people who wanted to extend the builder by using their own web packed stuff. I think the current solution makes it a lot cleaner to do and opens up so many possibilities for people to just add their own touches to their product. That makes it their own and also integrates it with angular its own ecosystem. Cool. Great example of it is Manfred's. And you build plots like that stuff wouldn't have been possible without builders. No, I agree. Injectables was my favorite. You're my hero on that thing. By the way, without that energy upgrade would be so much more difficult. You you really build me. I like. I love your builder, bro. I love your builder. OK, cool. I'm really happy, it's helpful. Super helpful. And you've been you've given us like on the spot support. It's crazy. I really, really appreciate it. Thank you. Pleasure. So we've got a question for mayor. We have a question for Ward. So Medford this year, they're asking FEV exhaust members said engy modules will be necessary more. Do you think that it's beneficial to not have them at all? Don't you think that they enforce the clean and modular application structure? Well, I guess it's a matter of taste. I'm sure you can write clean and reuse code with old and she module's, but some people really like and she module's because state grube components together. And so in the future, if this is implemented, I guess both will work. So it's up to you. But while the other boss recommends my customizes, talk to Dad FTN and finds one way of doing things because it does not come doing good. And if some people in the team are working this old engine motors and other bonds roughly Ascencion notches. Yeah, yeah. Yeah. So like half the teams doing thing a half the team's doing thing B, not great, right. Yeah. Yeah I agree. Thanks for the answer there. Ward, question for you. Is it possible to inject services within interceptors? Yes. And I showed several instances in which we were doing that, and it's as simple as as any other service class that takes independency. Just put it in the constructor and you're ready to go. So. So the question is, if you inject a service into an interceptor, do the requests made in that service, don't they also like in sceptically go back through the same interceptor that you're building? So the question is, isn't there like an inceptions circular problem? OK. So what you're talking about is where are the ejected service users, HTP client itself? Hello. There you are. Whereas I was always talking about other kinds of services that don't. OK. And yeah, you'll get a circular dependency there. And now it is true that the call you make, first of all, even to get it in there, you probably have to inject the injector and then ask the injector to get it out dynamically. And then once you had HTP client and then you were trying to issue something, you would have to be very careful what you asked a client to do so that your interceptors recognize that and bypassed it. So basically, the idea is, Duncan, that if you really need to go get something from from the server and you really want to use HP cloyed, you can create a different brand new instance of it shadowed instance to use or something like that. But basically what I have done, to be honest, is I've used some other techniques to make that's that server call I've used actually are extraneous, has its own little Ajax thing. And so if I'm ever stuck like that and I haven't been but if I were, I would I might just. You would never have the whole interceptor. Yeah. Okay. So I think that's a good point. Like, the nature of the interceptor is that it would exist before any age. TDP, right. So to do an EDP inside of the CCP, that's kind of meta. That doesn't necessarily make a lot of sense. Right. Perfectly. But it actually I mean, it's perfectly reasonable that you might want to talk to a outside server. OK, example, you might have to to go get a fresh tokin or to go get some piece of information from the server, from some server. But you would want to find a way to avoid using HTP client to do it. OK. All right. I see it. So if you're doing SCDP in a service that's being injected, intubations, you be interceptor, you gots to use not ACTC client module, you guys to use something else. That's what I have done where I was. I just want to make sure I bypass everything. I just use something simple because. Because that's not obviously that's a special case. And so you you you can sidestep it or you just got to find a way to make sure your interceptors recognize when they're being used. Like, typically it's a different. You are all right. You know. So if they recognize it, they say, you know what, the interceptor bails out right away. So it's OK. Coxing done. But be careful. Gotcha. All right. This next question, I guess, is getting kind of broad. Someone's asking, hey, I want to know where I could find complete consent related to SCDP requests and angular all their parameters, how they work over the network, examples for headers and custom requests. So let's say the three of you gentlemen are trying to learn more about those. Where do you go for the best documentation? Because it sounds like this person is a little frustrated. Yeah. Well, I know it also. Yeah, that's true. Wait, where do you roll the documentation? This person. This is a critique on you, my man. I own man. And I'm feeling the bird and the bird. Actually, I'm feeling your pain. Whoever it is that actually I do gets there are obscure corners. Anyone else? Mike, where you going to learn about this, this ish? I read the source as far as much as I can when docs fail. Source code really doesn't. So, yeah, yeah. You just go straight to the source. Yeah. OK. Manfred here. So I cannot say much about this, Iida, because I wasn't early adopter at Opti. I was really happy when it arrived. If we're open for free and somehow I knew it from Angolite chest. So getting started if it was not a big deal for it. So I guess I'm not the right person to talk about documentation. OK, cool. We've got a question, come on in. Here's the thing. If you have a question and you can't get the answer, you just throw it out to the community and you're going to get an answer. So, Ward, you know, another intercept, your question. Any plans for work on request metadata for interceptors? I have no plans for that. Oh, you're asking about that? I have no idea. I don't know that there is a tension on the ACP client at this time. But I am curious. What I wish that person would tell us what they are looking for. We can see what can be done. OK. So I think this question may be a Manfred question. I'm sure that the other two know. So the question is, can you lazy load a component that also uses another component that you also want as well, lazily loaded in the bundle without using an energy module? So honestly, I haven't tried it, but I guess it would be possible, because if I think about this, in this case, the first component has an import statement pointing to the second component. And if I'm registering the second component with the first components, you will sing this internal method of the stuff. It should really break the inboard statement, make sure that everything is bonded together. But I did not do an experiment before this. I guess it will work and it should work as soon as it's part of the public API. Yeah. A free opportunity for people to make an example and get some Twitter points right there. I bet I would be willing to retweeted. Right. I'm sure that the three of you would do as well. Yeah. Good blog post or. Good. Nice. Just a repo. Yeah. So. Suppose that you had one of your clients was like, hey, I have a component I want to lazy load. But that component also uses another component that I also want lazy loaded. What would you recommend that you would you just say, oh user use a friggin energy module. What would you say. Well, so I would recommend them to currently don't use private API as they are nice to see what's coming next. They are nice for seeing the potential, but I would not use private API. So there is currently a workaround for this. It is not spreading. If they really, really needed today, I would create at Thommy and she might show off in the same file. They are the first component is and this Dumi and Shemar Chill can point to the first component as well as to the second component. This makes that combine to buy up everything in the bay that works at Ramtha. You have to see the R in an early stage currently, and I hope if further releases of Ango love this all will be more streamlined, especially vandal's private API is become somehow public. Okay. Cool. I think, I think any of the three you may answer this one, but again it's coming back to dynamic component loading so I'll defer to two. May have your first. Can I import a dynamic component from a separate Swedien instead of a relative path. Yeah, that's that's an interesting question, because in theory, yes, in practice. It is really difficult because of the V how the angle of C labor and angle of steel eyes using that back and that back assumes that everything that is compiled is they are at compile time together. Everything needs to be out to be DA at compile time. And then that back is splitting it into chunks that can be easily live with it. So the real question is it is really, really difficult with that back. There are some work arounds. I have some of them in my block. You can use fatback stumbles. Look at this. And she acts, bilks plus. And there are are Koran's in the Internet. You can find using some inofficial solution spots. There is no good official. OK. So I have a question, Ward. What percentage of your projects do you have HDTV interceptors on, like you have it all home, or is it just something that's not as often it's not as commonly needed? Or do you are you like, no, this is supercut. We need it. I use it. I've used it every single project. My current client project I have from memory, at least 10 intercept. Ten. Ten. Know. Yeah. The idea is to bring in other words, you can put everything in one, right. But the whole idea here is to make each interceptor serve a purpose and then be focused because small, you know, like all code. It's a lot easier to understand if it does one thing, does one thing well, it is small. So things that you might think you might combine into one super interceptor. I don't do that. I create little interceptors and I just let it pass it all down and pass it all back up. Obviously, the super interceptor, that's that's a that's come of a cash rate. The fact that, yes, the super interceptor and I want to be that guy. Yeah. OK. So that's news to me. Ten interceptors, one up. I need you to tell me some examples. Please teach teach some of us, because some of us have zero interceptors. Right. Like some of us have significantly sized abs with zero zero interceptors. I am going to look at my index. Did I say ten? One, two, three, four, five, six, seven, eight. All right. I had eight in this one. And I'll just tell you what they are. I have a bouncing interceptor because I had one thing that the router I had these guards all over the place and it kept issue in. All of them are making the same call and it was making, you know, hundreds of get calls. Well, I'm exaggerating, but anyway, I do them. I have the logging one I had to read only one I showed. I have one that accepts Jason. Only I have somewhere I cue up the requests and batch them up and then send them rather than send them immediately. I have the off interceptor. I have a concurrency control interceptor because some of the mines, some of the data has to come with e tags in order to ensure that two people aren't making the same change at the same time. And a busy one. So that's eight or nine right there. So. So let me let me ask just try to understand one of those. Those are all really good reasons. So your D bounced one that basically says, hey, if I'm making too many of these too often, slow him down. Yeah. So basically what it does is it it throws them into it recognizes certain your Alesund throws them into a queue and then it has a timer on them. And when either a certain amount of time passes because you don't want you don't want to wait forever, right after a certain timeframe. It will send the request anyway. But at least wait. I think, like, I haven't set for like 10 or 20 microseconds before it issues them. And that just helps me deal with requests, storms, requests, storms happen. Yeah, totally. You don't want you all end of it. This is the thing you want to use interceptors where you have common common problem and where anything and in the app could be issuing that request. All right. And so this this was the case here. OK. So so how do I opt into, like, your defense interceptor? Do I just add an extra config to my request and then that's going to be gobbled up by your D bouncer's a your defense interceptor. How do I opt into it? Because I'm guessing you don't bounce all requests, but some of you may not know is I kind of showed with a read only I'm not you know, you take there you are l and then you pass it to something that says, hey, do I apply to you? And so I always have a I often have a function. And the deep ELT's is an example of them. For example, I'm only going to bounce gets right. It would be dangerous, dangerous, dangerous to to bounce to anything that that's safe. But it's only a get on certain. You Earles looks at them and it says, OK, I'm going do too. Otherwise I just let you attaching whatever the next interceptor. Now where do I get that information? Well, I could hardcoded it in a function or if I didn't want to do that, remember, I can use dependency injection. And so I could if I was really trying to go crazy, I could create a a multi provider and anybody could say, hey, I'm I'm one of those things I want you to be bales'. And then my interceptor would get all those and it would look at those and say, yep, you're in the list. You're denounced. Gotcha. One second. So, Mike, I appreciate it. Thanks to everybody involved. The attendees, especially because. In case you've ever done a livestream, it's a little bit wonky to try and figure out all these moving pieces, right? It's a little bit like like changing oil while you drive down the freeway, to be totally honest. So. So, Mike, I want you to imagine I'm someone who I heard your talk. I'm like, all right, that's cool. What are some symptoms? Because I don't know if I need it. They're like, okay, cool, Mike. Just talk about some cool. I don't know if I need a builder yet, though. Tell me some symptoms. If I'm at a large company, I'm at an organization with a lot of moving bits. What are the symptoms? Hey, it may be time to do a builder. Right. Ray? You know, once it's kind of the same way thought process like, hey, when you did this become automated or like once you make this part of like a CCD process. You look at the tasks that you are doing pretty often that aren't necessarily part of your current architecture. So, like, if you're you're building your app, obviously. But are you doing some, like CSX elimination or modification or image optimizations if you're doing all that and you're not making it part of your existing process? Dennis, kind of time to think about. OK. I'm running a bill, but then I'm also running all of this additional logic after the build has been done or after something in my app has happened. It could be nice to integrate that with the build and just have it happen. So what do you think about the tools that you have in the current kind of like scripts that are external to angular? Think about how often are these scripts being ran? And you know what? It make sense to use the manual work. I have to do it. Just make a building that can handle that. So got to kind of take it, take it case by case. So, OK. So I'm gonna try and paraphrase what I heard. If I'm at a company, I've got a I've got a significant size app and as part of my build step, I'm also running like no script, no script, no script, no script. Mike, you're set. And those notes, scripts always run. Every time I build it, maybe I have different ones for and different ones for production. Like you're saying. Hello. It might be time for you to get to get a builder or at least learn about it a bit more, as I always say. I'd like. Let's take a Sims. OK. OK, next question. And I think this goes for at least two, maybe all three of you. The person asks, in your time as a consultant, what are some of the pitfalls you see in angular apps that we should avoid? So I miss you. You guys fight whoever talks loud talks best here, but go ahead. There's so many. Yeah, there are. You know, as a consultant, one of the biggest problems I solve as I walk in and I just ask everyone to talk to each other, because a lot of what I see, a lot of what I'm solving is communication pattern problems, not not actual like architecting. It's just, hey, you talk to me and he talks to me or they talk to me. I need you to talk to each other. So what do you guys see? What are the pitfalls you're you're seeing that people should think you've hit on the most important one? How did developers talk to each other and how do they share their discoveries? One of the things I'm doing at my client is we have a once a week. We have a video conference in which we hear mostly I do. But I mean, everybody is invited to share some technique or some new part of the project that they worked on and get and get into the code and share ideas. So, for example, that did bounce intercept or I talked about that was a suggestion by one of the developers, my client developers, when I was describing it, a problem I was seeing. It was a great idea. And so having a regular session in which you just share ideas is is, I think, one of the great ways to address the very real problem you describe. All right. Mike Manford, I see two issues. One issue is under engineering, you have long got to module, which contains everything, but it is as bad as all the engineering value fro all the architectural patterns into the game. If I was reading needing them, for instance, I am doing a lot with my Prof Ron Vance nowadays and they have some meaning, but sometimes they are really complicated and if you use them without needing them, then you are creating a beach overhead for all your process. So I was really a boy against using batons. If you don't need them. And the second bomb is more on them and its authority level. It is not knowing your architectural goals. You'll need to know what your goals are. And but it's more important just to follow the example of have this customer who called me for us made an appointment. These is more important than usability, which is good. If he knows it, it sounds a bit corny, but in this case, to have aligned the software above car Kyran Restrict Troop, the government and so did need to maintain aid to adjust it to all the restrictions. And so it's clear that the artist is more important than usability in other situation. It might be really a vice versa. There might be the case that usability is much more important than its main benefit. So know your goals. I think that's good. If you don't know your goal, it's hard to say whose answers. Right? Right. Because if we don't know where we're going. Are there any right answers? Right. So it makes it it makes a lot more difficult. So those are really, really good points. All right. I have another question for Ward. It's they they want to know, is there a way to retry a call a certain amount of times if the request has a specific response code? Yes. And I'm very happy that that person added the caveat that they have a certain response code. I've seen returning calls that will retry every call. And like, if you got a four or four, it's not going to get any better. Right. That's the bottom line. There's no more retrial your way through that one, will it? Well, no. So there are examples of retry interceptors. I was going to say if that will probably be my ninth, 10th or 11th interceptor on this flight. And yes, you would look at the response type and actually some years ago at Angular Connect. Who was it that did it? One of the England team did a talk on Retry HTP interceptors. Gotcha. And I will try and find out and get that. OK. So I have two more questions and they will be done. First question is, will the three of you share your decks on Twitter, your slide decks? They're going to post them out from their personal accounts soon. If you're not on our energy retreat. But if you're not following the three of them, you should most of. I mean, I would follow all this because I follow all the speakers here. They're all fantastic. All right. So thank you on that one. The last one's a bit subjective, and it's a thing that developers are bad at generally, and that is assessing people's talent levels. Right. We're bad at interviews. I think we can all agree. This person wants to know what are the things that makes someone a beginner intermediate or an advanced angular developer? And how do you guys differentiate between those three? I told you it's subjective and I put you on the spot. But but it's a question. And I'm a I must start with Mike. I'm going to go to Medford and then we'll end with Ward. I think, you know, first person, the first subtle like beginner, they at least know some of the core concepts. But as soon as something doesn't go well, they're not quite sure how to move forward or how to get themselves out of trouble. The kind of intermediate person would be able to do that, get themselves in trouble, but then also thinks about the higher picture to certain degrees. Like, how do we structure everything? And then the expert tends to, you know, think solely about the architecture vs. the low level details, like they already know all the stuff they need to figure out how do we make this app as fast as possible? Load everything as efficiently as possible. And then we only care about, oh, is this energy for doing everything correctly? Are there proper people who should be focusing on that? Katcher thinks Banford. Yeah, I completely agree with Mike that. Katcher thinks Mayford. Yeah, I completely agree with Mike and also I would say the only MASH Shub is experience. Because if you have a lot of experience, especially if big gap projects, then then you are more often expert as before. So I've talked with this guy about certifications in the area of Anguilla. And I told them, don't those certifications because we all know those tests, smart, poor choice B, learn everything by heart. And then they have the certification claiming be an expert. So for me, it's about experience. And perhaps one more thought about this. I think they is not only this soul Angola expert anymore because Angola is such a huge platform. B can be experts in different areas. Experts for architecture are for component design, for design systems. And so. And a bomb is not necessarily an expert to other topic word. So I agree with what those guys said. Let me try to metaphor. I think of the Soffer development, like cooking. If you you can tell right away when somebody can't hold a knife. Right. That's a beginner. And they take too long to chop the vegetables, but eventually sort of intermediate folks can work their way around the kitchen and they can follow a recipe and stuff like that. They can follow recipes, but they don't have any vision for what the dining experience can be. When you get to the level of being an expert, you're thinking not. I mean, you can always go down and you've got great life skills. You can make anything that the kitchen makes. But really, most of your time you're thinking about how do I create the dining experience that represents what my restaurant is about, what is my style? Is my cooking. What do I care about? What do my customers care about? That's where your mind is and your car. And so when I'm interviewing people, I'm I'm asking them about their experience at each of these levels of cook. And I'm most excited when somebody knows exactly what the customer experience is supposed to be and cares about. NOD's great. I would add I don't have three levels. I'm an add one big one, just one one line in the sand. I guess that one goal I would give to people and I think that the three of you will probably agree. I know that there's certainly some other experts in the community. For me, there's a pinnacle skill for angular developers to that kind of goes you you're you're on your way to the next level. You're not. And that is on one second. OK. There was a thing that disappeared on the livestream is gone. OK. The thing is, it's reactive, angular, being able to appropriately embrace our excess and all that observables can do to make your angular code cleaner, to make you and you a code more performance, to make it to make it just the best version of it, to make the least amount of it possible to do the same job vs., you know, your two promises, your subscribes, insight of subscribes and stuff like that. And I am not shaming anyone. I don't think any of us were shaming anyone. Right. I think it's just trying to answer the question of, hey, these are symptoms. These are things these are goals that you should shoot for to kind of step up your game. Yeah, okay. Well, I want to give a round of applause. Do you three gentlemen, thank you for your talks. Thanks for your time on the panel here. And we will chat with you later. Thank you.