Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behavior Documentation #317

Open
gossi opened this issue Sep 10, 2014 · 0 comments
Open

Behavior Documentation #317

gossi opened this issue Sep 10, 2014 · 0 comments

Comments

@gossi
Copy link
Contributor

gossi commented Sep 10, 2014

Hey guys,

I slipped through the behavior documentation to find some information, which I didn't find at the end. I realized, there is information for two different types of people. Behavior consumers and behavior developers. However, these information are mixed up and there is no clear structure (e.g. "How to write your own Behavior" at two different locations). So I thought a little bit about restructuring this part and would also be willing to contribute some of the parts. Here is my idea on how to structure them:

Basics > Behaviors (this is for consumers) and should contain the following contents:

  • Hooks
  • Introduction to behaviors
  • Available Behaviors

    Which lists the bundled behaviors (not just the name, also a short description of what it does, the tagline) and a description on how to find more behaviors, e.g. link to user contributed behaviors (that work with propel2) and a link to search packagist (hint: https://packagist.org/search/?type=propel-behavior)
  • Using Behaviors

    Which als contains a section of customizing and applying them on a database level
  • Write your own Behavior

    A short introduction test, this is easy and a link to the "How to write your own Behavior" doc (see below).

How to write your own Behavior
This can and should be split into three parts:

  1. Explaining the API and terminology

    An explanation to all the basics and the Propel API that is available to write your own behavior. Which classes to use and to extend, getting parameters, setting defaults and also best practices, such as Object- and QueryModifier classes. Stuff that currently is available at http://propelorm.org/documentation/06-behaviors.html#writing-a-behavior. And also how to use composer for your behavior and how to publish it, to make it searchable through packagist (see link above).
  2. How to use the Propel API

    Basically stuff from here: http://propelorm.org/documentation/cookbook/writing-behavior.html
  3. Test your behavior

    That was the part I was looking for. From setting up over local development to a test-matrix on travis.

Maybe, extract the part of how to publish your behavior, give also help for the documentation and probably provide a markdown template for documentation (that can be easily used e.g. as the readme for a github-project) - see below.

This part should be located under the cookbook and the behavior section should be used to document available behaviors.

Behavior Documentation
Can there be a consistent structure, that is used across all documented behaviors to establish a reliable (and would also be part of the documentation template as mentioned above).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant