[wp-hackers] Separation of Application Logic from

Dougal Campbell dougal at gunters.org
Wed Sep 7 17:29:31 GMT 2005


Dougal Campbell wrote:
> Ryan Boren wrote:
> 
>> So, let's continue to clean up the admin templates by moving the heavy
>> lifting into functions.  I'd like to eliminate direct DB calls from the
>> templates as much as possible and improve code reuse.
> 
> 
> Hmmmm... Can anyone say "admin templates"?
> 
> I knew you could.

Whoops, looking back, I see that Michael Huynh already said it :)

David House says:
   "Secondly, the end user shouldn't ever see the Smarty
   templates for the admin. Only the WP devs, and they're
   certainly not laymen."

Don't be so sure. There are plenty of WP sites out there run by people 
who pretty much don't know the first thing about coding. And they 
shouldn't have to. That's one of the things WP is good at: it's a good 
tool whether you're a web novice or an expert PHP programmer.

Jeff Minard says:
   "Why would you need/want to template the admin section
   anyway? Aside from cases where you want to majorly
   rebrand the admin interface, only a small handful of
   people will ever see those pages."

Again, not necessarily the case. It might be useful to have different 
admin interfaces for different admins or site types. A "novice" admin 
template could avoid cluttering things up with advanced options that 
might not ever get used. Some sites might benefit from an interface 
geared more heavily towards managing pages than posts and comments.

Granted, templatizing the admin section is a more complicated endeavor 
than content templates. Maybe we'll decide that admin templates aren't 
needed. But I think that there might be enough use-cases to make it 
worth consideration, at least.

-- 
Dougal Campbell <dougal at gunters.org>
http://dougal.gunters.org/



More information about the wp-hackers mailing list