Django 不适合传达业务逻辑吗?
对于我一直在计划的项目,我几乎 100% 锁定在 Django 上。
我想“消除”的最后一个“神话”是 Django 在以下方面“平庸” 传达业务逻辑。
彼得·尚戈夫直接引用:
无论您选择什么框架,您的现实生活需求都会非常重要 电子商务模块中可用的功能很快就无法满足 你开始的时候,你最终需要做出不平凡的事情 对其进行更改,甚至更快地从头开始重写,而不是 之后。这是因为开源在以下方面一直表现出色 构建基础设施工具(想想网络服务器、模板 语言、数据库、缓存等),但相对平庸 实现业务逻辑。如果我是你我会寻找什么 是我最乐意破解的库,而不是那个 看起来最成熟。
我将 Django(带有 satchmo)与之对抗的“产品”:
- Ruby on Rails(带有狂欢)[Ruby]
- Catalyst [Perl]
- JadaSite [Java]
- KonaKart [Java]
- Shopizer [Java]
您能减轻(或确认)我的问题吗?有关的担忧 前面提到的有关 Django 的内容?
I am almost 100% locked in to Django for the projects I have been planning.
The final "myth" I'd like to "dispel" is that Django is "mediocre" at
conveying business-logic.
Direct quote by Peter Shangov:
Whatever your choice of framework your real-life needs will very
quickly outgrow the functionality available in the ecommerce modules
that you started with, and you will end up needing to make non-trivial
changes to them or even rewriting from scratch sooner rather than
later. This is because open source has always been exceptional at
building infrastructure tools (think web servers, templating
languages, databases, cacheing, etc.), but relatively mediocre at
implementing business logic. So what I'd be looking for if I were you
is the library that I'd be happiest to hack on rather than the one
that looks most mature.
"Products" which I am putting Django (with satchmo) up against:
- Ruby on Rails (with spree) [Ruby]
- Catalyst [Perl]
- JadaSite [Java]
- KonaKart [Java]
- Shopizer [Java]
Could you please alleviate (or confirm) my concerns regarding the
aforementioned quote about Django?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
简而言之,它当然不好,因为它不是业务流程管理软件;它是一个用于 Web 开发和完成工作的框架。
长答案 - 您需要澄清业务逻辑(以及“传达”它)的含义。您是在谈论流程图、工作流管理还是流程本身的执行?
我不明白您列出的其他项目如何“传达”业务逻辑 - 因为它们不是业务流程图或测试或验证包。它们只是完成某些工作的框架。一旦定义并验证了流程(使用一些外部工具),您就可以在代码中执行该流程。
就在线购物而言 - 就店面而言,业务“流程”非常标准,您可以轻松地将其映射到您列出的任何套餐。您没有提到您将运营什么样的商店,或者您的履行或交付流程是什么,因此如果 satchmo 内置了这些组件,或者您必须从头开始编写它们,则无法给您详细的答复。
django 唯一可能的缺点是它没有成熟的工作流引擎(两个主要项目 GoFlow 和 django-workflows 已经停滞),但这并不是对 django 的批评,因为它不是一个通用的 Web 框架。它是针对复杂的多状态工作流引擎不是主要需求的特定应用程序而设计的。
最后,就引用而言——在不了解上下文的情况下——我只能说最流行的业务流程映射软件之一实际上是开源的 JBoss BPM 引擎。
The short answer - of course its bad, because its not a business process management software; it is a framework for web development and getting things done.
The long answer - you need to clarify what you mean by business logic (and "conveying" it). Are you talking about process mapping, workflow management or the execution of the process itself?
I do not see how the other projects you listed "convey" business logic - because they are not business process diagramming or testing or validation packages. They are simply frameworks to do some work. Once the process has been defined and validated (using some external tools), you can then execute that process in your code.
In terms of online shopping - the business "process" as far as the store front is concerned is quite standard and you can easily map it to any of the packages you have listed. You did not mention what kind of store you'll be running or what your fulfillment or delivery processes are, so cannot give you a detailed response if satchmo has those components built-in or would you have to write them from scratch.
The only possible negative when it comes to django is that it doesn't have a mature workflow engine (the two main projects GoFlow and django-workflows are stalled), but this is hardly a criticism against django since it is not a generic web framework. It is designed for a specific application for which a complex multi state workflow engine is not a primary need.
Finally, as far as the quote is concerned - without knowing the context - I can only say that one of the most popular business process mapping software is actually the open source JBoss BPM engine.
我毫不怀疑闭源/专有人员也擅长构建基础设施工具和框架。他们不做的就是释放它们,或者让人们和它们一起玩。他们以自己为基础,通过坚持特定于为他们提供资金的企业的“商业逻辑”来赚钱。
如果您选择专有解决方案,那么毫无疑问还需要进行一些重要的更改,并且您将向为您提供(不完全是)解决方案的一家公司支付高额费用。 “哦,再花 4000 美元在数据库中添加额外的字段类别?嗯。哦,我想我们已经付给你 100,000 美元了,而且你的软件是闭源的,所以我们不能将其分包给招标流程......在这里,你go...”
开源更擅长实现业务逻辑,因为归根结底,实现业务逻辑的是人,而不是框架,而开源意味着更多的人可以使用它。
I don't doubt that closed-source/proprietary people are great at building infrastructure tools and frameworks too. What they don't do is release them, or let people play with them. They build on them themselves, making money by sticking "business logic" specific to the businesses who give them the money for it.
If you go for a proprietary solution there will doubtless also be some non-trivial changes required, and you'll pay through the nose to the one company that provided you with the (not quite) solution. "Oh, another $4000 to add an extra class of fields to the database? Hmmm. Oh I guess we've already paid you $100,000 and your software is closed source so we can't subcontract it to a tendering process... Here you go..."
Open Source is better at implementing business logic because, when it comes down to it, its people that implement business logic, not frameworks, and open source means more people can work with it.