XF 2.0 Model classes in XF2

Cupara

Well-known member
I understand that model classes from XF1 are not used in XF2, so what is the new method replacing model classes? That is the main issue I'm having right now in finding out the method replacing models.
 
From the Docs:

Repositories are a new concept for XF2, but you might not be blamed for comparing them to the "Model" objects from XF1. We don't have a model object in XF2 because we have much better places and ways to fetch and write data to the database. So, rather than having a massive class which contains all of the queries your add-on needs, and all of the various different ways to manipulate those queries, we have the finder which adds a lot more flexibility.
 
Thank you @LPH appreciate that. Too much reading on the docs and I overlooked that or forgot it. I should stop reading stuff all in one night. LOL
 
  • Like
Reactions: LPH
I need to do the same thing. Just have it bookmarked for when I need to refer back to it.

Been reading it myself and trying to learn. I don't think many people know that the demo portal add on is actually not that bad of an add on in itself as the source code is provided. I hope to code my first add-on soon. It may take some time though
 
Been reading it myself and trying to learn. I don't think many people know that the demo portal add on is actually not that bad of an add on in itself as the source code is provided. I hope to code my first add-on soon. It may take some time though
I come from coding XF1, I did the demo portal to learn the basics of the code but some things that aren't covered I'm sure I'll be back to ask about. The demo portal is great for learning the new coding of XF2, much different than XF1 and I think it is much cleaner.
 
Also I want to add thanks for the demo portal I learned how to do repositories with ease so I suggest everyone looking to develop add-ons do the same, follow the demo portal doc first.
 
Back
Top Bottom