RSS

Spring Data JPA Basics

Episode 61

In the previous episode, we covered basic concepts of web services in Spring framework. Today we will build upon that foundation and take a look on how to transfer some data between our Spring Boot application and the database. Getting started with this part requires just a bit of effort to set up the aforementioned database and configuring our application, so the two can talk to each other, but no worries I will go through this step by step.

wallup-13611.jpg

As usual, all the code presented in this article is available on my GitHub in the same project as before. This tag corresponds to project state at the time of writing this article. Before we dive into the configuration and code, let’s start with some underlying concepts, namely ORM and JPA.

Foundations

ORM, or Object Relational Mapping is a technique of mapping data between objects in object oriented languages and relational databases. Complications stem from the fact, that objects form graphs in the mathematical sense, and relational databases comprise of Read the rest of this entry »

 
6 Comments

Posted by on March 16, 2017 in Spring, Technology

 

Tags: , , ,

Spring Web Basics

Episode 60

Here is the second part of Spring back-end series for beginners. Part zero appeared half year ago, and was focused on Angular front-end. Part one was two weeks ago, and consisted of some basic concepts of Spring framework including inversion of control, dependency injection, beans, configuration and profiles. Today we are going to look into Spring web, in particular web services and handling incoming HTTP requests. There will be no fancy front-end stuff this time, just naked request and response.

steampunk_spider_lamp_by_catherinetterings-d6ugb5v

As usual the introduction to the topic and going over basic concepts might well be at least one separate article but let’s try to do all at once. We will cover the concept of HTTP protocol, servlets, web services, REST and JSON. If you would like to play with complete application working out of the box, visit my GitHub project Spring Angular Intro. This tag corresponds to project state at the time of writing this article.

Foundations

HTTP or Hypertext Transfer Protocol, belongs to the application layer of Internet Protocol Suite, so it’s the highest-level layer above transport layer (like TCP), network layer (like IP) and link layer (like Ethernet). HTTP request contains Read the rest of this entry »

 
4 Comments

Posted by on March 9, 2017 in Technology

 

Tags: , , , , ,

Boiling Frogs Wrocław 2017

Episode 59

Last Saturday, on February 25, I attended Boiling Frogs – software development conference held in my home city, Wrocław. It’s the second edition of the event, this time it took place at Wrocław Congress Center near Cenntenial Hall, one of the city landmarks. There were 31 talks / lightning talks in total, spread across three tracks covering variety of subjects not tied to any specific programming platform but focusing mostly on more generic aspects of coding, building organizations, solving problems and software craftsmanship in general.

c2d4qvhwiaaalrh

Unfortunately, I arrived a bit late and missed the keynote. Apparently, the closer you live to the place you are supposed to be on time, the lower are the chances of it happening – the universal rule. In addition, the day before I drove 300 km to Kraków and back again, and people need to sleep sometime.

Talks

I managed to be on six talks and one lightning talk in total, basically all of them were really good. let’s do a small recap of each of them. Read the rest of this entry »

 
Leave a comment

Posted by on March 2, 2017 in Technology

 

Tags: ,

Spring Core Basics

Episode 58

This week I was planning to publish introduction to Amazon Web Services, but since I’m working on preparing Spring-based web applications development course for Wrocław University of Technology students with my two colleagues, I decided to change the schedule a bit. I planned to write few articles about Spring framework anyway, but in order to fit everything before particular classes in March and April I need to start exactly now.

a1dac3474b1a296e8ec8b14647ec7798.jpg

I wrote a Spring Hello World article over two years ago actually, but today I wanted to talk a bit more about some fundamental concepts: Inversion of Control and dependency injection. Let us take a closer look at application structure, configuration, components and wiring. There will be quite a lot of code snippets. If you would like to play with complete application working out of the box, visit my GitHub project Spring Angular Intro. The application is based on the one I prepared for Angular Intro article in September 2016, but now we will focus on back-end exclusively. This tag corresponds to project state at the time of writing this article.

Concepts

Classic approach to program structure is that we write custom, high-level code which calls lower level code.  The flow of control goes from our code to a generic framework or libraries. Inversion of control is a technique, where Read the rest of this entry »

 
2 Comments

Posted by on February 23, 2017 in Spring, Technology

 

Tags: , , , ,

Cloud Computing Intro

Episode 57

Last week we talked about virtual machines and containers and rapidly growing popularity of the latter. Another subject that people in software development talk a lot is the cloud. Everyone wants to be in the cloud nowadays, there is a number of good reasons to do that and some reasons not to.

2322dc8bfd0a655059a0b4d0301ea218.jpg

Originally, I wanted to write an introduction to Amazon Web Services this week, since I’m into this topic recently. However, I realized that the introductory paragraph about the cloud in general is growing too fast and it requires a separate article. Let’s start with a bit of history of cloud computing. Remember: There is no cloud. There is just someone else’s computer.

Cirrus: Long Time Ago…

After the initial developments in computing technology, in sixties and seventies, it was typical, that organization had one large computer, the mainframe, and people were connecting to it over the network using terminals, just to send data and receive results. Then, there was the microcomputer revolution, and Read the rest of this entry »

 
2 Comments

Posted by on February 16, 2017 in Cloud, Technology

 

Tags: , , , ,

Virtualization and Containers Intro

Episode 56

Container revolution is one of the hottest topics nowadays in software development industry. The little blue whale, the Docker logo, can be seen on most programming conferences as well as numerous Twitter feeds of, so called, IT influencers.

676811.jpg

Today, along with containers, we will talk about their older and fatter siblings: virtual machines. It’s good to understand similarities and differences between those two and how to take advantage of that. We will talk about what containers are and what they are not. Contrary to what might have seem, containers did not render virtual machines entirely obsolete and there are reasons to use both.

