Hello everyone, and welcome to Adventures in Angular. My name is Alyssa Nichel.
I am the Angular Developer advocate at Progress for Kendo Ui. And today
on our panel we have the awesome Brooks Forsif with us. Hi everyone and
Chris Ford. Good day, awesome, awesome and our show today we have
a guest who is joining us. His name is Sonny Yusef. And Sonny,
how are you doing today? Lovely lovely an So I'm loving love a
lot of sun than goodness. I was so ready for summer. So Sonny
tell us for those listening to the podcast today, you know who have somehow
managed to not hear of you, Can you give us a quick intro to
yourself, what you do, where you work, et cetera. Yeah,
So I'm Sonny Yusef. I'm known as the Nigerian stay in England. We're
on a small consultant in London and mostly now we're working on the project of
the past few years with a company on Mindline where we are building a lot
of healthcare stuff. So like building basically a more mobile sorry, a mental
health platform that allows you know, patients and doctors to sort of like create
stuff. So the therapist can create like a lot of content and they can
push down to the patient in a very friendly manner and vice versa. And
and then there's also like all other administrative stuff and it's pretty much all Angular,
uh, which was hard to sell it first, but gladly when that
narrap was it like, was it between Angular and some other framework? What
was the what was the cell? I think it was between Angular and somebody
else's eager And that's that's all I'm going to say. It was like it
was a it was a no brainer. You're building an enterprise grade JavaScript first
platform, right, you know, like it's all about the right tool for
the right job. I think it Spelt was around at the time. Spelt
would have been a very good fit as well, but it just made sense,
you know, like it's you know, SEO is not really part of
the picture, so you know, the single pitch application stuff that really matter.
So it was a case of yeah it was Angler was always an option,
but maybe one or two people didn't want to learn Angular to the level
that was required for you to do something like that. But in the end,
yeah, well that is awesome. I'm glad that the Angular won the
battle for that one been a part of a project years ago when it was
the Angler JS switched to Angular and actually lost the battle to he was React.
So yeah, it reacts amazing. It's amazing. Sometimes I think if
we were to go down the React path for this particular project, it would
have been really, really, really really difficult because you know some of the
things we're doing in here. It's like, you know, when you're working
Hell Care. You can go into one client they want all the botanist to
fly to space, while there's other client ones. So you're constantly like,
that's that's how you get paid, right, you do what they want?
But then how can you make a central engine that allows you to easily more
unneat people's requirements. And you know when you have things like AOT or things
like the Ivory render, and now you have things like lazy loaded, it's
an absolute no brain or not to use our case. Yeah, I love
it. It reminds me of when I try to tell people about why I
use a UI library because there's so much that can be reinvented, But why
why reinvent the will in when you could be spending time on other parts,
like of the other features of the product, So I feel like the same
thing. Why would you essentially building out your own framework versus choosing Angular that
has so much, so much already done for you. So yeah, absolutely,
I think in our case we actually ended up it in SDK because you
know, every single client is almost like a separate application in a Mono report
because you build O the SDK and then you create this like schematic that every
single client app almost like takes in that SDK. So so like how Android
works, they just all implement that SDK. So if the client needs a
specific use case, you can build their own like mini SDK within that client
space. But if also you bring a new feature that everybody else has to
have, you can just do that and maintain that at one place. And
that really allows you to say, yeah, you end up with a lot
of applications physically, but maintainability long term wise. You can have project owners
that do nothing but you know, SDK work and ever that and it's yeah,
it's it's yeah, it's really really amazing. So you have several clients
like, yeah, clients in the same Mono repo using the same so yeah,
exactly. So what we've tried to do is code all sits in the
mono report. Right, you have the S which is like these granular building
blocks for every single application. Then you have like a let's say, you
know, let's say you become a client for us. So let's say Brooks's
company comes in, and Brooks's company would be like, okay, We'll created
an actual engine ad app, you know, engine generate app, and we'll
create Brooks's client and then in that book's client app, we would inherit everything
in that SDK, right, pretty much everything that Brooks's client needs. And
if Brooks's don needs something that is very specifical Brooks, we could just go
into that Burgers plan and do that. So we don't have to like think
about like the continuous integration on the that scale. We could just think about
it on just that Brooks's client scale and right only like endo intest for Brooks's
slign scale, that kind of thing. In the future, we would probably
use a schematics so that when we want to add that it's a little bit
more automated as well. So, Yeah, updating work for like into Angular,
yeah, or any of the independency versions, is it just one update
and all of them are updated? Yeah? So because it's still one Angular
very boat, it's still one package Jason file, right, which means yes,
as the scale as you scale up, that could potentially be problematic,
but not necessarily because nine times out of ten, like nine out of ten
packages are all used by all the applications. There's rarely a case where this
one guy. And even if that was a case, instead of becoming a
problem, someday that would be easily solvable where you could. I think there's
some nifty fancy things you can do with like MPM where you can have like
almost like minimpms. We haven't gotten the need to do that, but yeah,
if we needed to object. So I you recently operated to Angular nine,
which is a breath of fresh air. It was updating the one package
or Jason file and then everybody like all the apps not a just all Angular
nine. You know, that's it. And yeah, so at this point
it's pretty cool. It's easy. You have the back end and the repo
as well or is that a separate repel. No. So I'm kind of
known as being a very like I would say, ultra servilest type of guy,
like I've been serverless. Yeah, the next big thing, Yeah,
so I've been servilest since twenty eleven. That's how serverless I have been,
like the very first version of Azure type of serviles before Firebase. Because I
think a lot of people, we developers, we like to over engineer sometimes
like it's okay for somebody else to just let you do things, like it's
cool, no one's going to be So we we're using Atlas, mongodbi Atlas
and so everything is all there. If you need anything, you can just
use functions. But we have had a need for an APR. We are
thinking should we add those sgs APIs? We only have one of those inside
of the repot we are right now we have like a almost like a back
end monoebal type of thing or we're just doing that. But because we have
the one, we haven't that like, should we put it in there where
we still haven't made the choice yet. I guess, yeah, how do
you like an SJS? I love SGS? I think as well. Yeah,
I think if you're working with Angular, it should be your first choice,
not because it's great or it's not great, but it's because you have
the ability now to use the same exact thought process to think of a back
end application, and they've encapsulated it so well that someone like me, Actually
I don't really know much about express. I haven't really used note that deeply.
But I can still go in an SGS application and just use the observables
and everything and just know that, Okay, this function just decorated would get
and use the same principles and relatively get a very stable application working out quickly.
And the organization is great too, like it's organized like an angular application.
I feel like I need to go try. Now you're selling me on
it. So stuff. Actually, so I wanted to ask you. I
saw the topic for today's podcast and build a form around it, and I
was hoping this meant that you might actually finally put a positive spin on maybe
reactive forms for me. Yeah, yeah, yeah, absolutely. So you're
not like reactive forms. Yeah, I can't say it's the best thing.
God, yeah. I just learning now that in the community people are not
necessarily happy with reactive forms, And honestly, I don't know why. But
I don't you don't know why, like because I think I don't know if
it's a remnant of how bad Maybe and the other forms were or jet.
Let's be real, forms are crap, you know, if we have to
pick what we got pay to do every single day. No, you wouldn't
be like forms every day. If you see that one serial kit that goes
forms that you know who to stay away from. Right, Formed out really
difficult generally, right, and I think people forget how bad it was in
comparison to reactive forms. It's not perfect, but people forget how much you
can do just because of your reactive forms. Like, I don't envision myself
doing anything else with forms in any other framework so easily. And and by
the way, there's no there's no point that you would choose template like driven
for angula. I know the first one is reactive forms and the second one
is also reactive forms. Those are the only two types of forms that exist
in Angular Okay, okay, So I'm just I'm not sold on it yet
because I don't see the value in it. So I would love to hear
you kind of break that down for us. Yeah, yeah, yeah,
so yeah, template forms still exists, right, let's be should put.
Yeah, I'm controlling now a big time, getting stuff really easily done.
Right, But when you start getting to the field of testing and even the
people that created this have come out and say please use reactive forms. So
I think the problem with reactive forms is a few things. If you come
from a very Java dot Net object oriented background, you'd find reactive forms pretty
straightforward and you'd see that it makes sense. But if you come from a
traditional JavaScript let's say you're a React developer and you just joined and started using
angle the traditional JavaScript, you might struggle with the how monotonous that using reactive
forms can be. It's like, okay, I have to think about formula,
phone group and everything like that. So it's it's really that. But
when you understand why that exists, actually you really appreciate that. Oh it
makes it so that the things I want to do, the complex things I
want to do with forms easy. So with the reactive forms, it's hard
to do the simple stuff, or it looks hard to do the simple stuff,
but it's easy to do the more complex stuff. Well, that was
why I was wondering if there was ever a moment with a form that you're
like, yeah, let's not make this reactive, like it's legitimately like one
input or something like. I didn't know if there was a line that you
drew or if you actually were always yeah, I'm pretty much all the way
because if it's just one input, I'm just using like a form control,
right, like, because you have three members, you have the phone control,
you have the phone group on the phone or rate. So if it's
just one input, I would still use the form control. And yes,
if I was to use the like template forms, I'll probably get it done
half the time. Well, now I'm struggling to test. Now if I
needed to do anything, and if I needed to make something that like to
make a validata or something like that, unscrewed pretty much. I kind of
feel like, also, I think that if you're gonna you shouldn't use both
types of forms. I think, like any in any one application, I
think you should just pick one and you should go with it. And and
to be fair, if your choice is to use the template forms, that's
that's fine, you know, dig your own grave, but that if you
if you're if you're happy with reactive forms, like, I don't think you
should be dropping in any template stuff. Because you think about onboarding a new
developer onto a project, They're going to come along and be like all right,
I've got to build a form now. But I'm seeing both types of
use, So what what am I supposed to do? I see? Okay,
so you're saying it's much better to be consistent throughout the app, no
matter how simple a form is. Yeah, I think so I can see,
like, for example, in our project, we I don't know if
it's a rule or unknown rule, but reactive forms are the only things allowed.
It's it's just like an unwritten rule. Like I think we generally see
template forms at like a code smell. Yeah, I think we do that.
We've got to that place where it's like what is that? And this
is not to bash anybody that uses template forms. It has use cases.
I think just for us, it's like we've used reactive forms well enough to
know even for the simple stuff, it is worth when in the extra time
to just make it reactive forms. I'd love to hear why the template forms
cause problems for testing. I think because like if you think about it,
with the reactive forms right, you can easily test inside of the component,
so you can really like, for example, if you needed to test the
validata function, right, you can write that validata function testing without even doing
anything with forms. You can just write a pure function somewhere right that you
can test literally outside of the scope of angular as well, so you know
that that piece of logic works very well. And then now when you get
into the realms of a synchronous all of that while template because everything is you
know, banana in a box if you needed to test. Now you're dealing
with this whole engine model style thing where if things start changing every now and
then you're like guessing and stuff like that, you could get hurt really quickly.
Imagine Sanny like seeing engine model and just like cringing, like, well,
I think it sounds like you like just does sweep the desk? Yeah,
just computer on the floor, engine model. I don't see no,
no, no, nope, no, yeah. I just I just started
a project and they're using template forms. And that's the first project I've ever
been on, like about four or five years to doing anular to development with
template forms, and I'm just like, what is going on here? This
is so much different. It's people got their fans. Like if I'm like
quite a lot of the form stuff on stack overflow, people people's answers on
their tend to go straight to template forms. So I remember when I was
when I was first starting out with Angula obviously, like it's not an easy
framework, is it. So I was going googling quite a lot of stuff
and I'd quite often find that I'm on stack overflow and if it's a forms
question, the answer is all with emgy model. But like I committed quite
early on to go with the reactive forms because they just they just work better
for me. But in terms of I understand them better, I like having
all my logic and the component that's why. That's why I like them.
I like to keep as much stuff out of the template as I can.
So, yeah, it was, it was in those early days. It
was. It was quite tricky when I'm trying to find out the answer to
a thing. It's like right now, now I've also got to convert it
from you know, from the template based form into into the reactive form solution.
It's funny because it's the same with you know, Kendo Ui, where
we're constantly creating new components and a lot of them. As you can imagine
our form input type components and so all of our documentation is twofold, right,
It's it's all this is how you would implement and validate and test it
with reactive. This is how you do with template driven and so even whenever,
like we just released a couple new things for forms and we don't our
docs aren't finished yet because we only have the reactive docs out right now.
So it's just interesting having to support both and seeing lots of people use both.
Yeah, I would not be surprised if the ideality somebody deprecates the template
forms, I will not be surprised. I feel like there has I don't
know if I've had this conversation with someone, what would that I mean,
that would be like like think of Brooks's project right now, that's like using
Like what would that even look like because it's not like you can just be
like Erry update from template driven to react it like that would but you and
warn us and then like you know, you'd have a year to change it,
right in theory, but you know most people would put it off until
like there are three versions behind the version they dropped it, and then you
know, calling an overpriced consultant to change it all for buck fifty an hour.
But that's really what it looks like. Yeah, I don't know,
that's a good question. If they'll if they'll drop it yeah, I would
have be surprised. I would have be surprised. I think. I think
forms are I say forms are the most underrated part of any like our day
to day lives. Every single day, every one of us here has used
a form. If you think about your browser address bar, that is a
form. If you think about a lift you press those bots, that is
a form. Think about your mobile phone when you wake wake your mobile phone
up and you are making a phocal, that is a form. You go
into your car, and those radio bots and their technical forms. But we
don't see them as forms because they work. We only remember that they're forms
when they don't work. And that's that's the key thing there. Now I'm
going to say, everything is a formula, and what have you done?
I'm getting scared. This is like a horror movie here are taking over?
Yeah, it is. It's our day to day. Forms are how we
just key to how we provide inputs to machines. Right. Think about even
your remote control is technically a form. You are putting input like you I
can go, I can milk this to like the very end, but it's
it's they're very key. I was watching SpaceX and you know everybody was like,
hey, what was this built? And apparently the dashboard was built a
JavaScript basically I was like, yeah, yeah, self made version of electron.
But those are all forms, They're just buttons, and this is what
takes taking people to space. So it shows you that it's really really important.
So I see a link to an angular connect talck to that Sonny did,
so is there I'm assuming you want people to go and check out that
talk, so like, not too many spoilers, but is there anything like
big takeaways that you want to highlight from it that you shared with everyone in
regular connect? Yeah. I think the most thing is really showing like some
of the building blocks of forms, Like you know, talking about how you
know everything. First of all, you need to think of everything as an
abstract control. That is the base element. Everything is an abstract control,
and then it's just this out. This abstract control has three children, which
is the firm control, which you use for individual form elements or it excuse
me, input elements, and then the form group and then the former rate
form are is rarely used because a lot of times even when the former raate
is as correct, I just still use the form group because the form group
is just it's that object based API is really really easy to work. You
know. Can you use a form group with like an energy for though,
you know, when you have several when you're adding in more questions into the
form based on their answers. Technically I just used a form array and that
was like, I don't know, a couple of times I've used it.
I use it when you're like adding a car and then you have questions about
each car, you know, like do you want to red or black?
Right? And then you have to answer those Yeah you could, I mean
there are ways where you could. But can you do that with a form
group? The form because it's not an intro. If you need yeah,
you'd have to use something like maybe object or keys and whatever. And that
case, if iterating is very very key to your experience, then the form
array might be much better experience. There are a few things about forms that
can be better as well. We'll we'll probably get into that later on.
But I guess in that talk the most important thing was really showing specific use
cases. So one of the use cases I should was that a lot of
people loved was the ACYNC validata, which is you know where I did a
live deb where I use a Zippopotamus. It's an online free API that allows
you to send a zip code for a country and you get the information back.
It's free zipper bart and mass zipoparton dot us I guess and then you
can go like forward slash UK for Slash Australia. It's supports like twenty or
thirty different countries. And so where I was able to like put in a
postcode our live watch the form go and see whether that person we could deliver
it to that person based on their postcode. That that I think is very,
very very key because when you think about, like say you're creating a
social media application, what's the first thing people do to create a username?
You want to see if that username is taken or not. Now the form
has to wait to listen asynchronously whether that API request is good or bad.
These are some of the use cases that you know, we don't think about
as formers what they are. That's actually super interesting. I've never really thought
of it like that. How yeah, you need to need to be able
to validate on the fly, Like yeah, yeah, that's that's very interesting.
I like that. I like the zipopotamus as well, somebody thought long
and hard about that name, didn't they. Yeah, it's a nice I
mean there are other things when you think about, like not just the under
fly stuff as well, but just like Brooks are saying, when you need
to remove things here and there, you know you need to hide and show
stuff, and that's also things what also you needed to do think about when
you need to really like you know, everybody has used that form where you
feel in something you make a mistake, you send it to the survey,
it comes back absolutely empty and it tells you you made a problem. So
being able to compose that data and recompose that data that is also key.
And knowing when somebody is interacted with the phone to provide really radios experiences,
you know, advised the assessed fire. A lot of things I'm going to
react to form are really really really super could have done with you on the
show a few weeks ago. My fellow might remember that I was having an
issue where I was I was trying to All I was trying to do is
reset a form because the requirement for this thing that I was working on for
work was that there's the reset but on the form and I reset, I
clicked the reset button, go like my form my this dot my form dot
reset. All the validation flared up, like suddenly I've got my empty form,
but it's saying, oh, this field is required, this field is
required, this field is required. I wasted something like three days on that
trying to work out how to resolve that's the answer to that. By the
way it was filed like it was a really proper, filthy solution. It
turns out I don't know whether I don't know whether it's a bug in Angular,
whether it's bugging Angular material, or whether it's something specific in like one
of the components that we're using on the project, right, but other people
would encountered it. And it turns out the only way to resolve it was
that when you click the reset button, you destroy the component and then reinstantiate
it in a set time out. And it's it was like the fields weren't
like touched or dirty, set valid You try like just using like Marcus touched,
Marcus untouched all those things as well. Yeah, I did everything,
you know, because there was people were registering like get issues about similar things,
so which is why I'm wondering if it's a bug with angula maybe,
but you know, everything I've tried just didn't work, and in fact,
that that is the kind of solution that I absolutely hate using because that is
absolutely not the way that you should be resettling a form, right, But
sometimes what are you going to do? Well? I guess we can use
this opportunity to talk about some of the things that we don't like about reactive
forms, right yeah, yeah, like that. I don't know, I've
never come across that use case. So I actually investigated one of the things
I know that is very difficult to do, and I've spoken to I think
I've spoken to someone on the Angular team about this and they were like,
you know, right now. One of the things that apparently at the time
I spoke, which was like a year and a half ago, there wasn't
anybody in charge of maintaining a forms project. So the Forms was one of
those was that it was so well built that everything else has gone forward,
there hasn't been anyone to show it love because you know, so it's one
of the way they're thinking about really completely imagining it, you know, from
behind the scenes. So for example, if you needed to be bounce on
an input, it's actually pretty difficult, which is crazy. That's like,
just say, hey, I want to debounce on this particular input field,
you know, don't update it after HiT's actually really really really difficult, Like
it's so difficult to do something as simple as that. And I also,
one thing I don't like is if you needed to add a new phone control
or register a validator, you couldn't really just add a validator. You had
to sort of like, so let's say you have four validators right in as
the properties. You couldn't just add a fifth one. You had to like
construct an array or object of five validators and then send that validator in.
So you were like always resetting, you were never mutating, and they took
you know, immutable just to a whole new level. So yeah, that
I don't like. I think it can be better. I think maybe one
thing that I don't like is that with the reactive forms, there's maybe too
many ways to do the same thing. Like yeah, so, I mean,
you know, I always like to when I'm creating my form, I
always use the form builder, this dot form builder, dot group passing all
my stuff. But then you know, I go to another component and then
I see that somebody is just building individual form controls and just just assigning stuff
in there. And it's like this goes back to what we were saying earlier
about how you know you you should use just one one type of form's method
because that way it's consistent. But actually, as it turns out, you
need like levels of consistency on that. There's too many ways, too many
ways to skin that cap. Yeah, it kind of touches on just my
issues of it just seems just headachey more difficult. Like I I'm trying to
debug my reactive form like yet last week, and I kept googling like the
error I was getting and there wasn't a lot of help, and the way
I ended up doing it was just to basically go a different route. And
so that's kind of the same thing of that. I just I don't know,
it's just harder. I think from a it's like you said, it's
easier to do complex things with reactive forms, but if you're just like out
of the gate trying to do something simple and it's like not working and you're
like how do I do this? And then everyone online is like, here's
a template driven way to do it. Yeah, there's some it's hard to
ramp up to it, you know what I mean, Like it's complicated to
dive in and get going on it. And maybe there's better tutorials or something
that I missed when I was getting started on it. But I think it's
so funny Brooks that you're like the exact reverse where you're like just now seeing
a template driven way and you're like, oh, yeah, what is it?
Yeah yeah, now it feels weird. I'm looking at it being like,
oh, okay, I guess this is how we're going to do it.
I think for me, what we were working on in our project was
really what made me fall in love with forms because you know, when you're
building for healthcare, you're also building for education. That's just how it works.
That's why anybody that's worked in healthcare could easily move to education, because
it's like one of the says just cos out on the same point, because
think about it, We're allowing people to create content, right, which ends
up as an adjacent format, and then this patients see that content because you
know, content answer the question, which is also an adjacent format. Right.
So you know what I ended up doing. I didn't set out to
build an SDK. There was already a version one. Admit it. It
was on your to do list that year. You know, It's one of
them ones. Is like how Linux got made right. The guy just realized
that, oh, I've built a kernel, like oh, oh, as
well, just you know, make it so like what you really shake it?
Does? You know? He just says, oh, it's my lunchtime.
I feel like creating my own private jets. And then ury goes ahead
and creates own private jets and it comes and devils it like it's just a
regular thing. And he's like, oh, you don't have a private jet.
I didn't know that. That's how brilliant he is. So you didn't
go into it planning to do you know, we had a version one that
basically it was working. But you know, healthcare is very you're going to
be audited. You would audit you really well security because if you, like
say, somebody should like you know, you die misdiagnosed the wrong person that
has ramification. So that is the type of mindset it needs to go.
So when I jumped on the project, I told them, hey, you
know, yeah, I need to start looking at this as life or death,
not just like hey, we're writing coul code. You cannot do that
because I don't want to go to jail, and I'm pretty sure you don't
want to go to jail. So I guess when we started out, so
what we had was a really working application, wonderful, but it had like
pretty much everything was HTML, you know, which was nice, but I
was like, well, maintainability wise, this is not really. So what
we end up doing is we created what I call these block systems. Right,
so you have like an image block, a text block, a radio
bottom block, a checkbox block. They around twelve of them, you know,
image, video, audio, and that's what you can compose a bunch
of like the page with. So you can have these blocks on this page,
right, so you can have like page one, this block you put
in all the fields, the ID and everything. So with the what's it
called the now we also have the use case where every client once they apsolute
different. Right. So what actually ended up doing is the SDK is actually
has there's no template in the SDK. It exists solely to holding the component's
logic. And then what you do is you inherit that SDK. You create
the same component, but you use component inheritance to inherit that way super yeah
exactly. So you go in, Okay, Brooks application has Brooks image block,
Brooks text block, but that just exists to inherit from SDK block a
text block and then implement the templates the way Brooks wanted. But if Brooks,
say image block needs to do anything different, you can just override or
like add features on top only in that Brook SDK. And that's really Underto
compound that, Brook SDK would have brook Web and then brook like Mobile,
which is like an ionic app, so you not have to have like almost
like a mini Brook SDK that is shared between those two as well. So
it's that level of complexity. Was like, we weren't a fan of it,
but I was like, look, if we want to be able to
walk into any client and say hey, we can absolutely over an give you
what you need with that line, we need to put in this work and
once we do it it takes a year or whatever. Now we have the
infrastructure that we can do. So we ended up with an SDK and now
we're like, wow, it's so easy for us to do the cool stuff
because the SDK is not changing, you know. So yeah, that was
interesting. So you talked about clients having like desiring different looks. How has
that been challenging being like, okay, this form needs to look totally different
or not really just create different themes and throw throw it in with SaaS variables
or what's your Yeah. So, because every single application is its own container,
like you are just literally so you don't have someone sitting just designed for
that particular specific application, not needing to do any code. So so for
example, if I'm creating a new project tomorrow, all I'm doing is just
implementing the HTML and CSS for what that particular firm block looks like. But
all the behavior is or it already exists in the what's it called the SDK.
So for example, each block has what we call a data property where
you pass it the data for that particular block and you're just going to them.
I say, okay, data dot header here, data dot text here.
You know data. You don't need to write individual tests because it's already
been tested at the STK level, So you're just literally like that. It
sounds complex, but if you think about what it allows you to do,
is it allows you to sleep well knowing that hey, doesn't matter what will
change. This guy is always gonna like, you know, we can mess
things up and it's not gonna affect all the other apps. And we can
test this centrally and know this works. And so it's without angular reactive forms
we would we would absolutely be screwed. I'm one hundred percent. I feel
a little bit like I want to hear A Lissa tell us a bit more
about why she would still prefer template driven forms. It's just it's super It's
not that like deep of a thing. It's just really make it sound like
it is. Yeah, pretend you're a template forms it. It's it's because
I resist change and I got used to how template driven forms work, and
so anything outside of it, not just react forms, obviously would look foreign.
And I'm still not like I'm still not great at reactive programming in general,
and so it's just honestly, it feels like a It was just so
funny to hear books say that, because it was like the exact opposite.
For me. It just feels foreign and I'm uncomfortable with it, and when
I debug problems with it, that's where I start like bashing my face in
because I'm like, okay, like That's that's where I'm like, can we
just do it the old way please? So it's nothing to do with really
how it performs, just strictly the I guess the learning curve to get going.
That that bothers me with it with really anything reactive, so not just
forms. To be fair, do you, I never used anglae JS,
right, so Anglic anglic too as it was at the time, was was
my first experience at Angler. So when I was learning it, I had,
you know, actly watching that day they did you guys, have you
seen the keynote where there was like all these tombstones and they were like rip
like everything in Angular JS. It was like, you know, r ip
scope and rip uh like directives or whatever. It was like every single thing
that you used to using in Angular JS. And I was like watching it
because like Angler JS was my life back then, and I was like,
what are they doing to me? Like I was like dying a little bit
inside when that keynote came out. So yeah, that it is. It's
because I, you know, when I started programming, I learned JavaScript at
the very first, and then I tacked on some Angular JS and some Firebase
and I saw the magic of like just building web apps quickly and it was
just magic. I loved it. And so yeah, that's kind of my
background and it's just still hard for me to adopt the reactive way. One
of them reasons why people maybe might also shy away from reactive forms is also
the fact that you know, it does kind of require some level of RXX,
which was a big thing for me because you know, let's be honest,
I never heard of nobody is just so rags and when like cool,
you know, everybody went like for a while. Most people, let's be
real, most of us that use just know enough rxgs to get by,
we just we just knew it. We were not like ben less level like
RXX, Like okay, I know how to subscribe, unsubscribed and use the
acing pipe and that's where it ends, right, Like, you know,
maybe I know how to use a behavior subject. You know, that's like
cool. But that's all you need though, to be honest, the time,
is there really anything else is there? And when I knew I didn't
know RHGX was when I read a blog post by Ben Lesh saying you do
not need to unsubscribe as much as you think, and all I could just
be like, oh, snaps, because I was unsubscribing everyone. He can't
explain, like, look, you're unsubscribing, so you're creating a variable to
hold in the subscription so that you can go see the the energy un destroyed
and then call on subscriber's like no, you know you can just like say
they take one, or like you'll take until Actually just building the logic why
you were subscribing, I was like, that actually makes sub sense, makes
sense because then this thing would take care of the cleanup for me, wouldn't
it. Oh and then yeah, so yeah, but yeah, do you
think that plays a role into maybe making people people a little bit more hesitant
to use reactive forms for sure? Oh my gosh, yeah absolutely. I'm
like looking at this talk now by Ben Lasher and I'm like, I want
to see this. Yeah, he's a legend. He's like, he's just
such a legend. He should be ben ledged, not lesh we should change
into legends. Just change it. It's finished. I will tweet him that
you're welcome. Then called the d m B in the you know, name
request change, throwing a poor request in there. When you said the d
MV, I was like, are we getting him a license plate that has
like that on it. That'd be cool too, you you my imagine having
that level of RXGS knowledge show just on hand. I don't know how he
does it, because he just he'll just appear on someone's Twitter feed and just
go where someone's just someone's just sort of idly tweeting I can't do this thing
on r x GS, and then just like flies in like some kind of
superhero. And here's a bit of an almanac, isn't he He just dropped
like five operators that you've never heard of. You know how many operators there
are? Like the total number for a while, there's a lot. I
think they're the hundreds. One I recently started using more was share replay.
So I used to have this case where I was in complex stuff, but
I was I was just for the share operator. But then whenever I went
to the template, it just the data wouldn't show up, and I wasn't
really understanding why, Like, hey, I'm sharing. The whole point is
I don't want this to send more than once. But apparently the share operator
kind of only gets what setting points and there's some like weird stuff I've never
forgoted. But when you use the share replay, you still get only one
request being made, but it almost like replaced the entire like what's it called
stuff dream Oh so much terminology in there, pipeline stream just to throw buzzwords
Exchance. Yeah, we won't know if you're right or wrong, so that's
right. Yeah, blah blah, folk joined, blah blah, take him
till. Yeah, it's like Laura mepsom but like for Exchance operators. Oh
my gosh. Yeah, I started playing with Combined latest recently. No,
I only use ZIP where maybe sometimes you have like those cases where you have
like a parameter from the router and you also want to do something else,
but you need to do something else, like in between, where normally you
could just get like the flocket and then pass it down to a switch map
and then do that, but sometimes you need to do another thing. Maybe
you need to get some data from here, but you also need to get
data that comes that uses the like the parameter here, and then so you
cont cons and then use it both of them and then you subscribe and you
like then it's it's yeah, that's cool. I feel like I want to
tell JS operated story, but I wasn't sure. I listened like she was
getting ready to wrap up there now I'm now I'm sitting I'm tatering on the
brink and whether tell my story or not? No, no, I want
to hear this story. I was probably not that exciting. I've probably built
it up like I was just thinking that it. I know we've gone way
off topic, right, But as we started off talking about what I like
about forms and now this has become what I like about rsts. One thing
I do like is is that you can just like suddenly discover some operator just
because you suddenly need it, and you go and try and figure out how
am I going to do this and find there is an operator for that.
When I had recently there was this weird EDU case on the project that I'm
working on where occasionally you have you'd have some pipelines that included going off to
like an authorization service to get you know, make sure that the user is
logged in, and that there's this weird educase that if you happen to refresh
your page at about the same time that your session was expiring now, that
that service would just return like undefined or null or something, and it would
just everything would blow up on the page because this like checking your service was
just like at the top of a long pipeline, and I was like,
on Earth am I going to resolve this? And I was like, what
I really need is some way of only like continuing down the line if there's
if there's something to do, and and I found there. I think it's
something like skip while, and so I could just put that in my pipe.
At the top, you hit the old service, then you got skip
while. Basically the thing that he returned is equal to no, or is
equal to undefined or something, and literally putting that in there just meant that
it hit the old service, it gets the undefined, it goes nope,
wait for the next one, and it just all worked to fix it.
And it's like it's brilliant. One line, simple little line. I should
better be in my pick skip one. That's that's very smart. Do you
think a filter would have worked as well? I'm just thinking about it.
Yeah, yeah, possibly that's true. Time. Anyway, here ends my
story. I liked it. I'll buy the story bek for it. Yeah,
thanks, man, I appreciate it. It's good. That's good.
Sorry, I'm just looking at all these ones that I haven't even like pluck.
Basically you could pass in the property name in an object and it would
just get that for instead of went into the map and then get it in
the returnity. So you just see, like for example, if it was
like there are params, you could just say pluck the pass and the parameter
rise name, and then he just returns the value for you. So it's
really, really really I've heard of pluck from Underscore. I think it's it's
pretty cool. I like that. I think that's my pick. I think
mine would be. I like share and share reeply. It just just makes
everything nice. Yeah, which one sure sare reply? Yeah? Like looking
each one of these up as you guys know. So when you all are
looking for new ways to do their new methods or new ways to do this,
are you just blindly googling or is there like a resource whether it's our
x J stocks or something else that you is like your go to bookmarks,
look for it. If you choose an adventure thing on the unreactive x dot
io where you can you literally just follow this this this tree. I want
to something that creates that. You know, you're you're blowing my mind right
now. They removed it in a new one, but I think it's back
now and a new one. So yeah, it's like a decision tree operator
decision tree. Yeah, like I want to do you need to do Unie.
It's it's it's really cool. There's also this great place called like stackle
flow. Never I don't know if anyone has used it. Yeah, well
that's that's where I learned. Yeah, that's where I figured. Yeah.
It's like I type in what I'm trying to do and someone says, you
know, just use this, and I'm like, didn't say you're doing it
wrong? Really amazing. Don't tell anybody about it. By the way,
it's your competitive advantage. I need to have a career. Well, are
there any other forms or reactive or before we do picks on that you want
to give a shout out to shout out, I would say, I've heard
of this thing that Brown did. I think it's called formally or something like
that. There's supposed to be like a library on top of reactive forms that
makes it easy for you to do template stuff. But reactive form's way,
but would you just like make it it easy to compose. I've heard of
that. Never really used that because we really can't, like we have to
have full control over everything. That's that's one thing I think people can look
at as well feel free to. I've extensively given talks about reactive forms and
you can go my slices dot com, slash sandi usif everywhere. Just google
sandi USIF and google reactive forms. You see host a number of talks that
come up, and the slides are all there. I also think I would
really recommend that anybody listening maybe we should come together and see how we can
contribute more to the Reactive Forms repo. Maybe it needs a little bit of
love. I've never really contributed on a large scale to an open source project.
I have like angler, so maybe that this would be a good challenge
for me myself to go in there. But I think it will be really
really good useful. So let's create the features now I'm missing that we want.
I think that'll be really amazing as well. You can open up a
pull request to deprecate the template based for literally just remove it from the repo.
I fixed it for you. Well, what about Brooks or Chris picks
for today other than the operators aforementioned? Yah ahead, Yeah, Well I'm
going to pick skip while because it's what a lovely all right, operator,
Yeah, I've recently been. I finished The Mandalorian on Disney Plus and it
was quite fabulous, and then I thought I would try A friend of mine
was just banging on about how I should watch Star Wars Rebels, which is
one of the animated series, and I was like, okay, So I
decided to start watching the Clone War was animated series instead. I don't know,
just a spiiting maybe, but I'd never bother with it because it looked
awful. But it turns out I really like it. It's really good.
How There's one thing that baffled me initially is that you're not supposed to watch
it in order, and I didn't know why. Apparently, in the first
three seasons they they just jump all over the chronology all over the place,
and so in fact, on Star Wars dot Com they have published the order
that you should watch, and so the first episode you should watch if you've
never seen it before is season two, episode sixteen. I personally think that's
absolutely mental, but as it turned out, I did that. I watched
a few of them. Now, like the second one you watch is like
season one, episode sixteen, and it follows on directly from the one that
you just watched, which was in the next season. It's insane, and
so I'm going to pick the Clone Wars. But also I'm going to put
in a link here for the correct chronology cool viewing order so that you too
can watch it. That's a lot of work. It kind of is.
Well, they drop it, like I'm halfway through season three. Supposedly they
just go to just proper episode viewing order. But yeah, it's like,
I want to watch what was cool? I have to get out my list
right, which is the last one I watched? And what one am I
going to watch next? But I feel like it's gonna be worth It's gonna
be a worthwhile investment of my time and energy. I think cool cool,
Yeah, I have I have one pick today. It's wearing crocs with socks
because we're all in quarantine so no one can no one can see what I'm
doing, so I really enjoy the late cushy feeling and the warmth of my
socks. It's it's very I can't understand how crops are even a thing,
Like they should just be making me so happy. They should launched into the
sun. As long as no one, as long as no one sees me,
I think it's fine. Some some some friends about turned up my house
one day when when when you could actually go to other people's houses, and
like both of that kids were just wearing his new pairs of crooks, and
I just like took one look, said, why do you hate your children?
They're comfy and kids with kids, you don't have to, you know,
tie the shoelaces and everything. Right, that's true? Yeah too much.
Let me see Amazon dot com. I think vell Crow on an adult
shoe would be even more scoffed at than a croc sock shoe situation. Maybe
I can't argue with that, but I would like bel Crow shoes because I
hate tying my shoes. My gosh, this makes me so happy. I
tie him once and then wait until you know, and then shove. I'm
surprised you even bother. I mean, just you know, what's the well
then people people pointed out to you all the time, and that's just noy.
That's that's why you tie him. So scenario, I's like, haha,
shoes untied their slick and you're like, yeah, thanks, Yeah,
I wait one of day I get any shoes, take the shoelaces out,
Just get some like duct tape and just wrap it around, round and roundo
and round until you get the perfect comfort. I've gotten. I've gotten the
elastic shoelaces like that you pull, you know, and then you never have
to time. When I was on the rowing team, we used to take
our nikes and like not the end of the lace so and then cut it.
So basically you just slip it on and off, but it's still last.
So that's what I still do to tend shoes. So I've actually gotten
out of tying as an adult. I love that. Pick Brooks, thank
you for that. I definitely want to give a shout out to Deborah Carrata.
She has an RXGS in Angular course on plural site and it's just quick,
like three four hour course for going through our XGS and then also another
site if you're like, oh, Plural site's kind of expensive or what have
you? You to me is my second go to, and they have a
course on our XGS as well, and I think right now there's like a
flash sale going on for like eleven bucks to get the course, so definitely
check those out if you were listening today and feeling a bit lacking in the
understanding department. But yeah, Sonny, tell us any other picks that you
have and where people can find you online. So I'm easy. You just
searched that the use of S A, N, I, y U,
SUF, Google or anywhere that's my usual name. Everywhere you can find anybody
that looks as handsome as this, and it just happens not to be me.
You let me know to let on the flip side, I'm also working
on a beginner course to program actually, so as you know, I have
courses on Linda and LinkedIn dot com. When you I've been lucky enough that
I have like what fifty around twelve thirteen thousand, you know, followers,
and you know there's a message that you can No, I want to learn
how to code. I want to start coded. You know, how do
I learn how the code? Should I be learning ANGI or React? I'm
like, no, you should be learning how you should be learning JavaScript first?
Like, so I see a lot of people learning like they want to
learn how to code. But you know, I always say, we have
a lot of programmers that are plumbers but not engineers. A plumber could come
fix your five, and then engineer will know that you should buy this type
of pie. You should hang up at this pie so that this problem doesn't
occur. And I'm not trying to like shit on anybody or sorry, excuse
my friends, but I'm not trying to like, you know, be bad
to anybody. But it's just that's just the reality. So and the reason
for that is people don't learn the conceptuals properly. And I used to be.
I've always said that my biggest cigarette was jumping into frameworks too soon,
Like I didn't give javascripts long enough to actually get those concepts down. So
even still to this day, sometimes I'm like, JavaScript or is that this
framework? Like which one does that belong to? So I totally agree with
you and back you up on that. I'm sunny. I love that.
So you said you have courses, So I'm working on one now. I'm
really and I'm hoping maybe by end of July and June, sorry that it
might be out. I've just started. But it's going to be very very
like heavily JavaScript based, but conceptuals like where we're going to be using real
world examples to explain what a variable is you know whatever, I cannot wait.
So you're going to tweet about it when it comes out, right,
because I'm going to be there. I'm going to open up a commune soon
page somewhere soon sometime soon to just watch on my Twitter. But it's going
to be free as well, absolutely free, unlike other courses that it's just
maybe YouTube only. I'm going to take the time to bite size it so
that you can actually get little excerpts on like platforms like Instagram, platforms like
Twitter two minute excerpt that would maybe nudge you potentially to go watch it on
the actual web page and everything that it's going to be one hundred percent free
because I get that message so much and I think it's not much something about
it. So and it's going to be like no other I hope, and
so it stay tuned. Cool, awesome. It's the first announcement of that,
So now I really have to finish it. You're like, oh,
what date did I just set? That's really really cool. Well, thank
you so much for coming on today. Man, this was a really cool
topic and I love chatting with you. It's a really really neat influence in
our community. So thank you for just always supporting people. I see you
out there all the time, lifting people up in the Angular community and just
want to thank you for that. Hi, my pleasure man. You know,
the Angler Comedian has given me so much. Is only right for me
to give as little as I can or as much as I can as well,
So thank you. Pleasures are mine. Awesome, awesome, Well,
I think that's a wrap. We'll see you all next time.