Skip to content

Dev.Module Workflow

taiwen edited this page Mar 14, 2013 · 2 revisions

Module Development Workflow

Step 1: Features and Requirements

1: Feature description

  • Output: text and list

2: Use cases

  • Output: text and list with diagram (MS Visio)

3: Flowchart

  • Business
  • System
  • Output: diagram (MS Visio)

Step 2: Design

1: Detailed flowchart

  • Output: diagram (MS Visio)

2: Meta design

  • Output
    • list

3: Controller && Action design

  • Output

    • List
  • List Template

    • IndexController
      • indexAction
        • GET: $param1, $param2, ...
        • POST: $param1, $param2, ...
        • AJAX: No
        • Template: index-index.phtml

4: Database Design

  • Output

    • Table
      • Name
      • Type
      • Length
      • Default value
      • Description
    • Tables relationship
      • Tools: Workbench
  • Table Template:

Name Type Length Default value Description
id int 10 NULL AUTO_INCREMENT PRIMARY UNIQUE

5: Api design

  • Output

    • List
      • Package
      • Method to Call
      • Description
      • Parameters
      • Return Values
      • Example
  • List Template:

    • Test($name, $options = array())
      • Package: src/Api.php
      • Calling: Pi::service('api')->demo->test($name, $options);
      • Description: Test method
      • Parameters:
        • $name: name
        • $options: optional parameters
      • Return Values: boolean
      • Examples:

    $result = Pi::service('api')->demo->test('test);

6: Config design

  • Output

    • List
      • Name
      • Title
      • Description
      • Category
      • Type
      • Default value
  • List Template:

    • max-list-per-page
      • Title: item count
      • Description: max list count per page
      • Category: general
      • Type: text
      • Default value: 40

7: Form design ?

  • Output

    • List
      • Filename
      • Section(admin or front)
      • Name
      • Title
      • Description
  • List Template

    • AddForm
      • Section: admin

8: Block design

  • Output

    • List
      • Description
      • Config list
        • Name
        • Type
        • Description
        • Default values
  • List Template

    • RecentUser
      • Description: List recently log in users
      • Configs:
        • list-count
          • Description: total list count
          • Type: text
          • Default values: 40

9: Page design

  • Output
    • List
      • Name
      • Access
      • Block
      • Controller
      • Action
      • Section

10 Resource design

  • Output

    • List
      • Name
      • Access
      • Parent
      • Section
  • List Template

    • test
      • Section: admin
      • Access: manager, staff

11 Navigation

  • Output

    • List
      • Items
        • Name
        • Levels
        • Url
        • Controller
        • Action
        • Route
        • Callback
  • List Template

    • list
      • Route: admin
      • Controller: index
      • Action: list
      • Callback: Module\Demo\Navigation::admin
      • Levels: 1

12 Route design

  • Output

    • List
      • Route Configuration
        • Name
        • Priority
        • Prefix
        • Type
        • Options
        • Default Action
      • Custom urls
        • Url
        • Controller and action
  • List Template

    • Route

      • Name: channel
      • Type: Module\Channel\Route\Channel
      • Priority: 100
      • Options:
        • Parameter Delimiter: '/'
      • Default Action:
        • Controller: index
        • Action: index
    • Custom Urls

      • domain/login
        • Controller: index
        • Action: login

Step 3: Coding

1: Basic coding

2: Install

3: Complete business logic

4: Template integrated

Step 4: QA

1: Functional testing

2: Performance testing

  • AB
  • 并发
  • 时间
  • DB
  • etc

3: Security testing

  • SQL Injection
  • Escape
  • etc
Clone this wiki locally