Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #5914
| From | Marco Bakera <pintman@bakera.de> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: Two classes vs two methods in one class? |
| Date | 2015-10-03 21:06 +0200 |
| Organization | albasani.net |
| Message-ID | <mup8vo$gal$1@news.albasani.net> (permalink) |
| References | <muorn0$loh$1@speranza.aioe.org> |
Victor Porton schrieb am 03.10.2015 um 17:19: > I need an iterator which returns "processed" data (a function applied to the > unprocessed data received from a DB) and an iterator which return both > processed an unprocessed data (as a structure having ->processed and > -> unprocessed fields). It seems you are using classes as data containers and not as living things. That often happens when OR-mapping comes into place. I would prefer to give some processing method to the entities. If you want to rely on your decision it should be better to split functionality into classes (first scenario) - at least if you plan to implement it in an object-oriented manner. Best, Marco.
Back to comp.programming | Previous | Next — Previous in thread | Find similar | Unroll thread
Two classes vs two methods in one class? Victor Porton <porton@narod.ru> - 2015-10-03 18:19 +0300 Re: Two classes vs two methods in one class? Marco Bakera <pintman@bakera.de> - 2015-10-03 21:06 +0200
csiph-web