Views as plugins?

9 views
Skip to first unread message

eber.f...@gmail.com

unread,
Mar 10, 2011, 10:05:14 PM3/10/11
to Akelos PHP Framework
Hey guys!

So here is an idea: What if the view engine was actually a plugin?
Here is what I think...

When we have a request, we can do a bunch different of stuff with
that, generate and manipulate data and prepare a response object.
Views could be just libraries that parses over the response object
generating the proper render for it. That way, it would be really easy
to use other view engines along with Alloy like Twig, Smarty or
anything else. You just need to create a plugin for it. The plugin
would have the engine and needed helpers and stuff.

Another thing is that, in my mind, things would be far more explicit!
You could easilly inspect a view plugin and it's libraries to see what
it's capable of. Not that it's not easy right now, that is not the
case, but I think it would be easier to comprehend and extend views
that way. Well, it's just a thought. Let me know what you think (or
not)!

Bye!
Reply all
Reply to author
Forward
0 new messages