JavaRush /Java Blog /Random EN /We write a real project for a portfolio - "Java project f...

We write a real project for a portfolio - "Java project from A to Z"

Published in the Random EN group
Hello, future Senior Software Engineers ! For the past few months, I have been writing simple articles that describe important parts of the development. Today I'm going to share my idea! I want to help you get your first job. What is needed for this? For this you need to gain experience. Understand what these very projects consist of, on which engineers work and move the world of information technology forward.

All materials of the series:

“Java project from A to Z”: writing a real project for a portfolio - 1How to do it? You need to write something. Therefore, within the framework of this series of materials, we will write our telegram bot step by step (details below). And at the same time - we will deal with the stack of technologies that are necessary even for a novice Java developer.

Target

Write a project that will combine both working with databases, and creating the business logic we need, and setting up the work of deploying the project and testing it. What will we write? If you already write, then you need to write something really useful, so that there is interest in the work and someone could use the result. Based on these data, a telegram bot will write, which will work with the CodeGym website. Will it be useful? Undoubtedly! Due to the fact that telegram bots are not so difficult to write, you can get a working project quickly enough that can be useful.

Development timeline

Articles will be published once a week, so there will be enough time to master / review / write questions if something is not clear. The first articles will be the theoretical foundation that we will use in the project. And then it's just practice.

MVP (Minimum Viable Product)

“Java project from A to Z”: writing a real project for a portfolio - 2What is MVP? The term, as usual, is not ours, but you can find a tolerable explanation on the wiki . We quote: MVP is a product that has minimal, but sufficient functions to meet the first needs. The main task is to receive feedback to form hypotheses for the further development of the product. For us, this description fits the best. A quick description of all the functionality: As a Telegram user, I want to be able to subscribe to new articles in groups and receive notifications when new ones are released. I love reading the Success Story group , it motivates me to continue learning, to learn something new. I'm lazy and don't want to visit and refresh the page every time. Therefore, I, as a programmer, want to make my life easier and write a program that would send me a message in Telegram that a new article has been released. Further more: this is not the only group that I follow. I am from Kharkov, so I am interested in reading the articles that are published there. As a developer of this product, I will be very interested in whether someone uses my work, so we will add functionality for admins so that we can see the statistics of the telegram bot. Can it be done? Certainly! How? This is what I will show in a series of articles.

code name

Every cool project should have a code name. Ours will not be an exception, so at the moment it will be like this: JRTB (CodeGym Telegram Bot). Here and henceforth it will be called so.

What topics will we cover?

“Java project from A to Z”: writing a real project for a portfolio - 3

Database

You need to immediately understand that it is impossible to keep the state (data and information) in the application. The data needs to be stored in a database. Since there is no information on it in the training (as far as I remember :D), I will try to fill in the gaps in the knowledge that we will need. I will try to keep the database schema as simple as possible so that there is no stupor. This part will include:
  1. SQL theory based on MySQL.
  2. MySQL tool - MySQL Workbench.
  3. Database versioning. Flyway and liquibase.
  4. Create a database schema.
  5. Create a database schema drawing.

git

There are already articles on this topic. Of course, nothing will work without a version control system. To start working on JRTB, you need to understand the git. You can do it yourself, or you can read my articles on this topic: If you wish, you can also read about branching strategies, but here it is not critical and you can skip it.

Maven

Here we will talk about the build system, what it is for, how we will use it, what to look for, good manners. Also here we will talk about versioning, how exactly we will do it.

Docker

In order to make our life easier and easier, and the deployment process as simple as possible, we will use docker. To do this, let's talk about what docker is, what useful commands are. I want to say right away that I use docker at the user level and I may not know or be able to do something)) So if someone suggests how to make working with docker better / easier, I will only be happy about it. This part will include:
  1. Theory and practice of Docker.
  2. Backup/restore data via docker.
  3. Setting up our project so that it spins in docker.

bash scripts

To automate work, sometimes it is useful to write one/two scripts. Bash scripts are scripts that all developers understand to one degree or another, because in essence this is command line work in Linux, just saved in a separate file.

Create an application

All drive will be here. Based on previous knowledge, we will build a Spring Boot application that will contain a telegram bot object. What are we going to do here?
  1. Creating a complete description of the functionality that should be.
  2. A brief description of what a telegram bot is.
  3. Creating a Spring Boot Application.
  4. Description of work with Lombok.
  5. Description of work with UniRest.
  6. Implementing the Command pattern + working with creating your own annotation for admin commands.
  7. Creating a client to work with CodeGym requests (such as a list of groups, a list of articles in a group) using UniRest.
  8. Testing. Let's write all possible tests to cover our functionality.
  9. Setting up a system for checking code quality and automatically building on GitHub.
  10. Database connection along with database versioning.
All these steps will be done step by step, in order to better understand what is going on.“Java project from A to Z”: writing a real project for a portfolio - 4

Future results

As a result, we will get a real project that everyone who will read the articles can implement. The beauty of the telegram bot is that it will be possible to link this project to any bot so as not to be dependent on the bot that will be in the articles. More to the point, this is just the beginning of JRTB. In the future, it will be possible to discuss/add new functionality. Make this bot useful to all students of the CodeGym project. And the feeling that other people use your creation and they like it is worth a lot! And you, as readers of this series of articles, will be able to get real experience working on a real project. Traditionally, I propose to subscribe to my account on github, in which I post solutions and projects. All work on JRTB will go through GitHub, so I encourage you to sign up if you haven't already. Thank you all for reading, see you soon :)“Java project from A to Z”: writing a real project for a portfolio - 5
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION