You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Existing "Best Practices" is a mix of real best practices and "things you must do to make it work" I'd like to distinguish those, and put together a list of real best practices for 2.0.
Hopefully, very early in the process of upgrading plugins we can nail these down, and get things written up for us to follow.
Draft of the page is underway at Documentation/build/html/Tutorials/bestPracticesPlugins.html
On the list --- updated according to comments and discussion below
Method Naming Conventions
Maintaining Expected behavior -- e.g., if you override browseAction, keep the expected hooks in place
User View Partials
Put form-building logic in controller, not in extending Omeka_Form or Omeka_Form_Admin
Use Omeka_Form or Omeka_Admin_Form or view helpers
Use Omeka_Plugin_AbstractPlugin
When and how to override Omeka_Record_AbstractRecord::recordUrl()
Maintain admin look and feel (Omeka_Form_Admin helps here, but should include new CSS classes and whatnot when form is too complex for Omeka_Form_Admin to easily handle)
Use HTML5
Use nav(), and include a name for your nav so other plugins can filter it
Make your content searchable
Follow Omeka's guidelines for functions e.g., globals don't echo (need to document these)
Internationalization (need to figure out/document adding new i18n files)
Omeka Jobs -- default and long-running. When and why to choose
The text was updated successfully, but these errors were encountered:
Some of these are in the category of 'needed to just make it work', and so will go in an updating plugins and basic plugin development sections. Others are 'best practice' in the sense that a plugin will still work if done another way, but people should be aware of the better way to do something. For example, the new API, hooks, etc. stuff is 'make it work', while using Zend form view helpers is the better/preferred way to build forms. Some are kind of a mix, like how to do validations now that some hooks have been removed (this came up in IRC a while ago).
Internationalization is a big important one. Seems like we want to say using __() is a best practice, but we also need to make an easier path to updating translations without waiting for a new release. We're seeing this in forums and dev list already.
Existing "Best Practices" is a mix of real best practices and "things you must do to make it work" I'd like to distinguish those, and put together a list of real best practices for 2.0.
Hopefully, very early in the process of upgrading plugins we can nail these down, and get things written up for us to follow.
Draft of the page is underway at Documentation/build/html/Tutorials/bestPracticesPlugins.html
On the list --- updated according to comments and discussion below
The text was updated successfully, but these errors were encountered: