Stand alone classes

#1
[eluser]skunkbad[/eluser]
In the past I have successfully converted some of the CodeIgniter classes to be used outside of CodeIgniter. Some are easier to convert than others. In the last couple of days I have been mostly successful converting CodeIgniter's database classes, with the exception of the DB_cache. The problem here is that it requires the URI class, and that's one I don't want to waste time converting. It's big and overly complicated.

My goal in all of this is to reuse code I am familiar with, and I really like using CodeIgniter's "Active Record". I recently used the Slim php micro-framework for a small project and it worked really well. By converting and taking CodeIgniter classes with me to other frameworks, I can have the best of many worlds.

I've checked out packagist.org and have browsed around the internet a little, but wondering if anyone knows of good classes that handle URI / URL that are stand alone? I like CodeIgniter's URI segments, and I like using simple functions like base_url(), current_url(), etc.

Any suggestions are appreciated.

#2
[eluser]Narf[/eluser]
Irrelevant as an answer, but ... as you are somebody who has clearly stated their concerns over the upcoming license change, I hope you took care of meeting the requirements that allow you to "transform" those libraries.

#3
[eluser]skunkbad[/eluser]
[quote author="Narf" date="1352450857"]Irrelevant as an answer, but ... as you are somebody who has clearly stated their concerns over the upcoming license change, I hope you took care of meeting the requirements that allow you to "transform" those libraries.[/quote]

I've not used any of the CI 3.0 code, and don't plan to now or in the future.

#4
[eluser]Narf[/eluser]
I'm not talking about the OSL license, previous versions have one that is slightly different, but still has some demands that might be incompatible with another framework's license when combined.

#5
[eluser]skunkbad[/eluser]
[quote author="Narf" date="1352478944"]I'm not talking about the OSL license, previous versions have one that is slightly different, but still has some demands that might be incompatible with another framework's license when combined.[/quote]

Narf, I'm glad you're bringing up this issue here in the forum, because it really does deserve more attention.

For my intended purposes, the CI 2.X license won't be an issue, because most of the CI 2.X license revolves around redistribution, and there is no language in that license that declares that deployment of code is considered a distribution or redistribution. Legally binding terms of the 2.X license are more feasible for business and easier to fulfill than the OSL license. Not only this, but the terms of the 2.X license do not specify that I must ALWAYS reveal to site visitors the fact that I am using CodeIgniter, whereas the OSL license states that any deployment of code is considered a distribution, and the source must be made reasonably available to anyone.

Here is the core of the CI 2.X license

Quote:1) A copy of this license agreement must be included with the distribution.
2) Redistributions of source code must retain the above copyright notice in all source code files.
3) Redistributions in binary form must reproduce the above copyright notice in the documentation and/or other materials provided with the distribution.
4) Any files that have been modified must carry notices stating the nature of the change and the names of those who changed them.
5) Products derived from the Software must include an acknowledgment that they are derived from CodeIgniter in their documentation and/or other materials provided with the distribution.
6) Products derived from the Software may not be called "CodeIgniter", nor may "CodeIgniter" appear in their name, without prior written permission from EllisLab, Inc.

I don't have plans for future projects that involve frameworks where CodeIgniter's license will be of any concern. If a situation arises where CodeIgniter code is deemed incompatible, I'd simply drop it and use something else. Having years of PHP experience before using CI, I'm not so tightly bound to CI that I wouldn't be able to function without it. I will say, however, that I am disappointed with the CI 3.0 license, and feel that is extremely unfortunate that it's clever use of words is such that only an attorney can understand it. After many hours of reading and investigation, it's clear that it won't be a good fit for me or my customers. Consider this article written by Derek Jones: http://ellislab.com/blog/entry/codeignit...e_examples

In the section of this article that refers to personal projects and services, it is said:

Quote:How did I decide to reasonably make the source code of the OSL 3.0 licensed CodeIgniter files on my site available for those who want it? I have a Powered by CodeIgniter link in my footer that points to the official GitHub repo. CodeIgniter rocks!

CodeIgniter may rock, but the new OSL license doesn't. I do appreciate all of your hard work on CodeIgniter, and if I'm wrong about the license, I'd expect somebody from EllisLab to say so. Maybe you could influence them to respond? As I understand it, the only way I could use CI 3.0 without making the source code reasonably available would be to pay for a special license from EllisLab, and EllisLab has not made that price publicly known. Why is it a secret? You're doing a lot of work on CI, so I hope you get a kick-back!

#6
[eluser]Narf[/eluser]
Well, that was ... overwhelming. Smile

It was just that I've noticed how vocal you've been on the license change and all of a sudden you're writing about transforming CodeIgniter into a collection of stand-alone classes to inject in other frameworks. That just seemed a dangrous kind of thing to do for somebody who is that much concerned with licensing.

As for your request to bring this to EllisLab - they are the ones moderating the forums, so I'm sure that they would reply if needed. Although considering the original purpose of the thread - it would be off-topic.

#7
[eluser]skunkbad[/eluser]
[quote author="Narf" date="1352486201"]...It was just that I've noticed how vocal you've been on the license change and all of a sudden you're writing about transforming CodeIgniter into a collection of stand-alone classes to inject in other frameworks....[/quote]

Oh no, I dont want to transform CodeIgniter, just some good parts that I'll miss when working outside of CodeIgniter. Actually, my original request isn't asking for converted CodeIgniter classes, just good generic ones.

And in regard to being overwhelming, try reading that OSL license sometime!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.