New PHP 5 component library

16 views
Skip to first unread message

chtombleson

unread,
Apr 12, 2012, 5:59:06 PM4/12/12
to NZ PHP Users Group
Hi all,

I have recently released the first stable stable version of my PHP 5
component library Cribz Lib.

Website: http://cribzlib.cribznetwork.com/
Github: https://github.com/chtombleson/cribzlib/
Wiki: https://github.com/chtombleson/cribzlib/wiki/

Any thoughts, suggestions or if I missed a component just let me know.

Cheers
Christopher Tombleson

David Neilsen

unread,
Apr 12, 2012, 6:30:51 PM4/12/12
to nzp...@googlegroups.com
Hi,

I have a brief look at the examples, and some source, and (not trying to offend) it didn't look like something I would want to use.
A few points that stick out for me where:
  • The HTML filter class is just a wrapper for preg_* functions.
  • The form class, two things stuck out, the addElement class takes 9 parameters, and is just a big switch statement. 
  • And the sanitize uses custom regex, which Im not even sure would pass the standard smoke test http://htmlpurifier.org/live/smoketests/xssAttacks.php
  • No PSR0 autoloading.
  • And in general it looks like that components are overly simple, and would only fit a very small use case.


David Neilsen | 07 834 3366 | PANmedia ®



--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to nzp...@googlegroups.com
To unsubscribe, send email to
nzphpug+u...@googlegroups.com

chtombleson

unread,
Apr 12, 2012, 7:03:18 PM4/12/12
to NZ PHP Users Group
Thanks for your opinion David.

I know there is still a lot of work to be done on it.

One of the things I want is that it's easy to use and understand.
Why should I make things harder for people to get there heads around?

Your notes about the form class, I can't disagree with them. I know
there is a lot more I can do
to bring it up to standard and I will being so.

Cheers
Christopher Tombleson

On Apr 13, 10:30 am, David Neilsen <da...@panmedia.co.nz> wrote:
> Hi,
>
> I have a brief look at the examples, and some source, and (not trying to
> offend) it didn't look like something I would want to use.
> A few points that stick out for me where:
>
>    - The HTML filter class is just a wrapper for preg_* functions.
>    - The form class, two things stuck out, the addElement class takes 9
>    parameters, and is just a big switch statement.
>    - And the sanitize uses custom regex, which Im not even sure would pass
>    the standard smoke test
>    http://htmlpurifier.org/live/smoketests/xssAttacks.php
>    - No PSR0 autoloading.
>    - And in general it looks like that components are overly simple, and

Simon Holywell

unread,
Apr 12, 2012, 7:07:41 PM4/12/12
to nzp...@googlegroups.com

Also at a higher level. It is GPL licensed which kinda rules out serious commercial use - see copyleft.

Jonathan Hunt

unread,
Apr 12, 2012, 7:20:35 PM4/12/12
to nzp...@googlegroups.com
On 13/04/2012, at 11:07 AM, Simon Holywell wrote:
> Also at a higher level. It is GPL licensed which kinda rules out serious commercial use - see copyleft.

GPL doesn't preclude commercial use.

Define "serious".

Regards
Jonathan

Dave Lane

unread,
Apr 12, 2012, 7:26:04 PM4/12/12
to nzp...@googlegroups.com
Simon,

On 13/04/12 11:07, Simon Holywell wrote:
> Also at a higher level. It is GPL licensed which kinda rules out serious
> commercial use - see copyleft.

It seems to have become rather trendy to take that position. It is,
however, wrong, and quite counter productive.

What you are implicitly stating is that businesses only gain value from
open source software where they have the ability to convert the work of
open source developers into closed proprietary software. And that, of
course, is utter bollocks.

I suggest you talk to companies like Redhat, Instagram, Github, Acquia,
Google, HP, Yahoo!, Facebook, etc. about the commercial non-viability of
the GPL, I'm sure they'll be interested to hear your perspective.

Regards,

Dave

