Reading Note for Advanced Rails Recipes 2018 程序啪啪啪
1 Introduction
- What Makes a Good Recipe Book?
- What Makes This an Advanced Recipe Book?
- Who’s It For?
- Who’s Talking?
- Rails Version
- Resources
- Acknowledgments
- Tags and Thumb tabs
Part I—REST and Routes Recipes
- Putting A Resource On The Web 利用REST提供WebAPI
- Adding Your Own REST Actions (Or Not) 添加自定义的REST
- Authenticating REST Clients 制作REST的session登录
- Custom Response Formats 自定义反馈信息格式
- Catch All 404s 捕获404错误: 做好记录工作;充分利用DB的index以提高速度
Part II—Search Recipes
- Improve SEO with Dynamic Meta Tags 通过Meta标签提高搜索引擎收录
- Full-Text Search with Ferret 利用Ferret实现DB全文搜索
- Active Record on Solr 利用solr实现全文搜索
Part III—Database Recipes
- Adding Foreign Key Constraints 添加外键关联
- Write Your Own Custom Validations 添加自定义表单验证
- Analyzing SQL Queries 分析优化SQL搜索
- Taking Advantage of Master/Slave Databases 利用主从数据库实现读写
Part IV—User Interface Recipes
- Replacing In-View Raw JavaScript with RJS 利用嵌入式的RJS替代原生态JavaScript
- Handling Multiple Models In One Form 单个表单中提交多个Model
- Simplifying Controllers With a Presenter 对于一个controller里面的多model处理:可以采用视图/混合类的方式进行处理,原理同14.另外需要充分利用method_missing, 利用人为的方式规定表单数据域格式
- Validating Required Form Fields Inline 即时表单验证
- Creating a Wizard 制作步骤导航
- Updating # Partial Resources with Ajax 局部Ajax更新
- Uploading Images and Creating Thumbnails Ajax上传图片
- Decouple Your JavaScript with Low Pro 简化javascript
Part V—Design Recipes
- Freshening Up Your Models With Scope 利用with scope简化Model
- Keeping Forms Dry and Flexible 通过自定义的FormBuilder来DRY表单模板
- Prevent Train Wrecks with Delegate 利用委派机制将火车式的调用简单化
- Creating Meaningful Relationships Through Proxies 将Model间的关系语义化
Part VI—Asynchronous Recipes
- Processing an Asynchronous Workflow 处理异步工作流
- Off-Loading Long-Running Tasks to BackgrounDRb 将长时间任务处理放到后台
Part VII—E-mail Recipes
- Validating E-mail Addresses 验证Email格式
- Receiving E-mail Reliably via POP or IMAP 通过POP/IMAP收取邮件
- Keeping E-mail Addresses Up To Date 保证Email地址有效
Part VIII—Console Snacks
- Writin’ Console Methods 利用console
- Console Loggin’ Console日志
- Playin’ in the Sandbox 利用sandbox使console的操作最后对DB无效
- Accessin’ Helpers 利用Console查看helper效果
- Shortcuttin’ the Console console快捷键
Part IX—Testing
- Creating Your Own Rake Test Tasks 创建自己的Rake 测试任务
- Testing JavaScript With Selenium 利用selenium测试JS
- Mocking With a Safety Net 在安全的网络里测试
- Getting Started with BDD BDD
- Describing Behaviour from the Outside-In With RSpec RSpec描述行为
- Reducing Dependencies with Mocks 消除Mock中的依赖
- Fixtures Without Frustration 测试数据有效
- Tracking Test Coverage with RCov 利用RCov检测测试覆盖率
- Testing HTML Validity 检测HTML合法性
Part X—Performance and Scalability Recipes
- Looking Up Constant Data 制作常量数据
- Serving Page Caches to Facebook 制作缓存
- Profiling In The Browser 在Browser中检测性能
- Caching Up With the Big Guys 追踪性能问题根源
- Dynamically Updating Cached Pages 动态更新Cache
Part XI—Security Recipes
- Flipping On SSL 利用SSL
- Locking Down Sensitive Data 控制敏感数据
Part XII—Deployment and Capistrano Recipes
- Custom Maintenance Pages
- Running Multi-Stage Deployments
- Creating New Environments
- Managing Plugin Versions
- Safeguarding the Launch Codes
- Config Files On-The-Fly
- Preserving Files Between Deployments
- Responding To Remote Prompts
- Generating Custom Error Pages
Part XIII—Big-Picture Recipes
- Avoid Starting From Scratch
- Fail Early
- Analyzing Your Log Files
- Formatting Dates and Times
- Geocoding to Find Things By Location
- Giving Users Their Own Subdomain
- Tunneling Back to Your Application
- Monitoring (and Repairing) Processes with Monit
A Bibliography 288
Index 289
创建@
2013-01-30
最后修改@
2014-01-20