preface

This chapter focuses on how to use the various Jetbrains tools, and I attended Jetbrains Developer Day last week to share my experience with you. Without further ado, let’s get down to business.

use

You’ve probably used any of Jetbrains’ products, or heard of them if you haven’t. Jetbrains has been divided into three modules since its inception

  1. Developer Ide (integrated development Tool)
  2. Language (Kotlin for Jetbrains)
  3. DevOps (something about task management, continuous integration, continuous deployment)

For Developer ides I recommend using the Jetbrains ToolBox, which is the tool for managing all Jetbrains ides.

Jetbrains does minor updates on average once a month, so with the Jetbrains ToolBox you don’t have to worry about updates anymore. The Jetbrains ToolBox also provides a list of projects, so if you need to open a project, you don’t have to care which language the project is in, just open it and select the projects you want to open.

For those of you who are using Alfred, the directory for the Jetbrains ToolBox Ide installation is not /Application but ~/Application, so be sure to add it to the searchable list, otherwise you won’t find the startup file.

Take PhpStrom as an example to explain some of the interesting configurations of the Jetbrains Ide.

Fast coding

This is a trick that teacher Fan, the developer of Jetbrains, talked about on The day that you need to turn on

Preferences -> Editor -> {General->Postfix Completion || Live Templates}

General->Postfix Completion and Live Templates are both intended to provide Settings for coding speed. First, let’s look at Live Templates

Press space when typing fore (or enter, Tab, which you need to set)

A complete foreach statement appears, which you can use as a fill-in-the-blank to complete the structure

fore 
----> 
foreach ($ITERABLE$ as $VAR_VALUE$) {
    $END$}Copy the code

Of course there are others such as eco -> echo, prof -> create a protected class method. By default, the Ide already has some common shorthand methods for at least every language you know. Of course, you can add new templates if you don’t have what you want.

The second is to introduce General->Postfix Completion, which is a different kind of editing to the first. The first is to generate a template by typing an initialization command such as Eco -> echo. The second is to easily generate templates in the form of objects. Let’s take chestnuts

When you typea ! == null) {}

$a.notnull
---->
if ($a! == null) { }Copy the code

Because you don’t always have the entire process structure in mind when you’re coding, Live Templates can be a bit of a limitation. This is where General->Postfix Completion comes in. Finally, we’ll look at File and Code Templates. Generating Code quickly and then generating Code is something you do at the beginning of coding. To make coding faster, you’ll need to add common File Templates

For example, if you have been using the Laravel framework for a long time, when writing a feature in Laravel we will go through the following steps

Declare a route -> create a Controller,Model,Action… File -> Call Model to operate data -> Return results to user

If you use PhpStrom you write something like this

  1. Open the routing file router+ space to automatically generate a routing structure (of course you need to set it in advance).
  2. Create a Php Controller,Model,Action file with structure already set
  3. Use General->Postfix Completion Settings to complete all operations in minutes

Database

PhpStrom has a built-in Database, and the panel is very simple and easy to use. The upper right corner of his panel

Api

PhpStrom has a built-in interface Test tool. You can use Tools -> Http Client -> Test RestFul Web Service.

You don’t have to open universal Postman. You can use the IDE’s built-in testing tools to complete API tests. There is an even more powerful way -> create a test. HTTP file

GET www.baidu.com
Copy the code

Like above, click Run and you’ll get Response

GET http://www.baidu.com

HTTP/1.1 200 OK
Date: Fri, 23 Nov 2018 05:19:42 GMT
Server: Apache
Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT
ETag: "51-47cf7e6ee8400"
Accept-Ranges: bytes
Content-Length: 81
Cache-Control: max-age=86400
Expires: Sat, 24 Nov 2018 05:19:42 GMT
Connection: Keep-Alive
Content-Type: text/html

<html>
<meta http-equiv="refresh" content="0; url=http://www.baidu.com/">
</html>


Response code: 200 (OK); Time: 71ms; Content length: 81 bytes
Copy the code

Postman, of course, is no slouchier than it is. Now that the software has been coded, we can conveniently implement all the functions in Postman in.HTTP files. Request parameters can be added

GET http://www.baidu.com
Content-Type: application/json
{
"name":"zhangsan"
}

Copy the code

Each request ends before the following request mode. Please refer to the official website for details.

The theme

He that would do a good job must sharpen his tools. Jetbrains is just the tip of the iceberg. To learn how to use it, go to the official website. A handsome UI is also part of tweaking development efficiency. Seeing how beautiful your IDE is, coding is in a good mood. I used the Material Theme UI

Adjustments about fonts can be made under Editor -> Font

Of course, if you’re not just doing PHP development, and you’ve managed to configure an IDE that you like, you don’t need to do this with Goland when you write Go. You can Export your configuration using File -> Export Settings

Then go to File -> Import Settings to Import your configuration. That’s OK. If you have purchased a Jetbrains bucket or any Ide, you can use File -> Sync Settings To Jetbrains Account To synchronize To your Jetbrains Account, similar To cloud synchronization.

convenient

All that’s left is the shortcut keys, which are the foundation of IDE coding. What? Don’t need? Why don’t you use Word? I’m not going to summarize the shortcuts, there are so many on the Internet. A summary of one of laravel-China’s great gods is posted below.

Laravel-china.org/topics/5420…

The conference

So that’s part of the conference. Jetbrains’ Developer Day isn’t all commercial, but at least it does something worthy of recognition. I can’t share the PPT with you, and I don’t know how to get it. I’m sorry! The main contents of the conference are as follows: the main conference is in the morning, and the afternoon is divided into two conferences: Kotlin & Java and Web. As a PHP programmer, I have no choice.


In the morning

  1. At the beginning of the conference, they talked a lot about the use of their language, Kotlin.
  2. Then we talk about the internal workings and management of Jetbrains
  3. Start IDE -> Kotlin displays Kotlin features

In the afternoon

  1. Simple and efficient PHP programming guide, recommended testing, debugging methods & libraries and PhpStrom use methods
  2. Go Performance tuning in the Real world
  3. Learning efficient development with TDD Starts with this big guy writing a bunch of Java test cases that he doesn’t really understand. A little bit about the life of a program
  4. JetBrains’ Painless DevOps Solution finally covered some of the JetBrainsDevOps kits such as TeamCity (similar to TravisCi), Upsource, and more. Specific reference www.jetbrains.com/devops/?fro…

All in all, mostly dry goods, at least I feel there is no commercial publicity nature.

Thank you

That’s the end of this chapter. Thanks for reading, but I have a word of caution for developers

Do not make your editor Chinese. Do not make your editor Chinese

I’m sure you can understand. Thank you very much!