Skip to content
Rupesh Bhochhibhoya edited this page Feb 23, 2016 · 1 revision

Terms: data-driven design data-driven programming data-oriented design object-oriented design object-oriented programming domain-driven design

Does data driven design takes you to data driven programming or data oriented programming? DDP and DOP, both is data centered so is OOP.

We use data driven techniques all the time without giving much thought to it.

Think how you change your design best of the user feedback, may be using A/B testing. I think that is Data-driven design.

Based on the data access pattern, you design your database. Similarly, based on how data is accessed and manipulated for better performance you need to design your data data-structure, which I call data oriented design.

Adapting abstract data type design methods to object-oriented programming results in a data-driven design.[2] This type of design is sometimes used in object-oriented programming to define classes during the conception of a piece of software.

When doing data driven programming, one clearly distinguishes code from the data structures on which it acts, and designs both so that one can make changes to the logic of the program by editing not the code but the data structure.

Data driven

Data driven programming is a programming model where the data itself controls the flow of the program and not the program logic. It is a model where you control the flow by offering different data sets to the program where the program logic is some generic form of flow or of state-changes. Consider following example:

#####non-data driven

data_lloyd = {'name': 'Lloyd', 'lives': 'Alcoy }
data_jason = {'name': 'Jason', 'lives': 'London' }
go = function(x) 
    if x.name == 'Lloyd' 
    then 
        print("Alcoy, Spain") 
    else 
        print("London, UK") 
end

#####data-driven

data_lloyd = {'name': 'Lloyd', 'lives': function(){ print("Alcoy, Spain") }
data_jason = {'name': 'Jason', 'lives': function(){ print("London, UK") }
go = function(x)
    x.lives()
end

You can see the output of the program is determined by data being passed. So, data is controlling the program flow.

Data driven design in Software Development.

I kind of have good understanding how one could practice Data driven Design for better User experience. However, I don't know what this approach dictates the way you code, does it has any preference in term of programming paradigms or does it even dictates to use certain programming techniques like OOP or functional.

Development means design and program.

###Domain driven design vs Data Driven Design output = myfunc(input) vs. output = input.myfunc()

Most often I have use certain techniques and approaches without giving much thoughts to it, like what kind

If you already have platform or framework defined which will be used to develop your application, you don't have to worry to much about what patterns or paradigms to use. the framework or language already dictates you to use one they are made for.

In a data-centric design, the system is generally separated into objects based upon the data that they encapsulate. For example, in an e-commerce application you are likely to find objects that represent products, invoices, payments, and users. These objects provide methods which operate on that data, either returning its values, or mutating its state. A Product object might provide a method to determine how many of a given product are currently in stock, or possibly a method to add that product to the current shopping cart.

Names for data-centric objects are often nouns, because they frequently correspond to real-world objects. This real-worldliness is generally also true of the methods that these objects provide. The methods either represent accessors to the object's data, relationships between objects, or actions that could be taken on the object. Nicely, put thoughts. Gave me a good explanation with example but not the answer. May be that's the reality. We use all those techniques and tools but never put enough thoughts how such abstract thinking and when we try to do, guy like me get confused with all those jargons people has been using differently. May be compromise is what we need, instead of being dogmatic about certain practice, and as a result what you ended up is a solution that is simple, testable and within the budget and deadline. However, for me compromise, is also mean having anti patterns in my solution. But does that even a big deal? Honestly, I have never seen or done any real life project that doesn't have some sort of anti patterns based on definition of anti pattern.

__ The problems we wanted to solve needed different way of thinkings, that means a paradigm shift is needed to solve various problems. contexts, complexity are different for different problems. If you trying to solve all such problem using the same techniques, practices and patterns, you may end up with the solution but the path and process would be painful and complex, inconvinent and results to anti-pattern to reach the goal. All I am saying is its not good idea to try to solve all problems with the same set of mind, you need to develop different way of thinkings, which gives birth to various paradigms. Now, the problem is how to know what paradigm is better shoots to what kind of problems? __

__How to know which paradigm is choose? Depends upon what is required/problem and also on the what type of development platform we choose, as some may not suppose certain methodology and approaches. This means Design and programing is very co-related. You can not design the system and expect to be implemented readily on any platform you choose. you need to tune the design with certain paradigm that is supported by your programming platform. For instance, use OOD to implement using OOP. Use Data-driven Design to use Data-Driven Programming. Design and development/programming process is inextriable.

The most significant complexity of many application is not technical but it is in the domain itself, activities or business of the user.

Primary focus of most software should be in domain and domain logic. Starts with analyzing domain context, then modelling, then moving to OOP.

__DDD is not a silver bullet. When done sensibly, it's about taking a craftsman-like approach to building software, and recognizing the need to reduce the cognitive friction between development teams and the businesses they are building software for. One of the most important practices is to have a layer in which the domain vocabulary used by the software team and the business team matches as closely as possible. You build this layer iteratively as you come to understand the business problem that you are trying to solve. When business logic is sensibly encoded in this layer, isolated from all the convoluted dependencies that enterprise applications typically have by factoring interactions with those systems out to interfaces, the language used in the actual domain layer eventually becomes fairly concise, obvious, and readable. When you review your model with the business, they will often correct you, and you gradually refactor to a deeper understanding of the domain.

If you practice object-oriented design, including the discipline of loose coupling, and you practice unit testing fairly religiously, and you mercilessly refactor code, and you work with domain experts while building your system, essentially you'll end up with a result that's basically what advocates of domain driven design are talking about.__

DDD is a pragmatic approach to software development that can, over time, reduce the buildup of technical debt, and make your customers happier because you are able to speak the same language with each other, and deliver better-working solutions because of the advantages of understanding each other better.

Recently I was trying to reorganize my thoughts on various design approaches I have been practicing. One of them is Data-Driven Design. Most often, there were certain techniques that I apply

http://buytaert.net/the-future-of-software-is-data-driven https://passwork.me/info/blog/applicationdesign http://www.informit.com/articles/article.aspx?p=25074&seqNum=4http://stackoverflow.com/questions/1641580/what-is-data-oriented-design http://stackoverflow.com/questions/1641580/what-is-data-oriented-design/1641615#1641615

Data-driven: focus in data, design, based on measurement, based on facts, why--> better user experience. cosumer product business, walmart/target. product sorting/display/placement/pricing/personalized offers. Collecting and redesign. telecom/google/

Domain-driven: focus in logic

Clone this wiki locally