XenForo 2.0 is being completely rewritten. It's a huge project and will have an impact on addon development. The XF Development Team will release a developer version and allow addon developers the opportunity to learn how the 2.0 will influence addon development.
On the 2.0 alpha demo site, Chris, Mike, and many others on the XenForo development team are providing hints about changes to coding in XenForo 2.0. Please add any that I've missed in the comments below.
I. PHP Requirements
II. Services
III. Data Access
- The base unit for working with data is no longer a bare array. It is now an object that represents the specific type, giving you access to call methods on that object or access other data related to it trivially (getting the forum from a thread from a post).
- While you can still write SQL directly, most data access is done through a builder object. The builder can control what related data is fetched, what conditions are applied (including against related data) and the order of the results. This can be done in any order.
PHP:
$finder = $this->em()->finder('XF:Post')
->where('thread_id', 123)
->with('Thread')
->onPage(2)
->orderByDate();
$post = $finder->fetchOne();
$thread = $post->Thread; // this was fetched with the query
$forum = $thread->Forum; // this is silently fetched as needed
if ($forum->canView()) { /* ... */ }
if ($forum->isUnread()) { /* ... */ }
IV. Namespaces
V. Addon conventions
VI. Widgetized system
The team will discuss later
VII. Custom thread fields
VIII. Developer documentation
IX. External Accounts Framework and here.
X. Miscellaneous
And directly from Mike, we learn tons of information on the backend.
We will end with Mike's note from August (emphasis added):