I read the documents of Ballerina https://ballerina.io/. I am interesting about Ballerina. Is there are any framework to build the web app using Ballerina?
At the moment there is no Web frameworks similar to ASP.NET MVC or Spring for Ballerina. However you can easily create single page web applications using Ballerina RESTful services. This is similar to ASP.net WebAPI or python with flask.
There you separate the Web pages which are written in HTML/JS.. from the backend APIs which you can write in Ballerina.
Please take a look at this https://ballerina.io/learn/by-guide/restful-service/
I need to develop a web services and it needs to be hosted in Adobe CQ. I knew that CQ consume web services from other systems. We will need to create a OSGI bundle for this. I heard that Adobe not recommended to develop web services in CQ. Is it good approach to develop a web services in CQ itself? What happens if we host it in CQ?
Please share your feedback.
Thanks,
I just started learning web services. In bottom up approach, I have found some examples without being deployed in any application server. I mean a standalone web service application.
Here is an example of such type.
I have also given a try and done a walk-through of deployable simple web service examples.
So far to my learning of web services, I got to know that firstly, bottom-up- approach is not recommended. Now, in bottom-up approach, this standalone web service. When is it applicable to follow standalone web service procedure?
Endpoint.publish();
I guess, this approach is provided just for beginners and not to follow as a real-time practice. Is my interpretation correct?
I would make my application as a standalone web service if it will have multiple clients like:
Web Client via a web browser
Mobile App Client
Desktop Client
Then I could build every one of them alone using whatever the technology I prefer, and make it consumes my standalone web service.
For example, You could imagine the guys behind Twitter started developing it by building their core system as web service, then they build an independent web interface application for it, then they built the Twitter Android and iPhone APP, and another one came and introduced a Twitter Desktop client like Tweetbot and TweetDeck ... etc
BRIEF:
I am working on a web application, we decide to make some major. We did some researches and we found this tutorial that talks about "Creating api centric application".
we found the topic is very useful to us as we need in the near future to make an android app.
WE STARTED WITH:
Doing some searches starting from this query "api centric application" and we found these two topics related to that query:
REST
WEB SERVICE
WHAT WE WANT TO KNOW:
What is the difference between these terms "API centric application", "REST", "Web Service"
Is Rest an alternative way of Web service?
Is API Centric Application an approach of REST?
Is Web Service the parent of all this terms?
Do i need to produce some other information in order to this question
be eligible for policy.
After study all these types i found that:
A Web Service is a type of API, and all web-services must be API but not all API's must be web-services, The REST is a new concept of writing web-services and Web services written by apply REST Architectural concept are called RESTful web services
So my focus will be on changing my application to be API centric application by using REST Web service as this practice
Is it possible to create a REST web service using ASP.NET 2.0? The articles and blog entries I am finding all seem to indicate that ASP.NET 3.5 with WCF is required to create REST web services with ASP.NET.
If it is possible to create REST web services in ASP.NET 2.0 can you provide an example.
Thanks!
I have actually created a REST web service with asp.net 2.0. Its really no different than creating a web page.
When I did it, I really didn't have much time to research how to do it with an asmx file so I did it in a standard aspx file. I know thier is extra overhead by doing it this way but as a first revision it was fine.
protected void PageLoad(object sender, EventArgs e)
{
using (XmlWriter xm = XmlWriter.Create(Response.OutputStream, GetXmlSettings()))
{
//do your stuff
xm.Flush();
}
}
/// <summary>
/// Create Xml Settings object to properly format the output of the xml doc.
/// </summary>
private static XmlWriterSettings GetXmlSettings()
{
XmlWriterSettings xmlSettings = new XmlWriterSettings();
xmlSettings.Indent = true;
xmlSettings.IndentChars = " ";
return xmlSettings;
}
That should be enough to get you started, I will try and post more later.
Also if you need basic authentication for your web service it can be done, but it needs to be done manually if you aren't using active directory.
It is definitely possible to create RESTful web services using ASP.NET. If you are starting a new project I would definitely look into creating RESTful web services using WCF. The 3.5 .NET Framework allows you to specify RESTful endpoint along with a regular old SOAP endpoint and still deliver the same service.
All you really have to do is enable an endpointbehavior that calls out <webHttp />
Here is a good series on creating RESTful web services using WCF:
http://blogs.msdn.com/bags/archive/2008/08/05/rest-in-wcf-blog-series-index.aspx
You can certainly create RESTful web services in ASP.NET 2.0, for example, but there are no high-level APIs to do all the donkey work for you, as provided by WCF in .NET 3.5.
Well, of course you could always implement the spec yourself. It's just that there's nothing built-in to support it. If you use Nathan Lee's solution, do it as an http handler (.ashx) rather than an aspx. You can just about copy/paste his code into a new handler file.
You can do RESTful web services easily by implementing the spec using IHTTPHandlers.
Also check out using ASP.Net MVC. I've written some articles on this at my blog:
http://shouldersofgiants.co.uk/Blog/
Look for my Creating a RESTful Web Service Using ASP.Net MVC series
I'm only just beginning to use them, but from what I've seen 2.0 pretty assumes SOAP.
You can create RESTful service using
1) WCF REST service
2) ASP.NET Web API
If you all care about RESTful service, ASP.NET web api is that you should go with. But if you need service that supports both SOAP webservice and RESTful then WCF REST would be a good choice.
There are some articles that discuss about one versus another. This article may be helpful.