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.
Thank You, for providing those reports - good information is always welcome.
Please don't push yourselves to hard; slow and steady wins the race to good health.
"Program testing can be used to show the presence of bugs, but never to show their absence." - Edsger Dijkstra
"I have never been lost, but I will admit to being confused for several weeks. " - Daniel Boone
For Desktop & Apps, Any Labels, alerts , Dialogs we show on the UI,
We centralize them on a STRING resource file or a settings file. It'll be centralized.
So we give this file to a content expert who reviews and send back the corrections.
How does this work on a webpage.
This can even be centralized? I have no clue.
What's the best practice?
If we are centralizing the Content repository in a Key-value pair (let's say PHP)
It's gonna bring down the performance if there are hundreds of Labels on the page.
Or, I don't do anything, just hardcode all the text, review the 200 pages one by one, the brute force way.
I guess the question I've asked is inevitable for a Multi-lingual site like Facebook.
Just wanting to know how this is done the best way.
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...
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
My (immediate) Boss is so upset the bigger directors don't plan the resources well but crush the deadlines, it's like giving a broomstick to fight a war where Saber & Blaster guns are used. He was mad. He was furious and yelling.
I told him, okay listen boss, This is what the management could give, And with that, this is what we could deliver. So why we have to be upset about it?
Boss: I am not Upset. I am NOT Upset. I AM NOT UPSET. I'm just telling YOU what the HECK is happening.