What is Data Oriented programming?

22,599

Solution 1

First I want to say, that Data-oriented design and Data-driven programming is not the same!

In object-oriented programming you are focusing on a single object (class - its methods, members, etc.). In data-oriented design you are thinking how data is touched and processed. You just have a box that processes your input data to your output data (the ideal input data is the same as output).

All this was created to write high-performance applications. You are working on homogeneous, linear data - all to take the full advantage of CPU cache (both instruction and data).

Whenever you can, try to avoid hierarchical structures (use arrays instead), try to write functions that works on multiple data and use hot and cold structure splitting.

int Foo(int* input_data, int count)
{
    // do something with your data
}

Solution 2

As the name suggests, DOP intended for the development of data driven applications. It is not same as OOP. For further reference, go through the following links;

http://www.rti.com/whitepapers/Data-Oriented_Architecture.pdf

Alternate link here as the above one might not be working.

http://en.wikipedia.org/wiki/List_of_programming_languages_by_category#Data-oriented_languages

Share:
22,599

Related videos on Youtube

wizzardz
Author by

wizzardz

Updated on July 09, 2022

Comments

  • wizzardz
    wizzardz almost 2 years

    Can any one explain to me

    1. what is Data Oriented programming?
    2. Is Data oriented programming and functional programming the same?
    3. How is Data Oriented programming different from Object Oriented programming?
    4. Under what circumstances do we choose Data Oriented programming languages over Object Oriented programming languages?
  • wizzardz
    wizzardz over 13 years
    So Why DOP language is choosen over OOP language for creating Data Driven Applcation?Cant we create Data Driven Applcation using OOPs languages?
  • Mudassir
    Mudassir over 13 years
    Of course we can use an OOP language to develop data driven apps. But DOP languages provides special facilities for database apps development. Go through the Data Oriented Architecture PDF for details.
  • Anderson Green
    Anderson Green over 6 years
    Wikipedia includes these languages in its list of data-oriented languages, but I'm not sure if the list is accurate.
  • MarcusJ
    MarcusJ almost 6 years
    > use hot and cold structure splitting What does this mean?
  • Vakey
    Vakey over 5 years
    @MarcusJ Hot/Cold splitting is a technique for separating data into two categories. Data that you use every frame or every often (hot), and data that you use less frequently (cold). This helps with not loading unnecessary data in your cache lines. For more detailed info, check out this explanation: gameprogrammingpatterns.com/…