Click here to Skip to main content
15,884,628 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: So, I'm back at my desktop fro the first time in what? A week and a half? Two weeks? Pin
Richard Deeming10-May-20 22:16
mveRichard Deeming10-May-20 22:16 
GeneralRe: So, I'm back at my desktop fro the first time in what? A week and a half? Two weeks? Pin
Rage10-May-20 22:51
professionalRage10-May-20 22:51 
GeneralRe: So, I'm back at my desktop fro the first time in what? A week and a half? Two weeks? Pin
OriginalGriff10-May-20 23:38
mveOriginalGriff10-May-20 23:38 
GeneralRe: So, I'm back at my desktop fro the first time in what? A week and a half? Two weeks? Pin
S Houghtelin11-May-20 2:27
professionalS Houghtelin11-May-20 2:27 
GeneralRe: So, I'm back at my desktop fro the first time in what? A week and a half? Two weeks? Pin
glennPattonWork311-May-20 3:01
professionalglennPattonWork311-May-20 3:01 
GeneralRe: So, I'm back at my desktop fro the first time in what? A week and a half? Two weeks? Pin
dandy7211-May-20 7:18
dandy7211-May-20 7:18 
QuestionBest Practice for WebPage contents (Labels & Dialog messages) Pin
Nand3210-May-20 3:04
Nand3210-May-20 3:04 
AnswerRe: Best Practice for WebPage contents (Labels & Dialog messages) Pin
MadMyche10-May-20 4:22
professionalMadMyche10-May-20 4:22 
The best performance within a browser is to have as much static content as possible available.
The best performance on the server is also to have this.

Many of the "active" web technologies (PHP, ASP, CFM) have some sort of template or include page functionality. Utilizing these allows the majority of the elements common to a multitude of pages to be able to be edited in only 1 place.

With that, as time has progressed and frameworks have come in; a lot of features to make things easier to build also do have a performance hit. An example of this is within ASP.NET MVC; we can define a Model and even over-ride how it will be displayed elsewhere...
C#
public class Student
{
    public int StudentId { get; set; }

    [Display(Name="Name")]
    public string StudentName { get; set; }

    public int Age { get; set; }
}
Which can be utilized on the View page like via @Html.Label("StudentName")
to render this HTML: <label for="StudentName">Name</label>

While this is perfectly valid and does allow us to change this in one place... It comes at a cost as the View is rendered at runtime; involves some overhead, and does have a performance impact.
A diligent designer would just put in the static HTML that is rendered and remove the Display attribute from the Model as it is no longer needed.
For messages within Modals, it all depends on how dynamic do they need to be. Most likely I would place all of the common ones which require little customization into a Messages.js resource file and have that file loaded after page_load is complete.
You did mention JSON, which is more for data transmission and storage than it is for libraries. While you could populate your message library from it; the process in itself would have penalties due to processing time in the browser and would also have a size penalty.
Director of Transmogrification Services
Shinobi of Query Language
Master of Yoda Conditional

GeneralRe: Best Practice for WebPage contents (Labels & Dialog messages) Pin
Nand3210-May-20 5:36
Nand3210-May-20 5:36 
AnswerRe: Best Practice for WebPage contents (Labels & Dialog messages) Pin
Ravi Bhavnani10-May-20 6:57
professionalRavi Bhavnani10-May-20 6:57 
AnswerRe: Best Practice for WebPage contents (Labels & Dialog messages) Pin
RedDk10-May-20 7:40
RedDk10-May-20 7:40 
Joke:) hehe Pin
Nand3210-May-20 2:58
Nand3210-May-20 2:58 
GeneralRe: :) hehe Pin
PIEBALDconsult10-May-20 3:36
mvePIEBALDconsult10-May-20 3:36 
GeneralRe: :) hehe Pin
Nand3210-May-20 3:48
Nand3210-May-20 3:48 
GeneralRe: :) hehe Pin
OriginalGriff10-May-20 4:06
mveOriginalGriff10-May-20 4:06 
GeneralRe: :) hehe Pin
PIEBALDconsult10-May-20 4:16
mvePIEBALDconsult10-May-20 4:16 
GeneralRe: :) hehe Pin
David O'Neil10-May-20 11:27
professionalDavid O'Neil10-May-20 11:27 
GeneralRe: :) hehe Pin
Eddy Vluggen10-May-20 10:34
professionalEddy Vluggen10-May-20 10:34 
GeneralRe: :) hehe Pin
PIEBALDconsult10-May-20 15:47
mvePIEBALDconsult10-May-20 15:47 
GeneralRe: :) hehe Pin
Eddy Vluggen11-May-20 2:05
professionalEddy Vluggen11-May-20 2:05 
GeneralRe: :) hehe Pin
lmoelleb10-May-20 21:27
lmoelleb10-May-20 21:27 
GeneralRe: :) hehe Pin
PIEBALDconsult11-May-20 2:55
mvePIEBALDconsult11-May-20 2:55 
GeneralRe: :) hehe PinPopular
Amarnath S10-May-20 4:09
professionalAmarnath S10-May-20 4:09 
GeneralRe: :) hehe Pin
Nand3210-May-20 5:37
Nand3210-May-20 5:37 
GeneralRe: :) hehe Pin
Eddy Vluggen10-May-20 10:44
professionalEddy Vluggen10-May-20 10:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.