Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object Oriented approach? #10

Open
Naatan opened this issue Nov 15, 2011 · 9 comments
Open

Object Oriented approach? #10

Naatan opened this issue Nov 15, 2011 · 9 comments

Comments

@Naatan
Copy link
Contributor

Naatan commented Nov 15, 2011

At the moment the plugin follows the wordpress coding style, which is based on where PHP was around version 3. And although it would take forever for Wordpress to be re-done on an OO style, plugins are a different story.

What I'm getting at is that this plugin in particular would benefit greatly from being re-done in an OO style, it's approaching a size where the Wordpress coding style just makes it feel a bit messy to maintain and that generally creates for a very error-prone coding environment. Of course we all have our own preferences and what works for one might not work for another.

So I'm simply wondering whether you would be willing to re-do this project in an OO style? And by re-do I basically just mean wrapping up the current codebase in an object oriented style, cause there's nothing wrong with the code as-is.

I'm mostly asking since I'm currently planning on doing just this, seeing as I plan to use this plugin for a large scale long-term project, I'd want a piece of code that's prone to being updated and played with often to be as accessible as possible.

Let me know whether you'd be open to doing this or be willing to review an OO approach of your codebase as a pull request later on.

@thenbrent
Copy link
Collaborator

I would definitely review and most likely accept an OO version.

I'm going to do it myself in the near future though, simply due to time
constraints. The original code base was written by another developer (as
you'll see if you go way back in to commit logs) and I've taken to
maintaining it ever since, despite many personal qualms I have with style,
redundancy, improper use of or complete lack of use of WP API functions
(WP_HTTP class for example would have been good to use).

So any time you put into OO'ing (is that even a verb? haha) the code base
would be greatly appreciated, and I'll gladly add your WP Username as an
author on the plugin if you invest that time. :)

On Wed, Nov 16, 2011 at 1:35 AM, Nathan Rijksen <
[email protected]

wrote:

At the moment the plugin follows the wordpress coding style, which is
based on where PHP was around version 3. And although it would take forever
for Wordpress to be re-done on an OO style, plugins are a different story.

What I'm getting at is that this plugin in particular would benefit
greatly from being re-done in an OO style, it's approaching a size where
the Wordpress coding style just makes it feel a bit messy to maintain and
that generally creates for a very error-prone coding environment. Of course
we all have our own preferences and what works for one might not work for
another.

So I'm simply wondering whether you would be willing to re-do this project
in an OO style? And by re-do I basically just mean wrapping up the current
codebase in an object oriented style, cause there's nothing wrong with the
code as-is.

I'm mostly asking since I'm currently planning on doing just this, seeing
as I plan to use this plugin for a large scale long-term project, I'd want
a piece of code that's prone to being updated and played with often to be
as accessible as possible.

Let me know whether you'd be open to doing this or be willing to review an
OO approach of your codebase as a pull request later on.


Reply to this email directly or view it on GitHub:
#10

@Naatan
Copy link
Contributor Author

Naatan commented Dec 6, 2011

I've started work on an OO version, check here:

The different gateways have been made modular and work as their own Wordpress plugins, I committed them under different repo's here:

It's still a work in progress, only regular login / registration is ported atm, and there's still a lot of redundancy in the code due to the conversion to OO. But it's working quite well aside from the spit & polish that I will be applying soon.

The urge to use namespaces was hard to resist, but resist it I did - at the cost of my OCD nagging my brain every single second I worked on this :p

Let me know if you'd be willing to take a pull request for this once I'm done polishing and implementing the last few features. I will change ownership for the gateway repo's to you if you do. The code itself is still all the original code, all I did is basically wrap it up in an OO fashion and turned the gateways modular.

@Naatan
Copy link
Contributor Author

Naatan commented Dec 6, 2011

By the way, the indentation looks a bit screwed up atm since I did not optimize it for spaces yet. FWIW I used the Mensch font at size 9. But I'll polish that up in the final version that will be in the pull request.

@thenbrent
Copy link
Collaborator

Nathan, it's so nice to see SC start to get some of the TLC it deserves.
The code is looking so much nicer. I really look forwarding to merging that
code base. :)

On Wed, Dec 7, 2011 at 5:14 AM, Nathan Rijksen <
[email protected]

wrote:

By the way, the indentation looks a bit screwed up atm since I did not
optimize it for spaces yet. FWIW I used the Mensch font at size 9. But I'll
polish that up in the final version that will be in the pull request.


Reply to this email directly or view it on GitHub:
#10 (comment)

@DeanMarkTaylor
Copy link

Hay @Naatan and @thenbrent has this plugin been forgotten? Are you guys still using this one yourselves or is there something better to replace it?

The OO style looks good, did it ever get extensive testing?

@thenbrent
Copy link
Collaborator

@DeanMarkTaylor I don't use it on any sites anymore and don't give it the love it deserves. If you or @Naatan would like to take ownership of it, let me know.

@DeanMarkTaylor
Copy link

@thenbrent Thanks for commenting back, really sad to hear - was kinda hoping for a response from @Naatan, oh well - good luck with whatever you guys are up to now!

@Naatan
Copy link
Contributor Author

Naatan commented May 26, 2013

Sorry Dean I no longer work with Wordpress so I have no interest in maintaining this code.

@DeanMarkTaylor
Copy link

Cheers for the response @Naatan - enjoy yourself in your new coding endeavors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants