Posted on Leave a comment

Two Open Source Mobile App Development Frameworks To Make Mobile Dev Easier

Mobile apps have been a boon for developers. With Android the most widely used platform on the planet, it makes perfect sense for developers to ply their trade in the mobile market. Not only do developers have the chance to get their work seen, they can make money from the Google Play Store or the iOS App Store. For those who have yet to delve into the mobile development market, however, the process may be a bit daunting. What tools are available? More importantly, what open source tools are available? After all, if you’re developing on the Linux platform, you probably don’t want to work with proprietary software.

So, to get started creating the greatest mobile app on the planet, you need to get the right tools. One such tool is a framework. In programming terms, a framework is an abstraction in which common code (that provides a generic or general functionality) can be used and rewritten to provide a specific functionality. Say you need Function X for your app, but you don’t want to write all the necessary code for that function. You can use a framework that offers Function X and modify that function so it perfectly fits your needs. In other words, a framework is a way to make development easier and more efficient.

Are there open source frameworks available for mobile development? There certainly are. Let’s take a look at two tools available for this particular task.

Ionic

Ionic is both 100 percent free and open source. This project, licensed under MIT, enables you to build fully cross-platform, progressive web and native mobile apps for every major app store… all from a single codebase. You can develop Ionic apps on any platform you like. Of course, our platform of choice is Linux. Fortunately, Ionic offers a simple command-line interface (CLI) that can be used to create, build, test, and deploy your apps to any platform. Ionic also features:

  • Ionic Native, which allows you to unlock native APIs (and other features), by wrapping Cordova plugins in TypeScript.

  • Live Reload, which allows you to compile and re-deploy an app at every development step.

  • Ionicons, which is an icon pack that includes hundreds of the most common app icons (all MIT licensed and ready to use).

  • Deeplinking, which allow you to start your app from a web link (and can even load a specific view out of the box).

  • AoT Compiling, which helps your apps to load faster.

Create a free Ionic account here and then install Ionic on your distribution. For example, if you’re using Ubuntu as your development platform, to install Ionic you must first install Node.js and npm like so:

  1. Open a terminal window.

  2. Issue the command sudo apt install curl

  3. Add the necessary repository with the command curl -sL https://deb.nodesource.com/setup_10.x | sudo bash –

  4. Install node.js and npm with the command sudo apt install nodejs

Install Ionic with the command:

sudo npm install -g ionic

You can now begin creating and working with your project. To create a new project, issue the command:

ionic start PROJECT_NAME blank --type ionic1

where PROJECT_NAME is the name of your project. You should see a newly created folder (with the same name as your project), that includes a number of new files and folders (Figure 1).

For more information on using the Ionic CLI, check out the official Ionic Guide.

PhoneGap

PhoneGap is an open source distribution of Adobe Cordova that makes it possible to develop your mobile app using web development technologies (e.g., HTML, CSS, and JavaScript) in just a few minutes. If you don’t want to work from the command line, PhoneGap does offer a desktop app (which is only available for macOS and Windows). The desktop app uses the same libraries found in the CLI, but it makes it a bit less daunting for those who prefer a more point and click-friendly method of app development.

PhoneGap includes the following:

  • PhoneGap Developer is a mobile app to connect your devices to your development machine (to see changes you make instantly).

  • PhoneGap Build enables you get app-store ready apps without having to maintain native SDKs for each mobile environment.

  • Plugin Library gets you access to a robust library of plugins to extend the capability of your mobile apps.

  • Third party tools is where you can find additional tools, created by the PhoneGap community, to help test, debug, and manage apps.

  • Developer community allows you to connect to thousands of developers working with PhoneGap.

  • Mobile App helps you pair your mobile device to the desktop app, so you can preview your new app.

To install the PhoneGap CLI tool, you’ll need jode.js and npm installed (as described above). Once that is taken care of, you can install the PhoneGap CLI tool with the command:

sudo npm install -g phonegap@latest

Once you’ve install the CLI, issue the command phonegap to see the help file (and show that the tool was successfully installed—Figure 2).

You might find you run into a permissions issue, when running the phonegap command. To resolve that, issue the command:

sudo chown -R USER:USER ~/.config/configstore

Where USER is your Linux username.

You should now be able to create your first project with the command:

phonegap create PROJECT_NAME

Where PROJECT_NAME is the name of your project.

To find out more on how to use the PhoneGap CLI, check out this reference.

There’s more to be found

There are plenty more open source mobile developer frameworks to be found. These two tools, however, can be thought of as a great launching point to help you get started with your mobile development journey. They are certainly not the only players on the field, but offer quite a lot in the way of power, flexibility, and feature sets. Give one of these tools a try and see if it doesn’t empower your mobile app development with the help of open source.

Learn more about Linux development in the Introduction to Open Source Development, Git, and Linux training course, and sign up now to start your open source journey.

Posted on Leave a comment

How to Search for Files from the Linux Command Line

Learn how to use the find command in this tutorial from our archives.

It goes without saying that every good Linux desktop environment offers the ability to search your file system for files and folders. If your default desktop doesn’t — because this is Linux — you can always install an app to make searching your directory hierarchy a breeze.

