| | 1 | = Comment2 Module = |
|---|
| | 2 | [[TOC]] |
|---|
| | 3 | * requires >= Seagull 0.6.5 |
|---|
| | 4 | |
|---|
| | 5 | == Overview == |
|---|
| | 6 | The comment2 module demonstrates an easy to to add commenting to any of your existing modules. |
|---|
| | 7 | |
|---|
| | 8 | It offers several improvements over the existing module, namely |
|---|
| | 9 | * it's Ajax driven using jquery so no messy redirects are needed |
|---|
| | 10 | * Ajax submits and lists are very fast, making commenting more interactive |
|---|
| | 11 | |
|---|
| | 12 | The module also includes a www folder with web resources, ie CSS, javascript and images, demonstrating how easy it is to build these into your modules |
|---|
| | 13 | |
|---|
| | 14 | == Usage == |
|---|
| | 15 | This module is provided to demonstrate how easy it is to use jquery with Seagull. When the module is installed, you'll get a navigation element "comments" which invokes the example manager supplied with the module. |
|---|
| | 16 | |
|---|
| | 17 | The best way to follow the full Ajax workflow is, using the Zend debugger: |
|---|
| | 18 | 1. load the comments screen in Firefox |
|---|
| | 19 | 1. using the zend debug tool bar, select "next page" |
|---|
| | 20 | 1. write a new comment and hit submit |
|---|
| | 21 | |
|---|
| | 22 | This will start an interactive debug session where you can follow the workflow of the javascript calls. |
|---|
| | 23 | |
|---|
| | 24 | == Going Forward == |
|---|
| | 25 | The Ajax usage anticipates SGL_AjaxProvider2 that will be part of Seagull 0.9.x, the main features are: |
|---|
| | 26 | * $input and $output objects are available to every action method |
|---|
| | 27 | * jquery is used for the javascript library, which is quite a bit more succinct and powerful than prototype/scriptaculous |
|---|
| | 28 | * there are improved hooks for cleaning up JSON sent back to the browser |
|---|
| | 29 | * a raiseMsg() method has been added to SGL_AjaxProvider, making it much easier to send error/warning/info message back to the user |