Best Practices for Elgg Plugin        Developers             Cash Costello        ElggCamp San Francisco
Best Practices for Elgg Plugin        Developers             Cash Costello        ElggCamp San Francisco
About MeElgg core developerAuthor of Elgg Social Networking 1.8Employed by Johns Hopkins University Applied Physics Labora...
1. Namespace your functions, classes, actions,          views, CSS, JavaScript
2. Make dependencies between plugins explicit Plugin manifest, function_exists(), elgg_is_active_plugin()
3. Create a site customization plugin as a catch all              for small modifications   Maintain a readme with list of...
4. Keep your plugins start.php trimelgg_register_library(), elgg_load_library(), class with static  methods
5. Use inheritance with Elggs data modelRemember to unregister your class when your plugin is disabled using the deactivat...
6. Document what metadata is used with your                 entities@property in documentation of class or use getter/sett...
7. Avoid using many metadata key-value pairs           with elgg_get_entities*()
8. Use Elggs functions and classes when     interacting with the data model
9. Be aware that setting metadata on an entity        clears Elggs database cache
10. Use relationships to connect entitiesNot metadata!
11. Do not create large views
12. Create views that correspond to visual                 elementsAlso look for common elements that can be reused
13. Use the core views and CSS classes           whenever possible
14. Learn the principles behind Elggs new HTML/                       CSS  Example: CSS selectors should not cross element...
15. Test with non-admin user and while logged                     out
Upcoming SlideShare
Loading in...5
×

'Best Practices for Elgg Plugin Developers' Cash Costello #ECSF

9,733

Published on

Published in: Education, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
9,733
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

'Best Practices for Elgg Plugin Developers' Cash Costello #ECSF

  1. 1. Best Practices for Elgg Plugin Developers Cash Costello ElggCamp San Francisco
  2. 2. Best Practices for Elgg Plugin Developers Cash Costello ElggCamp San Francisco
  3. 3. About MeElgg core developerAuthor of Elgg Social Networking 1.8Employed by Johns Hopkins University Applied Physics Laboratory (JHU/APL)R&D in machine learningDriving force behind JHU/APLs collaborative platform built on Elgg
  4. 4. 1. Namespace your functions, classes, actions, views, CSS, JavaScript
  5. 5. 2. Make dependencies between plugins explicit Plugin manifest, function_exists(), elgg_is_active_plugin()
  6. 6. 3. Create a site customization plugin as a catch all for small modifications Maintain a readme with list of customizations!
  7. 7. 4. Keep your plugins start.php trimelgg_register_library(), elgg_load_library(), class with static methods
  8. 8. 5. Use inheritance with Elggs data modelRemember to unregister your class when your plugin is disabled using the deactivate.php script with update_subtype()
  9. 9. 6. Document what metadata is used with your entities@property in documentation of class or use getter/setter methods
  10. 10. 7. Avoid using many metadata key-value pairs with elgg_get_entities*()
  11. 11. 8. Use Elggs functions and classes when interacting with the data model
  12. 12. 9. Be aware that setting metadata on an entity clears Elggs database cache
  13. 13. 10. Use relationships to connect entitiesNot metadata!
  14. 14. 11. Do not create large views
  15. 15. 12. Create views that correspond to visual elementsAlso look for common elements that can be reused
  16. 16. 13. Use the core views and CSS classes whenever possible
  17. 17. 14. Learn the principles behind Elggs new HTML/ CSS Example: CSS selectors should not cross element boundaries
  18. 18. 15. Test with non-admin user and while logged out
  1. Gostou de algum slide específico?

    Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

×