Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Hooopo
@hooopo
Admin
NO. 8 / 2011-10-28

hooopo@gmail.com
nil
北京
160 Topics / 3013 Replies
360 Followers
0 Following
74 Favorites
聪明的妖怪录下了唐僧的紧箍咒
Reward
GitHub Public Repos
  • oh-my-github-circles 47

    GitHub User Circle Generator Using GitHub Actions

  • hackernews-insight 21

    Hackernews Insight using TiDB Cloud

  • repo-track-pipeline 6

    🔄 A flexible open-source data pipeline for seamlessly syncing data from any repository to your da...

  • oh-my-github-pipeline 6

    🔄 A flexible open-source data pipeline for seamlessly syncing data from any github user to your d...

  • chatgpt-xiaoai 3

    小爱音箱集成LLM,SaaS 服务

  • repo-contributor-circles 1

    GitHub repo contributor circles generator.

  • ossinsight-x 1

    Automatically post trending repos to Twitter every day.

  • mi-service 1

    XiaoMi Cloud Service for mi.com

  • hooopo 0

  • streamlit-echarts-demo 0

    Demo for Streamlit ECharts component

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 新主题上线 at April 06, 2015

    亮瞎了我的狗眼,需要适应一段时间。

  • Web 开发后端缓存思路 at April 06, 2015

    之前写了一个用 Etag + Redis 做跨域 Session 的 demo,在新版 safari 已失效:(

  • [广州] 招聘 Ruby 工程师 at April 03, 2015

    #22 楼 @tsaikoga 收到

  • [上海] Coupang 中国 招聘 Ruby 攻城狮 / 程旭媛一枚(我们是盈利的电商 ~~ 欢迎应届生) at March 30, 2015

    看起来不错呢

  • 申请以及集成 Stripe 的 Alipay 支付方案 at March 30, 2015

    我就是来同前面 4 位大神合影的!

  • [广州] 招聘 Ruby 工程师 at March 29, 2015

    #18 楼 @hello_ruby 收到,是捨てられた愛?

  • 不用数据库用什么? at March 27, 2015

    为何不用数据库啊?为何不用数据库啊?为何不用数据库啊?为何不用数据库啊?为何不用数据库啊?

    你这是反模式...

    数据库好啊,想缓存照样加载到内存,想初始化 seed 一下搞定,想 CRUD 还来得及。

    问题是你不用数据库居然自己还搞不定...

  • Puma 源代码分析 - 完结篇 at March 26, 2015

    #2 楼 @est 没用过,看名字也是怪兽系列的啊

  • Service Object: What? Why? and How? at March 24, 2015

    #30 楼 @fleuria 我觉得 正像 14 楼 @emanon 说的,这里说的 Service Object 就是提炼类(非 AR 类),当然 Form Object 算是一种形式。上面的一个例子可能有误导,另外再补充一下多 model 交互的例子:

    https://gist.github.com/hooopo/f6a031dac417323dfec6

    传统的 Rails Way,这些可能都会被放到 Order 或 Package 里。

  • Service Object: What? Why? and How? at March 24, 2015

    #27 楼 @Tim_Lang where is dao?

  • Ruby 有没有类似 Python 中 ImageFilter 的 gem 包 at March 23, 2015

    https://github.com/paulasmuth/hipster_filters http://code.tutsplus.com/tutorials/create-instagram-filters-with-php--net-24504

  • Docker 入门 at March 23, 2015

    #9 楼 @mimosa interesting.

  • Service Object: What? Why? and How? at March 23, 2015

    #9 楼 @flowerwrong 都是 extract method 的方法,但 concern 有一点局限性:

    • Service Object 更适合组织多个 model 之间的交互。
    • Concern 需要 ActiveSupport::Concern 才能玩的转,而 Service Object 就是普通 Object。
  • Service Object: What? Why? and How? at March 23, 2015

    #14 楼 @emanon 不知道‘层’要怎么理解。我理解的 Service Object 就是普通 AR Object 之外的普通 Ruby 对象,就是 Model。硬要说层的话应该是这样:(M=(AR+SO) -> V -> C)。

    这东西之所以会成为一个话题,是由于之前人们对 AR 之外的 Object 无所适从,甚至排斥,要么扔到 lib 里,要么硬写到 AR 里。

    说实话,这种类,我有时候也不单独放单 service 目录,直接扔 model 目录里,都是 Business Model.

  • Service Object: What? Why? and How? at March 23, 2015

    #10 楼 @emanon 取名字的目的是为了让大家知道在谈论的是什么,否则就无法交流。说简单了是 PORO(plain old ruby object),当然这也可以说又引入了一种概念。职责分离和“程序就是数据结构 + 算法”什么的类似,是一句人人都懂,而又人人都不懂的话。Service Object 是一个更具体的方法。

    第二点担心很多余,现在的 Rails 程序员都懒的很呐,helper 都懒得用,直接 view 里写逻辑的大有人在。原因很简单,简单粗暴不用思考啊。但你说的属于另外一个方向,我几乎没见过。

    Startup 项目有 Startup 的做法,遗留项目有遗留项目的维护方式。1k、1w、10w 行代码的项目也都有不同的维护方式,各自找到适合自己的方案就好,不必刻意模仿,也不必随意否定。

  • Rails 开发:那些年,我们一起踩过的坑 (剧终) at March 20, 2015

    #26 楼 @scriptfans 不不不,有可能是缓存

  • Rails 开发:那些年,我们一起踩过的坑 (剧终) at March 20, 2015

    楼主加油(^_^)/

  • [广州] 招聘 Ruby 工程师 at March 20, 2015

    #12 楼 @w7938940 欢迎再来~~~~

    #14 楼 @flowerwrong ^^

    #10 楼 @chaucerling 发来简历看看

  • MySQL 用 UUID 作为主键,实际使用中有什么问题 at March 19, 2015

    #28 楼 @huobazi 被你的热门标签吓尿了...

  • 遇到一些关联数据,大家是如何设计 API 的? at March 19, 2015

    楼主建议你读一下:

    • http://jsonapi.org/format/#document-structure-resource-relationships
    • http://jsonapi.org/format/#document-structure-compound-documents
    • http://jsonapi.org/format/#fetching-includes
  • [广州] 招聘 Ruby 工程师 at March 18, 2015

    PS.

    Ruby China 的帖子下沉机制对招聘帖来说不友好。之前的帖子不会被再次顶上来,就必须新发重复的帖子。这样之前的回复相关信息就没了。

  • [广州] 招聘 Ruby 工程师 at March 18, 2015

    #4 楼 @bhuztez 也不招 Erlang ^_^

  • [广州] 招聘 Ruby 工程师 at March 18, 2015

    #5 楼 @emanon 否...

  • [广州] 招聘 Ruby 工程师 at March 18, 2015

    #1 楼 @flowerwrong #2 楼 @larrylv #3 楼 @est

    谢谢~~~~~

  • 用免费的 Heroku,(paper/carrier)有什么方法可以存图片么?想花几分钟,部署一个玩具。 at March 15, 2015

    S4

  • 我喜欢酱紫的 Hash at March 15, 2015

    编码规范就是为了防止这种个人偏好的……

  • 请问如何利用 ActiveRecord 一次插入多条数据? at March 15, 2015

    http://shopperplus.github.io/blog/2014/11/08/fastest-way-to-load-data-in-mysql.html

  • 定义方法后面加 “=”,意义是什么? at March 13, 2015

    #11 楼 @blacktulip 其实以等号结尾的方法真有特殊处理:

    def current_user=(user)
      @xx = user
      nil
    end
    

    和下面不一样

    def set_current_user(user)
      @xx = user
      nil
    end
    

    current_user(user) 的返回值永远是 user set_current_user(user) 的返回值是 nil

  • 求解带 HTTP 头的 POST REQUEST 该怎么实现 at March 13, 2015

    没什么说的,看文档啊!

    另,"X-Requested-With:" => 'XMLHttpRequest',冒号要去掉

  • 为支持移动端离线模式-数据库采用 UUID 字段 at March 13, 2015

    #11 楼 @chunlea +1

  • Prev
  • 1
  • 2
  • …
  • 32
  • 33
  • 34
  • 35
  • 36
  • …
  • 108
  • 109
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English