+ Reply to Thread
Results 1 to 8 of 8

Thread: Hybrid Framework

  1. #1
    Ryan's Avatar
    Ryan is offline WPTavern Forum Moderator
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,418

    Default Hybrid Framework

    I read the following blog post by Justin Tadlock a few days ago:
    http://themehybrid.com/archives/2009...for-hybrid-0-7

    I always thought the Hybrid theme was the framework, but I guess not. When I was commenting on the post, I don't think it dawned on me quite how useful what Justin is doing could be.

    If any of us wants to create a theme with full-blown framework style functionality built into it, we can just copy Justin's framework, dump it into our theme and whammo! ... instant Parent Theme with ninja functionality built into it. Of course you still need to add a bunch of hooks etc. to your theme for it fully work, but chances are if you were intending to build a serious theme that you would already be doing that anyway, albeit with your own hooks.

    I've been beavering away working on a theme related project for a while now and have been dreading adding a whole bunch of "stuff" to it as it's just a bunch more crap to maintain, but if it's based on Justin's core framework code then as long as Justin is on the ball (and he will be) then it should work flawlessly.

    This doesn't require a parent theme to work, which makes it significantly easier for newbies to understand yet gives you all of the goodies that come with the Hybrid theme framework without having to rely on Justin's theme files (ie: header.php, page.php etc. etc.).

    I guess you could do the same thing with a plugin, but then you would need a whole bunch of checks in your theme for whether the plugin was loaded or not whereas by dumping all of the code straight in there, it will "just work".

    Opinions?

  2. #2
    greenshady's Avatar
    greenshady is offline Here For The Peanuts
    Join Date
    Jan 2009
    Posts
    155

    Default

    The biggest thing I've wanted to do is not confuse users more than necessary. Realizing that the majority of my users are not developers, the framework itself has never been released.

    When you hear Ptah Dunbar talking about what a theme framework should be, he's spot on. The framework is the "logic" behind the scenes. The theme is just sort of a wrapper for that framework.

    There's two important things to note:

    1) The Hybrid theme is a parent theme. Nothing is changing about this.

    2) Hybrid comes packaged with the "Hybrid framework." Yes, I know; bad naming decisions. This framework is being released separately.

    Honestly, I'd never really planned to release the core framework publicly until a post made by Alex King that said Hybrid and other frameworks (none were called out specifically) were not true development frameworks like Carrington. I took that as a bit of a challenge. ;)

    What goes on behind the scenes in Hybrid (the stuff in its /library folder) is what I'll be releasing for theme developers. I've been working overtime in making sure this code is lightweight and will work well in custom-made themes.

    I'm not even sure how well it'll perform as a framework. I am sure there's a long road ahead in making it a great development tool. What I really want to do is get some feedback on how to make it better and go from there.

    What's this thing for?

    Basically, the framework itself is something you drop into your own theme (not child theme). When it's released, you'll only need to call three lines of code in your functions.php file to launch the framework. Once that's done, you can build your theme (templates, custom functions, etc.).

    And, that's what it's for. It's for building themes.

    Once you've created a theme, you can release it back to the public. Then, you can build child themes off it or let your users build child themes.

    Basically, I'm giving you the keys to the Hybrid kingdom and making it a lot easier to build custom themes.

    A nifty feature

    You don't have to rely on Hybrid's hook system. The hooks will correspond to your theme name.

    Let's look at a specific hook in Hybrid. One of those is hybrid_before_entry. Well, if you created your own theme, then why should it have the word "hybrid" in it? Let's suppose you named your theme superduper. The theme hooks would be prefixed with "superduper". In our example, this would be superduper_before_entry.

  3. #3
    samh is offline Here For The Peanuts
    Join Date
    Oct 2009
    Posts
    177

    Default

    Thanks for bringing this framework to my attention Ryan - we've seen Carrington before, but not got round to really trying it properly.

    This looks like it could be charming!
    Personally: @WestHamProcess Professionally: @FootballUtd

  4. #4
    mkjones's Avatar
    mkjones is offline Hello World
    Join Date
    Jun 2009
    Location
    South Yorkshire
    Posts
    36

    Default

    Quote Originally Posted by greenshady View Post
    A nifty feature

    You don't have to rely on Hybrid's hook system. The hooks will correspond to your theme name.

    Let's look at a specific hook in Hybrid. One of those is hybrid_before_entry. Well, if you created your own theme, then why should it have the word "hybrid" in it? Let's suppose you named your theme superduper. The theme hooks would be prefixed with "superduper". In our example, this would be superduper_before_entry.
    Wow, you just blew my mind :) THAT is a killer feature.
    UK Based WordPress Guru
    base6 Design | My Blog | @mkjones

  5. #5
    Ryan's Avatar
    Ryan is offline WPTavern Forum Moderator
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,418

    Default

    Quote Originally Posted by greenshady View Post
    The biggest thing I've wanted to do is not confuse users more than necessary.
    You are doomed on that front I think. The majority of people won't fully understand how it works.

    Quote Originally Posted by greenshady View Post
    2) Hybrid comes packaged with the "Hybrid framework." Yes, I know; bad naming decisions. This framework is being released separately.
    Heh, tell me about it. I've made similar mistakes with plugin names and "premium features" and "premium support" names.

    There are advantages for you in using the same name though. Just like how WordPress.com has the same name as WordPress the software, they both effectively market each other, albeit in a slightly confusing way.

    Quote Originally Posted by greenshady View Post
    A nifty feature

    You don't have to rely on Hybrid's hook system. The hooks will correspond to your theme name.
    Is that really a good thing to encourage? If someone makes a Hybrid specific plugin, it may not work if the function names are changed. Or is there some way around that problem.

  6. #6
    greenshady's Avatar
    greenshady is offline Here For The Peanuts
    Join Date
    Jan 2009
    Posts
    155

    Default

    Quote Originally Posted by Ryan View Post
    Is that really a good thing to encourage? If someone makes a Hybrid specific plugin, it may not work if the function names are changed. Or is there some way around that problem.
    The function names won't be changed. The hook names will be. There'll be a function to get the appropriate hook prefix. I've already incorporated it into the development version one of my Hybrid-specific plugins.

    In fact, this original idea stemmed from the idea of standardizing hook names for themes. I thought it might be a neat thing to do to allow plugins to change the prefix of the hook.

    Don't worry; I've been thinking about all the things that could potentially go wrong. I asked myself the same question you did.

  7. #7
    Ryan's Avatar
    Ryan is offline WPTavern Forum Moderator
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,418

    Default

    Hmm, wondering if I can be the first to release a new parent theme based off of the new Hybrid framework now :) .... might not be ready in time though :(

  8. #8
    DaisyOlsen is offline Hello World
    Join Date
    Nov 2009
    Location
    NYish
    Posts
    6

    Default

    Justin, I think it's cool that you are releasing the framework. I think it's a little crazy that you have to release it in order to be considered a framework.

    I got a little irritated every time I heard anyone say that a Parent theme is not a framework at WordCamp. This is true, of course, if you are using some random theme from the repo, but anyone that doubts Hybrid's place in the framework lineup clearly has not spent any significant amount of time with it.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts