Question: I am a beginner in Selenium WebDriver (Java with TestNg). I'm trying to create a framework of my own.

My question here is what would be the better option to store my objects (basically all the webelements of my website under test), Page Object Model or External Property file? Why? Is there a better method than those?
Please help.

Answer: 
In my framework, I do not write code for any of the the webelements. I just store the locators (it is in Python, so simple dictionary literal works pretty well) in pageobject file for the page. I generate webelement from that as I need them - this saves lots of code. I could pretend I use factory pattern, but I don't - it is all much simpler than that, because Python's dynamic typing ignores type nazis and makes difficult things simple.

My advice would be not to start with framework. Start with coding what you need, and refactor as you learn more what your code need. Unless you are really experienced Java hacker with lots of OO design experience - and if you were, you would not be asking this question here, I guess? :-)
Instead, combine both. I have developed a support package that uses page factory to read locators from JSON.

Here is the article.

<https://medium.com/@hemanthsridhar92/custom-selenium-page-factory-to-read-locators-from-json-48710f77e272>

Let me know if you have any questions.