PHP/Symfony Data Jukebox Bundle

Forget all about views. Concentrate entirely on the model.

Table of Contents

  • Usage
  • Further documentation
  • What is the Data Jukebox Bundle ?

    The Data Jukebox Bundle is a PHP/Symfony bundle which aims to provide - for common CRUD (Create-Read-Update-Delete) operations - the same level of abstraction that Symfony does for forms.

    By defining and associating so-called Properties to standard ORM (Object Relation Mapper) Entities, one can generate fully-featured list and detail views for those entities, as easily as one generates forms.

    The same Properties are used to generate Symfony forms even easier, by automating the form building process.

    Developpers can thus concentrate entirely on the data model and have all views build automatically, with just a few lines in the corresponding controllers.

    Specifications

    Dependencies

  • [MUST] Symfony 2.7 or later
  • [MUST] PHP 5.3.9 or later
  • Features

  • new DataJukebox service
  • new Properties class and corresponding entity annotation
  • automated list/detail/form view generation
  • fully-featured list/detail views, including:
  • browsing controls ("First", "Previous", "Next", "Last" buttons)
  • fields display (show/hide) controls
  • fields sorting controls (allowing multiple fields criteria)
  • fields filtering controls (using a rich expression language)
  • global search controls (using a rich expression language)
  • CRUD operations controls (view detail, update, delete links and buttons)
  • versatile Properties control based on the action ('list', 'detail', 'insert', 'update', etc.) and authorization level (user-defined)
  • fine-grained Properties, including:
  • localized fields labels and tooltips
  • displayable fields (in the list/detail/form views)
  • default-displayed fields (for ergonomic presentation of data)
  • hidden fields (that must be fetched from the database but not displayed)
  • required fields (that may not be hidden or must be data-filled in forms)
  • read-only fields (that may not be modified in forms)
  • fields default values (when creating new data in forms)
  • fields links (for powerful data-driven hyperlinks)
  • orderable fields (fields that may be used for data sorting)
  • filterable fields (fields that may be used for field-based data filtering)
  • searchable fields (fields that are used for global data filtering)
  • additional form options (for further customizing forms)
  • additional links (for powerful data-driven hyperlinks)
  • Licensing

    The Data Jukebox Bundle is distributed under the GNU General Public Licence (GPL) Version 3. The PHP Data Jukebox Bundle includes all resources which contain the mention Data Jukebox Bundle in their documentation and licensing preamble.

    Other Open Source resources may come bundled with teh Data Jukebox Bundle release packaging; they are (and must be) used according to their original licence (look for copyright-related files in the folder hierarchy).

    Downloading

    download tree...

    Build

    NOTE: By "build", we mean create the necessary tarballs/package required for installation (according to the Installation section below) or distribution.

    [MUST] Obtain the source code

    $ git clone https://github.com/idiap/symfony-bundle-datajukebox
    

    [OR]

    $ tar -xjf symfony-bundle-datajukebox-source-1.0.20150909.tar.bz2
    $ cd symfony-bundle-datajukebox-1.0.20150909
    

    [MAY] (Re-)build the source tarball

    $ ./debian/rules build-source-tarball
    $ ls -al ../symfony-bundle-datajukebox-source-1.0.20150909.tar.bz2
    

    [MAY] Build the installation tarball

    $ ./debian/rules build-install-tarball
    $ ls -al ../symfony-bundle-datajukebox-1.0.20150909.tar.bz2
    

    [MAY] Build the documentation tarball

    $ ./debian/rules build-doc-tarball
    $ ls -al ../symfony-bundle-datajukebox-doc-1.0.20150909.tar.bz2
    

    [MAY] Build the debian packages

    $ debuild -us -uc -b
    $ ls -al ../symfony-bundle-datajukebox_1.0.20150909_all.deb ../symfony-bundle-datajukebox-doc_1.0.20150909_all.deb
    

    [MAY] Build the debian source package

    $ debuild -I'.git*' -us -uc -S
    $ ls -al ../symfony-bundle-datajukebox_1.0.20150909.dsc ../symfony-bundle-datajukebox_1.0.20150909.tar.gz
    

    [SHOULD] Do it all with a single command

    $ ./debian/rules release
    

    Installation

    WARNING: The Data Jukebox Bundle is actively maintained on Linux. It has not been tested on other platforms.

    NOTE: We assume a previously working PHP/Symfony setup.

    [MUST] Install the Data Jukebox Bundle

    [OR] using the installation tarball

    $ INSTALL_DIR='<installation-directory>'
    $ cd "${INSTALL_DIR}"
    $ tar -xjf symfony-bundle-datajukebox-1.0.20150909.tar.bz2
    

    [OR] using the debian package

    $ dpkg -i symfony-bundle-datajukebox_1.0.20150909_all.deb
    

    [MAY] Install the Data Jukebox Bundle documentation

    [OR] using the documentation tarball

    $ DOC_DIR='<documentation-directory>'
    $ cd "${DOC_DIR}"
    $ tar -xjf symfony-bundle-datajukebox-doc-1.0.20150909.tar.bz2
    

    [OR] using the debian package

    $ dpkg -i symfony-bundle-datajukebox-doc_1.0.20150909_all.deb
    

    [OR] using the source tarball (and PhpDocumentor)

    $ DOC_DIR='<documentation-directory>'
    $ pear install -o PhpDocumentor
    $ tar -xjf symfony-bundle-datajukebox-source-1.0.20150909.tar.bz2
    $ cd symfony-bundle-datajukebox-1.0.20150909
    $ ./doc/util/makedoc DataJukeboxBundle "PHP/Symfony Data Jukebox Bundle" "${DOC_DIR}" src doc/phpdoc
    

    Usage

    The Data Jukebox Bundle integrates Symfony the same way as any other bundle. Thus, make sure to:

  • add the corresponding namespace to your application autoload.php
  • instantiate the DataJukeboxBundle in your application AppKernel.php
  • create/update all assets:
  • $ ./app/console assets:install --symlink --relative <web-directory>
    
  • dump Assetic resources:
  • $ ./app/console assetic:dump <web-directory>
    

    Also refer to the Data Jukebox Tutorial (and Bundle) for detailed explanations on how to use the Data Jukebox Bundle and unleash its full power.

    Further documentation

    The full documentation of the Data Jukebox Bundle (including source code) is part of this (phpDocumentor-generated) HTML documentation; make sure to browse through the expandable tree located on the left of this text, as well as switch the documentation context using the drop list located on top of this text.

    Documentation generated on Mon, 29 Feb 2016 15:49:54 +0100 by phpDocumentor 1.4.4