📜 ⬆️ ⬇️

Is it possible to develop on the iPad?

Programming is a creative process and often the desire to write a piece of code or to correct a momentary error becomes simply unbearable. Sometimes writing code requires external circumstances, such as a critical error in the code that brings down the project. For employees who occupy management positions in a team, we need the opportunity to conduct a code review and fix problem areas of the code.

It is good when there is a desktop computer or laptop on which a familiar development environment is deployed. But what if you are outside the workplace? Carry a laptop with you all the time? But in the first place, a large 13-15 inch laptop will not be deployed everywhere (for example, public transport), and secondly, carrying it all the time with you is still an occupation. You can certainly buy an 11 inch MacBook Air (or its equivalent), but still it will not be so compact and not so often used to justify the purchase.

Well, let's look at the devices that are now almost always with us - this is a phone and a tablet. The phone is certainly an extreme option, although now, with the advent of 6 - 6.5 inch models, the line between the phone and the tablet is erased. I have experience of successful recovery of a remote server via ssh from an iPhone 4s phone with a 3.5 inch screen. But we are still talking about the process of full-fledged work with the code, therefore, in my opinion, the minimum is a tablet with a diagonal of 7 inches, the screen of which contains information comparable to the screen of a large computer. I will show on the example of the iPad Mini possible uses for solving everyday tasks of a developer.
')


If you are interested in the topic - read on (carefully, a large number of pictures).

Conventionally, there are three directions, according to the way of interaction with the code:

- use of the text terminal, remote SSH connection and console editor of the Vim type configured on the server. The brightest representatives are Prompt (from the well-known company Panic) and vSSH
- use of native iOS applications-text editors: Textastic, Coda, GoCoEdit
- use of remote access to the main machine: RDP, VNC, TeamViewer, Parallels Access

Each of these methods has its advantages and disadvantages, which we will consider below.

Using a text terminal



Suppose you have a remote server and Vim is configured on it. Vim, by its nature, involves working only with the keyboard, so it ideally fits the pattern of using an external keyboard. You can find thousands of articles on the Internet about the flexibility of Vim settings - I’ll just say that a little doped Vim is not inferior to the editors from JetBrains, whose products I also actively use. If you are developing only the backend of the application and testing the results can be done from the console - I advise you to stop at this option (it is also advisable to configure Tmux).

As a terminal, you can either use a clever vSSH , in which you can configure everything at all, or a more hipster Prompt . In Prompt, it’s bad that a part of the screen is given to it under various auxiliary elements, which reduces the working area, but more pleasant color gamut and different "fishes".

Prompt:


VSSH settings


Custom VIM has autocomplete as keywords


and for the project as a whole (names of functions in classes)


as well as project navigation


Prompt - $ 7.99
vSSH - 279 rubles.

Native iOS apps



To summarize how to work with files (depends on the editor):

- SFTP
- WebDAV
- iCloud
- Dropbox
- built-in web server
- sync via iTunes
- integration via GitHub / Bitbucket
- integration with Amazon S3, DreamObjects

All editors allow you to work with several simultaneously open files.

All editors have very limited support for hot keys when working with the keyboard. In an interview, the creator of GoCoEdit said that Apple itself severely restricts developers in these matters. Those. forget about binding on every action - at best, this is Cmd-C / Cmd-V

No editor has built-in support for git, but there is the ability to integrate with third-party applications that implement this functionality.

Coda



Let's start with Coda (formerly Panic's DietCoda)

General form


to create a complete all-in-one development environment - it is possible to create 4 types of windows


Document - any file with code (PHP, Python, JavaScript)
Preview - built-in browser with the ability to call a playground with a link to the page
Terminal - the terminal window is a full-featured Prompt 2 integrated into the editor.
Playground - a kind of testing environment for JavaScript. From the closest analogues - this is a simplified JsFiddle. Why he is married - honestly did not understand.

It is understood that you can do a full development cycle without leaving the application.

Built-in terminal window


There is a dictionary autocomplete, but not for the project as a whole. That is, for example, in PHP, after entering the $ this-> construction class, nothing will appear.


Built-in browser. In the upper right corner of the callback icon Playground.
There is no equivalent of FireBug, so debugging javascript will need to be "blind."


Settings for a specific file


Simplified analogue LiveTemplates


Search


In general, I would say that this is a marketing product. There are a lot of wow chips like the same Playground that don't really help with the development.

It costs 599 rubles in the Russian AppStore.

Textastic



Textastic editor. A serious editor, which is well thought out development process.

General view of the editor.

