7

I'm building a PHP framework and my english is not the best. There are several classes (database abstraction, module, router,...) in my framework and there is a place where they all have to be initialized and executed together.

  • What is a good name for a "master" class that initializes and runs all other classes?
6
  • I think the word master doesn't describe its functionality well. It is not like all other classes are childs of it or so.
    – opue
    Mar 11, 2010 at 19:44
  • 1
    Master_Control_Program, or MCP for short. Mar 11, 2010 at 19:48
  • 2
    It would be interesting to hear more about what this class does exactly. Maybe see some meaningful parts of the code or the function declarations? There might be a fixed expression for it.
    – Pekka
    Mar 11, 2010 at 19:48
  • 1
    Oh and could somebody please +1 this for me? I'm out of votes.
    – Pekka
    Mar 11, 2010 at 19:48
  • I just called it main. The C++ main function fits it perfectly I found out.
    – opue
    Mar 11, 2010 at 20:52

16 Answers 16

7

BuckarooBonzaiAndTheBootstrapInitiatorRoutine

1
  • 2
    Personally, all of my own PHP frameworks use this name somewhere. For the record, I have written no PHP frameworks.
    – Jonathan
    Oct 18, 2011 at 12:40
5

bootstrap

adding random text since it won't let me submit otherwise

1
  • That would have been my name of choice but the bad thing about is that I already have a bootstrapper.php. It loads all class files and initializes the class I'm searching the name for here! :D
    – opue
    Mar 11, 2010 at 19:50
2

Whatever you want to call the framework?

1

root?

adding random text since it won't let me submit otherwise

1

You can name it Delegator.

1

What is a good name for a "master" class that initializes and runs all other classes?

ClassFactory

1

Why not TypeYourAppNameHere?

1
ActiveBase

this will be a nice name for the master class i guess

0

core

adding random text since it won't let me submit otherwise

1
  • All the classes together are already the core of my framework - the class that initializes and manages all of them isn't the core.
    – opue
    Mar 11, 2010 at 19:47
0

bootstrapper

adding random text since it won't let me submit otherwise

0

Driver?

adding random text since it won't let me submit otherwise

0

Gennerally that would be the name of your framework.

$Opue

would work nicely. Or you could add a prefix. fwOupe.

0

I use an Application singleton:

class Foo 
{
  public function bar()
  {
    $app = Application::getInstance();
    $app->db->query( ... );
  }
}
0

I will call it main. The C++ main function does the same things in some projects - just create instances of some important classes.

0

GlobalFactory ?

0

It's an initialisation or bootup routine right? So why not Boot or GlobalInitialiser or similar?

(adjust to crazy American spelling as needed ;))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.