Article: An Introduction to Open-source Licenses

Originally published at http://www.sitepoint.com/introduction-to-open-source-licenses/


The web community is renowned for its willingness to share. Not only do we share experiences, give advice and help each other with projects, but we also share an incredible amount of code—from small snippets to entire frameworks and applications.

Much of the software we use daily is open-source—from operating systems and servers to the apps we use to ply our trades.

Amid all of this sharing, there arises the issue of copyright and licensing. If you’re using someone else’s free software, or if you’re sharing your own work, it’s important to consider these issues.

Standard Copyright

When you create a piece of software, it’s automatically protected by copyright. This means that you retain all rights to your source code and that nobody else may reproduce, distribute, or create derivative works from your work.

It may also lead to no one using your code—which obviously defeats the purpose of sharing it.

So if you really do want to share your work, but also want to protect it in some way, it’s important to consider the options available for licensing your work.

Choosing a License

There are various, recognized licenses you can apply to your work to make it really clear what people can do with your code. But each license has a particular focus, so which should you choose?

In this article, I’ll briefly introduce several of the most used licenses. Which one you choose will depend on what you want to achieve and how your code should be distributed.

Disclaimer: the overview that follows only provides a general sense of what each license encompasses. To understand each license fully, you’ll need to do more reading.

MIT License

mit

The MIT License lets people do anything they want with your code, as long as they provide attribution back to you and don’t hold you liable if something goes wrong. It’s used by projects like jQuery and Rails.

What's Required of You

You need to include a copyright notice, together with a copy of the license, within the code. (Just add a License file together with the ReadMe file.)

How You're Covered

The license states that the code is provided as is, and that you can’t be held liable for damages.

Comments

This is probably the best option if you want to get your baby out and leave it to the interwebz.

Having said that, you should be ready to see your creation used elsewhere without the source available, meaning that you might be unable to apply the changes upstream (yes, basically someone can create proprietary software from your open-source software).

If you don't want others to have so much freedom to use your code, it might be better to consider another license.

Apache 2.0 License

apache

The Apache License is similar to the MIT License, but it also provides an express grant of patent rights from contributors to users.

It’s much longer than the MIT license, mostly due to the grant of patent rights, but also because it explicitly disallows the use of trademarks in derivate works.

This license is used by—you guessed it—Apache, as well as Google (for its Android OS).

What's Required of You

Within the code, you need to include a copyright notice, together with a copy of the license. If you’re creating a derivative work with significant changes to the code, these need to be indicated also.

How You're Covered

The code is provided as is and you, as the creator, can’t be held liable for damages. Also, while this may be implicitly true of all licenses, the Apache license explicitly states that users of the software may not use the names, logos, or trademarks of contributors in their own derivative works.

Comments

Although a tad more restrictive than the MIT License, the Apache license makes it easier for the creator of the code to track changes—by requiring those creating derivatives to indicate significant changes to the code.

Still, remember that code licensed under the Apache License can end up in proprietary software.


Continue reading at http://www.sitepoint.com/introduction-to-open-source-licenses/

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.