When approaching a new problem, it's good to make a serious attempt at solving it yourself from scratch (reinventing the wheel if necessary) before looking up best practices.
Because you've already glimpsed the possibilities. You won't merely assume "this is the only way".