In zend framework, is there any way to interact between different modules? - api

I have got three modules in my zend application.
--module1
--module2
--module3
Here module3 is an api module. It doesn't have any views.
module1 and module2 should interact with module3(api module) to get the needed data.
module1 and module2 will have custom controller logic and views.
Is there any way to enable this kind of communication. I am new to zend framework.
Any help in this regard will be well appreciated. Thanks in advance.

Well the API you should create a Service layer for. Then if you need to expose this API externally you can use Module 1 to act as an intermediary between "remote" clients, but the other two modules can use the Service layer directly.

Related

.NET-Core Web API routing to diffrent process

My goal is to implement a generically extendible .NET core web API. The generic refers to modules that can be added at runtime and provide new endpoints as well as functionality. These modules will be developed based on a framework.
Currently I am still deciding if the modules will be included as a DLL or run as a separate process (.exe).
I have the basic understanding of Dependenci Injection regarding the addressing of controllers in a DLL. But now I wonder if and how to realize the whole thing via an own process.
The API should always be addressable via http://localhost/myapi/{endpoint}, i.e. a request to a module should be done via the same URL. For the user / developer of the frontend everything should be presented as one API.
Unfortunately I was not successful on my research and don't know exactly what I have to / should look for specifically. Therefore I hope that you can help me.
Examples are helpful, but I am also keywords or articles, which deal with such a topic, help me further.
kind regards

Does Vue-resource or a community library have an alternative to Angular's Services or Factories?

I am working on a larger application using Vue.js and I've been wondering if there is a better way to organize and reuse ajax requests. Currently the application is just making calls within the components (Is that good practice?). I'm coming from Angular, and I was wondering basically if there is an alternative to factories or services?
Vue does not offer any special functionality for this. The recommended way is to simply build your own modules and require them where you need them.

difference between openerp module and openerp web module

I want to understand what is the difference between openerp module and openerp web module? or both are complementary?
Some documents talk of openerp server side and other talk of client side.
My objective is to create a new module in openerp, I follow many documents that explains how create a module but they are too basic. Now, I want to understand the link between the web module and the basic module?
thanks.
It all depends on what you want you module to do. If you only want to change the javascript client side behaviour of OpenErp. Then you should be a web module.
If you want to access the ORM models and write python code that will execute on the server, then you create a openerp module.
I don't you can simply call all modules in OpenERP simply modules. They share simular structure, way to install. But as the client side in OpenERP is javascript, you write it in javascript, and why the call it web module.

Re-using a thirdy party web service using WCF

I have a 3rd party web service, which I intend to use from 2 different applications:
a Windows Workflow (WF) project
a website
Right now, from these 2 apps I manually add the reference to the 3rd party web service & call the required method. This means I have this proxy layer generated in 2 places.
What am looking for is a way to create (am not sure about the correct word to use, sorry guys) the 3rd party web service in one place & have the 2 applications re-use it.
Can this be achieved using WCF, something like wrapping the 3rd party web service in WCF.
Is this approach right?any help or pointers would be a great help, haven't done much service based development.
Environment: The website, the WF project resides on 2 different servers (windows 2003 R2).
Environment(development): windows 7 enterprise/vs 2010 / c#
Thanks
More detail:
Think I dint use the right words in my first query, the following is what am looking for & why I need it that way,I need to call the 3rd party web service from a new WCF service.This new WCF service will be called from other applications(winforms/WF/website) instead of calling the 3rd party service.The idea is to able to switch the 3rd party service(vendore) without changing the implementation & in one place.We use an hr-xml format for request/response & all our vendors(exisiting or future) support the hr-xml format for the industry we are in.If we use a class library, then to change vendor, we should recompile & distribute the dll correct,we dont want to do that. I am not sure about an architecture to be followed to achieve this whole functionaity.Any pointers in the right direction would be a great help.
Thanks
Your quest makes great sense indeed - and I think it should be quite easy to accomplish:
create a new class library assembly ("WebServiceClient" or whatever you want to call it)
inside that new project, do you Add Service Reference - this will create the necessary WCF proxy classes and the config file
compile that class library
From both your apps, you should be able to reference that web service client assembly, and use it - you have the code for the client side proxy only inside that common assembly, but you can use it from any number of apps.
One point to remember: you will need to copy&paste the config for the web service to the main application's config (app.config for a Winforms/console app, web.config for a website/web app) since it cannot be read directly from a class library's config file (that won't be used by .NET).
In this case, I think, WCF service will be the gr8 idea. You dont want to recombile the client applications if the vendor is changed.

WCF WinService with Plugins

I have a win32 application that uses client side plugins and uses a Win32 Service via TCP/IP. I would like to also dynamically load assemblies on the WCF service based on the addition of new plugins. Currently I have to add the the ServiceContract and OperationContract to the Services class and IService interface and then re-compile. Is there a way to dynamically load the WCF assemblies and not have to generate the class and interface references? Can these be moved out of the WCF Win32 service into external classes?
I was wondering about this as well, but came to the conclusion that this was not a question of whether or not its possible, but should you do it? Even if you could generate the contract definitions dynamically, you still need to notify the client of the change, they in turn would need to regenerate the proxy in order to interact with the new service definition, and then provide an implementation dynamically. A better approach is to redesign your service so it implements a particular strategy (read Strategy pattern). The contract remains static, but the implementation changes based on client input. That way your service can dynamically load modules without your client being aware of it.
HTH.
Steve