Mahmoud - for me - there is no absolute answer here. It would depend on several different contexts i.e. your discipline, what is valued by your institution most, which is the most competitive/realistic, how high-ranking are you aiming for etc? For instance, I've published many articles - but my discipline doesn't really lend itself to patents and/or inventions - although you might be referring to Intellectual Property - but that's different again.
I suppose that the best recommendation would be, where possible, try for both. It would make for a more balanced professional portfolio.
Dear Dean, I totally agree with you. But sometimes to write up a patent application and waiting several years for the acceptance sounds very crazy to me.
thank you for the answer. But sometimes I feel like I want to keep some of my findings in order to gather all of them after I finish my PhD and apply for a patent. While some of the recent findings can be published through a journal paper which has an excellent impact for my study field (Renewable energy systems).