
{"id":823,"date":"2015-08-23T19:19:06","date_gmt":"2015-08-23T19:19:06","guid":{"rendered":"http:\/\/www.codergears.com\/Blog\/?p=823"},"modified":"2015-08-23T19:19:06","modified_gmt":"2015-08-23T19:19:06","slug":"10-factors-to-consider-when-choosing-a-software-library","status":"publish","type":"post","link":"https:\/\/codergears.com\/Blog\/?p=823","title":{"rendered":"10 factors to consider when choosing a software library"},"content":{"rendered":"<p>Choosing a software library is not always an easy task, specially if many concurrent libraries exist\u00a0for a specific need. Many factors could influence a developement team to choose a library, here are some of them:<\/p>\n<p><strong>1- Licensing<\/strong><\/p>\n<p>The library license is the first thing to check, it&#8217;s very important to verify if the license is compatible with your using in your project, before going further and discover the library capabilities.<\/p>\n<p>http:\/\/en.wikipedia.org\/wiki\/Comparison_of_free_and_open-source_software_licenses<!--more--><\/p>\n<p><strong>2- Is the library satisfy\u00a0your needs?<\/strong><\/p>\n<p>It&#8217;s a\u00a0trivial factor, but how many devlopers realized a mini proof of concept to check that all their needs are satistified by the library. Sometimes we discover very early that the library is not good for some reasons.<\/p>\n<p><strong>3- The community is active<\/strong><\/p>\n<p>Many problems could occurs when using a library, if its community is active, it will be very easy to find quickly a solution.<\/p>\n<p><strong>4- What about the trend of using the library?<\/strong><\/p>\n<p>It&#8217;s interesting to know if the library grow on popularity or not? for that you can use google trends and discover the evolution of the library over years.<\/p>\n<p>Here&#8217;s for example the trend of d3.js API:<\/p>\n<p><a href=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/trend.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-859\" src=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/trend.png\" alt=\"trend\" width=\"804\" height=\"455\" \/><\/a><\/p>\n<p><strong>5- Is the library has a break changes in the past?<\/strong><\/p>\n<p>Before adopting a library, take a few minutes and search \u00a0in the web for \u00a0&#8220;LibraryName breaking changes&#8221; to check if for a specific version a breaking changes was done.<\/p>\n<p>It could help you for the following reasons:<\/p>\n<p>&#8211; Avoid \u00a0using library examples from older versions.<\/p>\n<p>&#8211; it&#8217;s not good sign if a library has a big breaking change. \u00a0It means the developers does not care about the library users, and it could happen again in next versions.<\/p>\n<p><strong>6- Constraints and limitations of using a library.<\/strong><\/p>\n<p>Sometimes a library is awesome for a specific needs, but has one killer limitation which could force you to not use it.<\/p>\n<p>Let&#8217;s take as example the google chart api, it&#8217;s a versy useful chart library. However, it has one annoying limitation, the user must have an internet connection.<\/p>\n<p>Before choosing a library, be sure that no limitation could affect its using, you have just to search in the web for &#8220;LibraryName limtations&#8221;.<\/p>\n<p><strong>7- Documentation<\/strong><\/p>\n<p>A well documented library will helps you considerably when you use it. specially if it contains many samples of using it.<\/p>\n<p><strong>8- Did you care about performence when using the library?<\/strong><\/p>\n<p>If you plan to use a library in a context where the performence is very important, don&#8217;t only trust the benchmarks found in the web. It&#8217;s preferable to make a POC with your specific constraints to have a better idea of how the library behaves in your specific context.<\/p>\n<p><strong>9- Is your application multiplatform?<\/strong><\/p>\n<p>If you application must works in many platform, don&#8217;t test mostly in one platform, after finishing the developement test for all the other platforms.<\/p>\n<p>Always test from the begining on all the targeted plateforms, some libraries are very good implemented for an OS and very bad implemented for the others.<\/p>\n<p><strong>10- is there any other serious alternative to the library chose, and you have a doubt?<\/strong><\/p>\n<p>In some cases you could find two awesome libraries for the same needs, and you have a doubt of using one of them. In this case never \u00a0let your code highly coupled with the library. Prefer using wrappers and facade patterns to isolate it&#8217;s use.<\/p>\n<p>Of course there are many other factors that could influence your choice. and to minimise the risk of using a bad \u00a0library which we must change it after. It&#8217;s always a good practice to isolate its use in some few places in the code, by using wrappers and facades.<\/p>\n<p>Try to evaluate the coupling of your application with all the libraries used, identify the libraries highly coupled with your code, and progressivly try as possible to decouple its use.<\/p>\n<p>Many tools could be used to detect easily the coupling of external libraries, we can enumerate <a href=\"http:\/\/clarkware.com\/software\/JDepend.html\">JDepend<\/a> and <a href=\"http:\/\/www.jarchitect.com\">JArchitect <\/a>for java, <a href=\"http:\/\/www.cppdepend.com\">CppDepend<\/a> for C\/C++ and <a href=\"http:\/\/www.ndepend.com\">NDepend <\/a>for dotnet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Choosing a software library is not always an easy task, specially if many concurrent libraries exist\u00a0for a specific need. Many factors could influence a developement team to choose a library, here are some of them: 1- Licensing The library license is the first thing to check, it&#8217;s very important to verify if the license is &hellip; <a href=\"https:\/\/codergears.com\/Blog\/?p=823\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;10 factors to consider when choosing a software library&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-823","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/posts\/823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=823"}],"version-history":[{"count":19,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/posts\/823\/revisions"}],"predecessor-version":[{"id":2072,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/posts\/823\/revisions\/2072"}],"wp:attachment":[{"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}