Fabien Taillon: No, nothing was blocking me from going to
production.
And actually I did.
I went to production with one of our more critical apps.
So it's that I was really confident with it.
Joshua Birk: That is Fabien Taillon, a Salesforce MVP and
CTO Techs in France.
My name is Joshua Birk.
I'm a developer evangelist here at Salesforce and on the Salesforce developer podcast, you
will hear info and insights for developers from developers.
Today, we talk with Fabian about taking a critical application from Aura and porting
it to Lightning Web Components and like many people who started coding on the Salesforce
platform, JavaScript was not his background.
Fabien Taillon: So, I mainly did, I would say back then the
languages is Java mainly on people's stuff.
It was like they have their own language, but it was almost like Java too.
So not a lot of JavaScript at the beginning, mainly Java.
Joshua Birk: And the story of how they got to a critical
application running on the Salesforce platform might also be pretty familiar to you.
They were doing a lot of important work inside a Google spreadsheet.
Fabien Taillon: All of our employees are using Salesforce.
Well, we need a Timesheet application where everyone will say, "this is what I've done
this week because our clients have seen" et cetera, and this is a very critical application
for us.
So at the time when we really started the company, it was like just a Google sheet like
everyone, just a few singles, if we have three people, it was okay.
But at some points it started to be difficult and we wanted to have something very professional
on this critical application.
And we said, well, we are a Salesforce developer, or Rudy knows a platform.
We all love it.
So let's just do it inside Salesforce.
So we just go on and develop it with Lightning Component because it was, I think the thing
to do for a very important application like this for us.
Joshua Birk: To be clear, the application that Fabian describes,
he doesn't describe it as being overly complicated.
It's a table with some interactive rows.
It doesn't have a lot of working parts to it, but it is extremely important.
They are a consultancy and this is how they get paid.
Fabien Taillon: Because we need to know which client we've
seen or a specific day or a specific week.
So that at the end of the month, we can just bill according with the client.
If we made any mistake, well, it won't be accepted by the client.
And moreover, is it two reasons working?
We won't be able to charge anyone.
So it's a very critical application for us.
Joshua Birk: And this solution was being built in the era
of Aura or in a post Visualforce world pre Lightning Web Components.
So what was it like being a Java developer, getting into a JavaScript framework for the
first time?
Fabien Taillon: Well, I would say it was my first time really
working with JavaScript.
I already did a few before because you in Visualforce, you can still bring some JavaScript
that you want to, but it was mainly for a few tweaks I couldn't do with the standard
visual first tags.
So yeah, going tour, I was already my first step to JavaScript.
So it was a big move for me, really a big change compared to Java.
I mean, I did Java.
I could go to Webex was just very easy, but going to JavaScript, was something very different.
Joshua Birk: So, the application is up and running in Aura,
it's running day to day, it's very critical application.
What was the impetus to moving it over to Lightning Web Components?
Fabien Taillon: So, the thing is that I was in the LWC pilot,
which was great.
But when you start to learn something new that you can try doing a few basic components.
So what I like to do is usually is taking SLDS mark-up and trying to create a component
from it.
So it's, I think a good way to learn the language [inaudible 00:03:39], but still at some point,
if you don't really build a real-life application while it feels like you knew already everything,
but you actually don't.
So I was like, okay, what could I do as a real life project to really try liking one
component for real?
And I was like, we have this internal tool, so yet it's critical, but I've already seen
that LWC is faster than Aura.
So why not just trying to rebuild it with like in Web Component drawings of pilot.
It's what I did.
I just took a screenshot and created a new version of the same app you already had in
production.
Joshua Birk: Now it's really interesting here, the distinction
that Fabian described when he was talking about the difference between working with
oral components and learning Lightning Web Components.
Fabien Taillon: So I think I will have a different mindset
than some of the people that already use a framework, like React, for instance, for me
twice quite new, but I really liked the new way to write component better than Aura.
Because when I had some issues, I was mostly looking for a JavaScript question and Stack
Exchange and not only assess first question.
So it was more stuff about, promises and these kinds of things that, is more common for any
JavaScript developer, but not that much for anyone coming from the platform from Visualforce,
for us on Lightning Component.
So I was like, Oh, so this is new, but actually I can ramp up pretty quickly because there
is a lot of already good documentation on JavaScript I can use.
Joshua Birk: When we did the launch for Lightning Web Components
we talked extensively about the importance of Web Standards and how we were embracing
Web Standards.
We were part of the committees that were forming the Web Standards and how helpful this was
going to be for developers and what Fabian is describing here is exactly what we were
talking about.
And this permeates through everything that they were doing with the port, listen to how
Fabian describes simply debugging a component in Aura being different from Lightning Web
Components.
Fabien Taillon: Yes, everything was faster.
So even with like in way components, even easier now to see the proxy objects.
So this is a big move for me.
Before I knew I was using the Lightning, what's the name of the Lightning Inspector or something
like that.
That is a cool to debug Lightning Components.
So I don't know if I fire a Nora event and nothing is happening.
I need the specific tool to know if the event is even fired, is it catched by something
what's the issue?
I don't really know.
Sometimes the bringing was not working, but it was a little bit painful.
It has a recess for specific actually, when I started to move on Lightning Web Components
or just using the Chrome DevTools and I didn't need anything else, it was the big move to
being a real JavaScript developers sort of.
Joshua Birk: So, finding documentation is easier, debugging
your JavaScript is easier.
What about, say something like events?
Fabien Taillon: Events are now it stoned out events.
So I think it's easier to debug than before, because I can use this Data Tool to debug
these kinds of events.
I mean, it's pretty easy to fire an event in LWC.
And it's pretty easy to switch from Aura event to these kinds of events.
So it was at a big move actually.
Joshua Birk: Again, Fabian's got a few advantages here.
He knows the original code line.
He's part of the LWC pilot, but how did the Apple development go based on what his expectations
were? Fabien Taillon:
Well to be honest, it was much faster than what I thought.
It was like a few days only because I already did a few components to test LWC before, and
I thought I would have a lot of code to rewrite, which wasn't the case.
Actually, I was able to reuse a lot of code from my existing app to the new one.
Joshua Birk: Because one similarity that Aura components
has to Lightning Web Components, is how they're working with the server.
The client side looks different, but on the Apex side of things, it's pretty much working
the same.
Fabien Taillon: Two methods from two different apex class.
So, that was a big thing for me when I started doing it.
But you see, and I was like, Oh, I don't have to reflect on anything on the Apex side.
I just have to import methods existing from several Apex controller onto would work without
changing anything it was really a great thing for what we it's a big reason why it was faster
to rewrite the app.
Joshua Birk: Another thing that was really interesting
from how Fabian strategized this rollout, was using Salesforce TX they could easily
spin up scratch orgs and release things that were based on two completely different code
lines.
So two different versions of this application, one of them in Aura, another one in Lightning,
one component, they could effectively work in them in parallel.
So whenever they were moving forward critical application and they always had version A
available.
Fabien Taillon: Actually I already built the first version
in Aura.
So it was easy for me to start again with Lighting Web Component, also being on a scratch
org on having everything on the Gita because we already have a build the first version
with the subjects.
It was on our repo, so I could just create a new scratch org because there was no issue
on our own environment at the beginning, because it was like, well, only on the scratch org,
so no problem.
I created a branch just to try creating the new app in the LWC on a [inaudible 00:08:42]
version, which is the Aura version on the LWC version, both side by side on doing the
exact same thing.
Joshua Birk: On the very first day that Lightning Web Components
was generally available in production, Fabian and his company rolled out the new version
of the Timesheet application.
Joshua Birk: There were some very minor differences in
the user interface due to changes in the base components.
They have felt no need to fall back to the old or version.
And the only real difference that this user reports is that the new version is faster.
Now, Fabian's company also works on a Salesforce, TX plug it.
Fabien Taillon: So yeah, we are building an SFDX plug-in so
we have a few commands.
One of them is to help us using a lock packages.
So we are using a lock packages with our own Timesheet application.
And you know, when you use lock packages, you can have dependencies between your package.
So this is used to build time, but Salesforce for validating that your package is okay,
but then, if I want to install one package, there is nothing that will install also dependencies
for me.
So I have to have one package depending on two, as a package, I need to install them
first, then, I will be able to install my package.
Fabien Taillon: So we just build a plug-in.
It will pass the dependencies and just sends them automatically.
So I don't have anything to just, instead of one package with one line of command.
Joshua Birk: Now, no pun intended, but I wanted to plug
Fabian's Salesforce DX plug-in, not just because it sounds incredibly useful for working with
packages, but also to highlight how JavaScript loops back into this conversation.
Because once again, we're talking about our good old friend, Standards.
Fabien Taillon: To write stuff.
We no don't type script.
So it was pretty new to me.
But then when I started working in the LWC, it feels like, Oh, it's almost the same.
So you have a class, you have an import statement, and you have functions.
I was like, Oh.
So if I look quickly to my code of my SFDX command onto my LWC, like two seconds each,
I could not even say which one is which one, because it was the same way of writing.
Fabien Taillon: So it was, I was like, Oh, this is almost
the same class, same thing to learn.
This is really the JavaScript for both of them.
Joshua Birk: As CTO of Techs and based on this experience
with the LWC rollout and with this port, I asked Fabian what his direction was to his
developers now for building anything that's Greenfield?
Fabien Taillon: And I said to everyone starting today.
So it was 2019 being going to production.
You don't have any reason not to be Lighting Web Component.
So stop doing any Aura component and just build 100% of your component, with LWC.
Joshua Birk: And that's our show.
Thanks for listening.
Now, before we go, I also want to point out that Fabian is deeply involved in his local
community.
He is a co-organizer of the Paris developer group.
He's also an organizer for French touch training, which in 2019, towards the end of September,
kicked off its inaugural conference.
And if you missed that, that's okay.
They're already planning on 2020.
Joshua Birk: Thanks for listening.
And if you'd like us go to your podcast, service of choice and subscribe share, and like, and
if you want more information, go to developer.salesforce.com/podcast.
Thanks again, I'll talk to you later.
This transcript was exported on Oct 15, 2020 - view latest version here.
episode4 (Completed 10/15/20) Transcript by Rev.com
Page 1 of 1