Logo
DiS Needs You: Save our site »
  • Logo_home2
  • Records
  • In Depth
  • In Photos
  • Blog
  • Podcast
  • Search
  • Community
  • Records
  • In Depth
  • Blog
  • Community

THIS SITE HAS BEEN ARCHIVED AND CLOSED.

Please join the conversation over on our new forums »

If you really want to read this, try using The Internet Archive.

Boards

Music Social More…

anyone here any good at object-oriented programming?

josh [Edit] [Delete] 14:49, 29 April '09

I'm having trouble with the basic concepts. I'm making an image gallery.

I'm going to want a method which uploads a new image to the filesystem and stores the image's details in a database 'images' table.

Now, should this method be part of the gallery class (gallery->addnewimage) or part of the image class (image->createnewimage)?
Perhaps it should be a combination of both?
Maybe the gallery object calls its 'addnewimage' method which in turn instantiates a new image object and calls the various methods involved in uploading, resizing and finding a home for our new image...

I dunno. Anyone?


Drowned in Sound
  • DROWNED IN SOUND
  • HOME
  • SITE MAP
  • NEWS
  • IN DEPTH
  • IN PHOTOS
  • RECORDS
  • RECOMMENDED RECORDS
  • ALBUMS OF THE YEAR
  • FESTIVAL COVERAGE
  • COMMUNITY
  • MUSIC FORUM
  • SOCIAL BOARD
  • REPORT ERRORS
  • CONTACT US
  • JOIN OUR MAILING LIST
  • FOLLOW DiS
  • GOOGLE+
  • FACEBOOK
  • TWITTER
  • SHUFFLER
  • TUMBLR
  • YOUTUBE
  • RSS FEED
  • RSS EMAIL SUBSCRIBE
  • MISC
  • TERM OF USE
  • PRIVACY
  • ADVERTISING
  • OUR WIKIPEDIA
© 2000-2025 DROWNED IN SOUND