Dear SMW (extension) developers,

SMW 1.4 brings a number of internal API changes that will require most 
extensions to change details in their code. In most cases, it will suffice to 
change the name of some class or function slightly, and some special parts of 
code might become obsolete. This can be seen already on SVN (and on the online 
API docs), but for your convenience, we have now also released an alpha 
version that is in a working state (hopefully) and that includes most changes 
that we intend for SMW 1.4. Quoting from semantic-mediawiki.org:

"Oct 26 2008. Version 1.4 of Semantic MediaWiki will largely unify the 
treatment of "special properties" (like has type) and normal user-defined 
properties. Both can be queried in essentially the same ways, and new 
"special" properties will be introduced to allow new features. Together with 
other required clean-ups, this brings some changes for developers using SMW 
for their own extensions. To help extension developers in producing compatible 
updates for their software, the SMW Project releases an alpha version of SMW 
1.4 which already includes all major internal API modifications. While many 
details changed their appearance, upgrading code to SMW 1.4 should in many 
cases boil down to some search and replace of small code pieces. Details will 
be discussed on the developer mailing list

* Download: http://semantic-mediawiki.org/w/images/semediawiki-1.4d-
alpha.tar.gz 

Users are also invited to test the alpha version, but it is not recommended to 
use it on production sites yet. In particular, extensions for SMW 1.3 will 
most likely not work with SMW 1.4 without changes."


The main change is that all properties are now represented by objects of a 
class SMWPropertyValue (see its online API doc), and no longer using Title 
objects and numbers (for special properties). In most cases, you do not longer 
distinguish between "special" and normal properties, but the SMWPropertyValue 
has functions to ask whether the property is one that should be shown to users 
or not (e.g. if it is internal and has no label at all). This is the main 
change, and it affects essentially all functions of SMW that take properties 
as arguments. It is usually easy to fix the type errors that you will get when 
using these functions with the old parameters. Some functions have also simply 
vanished (all with "special" in their name are just obsolete). 

In addition, the interface of SMWDataValue has changed slightly, since it uses 
the new property objects as well. In addition, some features that are really 
belonging to properties (getting a properties type) have moved to the new 
property class.

As a bonus, SMW 1.4 offers new hooks that allow you to:
* Add your own pre-defined ("special") properties in PHP, e.g. to have a pre-
declared property or your extesnsion (see SMWPropertyValue for this hook).
* Modify the Factbox layout as you like, using your own code to format the 
output (see SMWFactbox for this hook).

Feel free to ask questions if you want more details on some new design or on 
some required change. Otherwise it is probably also helpful to look at SMW 
code using the new methods, especially compared to SMW 1.3 code.

Cheers,

Markus

-- 
Markus Krötzsch
Semantic MediaWiki    http://semantic-mediawiki.org
http://korrekt.org    [EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to