How to implement soa concept in asp.net web api project? - asp.net-web-api

I know some basic concepts about SOA. But I don't know how I can develop a project based on SOA. So, I want to know a way for implementing SOA in Asp.NET Web API project.

SOA is not a technology but a style of design/Architecture. There are different implementations of this. They are as follows.
Web services based on WSDL and SOAP
Messaging, e.g., with ActiveMQ, JMS, RabbitMQ
RESTful HTTP, with Representational state transfer (REST) constituting its own constraints-based architectural style
OPC-UA
WCF (Microsoft's implementation of Web services, forming a part of WCF)
Apache Thrift
SORCER
ASP.Net Core supports REST api and if you looking at implementing SOAP based service using asp.net core here is a handy link for this
https://stackify.com/soap-net-core/
There are many videos on youtube and there are many websites to learn REST services. If you are familiar with c# and asp.net, you can start learn ASP.NET Core to build your restful services.
Here is a link to one video links.

Related

Example open source microservices applications

I'm looking for open source applications that demonstrate the microservices pattern. In particular, I'd like to find one or more applications that can be spun up on real cloud environment up (but with fake data and requests) to demonstrate real-world deployment mechanics.
Unfortunately, I haven't found any good options yet. I'll note that Discourse is a modern 3-tier application, using Rails API, Ember.js, Postgres, and Redis, but it still is much closer to a monolith than an example of microservices. The closest I've found so far is https://github.com/kbastani/spring-cloud-microservice-example but that is more of a framework than an actual application that delivers data.
Not your typical CRUD app but Deis (a PaaS) uses REST APIs mostly to communicate between services. Peatio has a bunch of services that communicate asynchronously through a message queue.
Microsoft provides a demo webshop application based on .NET Core showing how to apply the microservices pattern:
https://github.com/dotnet-architecture/eShopOnContainers
There is also an ebook available: https://aka.ms/microservicesebook
this lagom application example is a microservices application written in Lagom . It is a akka based framework (DDD for design).
Application is complete and working. See if that serve your purpose.

Can I merge these two web applications to become one using GWT Servlet and RESTful API?

I have started to write two web application projects
RESFful API for mobile clients using Spring REST API
GWT WebApp Server for web clients using Servlets
My problem is that both web applications are using the same database and that I think that instead of having two web applications I actually should have started this project using just one web application that handles the requests for web and mobile clients.
The problem I got now is that I don't have any idea how I could "merge" those two guys and whether I should stick to Spring REST API or if I should use RestyGWT.
GWT Server-Project using Servlets
RESTful Server using Spring
All projects (in the middle of a major refactoring mission)
Is there a way that would allow me to launch the web application as a whole and have access to the REST API from my mobile clients and to the Servlets from my web clients?
It depends on your business logic implementation. If you have it in a separate module/package, then it should be easy to merge your two applications.
You will have to rework the mappings in web.xml and how you pass the input/output data to the business logic methods from both the REST implementation and your servlet code.
Personally I will recommend a single approach such as only going with the REST based approach that you already have and migrate your servlet functionality to it.

spring mvc + desktop app = best protocol and gui framework

I wanna create spring app which will consists of 2 parts :
spring backend + spring mvc (server + web app)
desktop app which need to acces to backend
Whats best protocol to comunicate between spring and desktop app? Can i use SOAP for this? Can someone do quick overview of avaliable technologies (why not/yes)?
And whats best choice for desktop app GUI framework? or its better to use pure Swing / AWT.
I want to notice that i wanna use solutions which is most popular in software companies.
I appreciate every opinions.
The companies I work for aren't interested in Swing. Apps are web-based, not desktop. You're more likely to find mobile apps rather than Swing these days.
With that said, your instinct is a good one: separate the services, which are unlikely to change, from the UIs that come and go.
Start with Spring POJO, interface-based services and remote them any way you like.
An HTTP-based protocol will be more reusable by different clients.
Spring allows you to use HTTP remoting, SOAP or REST web services. If you write web services, learn how to write "contract first". Start with the .xsd for your XML messages.

Share WCF RIA Services between ASP.NET MVC and Silverlight clients

I want to use WCF RIA Services as the middle tier for multiple clients including Silverlight and ASP.NET MVC.
I created a solution with Domain classes in a separate assembly using WCF RIA Services 4.2 CTP and Database First, which I want to share between the Silverlight and MVC clients. The solution looks like this:
Solution Foo
Foo.RIAServices.Server.Entities
Foo.RIAServices.Server.Entities
Foo.RIAServices.Server.Entities.Web
Foo.RIAServices.Client
Foo.RIAServices.Client.Web
FooMvcApplication
FooMvcApplication.Tests
FooResources
What if anything is wrong with my architecture and approach? Is there a better approach to using the Microsoft Entity Framework to create a common service for multiple clients?
Can I create a common custom Authentication service for both? Will the [EnableClientAccess()] and [RequiresAuthorization] decorations be respected for all clients?

SOAP JAX-WS client in Ruby

I want to write a ruby web service client for a SOAP (JAX-WS) web service. I looked into soap4r and handsoap but couldn't find useful resources to write a (JAX-WS) client
Can you help me to find some resources and some way of doing it. Because as I can see, my web service is developed using oracle JDeveloper and looks little different than examples find in web.
I'm a beginner for SOAP, WSDL web services and finding it hard.
Has anyone done something like this before, or can you turn me to the correct direction?
JAX-WS is an API for the development of web services in Java. Know then that, in order to consume a SOAP/WSDL based web service, it is not necessary to know how that web service was implemented. It could be Java, .NET or any other number of languages. All that is required to create a SOAP based web service client is the WSDL for the service. It is self contained and self descriptive, including all operations and data types supported by the web service.
In order to familiarize yourself with web services, I would recommend trying to exercise some web services directly, for example using SoapUI. This will allow you to import a WSDL for an active web service, try out some of the operations, and see what the corresponding SOAP messages look like. Then, I would look at "What's the best way to use soap with ruby?" for more ruby specific approaches.

Resources