Pay attention to the top row of keys with buttons, in which there is one character in the middle and 4 more along the edges. This is a brilliant invention. If you use iOS, you know that to access the characters $, _, etc. It is necessary to switch to another “screen” of the keyboard. This greatly complicates the set and slows down the input process.

How this series of specialized keys work: you “poke” into the button - the character is entered in the center. If you “poke” into the center and move your finger in the direction of one of the edges of the button, the character is entered from the corresponding angle. Believe it is very convenient.



You can customize the view of the editor in a wide range


There is a dictionary autocomplete, but there is no autocomplete for the project.


There is a feature navigation in the classroom.


There is a search


There is also integration with the Working Copy program (below), which allows you to work with git-repositories, as well as with GitHub and Bitbucket.

Choose Working Copy as source.


Then the desired repository and file


After the work is finished, the file can be zakomitit using Working Copy to a remote repository.

It costs 479 rubles in the Russian AppStore.

Working copy



Working Copy is not an editor in the classic sense. This is rather a full-fledged client for working with git-repositories. Analogs: iOctocat , Git2Go

All these applications allow you to connect both stand-alone git repositories and integrate with GitHub and BitBucket. Support branches, view commits, diffs, etc. As a rule, all these programs have free functionality for working with repositories in viewing mode. If you want to commit your changes, you will have to pay from 7 to 10 dollars.

Add a repository


Repository window


View file


As I wrote above, there is full integration with the Textastic editor.

The cost is free, but for full-fledged work you need to unlock the functions.

GoCoEdit



It can be seen that the GoCoEdit editor was written by a programmer for programmers. The design of the application is rather peculiar, but there are a number of features that are absent in other editors.

General view of the editor. Note the extra line with the characters at the top of the keyboard. The principle of operation as in Textastic, described above. The difference is that if Textastic has a five-way button, then there are only three: the center, right, left.



File window


There is a search in the dictionary


and functions in the classroom. I emphasize that the search is only for the current file, and not for the entire project, which greatly narrows the scope and usefulness.


Search


There is a special command mode. Since, as I said above, normal hot keys in iOS are not realizable (or poorly realizable) - the following hack is used here: when you click on the CMD button, an input window appears where you can enter shortcuts that implement this or that action. The combinations themselves are very similar to the shortcuts from VIM.


In the built-in browser it is possible to connect FireBug Lite.

It costs 349 rubles in the Russian AppStore.

Using remote access to a desktop computer / laptop.



I tried TeamViewer and some of the VNC clients with VPN forwarding to the home network. In general, it seemed to me that they didn’t really take into account the reality of the fact that the work goes under the iPad and, as a result, the usability leaves much to be desired.

When Parallels Access came out a few years ago, I was in the hands of a free one-year license that came bundled with Parallels Desktop. From what I have tried - this is the most sane product, but which is also not without flaws. The biggest drawback is the periodic messages “Slow internet connection” and “sticking” of the interface, although both the iPad and the laptop are on the 70 Mbit / s network. Fortunately, it does not happen so often and you can live with it. Now the annual subscription is 649 rubles / year.

PHPStorm running on a laptop


Application launcher


Google Chrome with an open console


In general, we can say that this is a working version, provided that you are sitting on a fast Internet channel. Of the benefits - a complete working environment on the iPad.

Conclusion



iPad can be used for full development. I use an external keyboard if there is an opportunity to put it somewhere and an on-screen keyboard if I need to do something on the run. The on-screen keyboard does not increase the size of the device and allows you to use it on the go, but it covers half of the already small screen. In addition - typing with a large number of special characters located on different "screens" of the keyboard, makes typing slow. The external keyboard requires placement, but leaves the screen free and allows you to type at the speed of a desktop computer.




If you are developing only a backend application that does not require testing in a browser - I would recommend a bunch of SSH client + VIM + tmux on the server.

If you are developing something on the frontend and you have an adequate Internet channel, I recommend the Parallels Access bundle + editor + full-fledged Google Chrome with the console.

Native editors are in a rather embryonic state. Prior to the arrival of serious players in this market and Apple’s steps towards a more advanced use of an external keyboard, this is nothing more than a backup option in case you do not have the Internet. All editors are sharpened to work with one file, and not the project entirely. I hope that with the advent of the iPad Pro, the situation will improve and we will get full editors. If you really fantasize - I wanted Apple to allow the MagicPad to be connected and show the cursor on the screen, so that you do not have to constantly “poke” on the screen.

Source: https://habr.com/ru/post/271901/


All Articles