Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I have been looking at the naming conventions used by many larger sites for styles and javascript functions and came across facebook using class names such as class="_2t-f" and just wondering if this is done for a specific reason or if this is just a choice as opposed to intuitive class naming such as class="text-center"
I have tried to do research into this and have came across the Facebook Haste system and the Phabricator Celerity system but they seem more focused on versioning and requiring static resources as opposed to naming conventions. Thanks.
It's not a human choice, it's a minified classname. Bytes on the wire at Facebook's scale are measurable and costly.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I'm planning to create a forum website from 0 for my portfolio and learning experience. What should I choose between static and dynamic? Since I just thought it might affect my website performance.
I know the basic difference between static and dynamic which is one is pre-built and the other is rendered from the server-side.
I have experience in react, express, axios, mongodb, and MySQL
Any suggestion?
Big Forums are all dynamic websites.
What big sites will do for better performance is caching of dynamically generated > content. But you do not need this unless you have ~10 new visitors EVERY second ;)
Quoted from #phip1611
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Should i have one constants file for the whole app or split it one for each coresponding store , action ?
My thought's are one for the whole app?
It's a matter of preference.
If you have a couple dozen constants, I don't see a downside to keeping them in one file. If you have, say, hundreds of constants it may make sense to split them up—not for any technical reason, but just to make it easier for you and your teammates to find the ones you're looking for without digging through many pages of the same file.
Either way you should do your best to group them logically—and even in a file as simple as a list of constants, generous whitespace and comments will make everyone's lives easier.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
_I've seen both pure CSS menus and JavaScript based menus and I can't see that there is anything gained using JavaScript.
Is there something I'm missing.
The google search pulls up SO articles from a good while back.
Here is an SO article from about 5 years ago.
What is the current state of CSS menus?
Unless you want something that can't be done with CSS, you gain absolutely nothing by using JS instead of CSS.
JS was the way to do animated things before CSS3 brought its transitions and animations, and is now becoming a standard because it's simpler and performs better (in those few things it can do).
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
This will be a bit strange question, but..
I am planning to use jQuery/knockout to write a dynamic custom wizard
which will depending on different scenarios will load different templates/UI logic to the user.
Question.
Should I take into consideration memory usage in this case? or should I manually unload/clean up/save to the server pieces of UI which is not in use??
PS. Current version of wizard will have 5-7 steps.
You should write your app the best you can functionally and then determine if memory is even an issue. If it is, then you can take steps to reduce it's memory footprint but odds are you'll be fine. For instance, go look at what a site like Facebook's memory usage, a site that everyone and their grandmother uses.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
For javascript functions that only apply to one page, in a large(ish) web app - is it better to have the scripts inline or in the main javascript file?
If your application gets little traffic, use whatever you like best.
If your application gets a huge amount of traffic, you want to minimize:
the number of distinct requestable resources in your application to maximize cacheability
the size of each individual resource to optimize the empty cache experience.
1 and 2 contradict each other, so you have to pick a tradeoff appropriate to your application.
I would prefer having a proper module system and useful compilation tools so I don't need to have to worry sacrificing efficiency when it comes to keeping my code organized.