But what about the command line? If you happen to frequently work in the command line or you administer GUI-less Linux servers, where do you turn when you need to locate a file? Fortunately, Linux has exactly what you need to locate the files in question, built right into the system.

The command in question is find. To make the understanding of this command even more enticing, once you know it, you can start working it into your Bash scripts. That’s not only convenience, that’s power.

Let’s get up to speed with the find command so you can take control of locating files on your Linux servers and desktops, without the need of a GUI.

How to use the find command

When I first glimpsed Linux, back in 1997, I didn’t quite understand how the find command worked; therefore, it never seemed to function as I expected. It seemed simple; issue the command find FILENAME (where FILENAME is the name of the file) and the command was supposed to locate the file and report back. Little did I know there was more to the command than that. Much more.

If you issue the command man find, you’ll see the syntax of the find command is:

find [-H] [-L] [-P] [-D debugopts] [-Olevel] [starting-point...] [expression]

Naturally, if you’re unfamiliar with how man works, you might be confused about or overwhelmed by that syntax. For ease of understanding, let’s simplify that. The most basic syntax of a basic find command would look like this:

find /path option filename

Now we’ll see it at work.

Find by name

Let’s break down that basic command to make it as clear as possible. The most simplistic  structure of the find command should include a path for the file, an option, and the filename itself. You may be thinking, “If I know the path to the file, I’d already know where to find it!”. Well, the path for the file could be the root of your drive; so / would be a legitimate path. Entering that as your path would take find longer to process — because it has to start from scratch — but if you have no idea where the file is, you can start from there. In the name of efficiency, it is always best to have at least an idea where to start searching.

The next bit of the command is the option. As with most Linux commands, you have a number of available options. However, we are starting from the beginning, so let’s make it easy. Because we are attempting to find a file by name, we’ll use one of two options:

  • name – case sensitive

  • iname – case insensitive

Remember, Linux is very particular about case, so if you’re looking for a file named Linux.odt, the following command will return no results.

find / -name linux.odt

If, however, you were to alter the command by using the -iname option, the find command would locate your file, regardless of case. So the new command looks like:

find / -iname linux.odt

Find by type

What if you’re not so concerned with locating a file by name but would rather locate all files of a certain type? Some of the more common file descriptors are:

  • f – regular file

  • d – directory

  • l – symbolic link

  • c – character devices

  • b – block devices

Now, suppose you want to locate all block devices (a file that refers to a device) on your system. With the help of the -type option, we can do that like so:

find / -type c

The above command would result in quite a lot of output (much of it indicating permission denied), but would include output similar to:

/dev/hidraw6
/dev/hidraw5
/dev/vboxnetctl
/dev/vboxdrvu
/dev/vboxdrv
/dev/dmmidi2
/dev/midi2
/dev/kvm

Voilà! Block devices.

We can use the same option to help us look for configuration files. Say, for instance, you want to locate all regular files that end in the .conf extension. This command would look something like:

find / -type f -name "*.conf"

The above command would traverse the entire directory structure to locate all regular files ending in .conf. If you know most of your configuration files are housed in /etc, you could specify that like so:

find /etc -type f -name “*.conf”

The above command would list all of your .conf files from /etc (Figure 1).

Outputting results to a file

One really handy trick is to output the results of the search into a file. When you know the output might be extensive, or if you want to comb through the results later, this can be incredibly helpful. For this, we’ll use the same example as above and pipe the results into a file called conf_search. This new command would look like: ​

find /etc -type f -name “*.conf” > conf_search

You will now have a file (conf_search) that contains all of the results from the find command issued.

Finding files by size

Now we get to a moment where the find command becomes incredibly helpful. I’ve had instances where desktops or servers have found their drives mysteriously filled. To quickly make space (or help locate the problem), you can use the find command to locate files of a certain size. Say, for instance, you want to go large and locate files that are over 1000MB. The find command can be issued, with the help of the -size option, like so:

find / -size +1000MB

You might be surprised at how many files turn up. With the output from the command, you can comb through the directory structure and free up space or troubleshoot to find out what is mysteriously filling up your drive.

You can search with the following size descriptions:

  • c – bytes

  • k – Kilobytes

  • M – Megabytes

  • G – Gigabytes

  • b – 512-byte blocks

Keep learning

We’ve only scratched the surface of the find command, but you now have a fundamental understanding of how to locate files on your Linux systems. Make sure to issue the command man find to get a deeper, more complete, knowledge of how to make this powerful tool work for you.

Learn more about Linux through the free “Introduction to Linux” course from The Linux Foundation and edX.

Posted on Leave a comment

New Keynote Speakers Announced for Hyperledger Global Forum

With over 75 sessions, keynotes, hands-on technical workshops, social activities, evening events, and more, Hyperledger Global Forum gives you a unique opportunity to collaborate with the Hyperledger community, make new connections, learn about the latest production deployments, and further advance your blockchain skills. In addition to previously announced keynote speakers, new keynote speakers include:

  • Frank Yiannas, Vice President of Food Safety, Walmart
  • David Treat, Managing Director, Accenture

Session Highlights Include:

