1

Этап 1

Springing into action

12 января—22 января

2

Этап 2

Wiring beans

23 января—29 января

3

Этап 3

Advanced wiring

30 января—05 февраля

4

Этап 4

Aspect-oriented Spring

06 февраля—12 февраля

5

Этап 5

Building Spring web applications

13 февраля—19 февраля

6

Этап 6

Rendering web views

20 февраля—26 февраля

7

Этап 7

Advanced Spring MVC

27 февраля—05 марта

8

Этап 8

Working with Spring Web Flow

06 марта—12 марта

9

Этап 9

Securing web applications

13 марта—19 марта

10

Этап 10

Hitting the database with Spring and JDBC

20 марта—26 марта

11

Этап 11

Persisting data with object-relational mapping

27 марта—02 апреля

12

Этап 12

Working with NoSQL databases

03 апреля—09 апреля

13

Этап 13

Caching data

10 апреля—16 апреля

14

Этап 14

Securing methods

17 апреля—23 апреля

15

Этап 15

Working with remote services

24 апреля—30 апреля

16

Этап 16

Creating REST APIs with Spring MVC

01 мая—07 мая

17

Этап 17

Messaging in Spring

08 мая—14 мая

18

Этап 18

Messaging with WebSocket and STOMP

15 мая—21 мая

19

Этап 19

Sending email with Spring

22 мая—28 мая

20

Этап 20

Managing Spring beans with JMX

29 мая—04 июня

21

Этап 21

Simplifying Spring development with Spring Boot

05 июня—11 июня

1

Этап 1

Springing into action

12 января—22 января

2

Этап 2

Wiring beans

23 января—29 января

3

Этап 3

Advanced wiring

30 января—05 февраля

4

Этап 4

Aspect-oriented Spring

06 февраля—12 февраля

5

Этап 5

Building Spring web applications

13 февраля—19 февраля

6

Этап 6

Rendering web views

20 февраля—26 февраля

7

Этап 7

Advanced Spring MVC

27 февраля—05 марта

8

Этап 8

Working with Spring Web Flow

06 марта—12 марта

9

Этап 9

Securing web applications

13 марта—19 марта

10

Этап 10

Hitting the database with Spring and JDBC

20 марта—26 марта

11

Этап 11

Persisting data with object-relational mapping

27 марта—02 апреля

12

Этап 12

Working with NoSQL databases

03 апреля—09 апреля

13

Этап 13

Caching data

10 апреля—16 апреля

14

Этап 14

Securing methods

17 апреля—23 апреля

15

Этап 15

Working with remote services

24 апреля—30 апреля

16

Этап 16

Creating REST APIs with Spring MVC

01 мая—07 мая

17

Этап 17

Messaging in Spring

08 мая—14 мая

18

Этап 18

Messaging with WebSocket and STOMP

15 мая—21 мая

19

Этап 19

Sending email with Spring

22 мая—28 мая

20

Этап 20

Managing Spring beans with JMX

29 мая—04 июня

21

Этап 21

Simplifying Spring development with Spring Boot

05 июня—11 июня

12 января 2017 18 июня 2017
Цель завершена 20 мая 2017

Автор цели

Карьера и работа

Прочитать книгу Spring in Action

Очень клевая книга. Любой мидл и тем более сеньор должен хорошо знать спринг. И я вроде и что-то знаю, но не во всех деталях. Этой целью я хочу призвать себя к порядку и разобраться досконально в этом фреймворке. Книга пока по 3-й версии, потом еще надо будет освежить до 4-й версии (уже читать начал, поэтому не бросить её просто). Решил таки начать читать 4-ю версию.

Для прокачки английского, читаю в оригинале. План такой: читать по одной главе в неделю. Систематизировать прочитанное здесь или еще где-то, чтоб прочитанное не забывалось.

 Критерий завершения

Книга прочитана, информация законспектирована

 Личные ресурсы

Время

 Экологичность цели

Профессиональный рост

  1. Springing into action

  2. Wiring beans

  3. Advanced wiring

  4. Aspect-oriented Spring

  5. Building Spring web applications

  6. Rendering web views

  7. Advanced Spring MVC

  8. Working with Spring Web Flow

  9. Securing web applications

  10. Hitting the database with Spring and JDBC

  11. Persisting data with object-relational mapping

  12. Working with NoSQL databases

  13. Caching data

  14. Securing methods

  15. Working with remote services

  16. Creating REST APIs with Spring MVC

  17. Messaging in Spring

  18. Messaging with WebSocket and STOMP

  19. Sending email with Spring

  20. Managing Spring beans with JMX

  21. Simplifying Spring development with Spring Boot

  • 1217
  • 12 января 2017, 15:23

Вывод

129день
Радмир20 мая 2017, 13:24

Well, that was a great experience reading a whole technical book from cover to cover. For last 2 months it was quite challenging, cause I lost great part of my everyday free time but somehow I managed to find strength and finish the started reading.

