Portlet和Web服务之间的区别 [英] Difference between portlet and a webservice

查看:971
本文介绍了Portlet和Web服务之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定我是否在将洋葱和白菜进行比较.但是我真的对Portlet和Web服务感到困惑.我知道Web服务正在将您的应用程序中的软件组件作为对其他应用程序的服务,但是对我而言,它类似于响应请求的portlet.我知道我的理解使您(Portlet和SAAS开发人员)真的很沮丧.但是我需要对此进行一些澄清.

I am not sure if I am comparing onion with a cabbage. But I am really confused with the portlet and a web service. I know that web service is making your software components in your application as a service to other applications but to me it is similar to a portlet responding to requests. I know that my understanding is making you(Portlet & SAAS developers) really upset. But I need some clarity on this.

为什么我不能使用请求响应来进行类似于Web服务的Portlet工作? 如果是,使用Web服务比使用portlet有什么好处? 如果不是,那么缺少充当Web服务的Portlet是什么?

Why cannot I use the request-response to portlet work similar to a web service? If yes, what is the benefit I get in using a web service than a portlet? If not, then what are portlets lacking to act as a web service?

我是Portlet开发的新手.请不要为这个问题骂我.

I am a newbie in portlet development. Please dont curse me for this question.

请提出建议.

大多数答案都说portlet是UI组件.我的客户要求我在liferay中创建一个Web服务.那么将portlet做成Web服务呢?如果是,请提供一个指针或一些代码片段吗?

Most of the answer say that the portlet is a UI component. My customer has requested me to create a webservice in liferay. So is it to make a portlet as a web service? If yes, can you please provide a pointer or some code snippet?

推荐答案

特别是针对Liferay的编辑".

Addressing your 'edit' specifically with regards to Liferay...

Liferay插件项目无需太多工作即可公开Web服务.

Liferay plugin projects can expose web services without too much work.

Liferay Service Builder实际上具有功能,因此您可以创建由Liferay数据库中的表支持的SOAP Web服务或JSON Web服务(并在现有数据库表上进行查询).在JSON Web服务的情况下,生成的URL方案不是RESTful的(不幸的是),但是定义明确.通过您的一些工作,您还可以将Liferay的权限系统强加到Web服务调用上.

The Liferay Service Builder actually has facilities so you can create SOAP web services or JSON web services backed by tables in the Liferay database (and that make queries on existing database tables). In the case of JSON web services, the URL scheme generated is not RESTful (unfortunately), but it is well defined. With a bit of work on your part you can impose Liferay's permission system on web service calls as well.

Liferay开发人员指南:

请参阅该页面上指向SOAP和JSON服务的链接.

See the links on that page to SOAP and JSON services.

请注意,"portlet"只是Liferay插件的一种. Web服务工具是服务层的一部分-可以由许多插件类型使用.因此,在Liferay中创建Web服务不一定涉及portlet,您可以使Web服务没有与之关联的可视组件.

Note that a 'portlet' is only one type of Liferay plugin. The web service facility is part of the service layer - which can be used by many plugin types. So there isn't necessarily a portlet involved in creating a web service in Liferay, you can make a web service that has no visual component associated with it.

这篇关于Portlet和Web服务之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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