Plugin Creation: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
No edit summary
Line 133: Line 133:
== What Else? ==
== What Else? ==


Upon submitting your plugin for release with us, you will be moved to a new group in the BBoard. After this, you can help other who need help with your plugin the the User Made sub forum.
Upon submitting your plugin for release, you will be moved up to a new group in the [http://forum.uniformserver.com BBoard]. After this, you can help others who need help with your plugin in the the [http://forum.uniformserver.com/index.php?showforum=12 User Made] sub forum.





Revision as of 02:51, 11 April 2005

This article is still under editing. Some things still needs to be added and some clarified.

Making Plug-Ins for The Uniform Server

Most users like the fact that the Uniform Server is small and mobile. Most love it because they get to work more with it and develop things under it. Most like it because they get to add their own add-ons easily. No matter what we all like the Uniform Server for, it is good as long as everyone can contribute.

This documentation is one of the most requested documentation in the community and that it is, how to make plugins for the Uniform Server.

Though I will not take you step by step into making the plugins, I will tell you most of the things you need to know and some examples.

Must Know

When making plugins for the Uniform Server, you have to consider some things.

  1. What kind of plugin am I making?
  2. Who or what kind of community is it for?
  3. What do I need?
  4. Does size matter?
  5. and Security!

Thou this might not be a complete list of everything you need to know, I will try and keep it updated as I think more about it.

Starting Off

O.k., you have everything ready and you are about to start making the plugin. Here is what we do, since the development of version 3.3, we started a new system to make things easy for us and other developers who take interest in our program. We started a new kind of plugin structure. Unlike before where there was just 1 plugin directory, now we have 2. Why? This helps us and the users feel safe about their server. Before we used to put all the plugins under the “/home/admin/www/plugins” folder, but now we have a new folder for server made plugins. “/plugins”

The “/plugins” folder was made for 2 reasons, security and simplicity. When making a plugin related to the server, we use the “/plugins” folder, and when making plugins relating to the admin panel, we use the “/home/admin/www/plugins” folder. This allows the server to be safe from treat especially if the plugin for the server is powerful.

On Board for Plugin Land

Now you know the basics but there are still some things I need to make clear off. When making plugins that integrate with the server as one (for example: Resin or Tomcat,) we use the “/usr/local/<plugin-name>/” folder. AS you can see how we did the Resin3 plugin, all files pertaining to Resin 3 are kept in the “/usr/local/resin3” folder just as Apache 2 files are kept in “/usr/local/apache2”. This is simplicity.

In version 3.3 we also implemented a new system for the htpasswd files. We made a “/htpasswd” folder for htpasswd file to be kept in. In this directory, all directory are kept in-act. For example, if you have a htpasswd file for a test directory under the “/www” folder, you have to make “/htpasswd/www/test” and place the file under their. This is security and simplicity because it protects the file form the wrong hand since that directory is not viewable or anything by anyone but you.

Plugin Land

There are so making things that the Uniform Server is capable of running or integrating with, but we the developers try our best to release what we fell is needed ASAP. A lot of things can be integrated with Apache and we all know that and probably most of you have thought about making that your special small project one day. To try and integrate this with Apache or any other thing the Uniform Server has to offer. Most have actually done it and most are still leaving that at the bottom of the to-do list.

If you fell you would like to join the user-developer community and really help out, you can. , Search the Plugin File System at SourceForge and make sure that none of the plugins you are trying to make is already available, and then send an email to us at dev-com@uniformserver.com. Make sure that the email contains what kind of plugin you are making and some brief info. After that, if you need help or support, you can start a thread in the User Made sub forum. We would also try and do some study and then get back to you with as much information as we can.

If you do not know what kind of plugin you would like to make, you can check the list of feature request in the Feature Request system at SourceForge, do a search on Google, or start a poll or thread in the Open Discussion forum about what kind of plugins is really needed that is not available.

Start the Plugins!

So you have picked what feature you want to add to the Uniform Server and you are about to start the development. Make sure you read the “Starting Off” and “On Board for Plugin Land” for information on the directory structure of the Uniform Server.

To get back to starting off, first you want to test your plugin if it is also a standalone feature (eg. Resin or Tomcat.) If it is not a standalone types of plugin, start developing and integrating it according to the manual or the step by step instructions given to you by the creator(s). Make sure that you know what you are doing and that you are using a test server so that you do not mess up your own personal one. I personally have 2 development servers for this :).

After everything is set, start the server and follow on with the instructions to see if the plugin is really working.

If it is not working, you can get help from the creators or in our BBoard.

After Effect Show

You have tested the plugin and see everything is working perfectly and going according to plan. Yes, I can see you are happy and glad and probably want me to go on with the instructions. To get back on track, after testing everything and seeing that everything you have done in the last X days or X hour is ready for the world, you have to start the packaging and cleaning.

First you have to clean. What do I mean by cleaning? Most program/scripts are packed with some unneeded files like README or something like that. We usually delete them to save space if we are going to release it as a plugin. The only file we normally leave behind is the LICENSE file and that is because it has to stay intact if it is placed there.

Other files can also be deleted that are not needed. Some programs are made to work with both Windows and *nix and therefore pack both packages into one. You can delete those file you think were made for any other OS, other than Windows.

Packaging

We use a very neat way to pack our plugin files. If you can see the PHP4 plugin package and the Resin3 plugin package, we packed all the files into one folder because it does not require you putting this file in 1 directory and this in the other.

If you have a plugin that requires this file to be in one folder like the Apache Modules folder and the other in the PHP Extensions folder, you have to pack it a different way. First you have to start from the root of the folder. If the files are to be placed in multiple directories, you have to start from the main drive.

If a file is to be placed in the Apache Modules folder, you have to have the “/usr/local/apache2/modules” folder available. This means that the start folder after unpack will be “/usr”

I am sure you get the idea now because my hands are getting tired of this laptop keyboard.

After you have set everything in place, make a doc. This is the READ ME.txt file. This file has to be named READ ME.txt

The READ ME.txt file should follow this format:

----------------------------
PluginName FOR UNISERVER !!!
----------------------------

Hi, and thanks for downloading this great plugin for The Uniform Server.
The PluginName is…


---------------------
INSTALLING PluginName
---------------------

1. Direction to installing the plugins…
2. Copy this file where…
3. Integrating…
   - Find the line: Blah Code
   - Replace with:  Blah
   - Place this code…
   #----------------#
     Blah Blah Code
   #----------------#


----------------------
LITTLE TROUBLESHOOTING
----------------------

1. Any kind of error that might appear that you know can be solved by…
2. For support go to our forum at http://forum.uniformserver.com


-----------------------------------------------------------
Copyright 200X YourName
All rights reserved.

The authors were trying to make the best product so they 
cannot be held responsible for any type of damage or 
problems caused by using this or another software.

You can check other plugins for the format and method used for something.

Ahoy, Captain

That title probably does not sound right, but that is the one thing I can think of now for some reason. After packing everything, send a copy to dev-com@uniformserver.com. There, we will review it and make sure everything is in place.

Please do not send plugins in without the READ ME.txt file!

After review, we may do some modifications if we feel it is needed, and then we will send a copy of the modified version back to you for review and acceptance.

After you have accepted the review copy, we will release it into the File System for the whole world to see what you have been working so hard on.

Then, you are done!

What Else?

Upon submitting your plugin for release, you will be moved up to a new group in the BBoard. After this, you can help others who need help with your plugin in the the User Made sub forum.