Of course, try to get your patent before publishing. As Daniyil indicates, you'll have to satisfy various criteria and your invention/method will have to be novel. Publishing your work before that won't help. If you're keen to publish your work early just file for the patent and enjoy your priority rights.
Yes it is essential for a researcher to patent his or her work . A patent gives its own with the right to exclude others from exploiting the potential technology , including for example , making , using or selling the potential invention .Having a directed patent strategy can reduce company cost and increase value .Value from patent : Patent provides a wide range of value to their owners ,some of which may be more applicable to one business or another