License Info

I remember that i saw something about licensing around here, but for the love of god i cannot find it anywhere for now, so here it goes.

I have an application that has a small rest api, and right now i am building a client to connect to that api.

In this process, the client needs to be separate, a third party library if you will, that can be used in raw php or whatever. Now, because i am so addicted in using CMap over simple arrays, i want to use the CMap class and CMapIterator class in my client to pass parameters around. To do that, i must rename the classes to match my autoloader(think of the Zend_Naming_Convention for autoloading), therefore CMap will be named MySuperDuper_Something_Params and the CMapIterator will be named MySuperDuper_Something_ParamsIterator.

I don’t want to assume any kind of credit on these two classes, i want to use them and that’s all, but as you see, i need to alter them a bit(beside renaming the classes, also i need to strip some comments to make room for mine because i am also adding some new methods).

Now, what’s the path i need to follow here to be sure i don’t make anybody angry?

Right now, i do have a folder called license and in it i have yiiframework.txt where the current yii license stays.

Beside this, as i said, each class will get it’s original credits, i.e a note saying: Based on Yiiframework’s CMap class: http://www.yiiframework.com/doc/api/1.1/CMap .

Do i have to do something else beside the above ?

Should i let the class comments untouched and add mine at the end?

Any advice is welcome.

Thanks.

Hmm, i’m looking at CJSON and i see that basically Yii team did the same thing, took the class file, added the license info in it, then after, added their own info.

If i’m going to do the same, is it enough ?




/**

* JSON (JavaScript Object Notation) is a lightweight data-interchange

* format. It is easy for humans to read and write. It is easy for machines

* to parse and generate. It is based on a subset of the JavaScript

* Programming Language, Standard ECMA-262 3rd Edition - December 1999.

* This feature can also be found in  Python. JSON is a text format that is

* completely language independent but uses conventions that are familiar

* to programmers of the C-family of languages, including C, C++, C#, Java,

* JavaScript, Perl, TCL, and many others. These properties make JSON an

* ideal data-interchange language.

*

* This package provides a simple encoder and decoder for JSON notation. It

* is intended for use with client-side Javascript applications that make

* use of HTTPRequest to perform server communication functions - data can

* be encoded into JSON notation for use in a client-side javascript, or

* decoded from incoming Javascript requests. JSON format is native to

* Javascript, and can be directly eval()'ed with no further parsing

* overhead

*

* All strings should be in ASCII or UTF-8 format!

*

* LICENSE: Redistribution and use in source and binary forms, with or

* without modification, are permitted provided that the following

* conditions are met: Redistributions of source code must retain the

* above copyright notice, this list of conditions and the following

* disclaimer. Redistributions in binary form must reproduce the above

* copyright notice, this list of conditions and the following disclaimer

* in the documentation and/or other materials provided with the

* distribution.

*

* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED

* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN

* NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS

* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND

* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR

* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE

* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH

* DAMAGE.

*

* @author	  Michal Migurski <mike-json@teczno.com>

* @author	  Matt Knapp <mdknapp[at]gmail[dot]com>

* @author	  Brett Stimmerman <brettstimmerman[at]gmail[dot]com>

* @copyright   2005 Michal Migurski

* @license	 http://www.opensource.org/licenses/bsd-license.php

* @link		http://pear.php.net/pepr/pepr-proposal-show.php?id=198

*/



Did you read the text that you posted? It tells you exactly what you can and cannot do.

I’m also not sure why you have to strip comments to make room for your own, does your hard drive have 10 bytes of free space?

@Tsunami - Bad day ?

Yeah the code says what can and cannot do, but the question is, is it enough to have the copy of the license in the class file itself or i should also have it in a separate file(like yii does for cjson) ?

As for stripping, it wasn’t the correct wording, i guess i just want to add more info + new methods and document those (which is obvious that i am allowed to) so i think there is just one question left.

Without being a lawyer: I’d suggest you just keep the header intact. With header I mean the comment block mentioning author, copyright, license and stuff. If you modify the code, you can add your name as additional author, add your copyright mark, etc. But you shouldn’t remove any of these information.

With yii being released under the Modified BSD License, you can choose whether you include the license terms in the class itself or distribute it as a separate file. Other licenses are more demanding in this respect. Also, although being used quite often, I wonder if providing a link only is enough. A person getting a copy of the software might not have internet access, the link might no longer be valid or the license could have been changed. So including a copy of the license is always a good idea.

How you do it depends on your use case. If CMap is the only file you use from yii framework, including it directly into the class file might be a good choice. If you use several files from the framework, it might be easier to place the license file somewhere alongside the source files. I personally would also add a hint to the location of the license file inside the sources.

@Ben - Thanks man, your answer really helps.

What Ben suggested sounds reasonable. Also for non-lawyers I’ve modified our license page quite some time ago: http://www.yiiframework.com/license/