Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Accessing and Managing Third-Party Libraries

Learn about package management in your programming language and take advantage of all the goodness that's out there.


advertisement

The Cloud, micro-services and distributed systems are all the rage these days. But, in the end, each service and software component is implemented in some programming language. In the olden days, most software was custom made and very little was shared beyond built-in operating system libraries and the standard library of the language itself. These days, software is constructed very differently and is more often of an assembly of third-party libraries with a little bit of glue code to hold it all together.

C/C++

C and C++ represent the olden days. Back in the 1990s, I wrote desktop application in C/C++ and mostly used the Windows 32 API, the C++ STL and maybe a couple of third-party libraries. C/C++ have no central repository for libraries or a packaging format. Each platform comes up with its own way.

Perl

The introduction of Perl really brought the idea of an eco-system with lots of third-party modules to center stage. The Comprehensive Perl Archive Network (CPAN) is accessible through www.cpan.org. It has been online since October 1995 and currently has 179,934 Perl modules in 35,044 distributions, written by 13,009 authors and mirrored on 248 servers. Talk about community and staying power!

Python

Python has had a lot of ups and downs with its packaging story. Similar to CPAN, it has PyPI (Python packaging index). You can use pip to install packages from PyPI (or private repository). You can create and upload your own packages — and in your programs, you use the import keyword to be able to use third-party packages in your code.

Java

Java packages its components in .jar files that are simply zip files. If you put a .jar file in your CLASSPATH then you can use it in your code. Java has an elaborate namespace scheme that is reflected in its packages. Java doesn't have an official repository, but Maven serves as the unofficial repository for Java software. Go to https://search.maven.org/ and look around.

JavaScript

JavaScript took the concept of a third-party library to the next level. Modern JavaScript libraries are often composed of hundreds of mini-libraries or modules that create deep hierarchies. There are a couple of module systems (AMD, CommonJS) and many build and packing systems (WebPack arguably leads the pack). NPM (Node package Manager) with the package.json file is the people's choice. It is used for client-side applications too and not just for Node.js server-side applications. The repository is found at https://www.npmjs.com/.

Ruby

RubyGems is the Ruby Package manager. The public repository is found here. You can distribute and use programs and libraries (in standard gem format). The gem command-line tool allows finding, listing and installing gems. Later you can require a gem in your Ruby code to use it.

Go

Go relies on packages being in a standard location — the pkg sub-directory of the workspace. You import the packages and then use them in your code. You can also install packages directly from source code repositories by using the "go get" command.

Rust

Rust is a modern and advanced programming language that brings a lot of innovation to the programming language landscape. It learned its lessons well as far as packaging goes and from the get go had a well-designed and well-integrated package management system. Cargo is Rust's package manager. Rust packages are called crates and the central repository is found at https://crates.io/.

C#/.NET

The .NET framework didn't start with a package management system such as Rust, but it got one eventually. NuGet is the .NET package manager. The central repository currently hosts 74,831 unique packages that have been downloaded more than 2.5 billion times! If you want a nice command-line interface for NuGet, similar to apt or yum or brew on the Mac OSX, I recommend Chocolatey.



Libraries are essential for productivity. Learn about package management in your programming language and take advantage of all the goodness that's out there. If what you need is even remotely general-purpose, someone has most likely already created a library that you can leverage.



   
Gigi Sayfan is the chief platform architect of VRVIU, a start-up developing cutting-edge hardware + software technology in the virtual reality space. Gigi has been developing software professionally for 21 years in domains as diverse as instant messaging, morphing, chip fabrication process control, embedded multi-media application for game consoles, brain-inspired machine learning, custom browser development, web services for 3D distributed game platform, IoT/sensors and most recently virtual reality. He has written production code every day in many programming languages such as C, C++, C#, Python, Java, Delphi, Javascript and even Cobol and PowerBuilder for operating systems such as Windows (3.11 through 7), Linux, Mac OSX, Lynx (embedded) and Sony Playstation. His technical expertise includes databases, low-level networking, distributed systems, unorthodox user interfaces and general software development life cycle.
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date