laminas / documentation

Documentation repository for the Laminas Project components.
10 stars 7 forks source link

Each component should contain a description of how it can be used in an application #8

Open froschdesign opened 6 years ago

froschdesign commented 6 years ago

Problem

At the moment, most components only describe basic usage without integration and use within an application. This ends up in recurring questions from users how a component can be used in a zend-mvc-based or zend-expressive application.

Examples

Suggestion

We should add for each component a description of how the component can be used in an application. It would be advantageous if we add descriptions for:

The description should covered only a basic example how a component can be integrated in an application. For examples that illustrate full functionality, the tutorials should be used. The descriptions for application integrations should only be bundles of individual descriptions, which should already exist in the components. Therefore links must be set for all steps.

Requirements

Examples

An example can be found at zend-navigation:

Usage in a zend-mvc-based application

The fastest way to get up and running with zend-navigation is:

  • Register zend-navigation as module.
  • Define navigation container configuration under the top-level navigation key in your application configuration.
  • Render your container using a navigation view helper within your view scripts.

https://docs.zendframework.com/zend-navigation/quick-start/#usage-in-a-zend-mvc-based-application

Another example can be found at zend-i18n (WIP):

Usage in a Slim Application

The following examples show two options for using the Translator of zend-i18n in the micro framework Slim.

https://froschdesign.github.io/zend-documentation-showcase/application-integration/slim/

Already present

For laminas-mvc based applications

See also: https://docs.laminas.dev/tutorials/#application-integrations

For Mezzio based applications

Project

There is a project that tracks progress on this topic: https://github.com/orgs/laminas/projects/3

settermjd commented 6 years ago

As zend-mvc and zend-expressive build on these components and people will logically want to use them together, this makes a lot of sense.