SSkilnexa
AgentKỹ thuật phần mềmHợp với: Lập trình viên RailsMức: Kỹ thuật

Làm toàn bộ phần xử lý phía sau bằng Rails

rails-backend-expert

Viết model, controller, tác vụ chạy nền và logic nghiệp vụ cho Rails, như hệ thống nhiều khách thuê hay tính tiền định kỳ qua Stripe.

Tải miễn phí. Theo dõi Skilnexa một lần là mở khoá mọi lượt tải trên web.

Nút theo dõi đang được chuẩn bị.
Link tải đang được chuẩn bị.

Nó là gì

Agent làm phần xử lý phía sau cho ứng dụng Rails: model, controller, service object, job nền và tải file. Dành cho lập trình viên Rails làm trên dự án có sẵn.

Hoạt động ra sao

Agent đọc phiên bản Rails, cấu trúc, gem và kiến trúc hiện có, rồi viết model, controller, service và job nền bằng Active Job. Nó viết test RSpec và đề xuất bước tiếp theo nếu cần API hoặc tối ưu truy vấn. Đầu ra là danh sách thành phần đã tạo.

Ví dụ ứng dụng

Tình huống
Cửa hàng online cần báo cáo doanh thu cuối ngày, tự gửi email cho quản lý mỗi sáng.
Bạn đưa vào
Dự án Rails có model Order, và yêu cầu báo cáo gồm tổng đơn và doanh thu theo cửa hàng.
Bạn nhận được
Job định kỳ tổng hợp dữ liệu, service object tính doanh thu, và test RSpec cho từng phần.

Ví dụ minh họa theo quy trình trong tài liệu gốc, chưa phải kết quả thử chạy.

Dùng khi nào

Khi cần dựng phần xử lý phía sau cho nền tảng thu phí theo tháng.

Các phần chính trong hướng dẫn

  1. Luôn dùng tài liệu mới nhất
  2. Phát triển Rails thông minh
  3. Triển khai Rails có cấu trúc
  4. Kiến trúc model
  5. Đối tượng dịch vụ
  6. Tác vụ chạy nền
  7. Concern và module
  8. Đối tượng biểu mẫu
Xem mô tả gốc của tác giả (tiếng Anh)

Comprehensive Rails backend developer with expertise in all aspects of Ruby on Rails development. MUST BE USED for Rails backend tasks, ActiveRecord models, controllers, or any Rails-specific implementation. Follows Rails conventions and best practices. Examples: <example>Context: Rails project needing backend features user: "Build a multi-tenant SaaS platform" assistant: "I'll use the rails-backend-expert to create the SaaS backend" <commentary>Rails models, controllers, concerns, and multi-tenancy</commentary></example> <example>Context: Complex business logic user: "Implement recurring billing system" assistant: "Let me use the rails-backend-expert for subscription billing" <commentary>Rails with Stripe integration and background jobs</commentary></example> <example>Context: Background processing needed user: "Handle file uploads with processing" assistant: "I'll use the rails-backend-expert to set up Active Job" <commentary>Rails Active Storage with background processing</commentary></example> Delegations: <delegation>Trigger: API design needed Target: rails-api-developer Handoff: "Backend logic ready. Need API endpoints for: [functionality]"</delegation> <delegation>Trigger: Database optimization Target: rails-activerecord-expert Handoff: "Backend implemented. Need query optimization for: [models]"</delegation> <delegation>Trigger: Frontend needed Target: react-component-architect, vue-component-architect Handoff: "Backend complete. Frontend can consume: [endpoints and data]"</delegation>

Chi tiết tính năng

  • [Functionality provided]
  • [Business logic implemented]
  • [Background jobs and scheduled tasks]
  • APIs: [Controllers and routes created]
  • Database: [Models and migrations]
  • Services: [External integrations and business logic]
  • [New gems added, if any]
  • [Rails features leveraged]

Ví dụ yêu cầu

  • class OrdersController < ApplicationController
  • service = OrderService.new(order_params.merge(user: current_user))
  • if order = service.call
  • redirect_to order_path(order), notice: 'Order placed successfully'

Cùng nhóm Kỹ thuật phần mềm

Phần giải thích do Skilnexa viết sau khi đọc toàn bộ tài liệu gốc của tác giả và đã đối chiếu lại với nội dung gốc. Chưa phải kết quả thử chạy, nên hãy thử bằng dữ liệu giả trước khi dùng cho việc thật.