Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 865951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:43:16+00:00 2026-05-15T09:43:16+00:00

I often find myself with fairly complex data that represents something that my objects

  • 0

I often find myself with fairly complex data that represents something that my objects will be working on. For example, in a task-list app, several objects might work with an array of tasks, each of which has attributes, temporal expressions, sub tasks and sub sub tasks, etc.

One object will collect data from web forms, standardize it into a format consumable by the class that will save them to the database, another object will pull them from the database, put them in the standard format and pass them to the display object, or the update object, etc.

The data itself can become a fairly complex series of arrays and sub arrays, representing a ‘task’ or list of tasks.

For example, the below might be one entry in a task list, in the format that is consumable by the various objects that will work on it. Normally, I just document this in a file somewhere with an example. However, I am thinking about the best way to add it to something like PHPDoc, or another standard doc system.

Where would you document your consumable data formats that are for many or all of the objects / methods in your app?

Array
(
    [Meta] => Array
        (
            //etc.
        )

    [Sched] => Array
        (
            [SchedID] => 32
            [OwnerID] => 2
            [StatusID] => 1
            [DateFirstTask] => 2011-02-28
            [DateLastTask] => 
            [MarginMonths] => 3
        )

    [TemporalExpressions] => Array
        (
            [0] => Array
                (
                    [type] => dw
                    [TemporalExpID] => 3
                    [ord] => 2
                    [day] => 6
                    [month] => 4
                )

            [1] => Array
                (
                    [type] => dm
                    [TemporalExpID] => 32
                    [day] => 28
                    [month] => 2
                )

        )

    [Task] => Array
        (
            [SchedTaskID] => 32
            [SchedID] => 32
            [OwnerID] => 2
            [UserID] => 5
            [ClientID] => 9
            [Title] => Close Prior Year
            [Body] => 
            [DueTime] => 
        )

    [SubTasks] => Array
        (
            [101] => Array
                (
                    [SchedSubTaskID] => 101
                    [ParentST] => 
                    [RootT] => 32
                    [UserID] => 2
                    [Title] => Review Profit and Loss by Class 
                    [Body] => 
                    [DueDiff] => 0
                )

            [102] => Array
                (
                    [SchedSubTaskID] => 102
                    [ParentST] => 
                    [RootT] => 32
                    [UserID] => 2
                    [Title] => Review Balance Sheet
                    [Body] => 
                    [DueDiff] => 0
                )

            [103] => Array
                (
                    [SchedSubTaskID] => 103
                    [ParentST] => 
                    [RootT] => 32
                    [UserID] => 2
                    [Title] => Review Current Year for Prior Year Expenses to Accrue
                    [Body] => Look at Journal Entries that are templates as well.
                    [DueDiff] => 0
                )

            [104] => Array
                (
                    [SchedSubTaskID] => 104
                    [ParentST] => 
                    [RootT] => 32
                    [UserID] => 2
                    [Title] => Review Prior Year Membership from 11/1 - 12/31 to Accrue to Current Year
                    [Body] => 
                    [DueDiff] => 0
                )

            [105] => Array
                (
                    [SchedSubTaskID] => 105
                    [ParentST] => 
                    [RootT] => 32
                    [UserID] => 2
                    [Title] => Enter Vacation Accrual
                    [Body] => 
                    [DueDiff] => 0
                )

            [106] => Array
                (
                    [SchedSubTaskID] => 106
                    [ParentST] => 105
                    [RootT] => 32
                    [UserID] => 2
                    [Title] => Email Peter requesting Vacation Status of Employees at Year End
                    [Body] => We need Employee Name, Rate and Days of Vacation left to use.
We also need to know if the employee used any of the prior year's vacation.
                    [DueDiff] => 43
                )

            [107] => Array
                (
                    [SchedSubTaskID] => 107
                    [ParentST] => 
                    [RootT] => 32
                    [UserID] => 2
                    [Title] => Grants Receivable at Year End
                    [Body] => 
                    [DueDiff] => 0
                )

            [108] => Array
                (
                    [SchedSubTaskID] => 108
                    [ParentST] => 107
                    [RootT] => 32
                    [UserID] => 2
                    [Title] => Email Peter Requesting if there were and Grants Receivable at year end
                    [Body] => 
                    [DueDiff] => 43
                )

        )

)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T09:43:18+00:00Added an answer on May 15, 2026 at 9:43 am

    I would document with and in the code that defines the data. One way to self document is to use classes with well named attributes instead of arrays or hashes when things start to become complex. Just use comments sparingly to clear up any unobvious areas. Assume that the is smarter than you and avoid comments that clutter things.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 488k
  • Answers 488k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer AIR 2.0 is able to run native processes and read… May 16, 2026 at 8:45 am
  • Editorial Team
    Editorial Team added an answer You've got it set in your Web.Config, which is fine… May 16, 2026 at 8:45 am
  • Editorial Team
    Editorial Team added an answer Static variables are instantiated (and thus, constructor code run) before… May 16, 2026 at 8:45 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have two search/replace commands that I find myself running in vim fairly often
I often find myself writing a property that is evaluated lazily. Something like: if
Doing component-based development, I find myself doing this fairly often: public class SomeClass {
I've found myself limiting scope fairly often. I find it makes code much clearer,
Every now and again I find myself doing something moderately dumb that results in
I often find myself using Integers to represent values in different spaces. For example...
I often find myself needing a tool that would allow me to: search for
I often find myself in the following situation: The customer reports corrupt data in
I often find myself wanting to debug CSS layout issues that involve DOM changes
I often find myself doing something along the following lines in sql server 2005

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.