Virtual Machines

Virtual machines are emulations of computer architectures and provide functionality of a physical machine using appropriate combination of software and hardware. It’s not a new concept, as first implementation dates back to systems developed in the sixties like IBM CP-40. They are commonly used to Read the rest of this entry »

 
2 Comments

Posted by on February 9, 2017 in Cloud, Technology

 

Tags: , , ,

Software Gardening: Beyond Craftsmanship

Episode 55

In the past I wrote quite a lot about the nature of software developer. There was a comparison to scientist, then engineer, martial artist and finally to something based on medieval craftsman, who combines all three to an extent. However, some time ago I’ve encountered yet another metaphor for our profession that felt quite appealing.

little_gardener_by_irina_ponochevnaya-d9qc7m0

It’s the Software Gardener. The person that works not on an inanimate object, but on living, organic ecosystem that is constantly changing in unpredictable ways, and depends greatly on environmental factors. Let’s see what it’s all about.

Birds Are Chirping About the Gardener

The metaphor is not that common. I sit quite a lot on LinkedIn (probably more than typical software developer does and should) and I recall only one person that called herself that. Google finds about 5k results on “software gardener”, not much compared to 159k on “software craftsman”, 33M on “software developer” or 44M on “software engineer”. While the parallel to software craftsmanship was first drawn in 1992 by Jack Reeves, the parallel to gardening is not that young either. Read the rest of this entry »

 
Leave a comment

Posted by on February 2, 2017 in Misc

 

Tags: ,

The Charisma Myth

Episode 54

It’s time for another book review! Since, it’s still January, the month of recaps, let’s recap what I’ve reviewed so far. There were four books:

  • Episode 40: Building Microservices
  • Episode 25: Software Craftsman: Professionalism, Pragmatism, Pride
  • Episode 23: Software Craftsmanship: The New Imperative
  • Episode 17: Secrets of the Rock Star Programmers

What they all have in common? Well, they are about software development. Today, we are going to do something seemingly different. I will present you a book written by Olivia Fox Cabane, a person who has pretty much nothing to do with our industry. The book is called The Charisma Myth: How Anyone Can Master the Art and Science of Personal Magnetism. It’s a good book. And damn useful in software development.

What if charisma can be taught?

the-charisma-mythThere are people with magnetic presence, who are influential, inspiring, persuasive, charming and able to harvest the undivided attention of crowds. The common understanding is, that it’s a gift, a talent or an innate ability. You just either have it or not.

The common understanding is wrong. In the book, Olivia explains that charisma is simply a skill. Of course, different people have different degrees of talents toward learning particular skills, but nevertheless – it can be trained. Perhaps not everyone can be a master, but hey, being an expert or even decent at it can make great deal of difference in your life, both private and professional. Maybe you are not a politician, show host or CEO, but you usually deal with people to some degree (please get out of the cave…). And when being development team member or leader, scrum master, manager, product owner, administrator or whoever in IT, you benefit from charisma. If you help new people around, conduct a programming training, give a speech on tech conference or go talk with your boss about pay rise, you benefit from charisma. Let’s see how Read the rest of this entry »

 
Leave a comment

Posted by on January 26, 2017 in Books

 

Tags: , , ,

The Story So Far and The Road Ahead

Episode 53

It’s time to do some summary of my writing up to now and lay down plans for 2017. Usually people write such articles at the end of December or beginning of January, but my article about the Hobbits journey through layers of abstraction grew a bit longer than I’ve initially anticipated and I didn’t want to interrupt the series. So here it is, in the second half of January: The story behind How To Train Your Java, some numbers, summary and further ideas.

Timeline

Every story has to begin somewhere. Let’s list some milestones the blog went through from the very beginning. One day I’ve decided, that I want  a blog. With a dragon, because why not.

ws_Magical_Forest_Path_1920x1080.jpg

2014

  • August: It all started here. My initial idea was to write an enterprise application with all development infrastructure, tools, elements and all fancy stuff. I wrote twelve articles this month, mostly concerned with researching what to use for my project.
  • September: I started to drift away from the initial concept, did some categorization, two articles on Java optimization and retrospectives. The pace of one article a week was established.
  • October: There was a first book review, and three articles about conferences in Antwerp and London I’ve attended.
  • November: Hello World’s month. Besides another book review, I wrote about basics of Spring, GWT and Vaadin.
  • December: One article. That’s the moment where my motivation vanished. I lost interest in my project, and writing went down alongside.

Read the rest of this entry »

 
Leave a comment

Posted by on January 19, 2017 in News

 

Tags: , ,

From Java Source to Bare Metal, Part Four: The Battle of Eight Cores

Episode 52

This is the fourth and final episode of our little Hobbit’s journey through layers of abstraction of web application and all its foundations down to hardware. Starting in episode 49, we traveled all the way from Java code, web framework, web server, Java virtual machine, container, operating system through Internet Protocol Suite. It’s time to meet the Bare Metal.

smaug-the-hobbit-dragon.png.jpg

The Hobbit paced across maze of corridors and shafts inside the mountain to finally emerge through the main gate and run down the valley to breathe a fresh air. A moment later he froze, turned around, looked up and realized his grievous mistake. The Physical Dragon was not above the Lake City anymore. He was lurking at the mountain side, just above the gate, piercing terrified Hobbit with his gaze.  

Fire and Water: The Bare Metal

Everything we talked about up to this point was basically software. Now it’s time to look into our Hobbit whereabouts from the physical machine point of view. We started with an assumption, that we have a reference to the Hobbit object in our Java code. The object lives on Read the rest of this entry »

 
Leave a comment

Posted by on January 12, 2017 in Technology

 

Tags: , , , , , , ,