Hello my friends. A few days ago I was giving a presentation about hybrid apps at the Sthlm.js meetup at Stockholm. And since I am still on that topic, I wanted to create a post about it too.
What are hybrid apps?
First, let’s figure out what a hybrid app actually is.
Most often it could be described in this way:
It is an app created with web technologies – HTML, CSS, Javascript. This app is displayed in a native WebView layer. It has access to the native functionality. It can be distributed via an App store as a native app. It can be Google Play, Apple AppStore or any other. And finally, it feels like a native app.
I think the last part – feeling like a native – needs some attention.
After writing my previous post about Sass, I have realised that it is important to write a little tutorial on Command Line usage too. It will complement the recent post exploring why to use the command line and will let you to easily use the Command Line tools and its utilities. Let’s get started.
The Command Line program will be used a bit different depending on which operating system you are using – Linux, Mac or Windows. In this article I will only discuss *nix systems – i.e. Linux and Mac since they both have lots of things in common when working with a Command Line. Windows are a bit different (though the principles are the same) and therefore a separate article is coming about it. If you are using some other operating system, I will assume that you have enough knowledge about it and will be able to apply the principles discussed in this article too.
Starting the Command Line
The biggest difference of the Command Line on Mac and Linux is that on Mac it is called Terminal and on Linux it can be called Terminal, Konsole or even more specific, like Gnome-konsole. Kidding. If you dig deeper you will be able to spot the differences, but once again, the basics described in this tutorial do not differ much.
First, let’s start the Command Line. Terminal on Mac is located in the Applications folder. Alternative is to just type “Terminal” in the spotlight search.
On Linux, say Debian, you need to start the Konsole program. More detailed info on starting the Command Line on various distributions of Linux can be found here.
When you have started the Command Line, you will be presented with a black or white (depending on the configuration) window with the input prompt. It can look like this:
or this:
Now, you can write various commands into the prompt to:
Command line. Some are afraid of it. Some hate it. And some just love it.
I am neither of them. I consider tools I use in my everyday live to be just tools and I use them if they do solve the problem. If I need a graphical design – I will probably use the Photoshop or Gimp. If I need to edit a text I may use Word. If I need to work with Maven dependencies I will use the Command line.
So let’s treat it, the Command line, just as any another tool or program. Gimp. Word. Command line. When you need Word, you use Word. When you need Command line, you use Command line. Does it make sense? It is not something from the other world. It is a tool.
When to use a command line
Then comes the next big question – when to use the command line. Well, it is usually not used by simple users who just browse the internet or make a PowerPoint presentation. It is mostly used by developers and system administrators to automate or speed up certain tasks. It is like digging the ground yourself or let an excavator do it.
I personally have used it and find it a perfect tool for the following:
running commands of Git (which is a code version control system saving the history of your code)
automation scripts and helper scripts
package managers (Maven, Node package manager)
connecting to the server, executing the commands there, editing text files there
taking advantage of the developer tools – such as Phonegap, Grunt, Less, Sass, Javascript minification, etc.
Developing and configuring the web: server configuration, WordPress, Drupal development and management.
If you don’t know some of the tools above – don’t worry, I am planning on covering these in the upcoming articles. Most of them are just amazing helpers that will make your life easier.