As I said earlier, I would like to make gadget that will display suggestions on dashboard. I was wondering if anyone had any pointers they could give me on the process of making a custom app and gadget.
As you can see Anahita follows MVC design patterns in it's components. Anahita's Model is repository and domain entities. Anahita also places a graph architecture on top of the mysql database which is a relational database. An MVC triad is called a component. A package may contain multiple components.
Anahita supports component inheritance. For example media publishing apps (Todos, Topics, et.) are extending the com_medium. Groups and People apps both extend the com_actors component.
Anahita controllers have the main actions called BREAD (Browse, Read, Edit, Add, and Delete). For example _actionBrowse displays a list of entities or _actionRead displays an individual entity. There are two entities that you will be used most the time. Nodes and Graphs, because social networks are a network of nodes connect with graphs and some of the nodes exchanges messages (stories) that's why we call it the Nodes-Graphs-Stories architecture.
This is an old article the describes Anahita's lingo
now for building the suggestions app (components used directly by users) you don't even need to implement BREAD. Only the BR would do. The most challenging part is implementing the algorithm where each request checks the viewer against the list of conditions that I posted for you earlier and comes up with 1 or multiple suggestions https://www.getanahita.com/topics/161217-suggest-friends#scroll=161353
I don't know how to implement it yet until I sit down and code it myself. It is one of the apps on our 4.* road map.
So start code reading and try building an example app of your own which does a BREAD operation on a node entity. For example Blogs or Books, etc. Code reading and practicing is the best way to learn a new framework.
I'm still confused. To me, it doesn't look like $context->query should ever return something, since I don't see query as a member of KCommandContext or any of the classes it is inheriting from. I'm not incredibly familiar with php, but it seems like one of those classes should have a query member, if you're accessing it with the -> operator. Am I mistaken?
I think to make matters less confusing it would be better if you focus on what problem you are about to solve and use the API and the code examples in the apps to make it happen. At first you many not know what happens underneath the app API and at the framework level and that's ok.
Anahita is the result of 4+ years of development and understanding the code at the framework level could take you months. You can however build apps without knowing the underlying magic within days. Gradually as you are developing more sophisticated apps, you can go to the deeper layers of the framework code and make sense of it over time.
You can always post your questions here. We have people here with little technical background who have successfully launched their projects with a few custom components and extensions. You can do that too.