REST Web Service | Drupal or Symfony - rest

An application which is developed by Symfony 2 should retrieve data through a REST Web Service from a web site which is developed by Drupal.
How should the REST web service be developed?

Ok, so if I understand correctly you have two services:
Symfony2 app - requires data
Drupal app - has data
So you need to develop an API for Drupal which will be accessed by the Symfony2 app.
Now, I should tell you, this is a very beginer question. So you should start at the beginning.
Research the following topics:
"What is an API"
"What is a REST service"
"How to get data from an API with PHP"
then you need basics of Drupal module development and more specifically Drupal API module development. You'll need to know the version od Drupal as 7 and 8 differ quite a bit.

Building REST service with Drupal is documented https://www.drupal.org/documentation/modules/rest. Basically, you expose Drupal internal data models (called entities) through a REST API using JSON as format. On the Drupal side there is no code to write, everything should be configurable from the UI. When using Drupal 8, the configuration is exportable using the built-in Configuration Management. With Drupal 7, you should be able to export the configuration as code using the Features module.

Related

How to use alfresco java API to submit form values

I have developed one spring based java web application. In my project it is requirement to use alfresco as a CMS. For this I want to integrate this application with alfresco. So I decided to use alfresco java API's.
http://dev.alfresco.com/resource/docs/java/
But I am not getting how to use those API's to complete backend work of my web application. Suppose I would like to submit one form having user name & password fields in it. After click on submit button how can I handle request in backend so it will use Alfresco java API to process request and store details in database.
I have to do many operations in my project like upload file, play with documents, Submit different forms. view those forms etc.
My first question is am I going in right direction by using alfresco java API's. if yes then how can use those API? is there any other way to do this?
Any help would be appreciate!!!
Thanks in Advance,
Kailas Salunke.
Well, based on my experience, Alfresco is an excellent ECM but not suitable for being a CMS.
Apart from that, it is difficult to give suggestions, starting from the very general overview you have given, but things like user name and password have little to do with an ECM and storing of data in a database.
You have two options available.
One involve using the Web Content Management Quick Start, it's a Spring Surf app you can (not easily in my opinion) customize for your needs.
The other solutions, if you have an existing web app, rather than develop your own API have a look at CMIS, I have put a simple wikipedia explanation, you can dig further from there.
Then, when you are ready, have a look at Alfresco CMIS first, and the most used Java API for doing CMIS call, which is Apache Chemistry
CMIS, in its intent, guarantee that Alfresco could be replaced with any other CMIS compliant ECM. You can easily integrate Apache Chemistry in your Spring app.

Rest edition or standard?

We are going to start a project that will mostly rely on services. Is it better to start with the Symfony2 REST edition or the standard one ? Or that´s just a starting composer file so it´s not very important at all.
You should just use the normal Symfony2 version. There's no reason to take the Symfony2 REST Edition if you don't want to create a REST Service. From what I understood from your question is that your web application simply rely on services. Your Web application itself is NOT a REST Service from what I understood.

Recommendations for a Full-stack Framework for REST?

I am looking for a robust REST framework to eliminate all that boilerplate code with starting up a new REST-only web service (mobile clients). Is there a framework that already has this built-in where I could, for example, simply build the domain models and run with it? I would like to see:
Authentication & User Model
Logging
Basic CRUD
Permissions (for model access)
Scalability
It seems every web service at a minimum needs the above capabilities. Somebody, somewhere must have written a good re-usable framework with the above capabilities. Any ideas? I would prefer Node.js, Java or even hosting with a PaaS service provider that offers these features.
Spring 3 MVC provides a very nice and simple annotation based framework for REST.
See http://blog.springsource.org/2009/03/08/rest-in-spring-3-mvc/ it can be deployed on any java web server like Jetty or Tomcat.
A framework like XAP provides a combined solution of Spring and Jetty plus it's built for dynamic scaling.
See http://www.gigaspaces.com/xap.
Last if you want to easily on board this solution on any cloud CloudifySource provides an open source project which includes XAP capabilities and PaaS.
See http://www.cloudifysource.org
I use Symfony 1.4 for this. It is an PHP framework. It generates most of what you need for free. The database stuff is also quite easy as the Symfony uses ORM libraries (you can choose but I can recommend Doctrine: http://www.doctrine-project.org/).
For example the whole backend site(admin) generating is a matter of running one command. They have a great e-book fro free. More info here:http://www.symfony-project.org/.
There is also Symfony 2.X (http://symfony.com/), which have a lot of new features (e.g. new Doctrine 2.0). Especially with the bundle (plugin) https://github.com/FriendsOfSymfony/FOSRestBundle is the RESTful service quite easy.

Single Sign on in a 3 tier architecture between SAP Netweaver CE and R/3

I am trying to implement SSO using SAP logon tickets in a 3 tier architecture between NW CE and R/3. But so far I have not been able to crack this.
Let me describe the scenario in detail:
We have two Java EE applications on Netweaver CE7.2 Application Server:
UI: Just handles all the UI logic : js, jsp, css, html, extjs .It calls the Business Layer Java EE application to get data from back-end systems.
Business Layer: Calls R/3 SOAP services does some processing on them and exposes the data back to the UI via a Restful JSON service (implemented using Java Spring framework)
Both UI and Business Layer Java EE applications define login modules to be used for SAP logon tickets. So the architecture is like this:
UI ---RESTfull------>Business Layer----SOAP--->ABAP R/3
So ideally when the UI link is clicked it prompts the user for authentication (uses CE UME) and then the UI applications calls the Business Layer which then calls R/3. This unfortunately doesn't work. The authentication between UI and Business Layer Application fails.
However if you remove the Business Layer Java EE application and call the SOAP service directly from the UI. SAP logon tickets starts working.
So I have been able to make SAP logon tickets work with the following 2 tier architecture:
UI-----SOAP----->R/3
So my Question is:
Is there a way to use SAP logon tickets in a 3 tier architecture between NW CE and R/3 (For the scenario described above)? Any help/pointers/documentation links would be great
Now since the SAP ECC and CRM systems have the ability to publish JSON Restful services (Wrapper on a RFC), it is not possible to directly consume this service.
Hence there is no need to covert JAX-WS services to JsonRestful , all I have done is pass in the secuirty token "MYSAPSSO2" to this interface for single sign on.
I will update the post with more details soon.

Recommendation required RESTful web services on Linux

Looking for a recommendation of which framework/web server to go with on Linux. The idea is to build database backed RESTful web services.
I know Java, c++, c# (irrelevant I guess on linux) and C. Okay with developing in any of those.
Here is a table of frameworks that have varying degrees of support for REST and the languages they use.
You might want to check out RESTx. It is multi lingual: You can write code in Java, Python (server-side JavaScript coming soon). RESTx is specifically a platform for the creation of RESTful resources and web services. It is NOT a traditional application framework. DB backed web services are actually a specialty of RESTx: You identify the reusable components you want (in this case a JDBC capable DB access component), and then just configure it through the RESTful API or by filling out a small form in a browser. As a result, you get a new RESTful web service, which encapsulates the query you specified when creating the new resource.
I'm the lead developer on RESTx, so if you have any questions, please contact me or visit our forums.
If I were you I would go with Ruby 1.9.2 + Rails 3
they're fun and you get to learn something new
ubuntu specific install guide: http://web2linux.com/installing-rails-3-on-ubuntu-10-04-lucid-lynx/
official RoR intro: http://edgeguides.rubyonrails.org/getting_started.html