Skip to content
Petr Bena edited this page Aug 23, 2017 · 10 revisions

This is a guide that may help developers who are new to huggle project. Before you decide to jump into huggle development, you should get yourself familiar with huggle, at least by installing it and running it.

Before you start writing Huggle code, make sure to read Coding style

In order to develop huggle you should understand C/C++, HTML and MediaWiki

First of all, you should run huggle with parameter --help - that will show you some options that as a developer you would use very often, especially these 2:

  • -v: increases verbosity, you want to start huggle with this option every time you are debugging it
  • --qd: dump RAW traffic between mediawiki and huggle

Where to start

Huggle is talking to MediaWiki through APIs using so called queries, there is a number of query types in huggle, they are all inherited from base type Query. Most often you will see instances of ApiQuery. The query objects make it very simple for developer to use API in order to asynchronously retrieve some data from a wiki.

Garbage collector

There is a garbage collector in huggle called just GC. You may not need to directly interact with it, because it works fully automatically. It is able to manage all objects that are inherited from class Collectable. What is important to know is, that every object inherited from collectable should never be manually deleted. There are 3 types of memory objects in huggle:

  • Unmanaged
  • Unmanaged collectable
  • Managed collectable

Unmanaged objects are always manually handled by a programer. If you create an instance of collectable, it may, or may not be (depending on its constructor) become managed.

Clone this wiki locally