I am creating a service fabric application. I saw in the Microsoft documentation that, based on how we store the data we can choose between stateless and sate full template.
But under .net core 2.0 itself, it has "stateless" and "stateless Asp.net core". What is the difference between these two.
My requirement is to migrate a existing web api which is stateless. As per the microservice architecture, I have selected a Stateless Asp.Net core template as the front facing api and I am not able to decide the template for Web api.
Thanks in advance
it has "stateless" and "stateless Asp.net core". What is the
difference between these two.
Stateless Service is a simple template to build a basic reliable services.
Stateless ASP.NET Core is a more complete template to build a reliable service that uses ASP.NET Core. It is a great starting point for any website or web API.
My requirement is to migrate a existing web api which is stateless. As
per the microservice architecture, I have selected a Stateless Asp.Net
core template as the front facing api and I am not able to decide the
template for Web api.
Do chose Stateless ASP.NET Core because you will host a web API.
Related
What happens when we do not use REST api to build a web application? And also please tell how to build a web service using REST api in PHP.
What happens when we do not use REST api to build a web application?
Nothing, you can do your project with or without REST API. Assume you are running a restaurant and you want to attach with online food service like Foodpanda,zomato you need to provide an API to interact your data without any user interface which can be done easily using REST.
Why do we need RESTful web services?
REST should be used if it is very important for you to minimize the coupling between client and server components in a distributed application. [read more]
How to build a web service using REST api in PHP?
There are many resources available in internet. Here I found something related to PHP
PHP RESTful Web Service
I have gone through the ATG oracle guide for rest web service Architecture. Kindly provide a basic example/ steps to consume a rest service in oracle ATG.
If you are looking to consume an external REST API from within your ATG application, then ATG does not provide you any specific way to do so, but ATG is Java, and there are many ways to call REST services in Java.
If you are looking to expose REST APIs from your ATG application, then ATG 9 onwards has a REST Services framework, and ATG 11 onwards has a REST MVC framework that you can use. If these are not suitable for you, then there are other, third-party, ways of doing it too.
Our architecture consists of several backend (non-ServiceStack) services and applications that send data to our system via ServiceStack service hosted in asp.net - this is currently a standalone ServiceProject project containing our required Services/Repository/DTOs following the structure of all the provided ServiceStack samples.
With our backend complete we're now designing our two front-end requirements consisting of a web application and native mobile application. For the web application I'd really like to continue leveraging ServiceStack by using the Razor plugin to create the application's layout/views from our existing DTOs, for our mobile app we will only rely on the ServiceStack service for authentication and data - as it is native it's layout/views will come from it's own SDK.
Can I leave my standalone ServiceStack service as is and:
Create a separate web application project that authenticates
against our existing standalone ServiceStack service and uses the
Razor view plugin?
Have our native mobile app clients
authenticate against the same standalone ServiceStack service?
Most of the examples ie. RazorRockstars I've seen have the services embedded in the web project so I'm not sure if this distributed type of setup is supported. Any guidance or feedback on this is greatly appreciated!
It is very much possible. You can consume the web service from both, web and native mobile application. I worked in a ASP.NET MVC web application which used to make call to Web API service hosted at different server. The Web API service was shared among multiple applications. We were consuming it by making AJAX calls from client.
Something similar to your scenario is done at below link but they are using cloud to host service:
http://www.codeproject.com/Articles/529109/Mobile-2fWebplusClient-2cplusWebplusAPIplusandplus
If you have opportunity to make a web app for mobile instead of native app, then in a single solution both mobile and desktop app can be created. The exemplary solution can be found here: http://nopcommerce.codeplex.com/
Thanks and free free to discuss more in case of further questions.
Hi I need to use REST web service but not getting how to start. Although I have checked different articles but there is no proper example which tells flow of REST SERVER and REST CLIENT. Is there any good example link which tells how a REST server will be created with php and how this web service will be called with which technique. I need web service to show customers and then update customers using web service as well. I need to create my own web service for my application so I need to create both Rest server and Rest client.
Thanks
Crinch
REST isn't a technology, it's a style of software architecture
If you want some concrete examples and a simple framework to get started, try cherrypy, which is a minimal web framework written in python.
This should get you started with a web server that can help you adhere to REST design principles.
You Can Try PHP REST Data services https://github.com/chaturadilan/PHP-Data-Services
What are the necessary points that we should keep in mind while developing web service .NET that can be accessed by ASP.NET and mobile phones like iPhone and Android?
Web services by design are platform agnostic, which means that you should be able to access them from any application. However depending upon the relevant framework options available different implementations might be easier to access that others (XML/SOAP via .NET as an example).
Building a REST service serving up JSON could be your best option for an easy adoption on multiple platforms.
REST vs SOAP
Web Services
1.It Can be accessed only over HTTP
2.It works in stateless environment
WCF
WCF is flexible because its services can be hosted in different types of applications. The following lists several common scenarios for hosting WCF services:
IIS
WAS
Self-hosting
Managed Windows Service
For mobile application check http://www.c-sharpcorner.com/UploadFile/sry_143/4010/
For ASP.Net application check http://geekswithblogs.net/nestor/articles/108042.aspx
Happy coding!!