A nice balance of both is necessary . It also depends on your risk taking appetite. Save what you invest. Investment is necessary for any middle aged man to grow further whereas saving is necessary to retain that development.
Yes saving comes first. If you dont save how one can invest in the future? For a medium class person savings is the most important thing. As he want to take care of day to day expenses so saving can only serve the purpose and once you have enough savings then can think of investments.