Integrating Alfresco Share in external web app - share

I have a project ( a web application ) that aims to integrate Alfresco Share like a portlet on it. Something like what's done in this video : https://www.youtube.com/watch?v=On7SfssX8TI&t=22s. If anyone please know where do I start ? What should I do and what steps to follow, I'll be grateful.
Thanks in advance.

Share and Alfresco Repository communicate via REST APIs. Share pulls/fetches data from Alfresco Repository by making calls to its APIs.
So, if you want to use Share as front-end with your Web Application then you would have to create necessary APIs that handle documents and its metadata within your web application and provide them to share when needed.
In most of the cases, web-application is used as front-end instead share and Alfresco repository can be used as server-side repository to maintain the server-side operations on documents. In this, you have to develop only client-side APIs that can communicate with Alfresco Repository to exchange data.
So my advice to you is, study the Alfresco-share with Repository first and then try to use share with your web-application.

You can use Liferay to create easily your portlet, you can check this addon Alfresco Portlet For Liferay Portal , or google "alfresco liferay", there is many examples of integration

Related

Adobe Experience Manager: (Blackbox) Web API for external access

Background: We're creating an offer for an Xamarin app for a customer, which is using AEM to manage a lot of content. We are not experienced with AEM, therefore I have the task to find the possibilities regarding a Web connection and how deep into AEM we need to interfere, to get the desired data.
Usually, I would never ask such a general question here, but after some hours of research, I didn't find any hint regarding a public API:
I've started a chat with an Adobe employee, but he told me, that he
can't help me regarding technical questions
I've analyzed the AEM architcture, finding Sling being a Web API
(https://helpx.adobe.com/experience-manager/using/querying-experience-manager-sling.html), but it also just Java
I've also found AEM Assets (https://helpx.adobe.com/experience-manager/6-4/assets/user-guide.html),but analyzing it, it seems like this is more like a Web App on top of AEM
I've also found Web APIs in AEM Screens,
https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/developing-screens-rest-api.html, but the architecture here seems also very tightly coupled between the UI and the Web APIs
So, my question: Is there just no Web API at all? Or is one of the subproducts of AEM the endpoint, we could use to get data?
Based on the fact that you mentioned Xamarin I guess you are supposed to work on a mobile app.
You basically have four options, if you want to build that using AEM:
Use the Single Page Application (SPA) capabilities of AEM (requires AEM 6.4):
Use the (legacy) PhoneGap capabilities of AEM.
Use the out-of-the-box Sling APIs to expose the data you need and use them in your Xamarin app.
Write a custom (web service) API and use that in your Xamarin app.
I would strongly suggest to have a look at the SPA support or PhoneGap capabilities if you are not running AEM 6.4.
Working with the Sling API or building your own API is not the best option if you are new to AEM. There are so many pitfalls that will cause you a lot of headaches and you run the risk of creating an unmaintainable mess of an AEM project.

Rest API and admin in the same application

I'm new to building APIs, I made the first one using an MVC framework: codeigniter, with chris kacerguis rest implementation.
I'm not really sure this was the best think to do because I believe maybe the framework is not that "slim" or light just to API's purposes.
I plan to do a mobile App, an admin and a website so the three can consume the Api's services.
Is it a bad idea to have the API, the website and the admin on the same project? which are the pros and cons? or the best architectural approach?
Otherwise I will have: One Codeigniter project for the API and Another Codeigniter project for website and admin
thanks
You can create folders in "controllers" folder to organize your project and use the same project/env configuration :
controllers/Home.php
controllers/api/MyApi.php
controllers/admin/Admin.php
Edit : You will share models and libraries too.
In my project I realized 2 types of controller - REST and API. Admin js gui work with REST, other world work with API. You can do it simply with silex framework, a little brother of symfony.
The purpose of building a REST API so that you only have to build one project for your business model. This allows you to construct any number of applications on any platform, only requiring you to consume the API in different ways. This essentially separates/decouples the user interface from the business logic, and vice versa.
You should create separate projects for the REST API and each UI project should also be separated projects. This allows you to change the underlying code, language and platform in any one of the projects without breaking any of the other projects as long as the API signatures remain the same.
For example, you could have a live version of your website built using Codeignitor while developing another septate project using AngularJS. When your AngularJS project is complete you would simply swap out the project on your server (or create an entirely new website or server) still allowing you to use the other if required. Additionally, you may decide that you would like to move the API onto a different platform, language or database, develope it and swap the implementation when finished causing no changes to any of your UI projects assuming you have not changed the API signatures.

How to access SAP backend tables using SAPUI5?

I'm totally new to SAPUI5 and after learning the classic Dynpro and developing on the SAP GUI I got a few questions about how SAPUI5 works.
As SAPUI5 is developed in Eclipse I'm interested how it could get data from a SAP NetWeaver table.
Do I need a remote call for that? And how does the Eclipse program connect and communicate with NetWeaver?
I didn't find an answer to that, maybe it's just too simple.
Maybe someone have some tips or best practice to share?
Thank you.
SAPUI5 apps are running inside the user's browser and connect to any server with HTTP. This is actually the very standard way of creating client-side web applications. You can use any kind of HTTP server as long as they offer the data at a URL and offer the data in a well-known format like JSON or XML, but when you have a Netweaver server, Gateway and using OData would be the recommended way to go.
Don't think too much about Eclipse. It is not at all required to develop SAPUI5 applications, it just used to be a well-supported editor with additional plugins in the past. Actually SAP WebIDE would be the best-integrated editor now, but you can still use anything from vim to Notepad.
There are plenty of Gateway/SAPUI5 guides on the web, also the official UI5 documentation contains chapters about getting data from the server with OData. I'd recommend doing the entire walkthrough to any beginner!
You have to write a service (as far as I know preferably using SAP NetWeaver Gateway) to expose whatever data and operations you wish to access from the back-end system.

Alfresco as App development framework?

I was surfing the Internet where I found an article saying that Alfresco is a Content Management Framework as well as App Development Framework. While I understood it as Content Management Framework, I am not able to know about it as an App Development Framework.I tried researching over it, but could not find anything viable.
I want to know that how Alfresco can be used as an App Development Framework ?
Hi Alfresco has an application development framework, more info here:
Guides: https://community.alfresco.com/community/application-development-framework/pages/get-started
Angular 2 components repository: https://github.com/Alfresco/alfresco-ng2-components
Alfresco App Yeoman generator: https://github.com/Alfresco/generator-ng2-alfresco-app
JavaScript API repository: https://github.com/Alfresco/alfresco-js-api
Some videos:
https://www.youtube.com/watch?v=-OFI3izSDdk
https://www.youtube.com/watch?v=kjOgVbINAyU
In case you want a live support you can use the Gitter channel: https://gitter.im/Alfresco/alfresco-ng2-components
Well, if for App is meant mobile application, Alfresco has a Mobile SDK available for both iOS and Android which can help you create your own application to work against the Alfresco Platform.
Moreover there is another framework called Aikau which has one main goal
The main purpose of Aikau is to provide a library of widgets that can be easily assembled into a web application for accessing an Alfresco repository. The aim is not to replace Share but it was necessary to migrate away from its original implementation, which was based around the Surf paradigms of pages, templates, components and web scripts, towards a solution that provided for rapid development and customization.
This feature was first introduiced in Alfresco 4.2 and then extended in Alfresco 5.0
If you want to build applications for Alfresco you have a number of options available to you - as mentioned you can build mobile applications (and there are SDKs available to do this).
If you want to build web applications then you have the option of either customizing the default Alfresco Share client (which is built on top of the Alfresco Surf framework using a combination of YUI 2 and Aikau). Alternatively you can built your own web client by building a new client with the Maven Aikau Archetype.
The advantage of the Surf framework is that it takes care of Alfresco authentication across all the various APIs (WebScript, CMIS, Public API, etc) as well as providing lots of security benefits (CSRF, XSS white-lists, etc).
The advantage of using Aikau is that it provides a large number of out-of-the-box widgets that are specifically designed to work with Alfresco data and address Alfresco (ECM) specific use cases.
You are of course not limited to these options - you can build an application on top of any stack you wish, but ultimately you will want to be making use of the REST APIs that the Alfresco Repository provides.
Depending upon the application you are building you may also want to build custom data models and build in workflow via Activiti BPM as well.

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.