5. 다루지 않을 내용
● ActionCable
○ ActionCable javascript 클라이언트 위주의 패치내용 밖에 없음.
○ JS 클라이언트는 웹소켓 서버 연결 종료 후 재접속하는 알고리즘이 변경되었음.
■ https://github.com/rails/rails/pull/40229
● ActionText, ActionMailbox
○ Rails way로 Rich Text, Email을 다루기는 하지만,
그렇게 많이 쓰이지도 않을 뿐더러 이렇다 할 변경사항도 없음.
● ActionView, ActionPack, ActiveModel
○ 변경사항이 있긴 하지만, 그렇게 임팩트있는 변화는 아님.
○ (9/18) ActiveModel::API 라는 module이 추가됨. (ActiveModel::Model은 하위호환성 제공)
6. ActiveStorage (1)
● Add ability to use pre-defined variants.
모델에 첨부하는 이미지에
variant를 지정할 수 있도록
프레임워크 차원에서 ability를 제공
기존에는 module mixin으로 해결하는 경우가 많았음.
7. ActiveStorage (2)
● variant processor로는 mini_magick 대신 vips가 쓰일 예정
○ Mini_magick은 deprecated 되지 않고, rails 7에서도 계속 호환될 예정
● Audio Analyzer가 추가됨. (duration, bit_rate 등의 속성을 추출할 수 있음)
○ pdf analyzer도 추가될 수 있음(아직은 pr 대기 상태)
8. ActiveSupport (1)
● 좀 더 간결해진 Rails Credentials 변수 접근
Before
Rails.application.credentials.aws[:production][:access_key_id]
After
Rails.application.credentials.aws.production.access_key_id
9. ActiveSupport (2)
● rails app:update 명령으로 버전 업그레이드할 때,
en.yml, storage.yml, puma.rb, routes.rb 파일을 덮어씌우지 않게 됨
● Enumerable 클래스에 편의 메서드 제공
Enumerable#sole
Enumerable#maximum
Enumerable#minimum
Enumerable#in_order_of
10. ActiveJob (1)
● 반드시 끝내야 하는 background job이라면
retry_on 메서드의 attempts 파라미터에
:unlimited 옵션을 넘겨줄 수 있게 됨.
12. ActiveRecord (1)
● 전화번호, 주민등록번호, 주소 등 민감한 필드를 암호화해서 저장할 수 있게
됨.
(ability to perform application level encryption)
https://edgeguides.rubyonrails.org/active_record_encryption.html
13. ActiveRecord (2) - Query
● 컨트롤러에서 SQL 쿼리가 실행될때마다 쿼리에 대한 로그가 남게 됨
https://github.com/rails/rails/pull/42240
-> https://github.com/basecamp/marginalia 가 Rails에 디폴트로 포함됨
18. ActiveRecord (6) - Query
● ActiveRecord::Relation#load_async
Database에서 Table을 조회하는 작업을 스레드에서 비동기적으로 처리한다.
서로 독립적인 테이블을 조회하는 작업이라면, 성능 개선에 도움이 될 수 있음.
19. ActiveRecord - 다루지 못한 내용
● Multiple Database 지원
○ 개인적인 경험의 부재로 깊이 있게 알아볼 여력이 없었음.
21. Javascript Bundling without Webpacker
● Rails 7부터 webpacker가 아닌 importmap이 들어갑니다.
This frees you from needing Webpack, Yarn, npm, or any other part of the
JavaScript toolchain. All you need is the asset pipeline that's already included in
Rails.
https://twitter.com/yarotheslav/status/1427589848400072704
22. Importmap-rails : import JS modules with Ruby DSL
package.json, webpacker.yml, [environment].js 등의 파일을 건드릴 필요없이,
importmap.rb 파일만 수정해도 JS module import가 손쉽게 된다!
Alpha preview: Modern JavaScript in Rails 7 without Webpack : https://www.youtube.com/watch?v=PtxZvFnL2i0
23. Inside of importmap-rails
https://wicg.github.io/import-maps/ : 아직까지는 공식적인 표준은 아닙니다.
https://world.hey.com/dhh/modern-web-apps-without-javascript-bundling-or-transpi
ling-a20f2755 : Hotwire, Trix, ActionCable.js 등의 JS 라이브러리가 레일즈에
포함되고 있는 맥락에서 읽어보면 도움될만한 글
Alpha preview: Modern JavaScript in Rails 7 without Webpack : https://www.youtube.com/watch?v=PtxZvFnL2i0
24. (9/6) JS bundling with different ways
https://world.hey.com/dhh/rails-7-will-have-three-great-answers-to-javascript-in-20
21-8d68191b
https://github.com/rails/jsbundling-rails
25. (9/7) CSS bundling
● Rails 프로젝트를 생성할때
CSS 전처리기를 Tailwindcss, postcss, sass 중 선택할 수 있게
옵션을 제공하도록 패치될 예정
https://github.com/rails/cssbundling-rails
27. 첨언
● 내가 주로 사용하는 프레임워크의 릴리즈 노트를 읽어보면서 정리해보니,
내부의 동작원리를 좀 더 잘 이해할 수 있게 되었습니다.
● 릴리즈노트를 간혹 보다보면, 추상적으로 설명된 부분이 종종 보이는데
관련 내용이 언급되어 있는 PR을 찾아보는게 이해에 도움이 됩니다.