--
Dave Lane, Egressive Ltd da...@egressive.com m +64212298147 p +6439633733
http://egressive.com Free/OpenSourceSoftware: because to share is human
Drupal powers communities: http://drupal.org Use Open Standards: w3.org
Software Patents kill innovation

Jochen Daum

unread,
Apr 12, 2012, 7:28:46 PM4/12/12
to nzp...@googlegroups.com
Hi,

On 13 April 2012 11:07, Simon Holywell <si...@holywell.com.au> wrote:
> Also at a higher level. It is GPL licensed which kinda rules out serious
> commercial use - see copyleft.

not at all, see here:
http://automatem.posterous.com/why-purchasing-open-source-licenced-is-the-ri

In short: The software is either a business asset, then don't
distribute it, so GPL doesn't take effect. Or it is not, then what
does it matter.

HTH, Jochen

Simon Holywell

unread,
Apr 13, 2012, 2:25:31 AM4/13/12
to nzp...@googlegroups.com

Jochen and Jonathon,

This is my primary bug bear with GPL: http://www.gnu.org/licenses/gpl-faq.html#LinkingWithGPL

Thanks,
Simon

Simon Holywell

unread,
Apr 13, 2012, 2:32:10 AM4/13/12
to nzp...@googlegroups.com

Calm down dude or you might end up here: http://xkcd.com/386/

Seriously though I hear your call of bollocks. Sounds like GPL works for you and thats great, but until I see clear legal fact stating it works generally then I will refrain from agreeing. My primary concern is with linked libs.

Thanks,
Simon

Bruce Clement

unread,
Apr 13, 2012, 2:41:23 AM4/13/12
to nzp...@googlegroups.com


On Fri, Apr 13, 2012 at 6:25 PM, Simon Holywell <si...@holywell.com.au> wrote:

Jochen and Jonathon,

This is my primary bug bear with GPL: http://www.gnu.org/licenses/gpl-faq.html#LinkingWithGPL



The referenced question explains how the GPL requires that programs linked to GPL software must be covered by a compatible licence.

This is a deliberate design decision in the writing of the GPL, it's to ensure that code released under the GPL can't be tied up with other software that would prevent it being used under the GPL.

On the other hand, it's only people you give the code to who have the right to use it under the GPL. I don't understand why it should be a problem to give this to a customer who probably only has a thin shim on top of a large GPL code base to be able to pass that on.

If you have a use case where you don't want to allow your customers to be able to modify and on-sell the changes they've paid for, then the answer is simple, don't use GPL covered code as the base of your product..

Interestingly enough IBM, Sun (although not Oracle) and other large companies have had no problem releasing code under the GPL and even Microsoft[1] has done it, however albeit grudginly.

Bruce

[1] http://www.networkworld.com/news/2009/072009-microsoft-linux-source-code.html

--
Bruce Clement

Home:    http://www.clement.co.nz/
Twitter:    http://twitter.com/Bruce_Clement
Directory: http://www.searchme.co.nz/

"Before attempting to create something new, it is vital to have a good appreciation of everything that already exists in this field." Mikhail Kalashnikov

Grant Paton-Simpson

unread,
Apr 13, 2012, 2:43:27 AM4/13/12
to nzp...@googlegroups.com
Hi Simon,

Isn't that what the LGPL is for (if you're going down the copyleft path)? Anyway, there is a good range of well-established and well-understood open source licences available. I have released different projects under both the LGPL and the AGPL3 licences. The person who does the work of creating the code gets to make the choice. Others get to use the code if they are willing to comply with the terms.


All the best, Grant

Simon Holywell

unread,
Apr 13, 2012, 3:21:43 AM4/13/12
to nzp...@googlegroups.com

Yep that is where the LGPL and GPL exception clause step in. I am not arguing that GPL isn't useful or that it doesn't serve a purpose or even that it should not be used. It is however restrictive, which hampers adoption.

Jethro Carr

