Tips for Writing Midgard Applications
All Midgard applications should follow common guidelines to provide integration with each other, common configurability and look-and-feel. Important consideration is also how the application fits into the general Midgard environment. Here are several guidelines on writing Midgard applications:
- Utilize the Midgard Naming Guidelines for your project
- Remember that the Midgard community is international
- keep your application internationalized
- provide localization features
- Keep your namespace clean:
- Keep all code in snippets, all output in styles or snippets
- Place your snippets into either /ProjectName, or /tld/domain/projectname snippetdir
- Prefix all global variables with $ProjectName or $tld_domain_projectname
- Allow code sharing and reuse
- Follow PEAR Coding Standards
- Use either GNU GPL or LGPL license if possible
- Make your application E_ALL error reporting compatible
- Reuse common parameters and add your new ones to the registry
- Write your applications as MidCOM components when possible
- Support replication and easy installation
- Write only Repligard-safe applications
- Use yamp for packaging your application
- Provide smart defaults for all configuration settings
- Maintain transparency and contact with the community
- Release Early, Release Often
- Work using the Midgard CVS
- Announce your application on midgard-user and freshmeat
- Provide consistent user interface
- Follow the Midgard Visual Guidelines
- Use the GNOME Stock Icons
- Output valid XHTML in your web applications
- Enable styling the application via CSS or Midgard style elements
- Document your application well
- User documentation goes to Midgard Documentation
- Maintain development information on your project page
