集成共享同一MySQL数据存储的Django和Rails应用的最佳方法是什么? [英] What's the best way to integrate a Django and Rails app sharing the same MySQL datastore?

查看:57
本文介绍了集成共享同一MySQL数据存储的Django和Rails应用的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将与网络上的Python开发人员合作应用.我将在Ruby中构建它的一部分,他是将使用Django构建它的另一部分.我不太了解Django.

I'm going to be collaborating with a Python developer on a web application. I'm going to be building a part of it in Ruby and he is going to build another part of it using Django. I don't know much about Django.

我整合这两个部分的计划是简单地映射一个特定的URLPython的路径前缀(例如,任何以/services开头的请求)代码,同时让Rails处理其他请求.

My plan for integrating the two parts is to simply map a certain URL path prefix (say, any request that begins with /services) to the Python code, while leaving Rails to process other requests.

应用程序的Python和Ruby部分将共享并更新相同的MySQL资料储存库.

The Python and Ruby parts of the app will share and make updates to the same MySQL datastore.

我的问题:

  1. 人们通常对这种整合策略有何看法?有没有更好的选择(除了全部用一种语言编写)?

  1. What do people think generally of this sort of integration strategy? Is there a better alternative (short of writing it all in one language)?

共享敏感会话数据(即已登录)的最佳方法是什么用户ID)在应用的两个部分之间?

What's the best way to share sensitive session data (i.e. a logged in user's id) across the two parts of the app?

推荐答案

我看到您不能使用Django的auth,不能使用Django的ORM,不能使用Django的admin,不能使用Django的会话-剩下的就是URL映射到视图和模板系统.我不会使用Django,而是使用一个更简单的Python框架.每当您的Python程序员扩展自己的世界...

As I see it you can't use Django's auth, you can't use Django's ORM, you can't use Django's admin, you can't use Django's sessions - all you are left with is URL mapping to views and the template system. I'd not use Django, but a simpler Python framework. Time your Python programmer expanded his world...

这篇关于集成共享同一MySQL数据存储的Django和Rails应用的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