unread,
Apr 13, 2012, 3:32:24 AM4/13/12
to nzp...@googlegroups.com
On Fri, 2012-04-13 at 07:32 +0100, Simon Holywell wrote:
> Calm down dude or you might end up here: http://xkcd.com/386/
>
> Seriously though I hear your call of bollocks. Sounds like GPL works
> for you and thats great, but until I see clear legal fact stating it
> works generally then I will refrain from agreeing. My primary concern
> is with linked libs.


heh,

If there was such thing as clear legal fact we wouldn't needing lawyers.

Reality is that there are a range of licenses and their suitability
varies depending on your business model - to outright dismiss the GPL as
being against serious commercial use is a silly statement at best.

A company may choose to GPL license a product and make a commercial
business around the support, rather than the code (eg, MySQL, RedHat) or
they may decide to keep the code propietary and sell boxed software (eg,
Microsoft).

Both are valid business models, to state that either are unsuitable for
serious commercial use is wrong.

A more valid statement could be "I am in the business of selling
software and the GPL does not suit my business model as I wish to retain
control of the right to redistribute my code and profit from that".


regards,
jethro

--
Jethro Carr
www.jethrocarr.com
www.amberdms.com

signature.asc

Simon Holywell

unread,
Apr 13, 2012, 3:36:56 AM4/13/12
to nzp...@googlegroups.com

Agreed. I over simplified in a bid to type less on this puny phone. What I am saying is that if you licence under GPL then you reduce adoption. Here are a couple of examples:

Want to resell a CMS that includes ExtJs (this is where GPL can hurt free software and be weaponized by asking for a commercial licence) on its GPL licence. See Pimcore.

Want to include a lib in a PHP extension (in this case it hampers even opensource, but lets not go down the free software vs open source route).

I agree and don't use most GPL code where it will be harmful to me. There is an additional problem with it though; I don't know what my code/product might evolve into in the future and then whether GPL will come back to bite. So I avoid it and that is where adoption rates get affected.

I am a fan of permissive licences for this reason and would encourage anyone to adopt such a licence. If you don't want to then thats fine, but it is also fine if I don't use your code. :-)

In the interests of disclosure: I have GPLed code myself before. I don't any more though.

--

Dave Lane

unread,
Apr 13, 2012, 3:44:03 AM4/13/12
to nzp...@googlegroups.com
Hi Simon,

On 13/04/12 19:36, Simon Holywell wrote:
> Agreed. I over simplified in a bid to type less on this puny phone. What
> I am saying is that if you licence under GPL then you reduce adoption.
> Here are a couple of examples:
>
> Want to resell a CMS that includes ExtJs (this is where GPL can hurt
> free software and be weaponized by asking for a commercial licence) on
> its GPL licence. See Pimcore.
>
> Want to include a lib in a PHP extension (in this case it hampers even
> opensource, but lets not go down the free software vs open source route).

I'm struggling to understand your point. If you want adoption of a CMS,
let's consider the two most widely adopted CMSs out there by a
staggering margin: Wordpress and Drupal. Guess what: they're both GPL
licensed. I know a lot of people making a very nice living (and building
successful businesses on) providing services on for those two platforms.
Another example of successful GPL licensed product is Linux. Doesn't
seem to have inhibited its uptake particularly.

Cheers,

Simon Holywell

unread,
Apr 13, 2012, 4:00:07 AM4/13/12
to nzp...@googlegroups.com
Hi Dave,

Wordpress and Drupal are not, generally, used as libs - at least I hope not, yikes!

Thanks,
Simon

--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to nzp...@googlegroups.com
To unsubscribe, send email to
nzphpug+u...@googlegroups.com

Jochen Daum

unread,
Apr 13, 2012, 5:29:41 AM4/13/12
to nzp...@googlegroups.com

The point I was trying to make was: even if the gpl based software is critical for your business, doesn't mean it needs to be distributed.

Microsoft office is only one of many business models.

Hth, Jochen

Reply all
Reply to author
Forward
0 new messages