Re: Names for my Classes...?
if you're developing for PHP >= 5.3, you could put all of these classes in the namespace "templates" and then not really have to worry about them. in my framework, the helpers namespace has a few classes named after a model or controller class, each residing in their respective namespaces.
If you can't do this, then you could just name your view class RegionSection. or just Section.
Re: Names for my Classes...?
I like that better kows, Section that is...
What about Component? I originally named it such for it's common use in my apps as a way of including things like Flash applications and other 'widgets'. Is there a more accurate name that could be given to such an object? (Not widget :rolleyes:)
Re: Names for my Classes...?
if a "component" is something like flash objects, then name it Asset. I have an Assets class that is used for loading CSS and JavaScript files. I don't like the name component or widget.
Re: Names for my Classes...?
It's not specifically for flash objects, nor CSS; an example of it's use could be for a simple front controller:
PHP Code:
$page = new Page("default.html");
switch($_GET['page']){
case "":
$page->add_component("main", "home.html");
//do more stuff to the component
break;
case "news":
$page->add_component("main", "news.html");
//do more stuff to the component
break;
case "about":
$page->add_component("main", "about.html");
//do more stuff to the component
break;
}
This allows you to set parameters of the component, and even add further objects to the component (such as more components)
This can easily be used to add things like files containing flash objects, or anything for that matter. I mentioned flash objects because it works well to set parameters for the flash object element in the tag.
PHP Code:
$page = new Page("default.html");
$page->add_component("flash_object", "flash.html");
$page->node["flash_object"]->set("bkg_color", "blue");
$page->node["flash_object"]->set("source", "some_file.flv");
Anyways, in short, its an "advanced" way of including external, partial files.
Re: Names for my Classes...?
those things could still be considered assets. if you don't like that then I've got nothing -- try resource.
it's kind of hard to name a random thing you didn't make.
Re: Names for my Classes...?
Thanks kows. I do appreciate your answers. I'll probably stick with Component for now and just alias functions if necessary in the future (thankfully no direct object instantiation is available)