第三方模块集成到应用的最佳实践 [英] Best practices for integrating third-party modules into your app

查看:104
本文介绍了第三方模块集成到应用的最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有涉及构建由大约50%的自定义功能的应用程序的几个项目,但随后拉,比方说,维基,论坛,和其他组件都是轮子是已经发明了我们不希望从头开始重新写。

We have a few projects that involve building an application that is composed of maybe 50% custom functionality, but then pulls in, say, a wiki, a forum, and other components that are "wheels" that have already been invented that we do not wish to re-write from scratch.

这些第三方应用程序通常有自己的数据库,主题和认证​​系统。把事情的工作就像一个单点登录,或一个共同的主题,或标记/在多个子应用横跨实体搜索是pretty具有挑战性的问题,在我的经验。有哪些最佳实践为这种一体化项目?

These third-party applications usually have their own databases, themes, and authentication systems. Getting things to work like a single-sign-on, or a common theme, or tagging/searching across entities in multiple sub-apps are pretty challenging problems, in my experience. What are some of the best practices for this kind of integration project?

我们的做法,到目前为止,已经尝试和仔细挑选你的组件,选择具有明确定义的API,$ P pferably通过HTTP(如REST或SOAP)$的人,虽然这并不总是可能的(我们还没有找到一个体面的论坛,这样工作)。是否还有人建议可以给任何人试图做到这一点,因为我怀疑我们很多人都越来越频繁,这些天?

Our approach, so far, has been to try and pick your components carefully, choosing ones that have a clearly defined API, preferably via HTTP (like REST or SOAP), though that isn't always possible (we haven't found a decent forum that works that way). Are there suggestions folks can give to anyone trying to do this, as I suspect many of us are more and more frequently these days?

推荐答案

请确保您的应用程序和第三方应用程序或库之间的接口是这样的,你可以以防万一别的东西方便地更换它。在某些情况下,第三方软件可能只是一个标准API的实现(Java那样这个有很多与JDBC,JMS,JNDI,...)。在其他情况下,这意味着在一些API,你拿出包裹第三方库。

Make sure that the interface between your application and the third-party application or library is such that you can replace it easily with something else just in case. In some cases the third-party software may just be an implementation of an standard API (Java does this a lot with JDBC, JMS, JNDI, ...). In other cases this means wrapping the third-party library in some API that you come up with.

当然有次抛出这一想法窗外,有事情与第三方软件的紧密集成。只要确保你真的想您的应用程序的第三方约束。一旦你走上这条路真的很难回去改变主意。

Of course there are times to throw that idea out the window and have things tightly integrated with the third-party software. Just be sure that you REALLY want to bind your application to that third-party. Once you go down this road it's REALLY hard to go back and change your mind.

这篇关于第三方模块集成到应用的最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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