The book was quite nice, with bright examples, nice definitions. But it was a merely simple touch to a huge Spring world. And looking at Spring documentation itself will give you all you need. But it was a nice experience with reading english book, so now I'm gonna read technical books only in English! :)

Дневник цели

129день

Запись к этапу «Simplifying Spring development with Spring Boot»

Радмир20 мая 2017, 13:18

The chapter covered:

  • Adding project dependencies with Spring Boot
  • starters
  • Automatic bean configuration
  • Groovy and the Spring Boot CLI
  • The Spring Boot Actuator

Spring Boot is an exciting new addition to the Spring family of projects. Where Spring aims to make Java development simpler, Spring Boot aims to make Spring itself simpler.

Spring Boot employs two main tricks to eliminate boilerplate configuration in a Spring project: Spring Boot starters and automatic configuration.

A single Spring Boot starter dependency can replace several common dependencies in a Maven or Gradle build. For example, adding only Spring Boot’s web starter as a dependency in a project pulls in Spring’s web and Spring MVC modules as well as

the Jackson 2 databind module.

Automatic configuration takes full advantage of Spring 4.0’s conditional configuration feature to automatically configure certain Spring beans to enable a certain feature. For example, Spring Boot can detect that Thymeleaf is in the application classpath and automatically configure the beans required to enable Thymeleaf templates as Spring MVC views.

Spring Boot’s command-line interface (CLI) further simplifies Spring projects with Groovy. By simply referencing a Spring component in Groovy code, we can trigger the CLI to automatically add the necessary starter dependency (which may, in turn,

trigger automatic configuration). Moreover, many Spring types don’t require explicit import statements in Groovy code run via the Spring Boot CLI.

Finally, the Spring Boot Actuator adds some common management features to a Spring Boot–developed web application, including insight into thread dumps, web request history, and the beans in the Spring application context.

129день

Запись к этапу «Managing Spring beans with JMX»

Радмир20 мая 2017, 13:15

That was a cool chapter about:

  • Exposing Spring beans as managed beans
  • Remotely managing Spring beans
  • Handling JMX notifications

With JMX, you can open a window into the inner workings of your application. In this chapter, we saw how to configure Spring to automatically export Spring beans as JMX MBeans so that their details can be viewed and manipulated through JMX-ready management tools. We also learned how to create and use remote MBeans for times when those MBeans and tools are distant from each other. Finally, we saw how to use Spring to publish and listen for JMX notifications.

129день

Запись к этапу «Sending email with Spring»

Радмир20 мая 2017, 13:13

Email is an important form of human-to-human communication and frequently a crucial form of application-to-human communication as well. Spring builds on the email capabilities provided in Java, abstracting JavaMail for simpler use and configuration in a Spring application.

In this chapter, we’ve seen how to use Spring’s email abstraction to send simple email messages, and you’ve taken it further by sending rich messages that contain attachments and that are formatted with HTML. We also looked at using templating

engines like Velocity and Thymeleaf to generate rich email text without resorting to creating HTML via string concatenation.

129день

Запись к этапу «Messaging with WebSocket and STOMP»

Радмир20 мая 2017, 13:10

Messaging with WebSocket and STOMP

This chapter covered

  • Sending messages between the browser and the server
  • Handling messages in Spring MVC controllers
  • Sending user-targeted messages

I've learned WebSocket from this chapter and how it works with bare JS, and a cool SockJS wrapper for those browsers that don't support WebSockets.

And even more, there is a STOMP protocol that brings another abstact layor over Websockets.

WebSocket is an exciting way to send messages between applications, especially when one of those applications is running within a web browser. It’s critical for writing highly interactive web applications that seamlessly transfer data to and from the server.

Spring’s WebSocket support includes a low-level API that lets you work with raw WebSocket connections. Unfortunately, WebSocket support is not ubiquitous among web browsers, servers, and proxies. Therefore, Spring also supports SockJS, a protocol that falls back to alternative communication schemes when WebSocket doesn’t work.

Spring also offers a higher-level programming model for handling WebSocket messages using the STOMP wire-level protocol. In this higher-level model, STOMP messages are handled in Spring MVC controllers, similarly to how HTTP messages are handled.

129день

Запись к этапу «Messaging in Spring»

Радмир20 мая 2017, 13:04

The chapter was about messaging - async way of communication between applications. It covered:

  • Messaging with JMS
  • Sending messages with Spring and AMQP
  • And async message-driven POJO

Asynchronous messaging presents several advantages over synchronous RPC. Indirect communication results in applications that are loosely coupled with respect to one another and thus reduces the impact of any one system going down. Additionally,

because messages are forwarded to their recipients, there’s no need for a sender to wait for a response. In many circumstances, this can be a boost to application performance and scalability.

