Filed under: Uncategorized | Tags: mvcPress, Web 2.0, Web Design, Web Development
I have made a promise few months ago to develop an MVC plugin for wordpress. I have started SOMETHING, at the very least i worked out the menues and how everything is suppose to look like. But i hav’nt got a chance to spend some SERIOUS beefy time on it due to contracts etc (fast money is always good). But after march the 5th, i’m going to have ALL of my free time deticated to it.
Okay!, building a framework ontop of a language is TIME CONSUMING. Now!, wordpress is a product. its not a language!. Its not even built ontop of any framework!. So, all i’m doing is just reorganizing code!. I see plugin ideas that are SUPER, but they give you a DB error every once a while, or they miss the last element of an array etc!. We are all human, and we will all do these mistakes!, so why not let a machine handle these little things for us!.
Back on track!!!!, yes, mvcPress beta coming soon!.
UPDATE: I’m no longer working on this you guys!, although it would be a GOOD project to finish. But i decided to use symfony instead of hacking away at WP. And in all honesty, wordpress ISSSS a blogging software (correction, the BEST blogging software). But i think it would make more sense to use a framework instead of a product to do my little evening projects.
————————————————————————————————————————–
Okay, so i spent few hours over the weekend to work on mvcPress. If you have’nt been reading my previous posts (not surprizing), i am kind of playing around with developing an MVC framework to be used on wordpres plugin development.
An good place to start is to decide how it will look like. A top level submenu is DEFINATLY needed. I know its fround upon, but iz all good. The submenue’s will be,
- Dashboard – Dashboard is going to be a quick summary of all of your projects, views, models, controlers. And it will also be an RSS agregator of the development blog. Thought it was a good idea.
- Generator – This is the interface where all of the components will be generated.
- Helpers – A plan old php function library files. Will contain functions and classes that could be used in other components. The nice thing about it is, its a normal WP plugin. You can manage it, activate it, deactivate it, etc.
- Projects – Projects which are developed by mvcPress.
- API -Wordpress API, becomes very helpful.
- WP-phpMyAdmin – Well, THANK YOU DUDE.
Yeahh, so thats that. Now, one more thing which i have defined which is worth mentioning. What does MVC mean in wordpress talk? Well, tell me what you think of this:
Models in WP – This is where i have to do anykind of programming. This should be SOMETHING inheritable!, i WILL implement scaffolding and relational scaffolding in mvcPress models.
Views in WP – Each view will reside in one file, will include the model on top, and is basically a template tag.
Controler in WP – Each controler resides in its proper directory path, it is a file which contains one wordpress action sink. Each controler will include the model on top, and it will be implemented using many boolean tags and conditional tags.
So yeahh, this is where i’m at. Hopefully few more weeks, i should have something that runs. It will be really easy to develop this framework since all of the heavy lifting is done by the WP functions. I just have to look them up and use them.
Filed under: Uncategorized | Tags: mvcPress
Well, its not done yet, However, i have been talking about developing an MVC framework specially talored for wordpress plugin development. I will call it mvcPress, i’m hoping to roll the first version SooOOooN, it would be more of a functional protype than anything. HOPEFULLY!. It will be bare bone, but its a good place to see how the community responds to it. Besides, you can bet your sweet A55 that it will be LOTS better than those HORRID
switch(POST[stage]){}
and
if(this){$mysql = “bla”} else {$mysql=bla} elsif (!not_in_table_structure){ $mysql=hippiy}
Okay, so i’m going ahead with this.
In my previous post i was venting about the lack of code organization within wordpress plugin community. Then i remembered something that my dad said, “YOU CANT BITCH ABOUT ANYTHING UNLESS YOUR WILLING TO DO SOMETHING ABOUT IT” (my dad) so FUDGE IT i’m going for it. I think if we gave developers the opportunity to engineer thier ideas as opposed to hack it, we will see lots of powerfull wordpress dirivatives.
So whats the big idea? bringing MVC to wordpress plugin.
I started looking into OLD code to base my framework on, and by old i mean pre RoR (ruby on rails). And indeed i found lots of little 500 line of code SIMPLE bare bone frame works that follow MVC. Which really is going to be a greate starting point for me. The one i decided to work with does’nt generate any files, it does’nt scaffold or anything like that. However, thats good, since scaffolding and file generation will be customized to wordpress’s envoroment.
If someone is reading this and want to jump aboard, let me know. I can use some help.
Is’nt it about time that somebody with a decent programming background develops an MVC framework written especially for wordpress plugins!?!?.
WordPress plugins right now are hacked big time in order to do what they are suppose to do. And all of the code rewriting is time consuming and leaves lots of space for error, which only frustrates admins since thier wordpress is acting up and they have no idea why. Aside from that, wordpress is being used as a CMS for many private contractors (such as myself) to talor to thier clients. I usually end up writing few simple plugins per contract, depending on what my client needs. And i think that an MVC framework would make my life SOO much easier.
We have two choices right now:
- Taking an exisiting PHP MVC framework and blend it into wordpress. Now this could be possible however, i dont know how much it would slow things down.
- Developing a lightweight minimalistic framework and port it into wordpress as a plugin.
So i’m just thinking out loud here, bare with me. The framework needs to:
- Scaffold relational tables based on a predetermined forign key. How good is a scaffolding option if it is not relational. Many extentions have been built for ruby which extend to that functionality.
- Have a sweet ass admin interface which will generate all files for us.
- Data validation, display order, and other things to model would also be done through the admin interface.
- Tie “controller actions” to wordpress “action hooks”. That would be soo sweet.
- Somehow, generate test cases.
Seriously, not much more than that. It should be small and miminal. It would be solving a MUCH smaller problem than something like Catyles, or RoR would be. Something like this would not only make wordpress customizable, but it would also cut back on the cusyomization/development time by a convincing factor.
Hopefully soon, i will have the time. Pingback me if you find something else out there like this.