Does more logic on Client side reduces the lightning performance?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












I am just struggling to understand on this as I develop a lightning component. I have object rows from apex controller which gets displayed on the component using <table>, <tr> and <td> tags. I have written most of the logic on the component itself like disable 'select' checkbox if rec.status = completed, enable 'select' checkbox for rec.status = Open, use of different checkboxes and inputfields using <aura:if>. I was just suggested that we should implement all such kind of logic on the backend (apex) and we should use the front end just to display the records.
Does this way of doing reduces the performance of the lightning component?










share|improve this question





























    up vote
    1
    down vote

    favorite












    I am just struggling to understand on this as I develop a lightning component. I have object rows from apex controller which gets displayed on the component using <table>, <tr> and <td> tags. I have written most of the logic on the component itself like disable 'select' checkbox if rec.status = completed, enable 'select' checkbox for rec.status = Open, use of different checkboxes and inputfields using <aura:if>. I was just suggested that we should implement all such kind of logic on the backend (apex) and we should use the front end just to display the records.
    Does this way of doing reduces the performance of the lightning component?










    share|improve this question

























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am just struggling to understand on this as I develop a lightning component. I have object rows from apex controller which gets displayed on the component using <table>, <tr> and <td> tags. I have written most of the logic on the component itself like disable 'select' checkbox if rec.status = completed, enable 'select' checkbox for rec.status = Open, use of different checkboxes and inputfields using <aura:if>. I was just suggested that we should implement all such kind of logic on the backend (apex) and we should use the front end just to display the records.
      Does this way of doing reduces the performance of the lightning component?










      share|improve this question















      I am just struggling to understand on this as I develop a lightning component. I have object rows from apex controller which gets displayed on the component using <table>, <tr> and <td> tags. I have written most of the logic on the component itself like disable 'select' checkbox if rec.status = completed, enable 'select' checkbox for rec.status = Open, use of different checkboxes and inputfields using <aura:if>. I was just suggested that we should implement all such kind of logic on the backend (apex) and we should use the front end just to display the records.
      Does this way of doing reduces the performance of the lightning component?







      lightning-components performance javascript-controller






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 15 hours ago









      David Reed

      22.8k41641




      22.8k41641










      asked 15 hours ago









      Kanikala

      797




      797




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          5
          down vote













          Lightning Component Framework is optimized for performance. So unless and until you have things really going bad, you should be good if you implement your component using Lightning Components Performance Best Practices.



          Then Lightning component framework is all about building rich UI applications utilizing more of client side features. So if you really don’t use the client side features, then you will end up under-utilizing the framework.



          One of the significant considerations for performance in any framework is to reduce server trips. So as long as you are efficiently handling your client side components without making unwanted server calls, you are in fact doing it the right way.



          Here are few of the excerpts which you can find on documentation on Lightning Component Framework.




          The benefits include an out-of-the-box set of components, event-driven architecture, and a framework optimized for performance.



          Uses a stateful client and stateless server architecture that relies on JavaScript on the client side to manage UI component metadata and application data. The client calls the server only when absolutely necessary; for example to get more metadata or data. The server only sends data that is needed by the user to maximize efficiency.







          share|improve this answer





























            up vote
            4
            down vote













            Aside from Jayant's excellent answer, it's worth noting that JavaScript is faster than Apex, hands-down. Whenever Visualforce started to have issues with rendering a page, the immediate solution is to use a client-side framework, as demonstrated in this answer. In other words, the general advice is to avoid using Apex, because it is slower than client-side rendering. Do as much as possible with client-side code.



            This applies for both Visualforce and Lightning, but in particular, you'll enjoy a much more responsive UI if you do as much processing as you can after getting the data back from the Apex code. Apex should only be used to perform DML operations, callouts, and describes, with minimal processing and minimal server-side logic.



            However, because of the nature of Lightning, do remember that Apex should still perform sanity checks, like making sure sharing is enforced, checking CRUD/FLS permissions, and generally ensuring that the request is not manipulated. Lightning mostly protects each name space from interacting with other namespaces, but it's not necessarily immune to poorly designed components that might be manipulated by external messages, etc.






            share|improve this answer



























              up vote
              0
              down vote













              You may also want to Evaluate out of the box lightning datatable component.
              There won't be any need to maintain your table tags etc..



              https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example






              share|improve this answer




















                Your Answer







                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "459"
                ;
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function()
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled)
                StackExchange.using("snippets", function()
                createEditor();
                );

                else
                createEditor();

                );

                function createEditor()
                StackExchange.prepareEditor(
                heartbeatType: 'answer',
                convertImagesToLinks: false,
                noModals: false,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );













                 

                draft saved


                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f237468%2fdoes-more-logic-on-client-side-reduces-the-lightning-performance%23new-answer', 'question_page');

                );

                Post as a guest






























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                5
                down vote













                Lightning Component Framework is optimized for performance. So unless and until you have things really going bad, you should be good if you implement your component using Lightning Components Performance Best Practices.



                Then Lightning component framework is all about building rich UI applications utilizing more of client side features. So if you really don’t use the client side features, then you will end up under-utilizing the framework.



                One of the significant considerations for performance in any framework is to reduce server trips. So as long as you are efficiently handling your client side components without making unwanted server calls, you are in fact doing it the right way.



                Here are few of the excerpts which you can find on documentation on Lightning Component Framework.




                The benefits include an out-of-the-box set of components, event-driven architecture, and a framework optimized for performance.



                Uses a stateful client and stateless server architecture that relies on JavaScript on the client side to manage UI component metadata and application data. The client calls the server only when absolutely necessary; for example to get more metadata or data. The server only sends data that is needed by the user to maximize efficiency.







                share|improve this answer


























                  up vote
                  5
                  down vote













                  Lightning Component Framework is optimized for performance. So unless and until you have things really going bad, you should be good if you implement your component using Lightning Components Performance Best Practices.



                  Then Lightning component framework is all about building rich UI applications utilizing more of client side features. So if you really don’t use the client side features, then you will end up under-utilizing the framework.



                  One of the significant considerations for performance in any framework is to reduce server trips. So as long as you are efficiently handling your client side components without making unwanted server calls, you are in fact doing it the right way.



                  Here are few of the excerpts which you can find on documentation on Lightning Component Framework.




                  The benefits include an out-of-the-box set of components, event-driven architecture, and a framework optimized for performance.



                  Uses a stateful client and stateless server architecture that relies on JavaScript on the client side to manage UI component metadata and application data. The client calls the server only when absolutely necessary; for example to get more metadata or data. The server only sends data that is needed by the user to maximize efficiency.







                  share|improve this answer
























                    up vote
                    5
                    down vote










                    up vote
                    5
                    down vote









                    Lightning Component Framework is optimized for performance. So unless and until you have things really going bad, you should be good if you implement your component using Lightning Components Performance Best Practices.



                    Then Lightning component framework is all about building rich UI applications utilizing more of client side features. So if you really don’t use the client side features, then you will end up under-utilizing the framework.



                    One of the significant considerations for performance in any framework is to reduce server trips. So as long as you are efficiently handling your client side components without making unwanted server calls, you are in fact doing it the right way.



                    Here are few of the excerpts which you can find on documentation on Lightning Component Framework.




                    The benefits include an out-of-the-box set of components, event-driven architecture, and a framework optimized for performance.



                    Uses a stateful client and stateless server architecture that relies on JavaScript on the client side to manage UI component metadata and application data. The client calls the server only when absolutely necessary; for example to get more metadata or data. The server only sends data that is needed by the user to maximize efficiency.







                    share|improve this answer














                    Lightning Component Framework is optimized for performance. So unless and until you have things really going bad, you should be good if you implement your component using Lightning Components Performance Best Practices.



                    Then Lightning component framework is all about building rich UI applications utilizing more of client side features. So if you really don’t use the client side features, then you will end up under-utilizing the framework.



                    One of the significant considerations for performance in any framework is to reduce server trips. So as long as you are efficiently handling your client side components without making unwanted server calls, you are in fact doing it the right way.



                    Here are few of the excerpts which you can find on documentation on Lightning Component Framework.




                    The benefits include an out-of-the-box set of components, event-driven architecture, and a framework optimized for performance.



                    Uses a stateful client and stateless server architecture that relies on JavaScript on the client side to manage UI component metadata and application data. The client calls the server only when absolutely necessary; for example to get more metadata or data. The server only sends data that is needed by the user to maximize efficiency.








                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited 3 hours ago

























                    answered 14 hours ago









                    Jayant Das

                    8,5502421




                    8,5502421






















                        up vote
                        4
                        down vote













                        Aside from Jayant's excellent answer, it's worth noting that JavaScript is faster than Apex, hands-down. Whenever Visualforce started to have issues with rendering a page, the immediate solution is to use a client-side framework, as demonstrated in this answer. In other words, the general advice is to avoid using Apex, because it is slower than client-side rendering. Do as much as possible with client-side code.



                        This applies for both Visualforce and Lightning, but in particular, you'll enjoy a much more responsive UI if you do as much processing as you can after getting the data back from the Apex code. Apex should only be used to perform DML operations, callouts, and describes, with minimal processing and minimal server-side logic.



                        However, because of the nature of Lightning, do remember that Apex should still perform sanity checks, like making sure sharing is enforced, checking CRUD/FLS permissions, and generally ensuring that the request is not manipulated. Lightning mostly protects each name space from interacting with other namespaces, but it's not necessarily immune to poorly designed components that might be manipulated by external messages, etc.






                        share|improve this answer
























                          up vote
                          4
                          down vote













                          Aside from Jayant's excellent answer, it's worth noting that JavaScript is faster than Apex, hands-down. Whenever Visualforce started to have issues with rendering a page, the immediate solution is to use a client-side framework, as demonstrated in this answer. In other words, the general advice is to avoid using Apex, because it is slower than client-side rendering. Do as much as possible with client-side code.



                          This applies for both Visualforce and Lightning, but in particular, you'll enjoy a much more responsive UI if you do as much processing as you can after getting the data back from the Apex code. Apex should only be used to perform DML operations, callouts, and describes, with minimal processing and minimal server-side logic.



                          However, because of the nature of Lightning, do remember that Apex should still perform sanity checks, like making sure sharing is enforced, checking CRUD/FLS permissions, and generally ensuring that the request is not manipulated. Lightning mostly protects each name space from interacting with other namespaces, but it's not necessarily immune to poorly designed components that might be manipulated by external messages, etc.






                          share|improve this answer






















                            up vote
                            4
                            down vote










                            up vote
                            4
                            down vote









                            Aside from Jayant's excellent answer, it's worth noting that JavaScript is faster than Apex, hands-down. Whenever Visualforce started to have issues with rendering a page, the immediate solution is to use a client-side framework, as demonstrated in this answer. In other words, the general advice is to avoid using Apex, because it is slower than client-side rendering. Do as much as possible with client-side code.



                            This applies for both Visualforce and Lightning, but in particular, you'll enjoy a much more responsive UI if you do as much processing as you can after getting the data back from the Apex code. Apex should only be used to perform DML operations, callouts, and describes, with minimal processing and minimal server-side logic.



                            However, because of the nature of Lightning, do remember that Apex should still perform sanity checks, like making sure sharing is enforced, checking CRUD/FLS permissions, and generally ensuring that the request is not manipulated. Lightning mostly protects each name space from interacting with other namespaces, but it's not necessarily immune to poorly designed components that might be manipulated by external messages, etc.






                            share|improve this answer












                            Aside from Jayant's excellent answer, it's worth noting that JavaScript is faster than Apex, hands-down. Whenever Visualforce started to have issues with rendering a page, the immediate solution is to use a client-side framework, as demonstrated in this answer. In other words, the general advice is to avoid using Apex, because it is slower than client-side rendering. Do as much as possible with client-side code.



                            This applies for both Visualforce and Lightning, but in particular, you'll enjoy a much more responsive UI if you do as much processing as you can after getting the data back from the Apex code. Apex should only be used to perform DML operations, callouts, and describes, with minimal processing and minimal server-side logic.



                            However, because of the nature of Lightning, do remember that Apex should still perform sanity checks, like making sure sharing is enforced, checking CRUD/FLS permissions, and generally ensuring that the request is not manipulated. Lightning mostly protects each name space from interacting with other namespaces, but it's not necessarily immune to poorly designed components that might be manipulated by external messages, etc.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 13 hours ago









                            sfdcfox

                            235k10180396




                            235k10180396




















                                up vote
                                0
                                down vote













                                You may also want to Evaluate out of the box lightning datatable component.
                                There won't be any need to maintain your table tags etc..



                                https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example






                                share|improve this answer
























                                  up vote
                                  0
                                  down vote













                                  You may also want to Evaluate out of the box lightning datatable component.
                                  There won't be any need to maintain your table tags etc..



                                  https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example






                                  share|improve this answer






















                                    up vote
                                    0
                                    down vote










                                    up vote
                                    0
                                    down vote









                                    You may also want to Evaluate out of the box lightning datatable component.
                                    There won't be any need to maintain your table tags etc..



                                    https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example






                                    share|improve this answer












                                    You may also want to Evaluate out of the box lightning datatable component.
                                    There won't be any need to maintain your table tags etc..



                                    https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered 1 hour ago









                                    apn

                                    799829




                                    799829



























                                         

                                        draft saved


                                        draft discarded















































                                         


                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f237468%2fdoes-more-logic-on-client-side-reduces-the-lightning-performance%23new-answer', 'question_page');

                                        );

                                        Post as a guest













































































                                        Comments

                                        Popular posts from this blog

                                        Long meetings (6-7 hours a day): Being “babysat” by supervisor

                                        Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                                        Confectionery