Although JMS provides a standard API for all Java applications wishing to participate in asynchronous communication, it can be cumbersome to use. Spring eliminates the need for JMS boilerplate code and exception-handling code and makes

asynchronous messaging easier to use.

In this chapter, we’ve seen several ways that Spring can help establish asynchronous communication between two applications by way of message brokers and JMS.

Spring’s JMS template eliminates the boilerplate that’s commonly required by the traditional JMS programming model. And Spring-enabled message-driven beans make it possible to declare bean methods that react to messages that arrive in a queue or

topic. We also looked at using Spring’s JMS invoker to provide message-based RPC with Spring beans.

Alsow there was extension of JMS messaging standard - AMQP, that brings new several type of messaging queues.

127день
Радмир18 мая 2017, 10:19

BTW, for now I finished the book! :) will describe all the chapters a bit later.

124день

Запись к этапу «Messaging with WebSocket and STOMP»

Радмир15 мая 2017, 09:28

meanwhile, chapters 17 and 18 are finished. Will be summarized later.

Комментарии

Aleksey09.05.2017

Ты давно не отписывался в этой цели. Надоело читать Spring in Action? =)

Радмир11.05.2017

Aleksey, времени почти нет :) сейчас редко захожу, но вот дочитал таки 17-ю главу, скоро отпишусь

84день

Запись к этапу «Creating REST APIs with Spring MVC»

Радмир5 апр. 2017, 07:17

The chaper covered such things like:

  • Writing controllers that serve REST resources
  • Representing resources in XML, JSON and other formats
  • How to consume REST resources

So, you just write your regular controllers. And then you have to transform the output to the apropriate format by REST, by two options:

  • Content negotiation—A view is selected that can render the model into a representation to be served to the client.
  • Message conversion—A message converter transforms an object returned from the controller into a representation to be served to the client

For the first option there is ContentNegotiatingViewResolver. It checks requested media type(s) and finds the best suitable view for it. The key benefit of using ContentNegotiatingViewResolver is that it layers REST resource representation on top of the Spring MVC with no change in controller code. The same controller method that serves human-facing HTML content can also serve JSON or XML to a non-human client.

Message conversion is a more direct way to transform data produced by a controller into a representation that’s served to a client. When using message conversion, DispatcherServlet doesn’t bother with ferrying model data to a view. In fact, there is no model, and there is no view.

Message conversion based on client's Accept header.

@RequestMapping(method=RequestMethod.GET, produces="application/json")

public @ResponseBody List<Spittle> spittles(

@RequestParam(value="max", defaultValue=MAX_LONG_AS_STRING) long max,

@RequestParam(value="count", defaultValue="20") int count) {

return spittleRepository.findSpittles(max, count);

}

@ResponseBody rules!

There's also @RequestBody annotation to help transforming data to entity:

@RequestMapping( method=RequestMethod.POST consumes="application/json")

public @ResponseBody Spittle saveSpittle(@RequestBody Spittle spittle) {

return spittleRepository.save(spittle);

}

Spring 4 brings @RestController annotation, that automatically treats all methods as @ResponceBody.

Also methods can return ResponceEntity<> to have ability to pass Http error codes.

@RequestMapping(value="/{id}", method=RequestMethod.GET)

public ResponseEntity<Spittle> spittleById(@PathVariable long id) {

Spittle spittle = spittleRepository.findOne(id);

HttpStatus status = spittle != null ? HttpStatus.OK : HttpStatus.NOT_FOUND;

return new ResponseEntity<Spittle>(spittle, status);

}

And there also nice @ExceptionHandler to handle errors:

@ExceptionHandler(SpittleNotFoundException.class)

public ResponseEntity<Error> spittleNotFound( SpittleNotFoundException e) {

long spittleId = e.getSpittleId();

Error error = new Error(4, "Spittle [" + spittleId + "] not found");

return new ResponseEntity<Error>(error, HttpStatus.NOT_FOUND);

}

or even:

@ExceptionHandler(SpittleNotFoundException.class)

@ResponseStatus(HttpStatus.NOT_FOUND)

public Error spittleNotFound(SpittleNotFoundException e) {

long spittleId = e.getSpittleId();

return new Error(4, "Spittle [" + spittleId + "] not found");

}

Also there was a way to set headers through ResponceEntity and HttpHeaders classes.

About consuming REST services, there's a RestTemplate with a dozen of methods.

Вы тоже можете
опубликовать свою
цель здесь

Мы поможем вам ее достичь!

310 000

единомышленников

инструменты

для увлекательного достижения

Присоединиться
Регистрация

Регистрация

Уже зарегистрированы?
Быстрая регистрация через соцсети
Вход на сайт

Входите.
Открыто.

Еще не зарегистрированы?
 
Войти через соцсети
Забыли пароль?
Артур
Aleksey
Elena Morozova
Aleksey
Aleksey