Salesforce, E. T. J. S, Charlotte discussed on Software Engineering Daily


In Terms of actually building work flows or processes. There is the declarative layer. Can you talk more about what the declarative layer is and how you build applications at the declarative layer? So. In some circles, the holy grail of of software is to not write code. I. It's a emission of a lot of different platforms teams over time. And, I think I'm a pragmatic person I think that there's there's always going to be some combination of what you can do with code in what you can do with tools that are essentially writing code under the hood. And salesforce really believes in sort of a low code, no code approach, and can they create enough tooling so that smart people can do all kinds of interesting complicated applications without actually having to write any code. So there are a ton of tools on the platform to support this sort of initiative. There's a workflows which have been around for a long time basically sort of if this sort of behavior where you say, okay, you know if a record had satisfies these criteria that I want you to mutate it in the following way or wants you to send an email to someone about this record. So to the one I did and then they've added another set of them over time there flows which are much more robust sort of node based behavior where you have this sort of if else evaluation and if true follow this path that false while this path. And then manipulate records the way a very similar like a note read wants familiar with that sort of a very sort of flowed based behavior called flow naturally, and they also something called process builder, which is very similar to flow actually quite quite affiliated under the hood similar technology, and that's a little bit friendlier richer with Meta data not quite as powerful. So that's just three examples of sort of work full based logic, but there's actually a number of tools in sort of the declared a toolbox things, validation rules, Ricans okay. I want to evaluate this record for these criteria. And the criteria can quit sophisticates. There's actually has their own sort of formula language where you can evaluate all kinds of things about a record or make mutations who record using their formula, and then they have Meta data linkages back to the formula. So this is going to be a drumbeat throughout our conversation is always Meta data where behavior. So for example, I can define essentially a reference table with information and maybe break points for discounts based on volume right this many items sold is this kind of break point or maybe it's really reference data. That's the names of all. The states or the names of some sort of information that referred to a lot for our business, and from for example, a formula, I can pull on that reference state or from some of these declared him tools I can pull in their reference data and use it as part my evaluation. So if this record is greater than breakpoint a, you know this do this logic and I can define breakpoint as an abstract entity. Right. This is going to call at breakpoint a it's actually meditate reference table somewhere else so they can go back and update that that reference so. Really, there's some some very clean design here. That is a common thread throughout different parts of the system. This idea that Meta data is the most important thing. We're not going to repeat stuff as much as possible and everything else is built around meditating ties back to it. So of course, you have those all this occurred of tools. They don't always get the job done unusual complex things typically, you fall back to code, and then especially for speed the coating on the platform is still much faster than most the declared stuff that's gotten better over time especially with the recent recent. Can actually run flows before save but? Still if you're doing things with a lot of records, it's typically better to write it with apex. Still one of the things that I try to tell people when I'm teaching them about salesforce I do a lot of training for. Developers is that because it's such a large toolbox, he really have a Lotta different ways to solve your problem. And a lot of them probably will look correct and in fact, some of them be correct but only a few of them are probably the most wanted them can be the most but only a couple of them are probably really solutions to your problem and one of the reasons that people get tripped up as you won't necessarily know which one was the. Best for a long period of time and really with scale. That's one of the big. Achilles. Heels for people that are getting used to doing social work is that things behave quite differently at large scale than they do at small-scale view table that has one hundred records and enter thousand records in it than than fine like you knew kind of do whatever you. Want programmatic, declared of around that those records with a table that has ten million records in it or fifty million records in one hundred, million records in it and remember this very sophisticated security model around sharing. That's a lot of calculations round sharing to get into all kinds of weird little behaviors around. Okay. Well, if you defined the linkages between these two. Records as this type of relationship. Then it's GonNa Change, your share model in this following way, and when you scale that you know two hundred, fifty, million records x the number of users in your org, he started to have huge numbers of sharing records to be recalculated if you make certain changes. So it really kinda takes you down a rabbit hole at politico. And of course, every application needs to have some kind of UI layer. Tell me about the best practices for building you I layers in salesforce applications. So let's talk about you I layers and I wanna come back to just the idea of layers general with salesforce. So of course, salesperson evolving platform actually one of things I that I love about the platform is how much it moves it changes a lot. They have three releases a year. There's so much stuff and release. It's actually really challenging honestly as a practitioner to keep abreast of all the information and. All all the changes to actively learn all the time with the platform. So what that means is that things change over time there's all sorts of new ways to do things. So kind of back in the day there was visual force, which is actually built on Charlotte. Bolt faces on a famous ever been from without library. It's not really well known, but it's there's a little secret tip from back in the day. The audience who is listening who's familiar with that. Well you you special you're in a small group of people that know that that's the the origin of that that feature in sales worse it's beautiful. It's been around a long time. It's kind of a template system very tightly coupled with the back end really pretty clean way to refer to fields and records, but getting a little long in the tooth AGO salesforce focused on sort of a Java based approach rates, visual I kind of a thin client approach, right? It's a very thin page. The renders server side in your sent the mall with a view state. Here's some some data about the page session, and then here's the actual rendered output or was a different approach. So or A, you are a was their library for doing sort of javascript loading system were yesterday's class-based widget module system in the browser kind of similar to an E. T. J. s sort of approach and that was around for awhile pre powerful definitely some interesting complexities with doing more sophisticated projects on it again, sales for the sort of. I don't know I. I might be in an unusual group of people doing sort of complicated, very large projects with their tools but a lot of the things that they build are designed to sort of enhance what they already have their only to be huge standalone thing. So or a was challenged by struggling a little bit at large scale is a really good sort of module system but it. Had performance issues, and so the third sort of third iteration here in the most recent came out about a year and a half two years ago or call lightning web components, and that's still sources sort of interpretation of the web component. Standard they've actually started participate in the the group that guides that Standard and they've taken web components and essentially done the seals were thing to it and made..

Coming up next