Quantcast
Channel: Ignite Realtime : All Content - Openfire Dev
Viewing all articles
Browse latest Browse all 966

A few things that should really be improved

$
0
0

Hi there,

 

I've recently started into the plugin development of openfire. There are a few things so far that bug me. Since normal users can't add issues to the bugtracker I started this document and will update it as I continue in development. I think for most of these things there is no doubt that they are wrong. Maybe someone will add them to the issues.

 

Database creation and deletion

The plugin.xml template specifies how you have to name your SQL-Files and where to put your updates. This is a good thing, but it has some flaws:

  • The databaseKey could be removed. Instead there should ne exactly one file, named after the name of the plugin (like given <name>-tag) and with the database type as a suffix. Example: my-pluigin_mysql_install.sql
  • You may have noted the install suffix. Yeah! Sadly you can't tell openfire to delete your tables after you removed the plugin. This is bad. An unexpirienced user is not able to distinguish between tables he needs and tables he does not. Instead there should be a my-pluigin_mysql_uninstall.sql file that takes care of deleting all remaining tables. Openfire should guarantee that the database is up to date before executing this uninstall script.
  • Instead of having the plugin to set its database version let openfire do this. There is no need to have the plugin set its database version itself. Furthermore: It is not clear, what name should be user for the "name"-column. I assume it has to be the plugin name but I could not find an clear answer to this question.

 

Cameluppercase for database tables

I've never seen this EVER before. Please use underscores and only lower letters. Otherwise it's not possibly to just copy over a databse from windows to linux.


Viewing all articles
Browse latest Browse all 966

Latest Images

Trending Articles



Latest Images