Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 308317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:38:21+00:00 2026-05-12T07:38:21+00:00

I understand that there are several questions on OOD; this one is not a

  • 0

I understand that there are several questions on OOD; this one is not a duplicate (I hope) because of its specific nature – can a functionality that process data be a class?

First, some background.

This came up from a discussion my supervisor had with me. I was supposed to write a video loading class. His idea was to have a single Video class that loads itself.

I thought through it and came up with a Video class that stores the codec, filename, frame per second and more importantly the byte arrays, and a VideoLoader class that takes a filename, a reference to the Video class and then populate it.

My supervisor said this is not correct. “A class should always have a state”. I assume he meant private members here. “The VideoLoader is just a bunch of processing functions. It shouldn’t be a class”. I argue that I am doing decoupling. The VideoLoader in the future could have an abstract base class in case we are using different libraries (currently FFMPEG) to load videos.

It still kind of bother me, though. OOD always describes finding the verbs and the nouns, and ‘processing-only classes’ rarely come out from OOD design. Are there guidelines in OOD for this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:38:22+00:00Added an answer on May 12, 2026 at 7:38 am

    I agree with your approach.

    Consider your VideoLoader a helper class that is used to instantiate or populate as you say the instances of Video. It is a part of a good design to separate responsibilities and not put it all into one entity. Anyway, in many object-oriented frameworks it is not possible to have standalone methods without wrapper classes.

    If you wish to please your supervisor you could put a Load method in your Video class and make it the only way to instantiate videos.

    public class Video
    {
        private Video ()
        {
        }
    
        public Video Load (/* Parameters */)
        {
            Video video = new Video ();
    
            // Set up this video object
    
            return video;
        }
    }
    

    The way you are doing it actually has a term – Factory pattern.

    Have a look here: Factory method pattern. This is exactly what you are doing. You use a factory to instantiate video classes of potentially various types (codec-dependent or else).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why only one overload throws this exception? Little update: I understand that there was
One of the things about programming is that there are several ways to achieve
I just don't understand how this is done. I've gone through several questions here
I know there are several similar questions, but I'm struggling to understand the error
I understand that there is a setting in Sun JVM for dumping the heap
Are there overall rules/guidelines for what makes a method thread-safe? I understand that there
I am trying to understand the co-ordinate spaces of three.js, I understand that there
Just to preface my question, I understand that there is no direct support for
Is there a way to debug CoffeeScript line-by-line? I understand that it compiles into
There are things that I don't understand when it comes to linking... I'm writing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.