Technical Track:

  • Approaches to Consortia Governance and Access Control in Hyperledger Fabric Applications – Mark Rakhmilevich, Oracle
  • Chaincode Best Practices – Sheehan Anderson, State Street
  • Lessons Learned Creating a Usable, Real-world Web Application using Fabric/Composer – Waleed El Sayed & Markus Stauffiger, 4eyes GmbH

Secure your spot now and save up to $150 with the current registration rate, available through November 25. Register now >>

Read more at The Linux Foundation

Posted on Leave a comment

Catch Up on October Events with Videos from OS Summit, Linux Security Summit, and Open FinTech Forum

October was big month for events at The Linux Foundation. Seriously, just this month, the LF-affiliated events included:

Following this flurry of activity, we want to share some of the highlights with you. At Open Source Summit Europe & ELC + OpenIoT Summit Europe, more than 90 sessions were recorded, and you can browse the list of presentations here.  A few of the featured keynotes include:

There are 21 videos available online for Linux Security Summit Europe, several of which provide an overview of recent developments in the Linux kernel, including the following:

The Open FinTech Forum is a brand-new event, which took place in New York City earlier this month and focused on the intersection of financial services and open source. It covered cutting-edge open source technologies including AI, blockchain, and Kubernetes, and there are 9 keynote videos available online, including:

We invite you to check out these presentations, see all the upcoming Linux Foundation events, and mark your calendar to join us.

Posted on Leave a comment

Open Source Leadership Summit

The Linux Foundation Open Source Leadership Summit is the premier forum where open source leaders convene to drive digital transformation with open source technologies and learn how to collaboratively manage the largest shared technology investment of our time.

An intimate, by invitation only event, Open Source Leadership Summit fosters innovation, growth and partnerships among the leading projects and corporations working in open technology development. It is a must-attend for business and technical leaders looking to advance open source strategy, implementation and investment. 

Read more

Posted on Leave a comment

55 Percent of Cloud Developers Contribute to Open Source, Says Survey

In presenting the results of its survey of 4,300 cloud developers, DigitalOcean seemed surprised that only 55 percent of respondents contribute to open source projects. Yet to tech outsiders — or old-timers — it may be more surprising that more than half of developers do contribute. There are relatively few professions in which companies and their employers regularly offer pro bono services for the greater good of the industry.

DigitalOcean, which provides cloud infrastructure software and services, has timed its “Currents” survey release in conjunction with the conclusion of its fifth annual Hacktoberfest program. Co-hosted with GitHub and twilio, Hacktoberfest invites developers to collaborate during the month of October on a smorgasbord of open source projects.

Corporate leaders appear to be sending mixed messages to their developers about open source. Although 71 percent of respondents to the DigitalOcean survey said that their employers “expect them to use open source software as part of their day-to-day development work,” employers are less supportive of their developers contributing to software that doesn’t directly benefit the company. Only 34 percent of respondents said they were given time to work on open source projects not related to work.

Younger developers more willing to contribute

The report reveals some encouraging signs, as well. Some 37 percent of the developers said they would contribute more to open source if their companies gave them the time to do so. In addition, despite some 44 percent of respondents saying they don’t contribute because they feel they lack the right skills and 45 percent saying they don’t know how to get started, the less experienced, and presumably younger, developers appear more open to contributing. A total of 60 percent of developers with five or fewer years of experience contribute to open source, while the number is “significantly less” for developers with more experience, says DigitalOcean. This bodes well for future contribution levels.

Developers in India were more likely to contribute to open source projects (68 percent) than any other nationality. Although DigitalOcean did not speculate, this may be due in part to the younger average age of Indian developers.

Motivations to contribute include the opportunity to improve coding skills, learn new technologies, and advance one’s career. Also noted was the less tangible benefit of being part of a community.

Among the many other findings in the survey, the leading programming language for open source projects was JavaScript (62 percent) followed by Python at 52 percent. The only other languages over 20 percent were PHP (29 percent), Java (28 percent), and CSS (25 percent). When asked which open source projects have “excited you the most” over the last three years, the React.js JavaScript library for building UIs took the top spot with 468 mentions, followed by Kubernetes (335), Docker (252), Linux (240), and Tensorflow (226).

Companies are failing to lead the open source charge by example. Only 18 percent of employees said their companies actively participated in open source organizations such as the listed examples: Apache Foundation, Node.js Foundation, and Cloud Native Computing Foundation. Three out of four respondents said their companies have donated $1,000 or less to such organizations over the last year.

Not surprisingly, high cost was the leading reason (38 percent) why companies skimp on open source donations and labor contributions. This was followed by a preference for in-house development (33 percent) and lack of knowledge of the listed organizations (27 percent). More promisingly, 29 percent said their companies plan to contribute to such organizations in the future.

When asked which of the five leading tech companies were doing the most to support open source, 53 percent listed Google, and Microsoft came in second at 23 percent. Next came Facebook (10%), Amazon (4%), and Apple (1%). Although IBM does not appear on this list, its $34 billion acquisition of Red Hat this weekend — the largest software acquisition in history — should boost its already extensive open source contributions in cloud software.