How to calculate the resources needed for the application?
How to calculate the metrics for the application... May be what may be the RAM does an application may take, or computing power (CPU speed)that is required .
I don't think it's practical to rely on a theoretical measure of the resources needed, even if it's possible to get such a figure.
In my opinion, it really boils down to thinking about what your code is doing and taking care of avoiding cases that can use potentially unbounded resources. For example, if you're performing 3 database queries for fetching the details of 3 users, you might want to think "what happens if it's a 1000 users?". If you know for sure it will never be 1000, you're good. If not and the answer is 1000 queries then you're doing it wrong.
Most importantly, it's important to keep a keen eye on actual resource utilization, which means analyzing resource usage regularly, stress testing your application and benchmarking. In other words, measure, measure, measure, and optimize the parts that are taking too many resources.
Nishant Agrwal
I don't think it's practical to rely on a theoretical measure of the resources needed, even if it's possible to get such a figure.
In my opinion, it really boils down to thinking about what your code is doing and taking care of avoiding cases that can use potentially unbounded resources. For example, if you're performing 3 database queries for fetching the details of 3 users, you might want to think "what happens if it's a 1000 users?". If you know for sure it will never be 1000, you're good. If not and the answer is 1000 queries then you're doing it wrong.
Most importantly, it's important to keep a keen eye on actual resource utilization, which means analyzing resource usage regularly, stress testing your application and benchmarking. In other words, measure, measure, measure, and optimize the parts that are taking too many resources.