首页 \ 问答 \ 为什么要使用AppHarbor插件?(Why use AppHarbor addons?)

为什么要使用AppHarbor插件?(Why use AppHarbor addons?)

当我可以直接从提供商处获得帐户并获得额外的好处(如每个帐户的多个用户或项目)时,为什么我应该使用AppHarbor插件? 我知道每个应用程序都有插件集中配置,但这也意味着你必须通过AppHarbor。

此外,AppHarbor在一些提供商(特别是Airbrake)的网站上添加了标题,这些设计器破坏了设计(看起来不合适并且具有巨大的利润)。 在一些插件上,定价比插件定价灵活得多(同样,Airbrake就是一个很好的例子 - 不知道这些计划提供的是什么!)。


Why should I use AppHarbor addons when I can get an account directly from the provider and have additional benefits (like multiple users or projects per account)? I know having addons per application centralizes configuration but it also means you have to go through AppHarbor.

In addition AppHarbor adds their header on the website of some providers (notably Airbrake), which ruins the design (looks out of place and has massive margins). On some addons pricing is much more flexible than the addon pricing (again, Airbrake is a good example - no idea what those plans offer!).


原文:https://stackoverflow.com/questions/11126734
更新时间:2021-11-09 09:11

最满意答案

模型绑定就是这样,绑定模型。 如果模型不存在,它将返回null或Null对象。 然后控制器可以决定如何处理模型。 如果它为null,则抛出。

但是,如果您看到相同的代码行出现,那么封装该代码是一个好主意。 一种选择是使用ActionFilter。 模型绑定器创建对象,如果模型为null,则操作过滤器可以将响应代码设置为404。

在这种情况下,您的控制器只需要担心“快乐路径”。 这就是模型的存在。


Model binding does just that, binds the model. if the model doesn't exist it would return either null or a Null Object. The controller could then decide what to do with the model. If it's null, throw.

however if you you see the same lines of code appearing than it's a good idea to encapsulate that code. One option would be to use an ActionFilter. the model binder creates the objects and the action filter can set the response code to 404 if the model is null.

in this scenario your controller only needs to worry about the "happy path". That is the model exists.

相关问答

更多

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。