Objects With No Behavior

Posted by Patrick Donovan on Stack Overflow See other posts from Stack Overflow or by Patrick Donovan
Published on 2012-06-23T14:07:59Z Indexed on 2012/06/23 15:16 UTC
Read the original article Hit count: 265

I've been teaching myself object oriented programming and I'm thinking about a situation where I have an object "Transaction", that has quite a few properties to it like account, amount, date, currency, type, etc.

I never plan to mutate these data points, and calculation logic will live in other classes. My question is, is it poor Python design to instantiate thousands of objects just to hold data? I find the data far easier to work with embedded in a class rather than trying to cram it into some combination of data structures.

© Stack Overflow or respective owner

Related posts about python

Related posts about object-oriented-analysis

  • Objects With No Behavior

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I've been teaching myself object oriented programming and I'm thinking about a situation where I have an object "Transaction", that has quite a few properties to it like account, amount, date, currency, type, etc. I never plan to mutate these data points, and calculation logic will live in other… >>> More

  • Books or help on OO Analysis

    as seen on Programmers - Search for 'Programmers'
    I have this course where we learn about the domain model, use cases, contracts and eventually leap into class diagrams and sequence diagrams to define good software classes. I just had an exam and I got trashed, but part of the reason is we barely have any practical material, I spent at least two… >>> More

  • How to conciliate OOAD and Database Design?

    as seen on Programmers - Search for 'Programmers'
    Recently I've studied about object oriented analysis and design and I liked a lot about it. In every place I've read people say that the idea is to start with the minimum set of requirements and go improving along the way, revisiting this each iteration and making it better as we contiuously develop… >>> More

  • Writing Great Software

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Hi, I'm currently reading Head First's Object Oriented Analysis and Design. The book states that to write great software (i.e. software that is well-designed, well-coded, easy to maintain, reuse, and extend) you need to do three things: Firstly, make sure the software does everything the customer… >>> More

  • Which book should I choose?

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Hi guys, I'm looking for a good read on object oriented design. The two books I'm currently looking Head First Design Patterns and Head First Object object-oriented analysis & design. They seem very similar when looking at the contents and browsing through available sample text. Which one would… >>> More