I am curently developing a java/jee application using Alfresco as ECM. I want to know what is the best way to communicate with alfresco in a Java/jee app.Which is better using the web script or cmis ?
-
please read this post [cmis or web scripts use?](http://stackoverflow.com/questions/42495054/cmis-or-web-scripts-use) and why not upvoted it – Yagami Light Feb 28 '17 at 09:12
-
i read it but it is not clear :/ – fbm fatma Feb 28 '17 at 09:18
-
And tell me what is not clear for you ?!? – Yagami Light Feb 28 '17 at 09:19
-
1why it is better to use cmis rather than web script ? – fbm fatma Feb 28 '17 at 09:20
-
with my case and it is the same with the post that i answered using CMIS is the fastest and simplest solution to perform a connexion with alfresco, you only have to download some library (any one can do it) and if you use java you will not be lost with CMIS some java method for the most importante feature (create folder, create document ...) – Yagami Light Feb 28 '17 at 09:24
-
ok what about performance? I am not going to host my app and alfresco on the same server,so i think it would be better to use cmis,to avoid traffic.what do you think ? – fbm fatma Feb 28 '17 at 09:28
-
1you have to understand that CMIS is something very similar to communicating using REST API (this is why you can use it with other ECM) this is why i don't think that you will get a performance problem – Yagami Light Feb 28 '17 at 09:30
-
I am using CMIS for over a year and no problem i hope it will stay like this (but i make some changes to see if Alfresco is available) i will provide it if you want – Yagami Light Feb 28 '17 at 09:33
-
ok send it if u can.and thx :) – fbm fatma Feb 28 '17 at 09:35
-
but i have to edit you question to make it more linked with the answer is it OK ?!? – Yagami Light Feb 28 '17 at 09:36
-
no let it as it is please. – fbm fatma Feb 28 '17 at 09:37
2 Answers
I do not believe CMIS being the best way to communicate with an alfresco repository, at least not for the most recent Alfresco versions, unless interoperability is a key value here (as in you want to be able to switch easily between content repositories).
If you are starting a new project from scratch, then Alfresco public REST API would be my very first suggestion check the docs for more informations. Note that it is only available starting from version 5.2.
Some times, you will even need to implement your custom webscripts (RESTful endpoints) for your custom logic, depending on what you are trying to achieve like in insuring transactional atomicity or implementing some complex logic ...

- 4,156
- 2
- 21
- 37
For someone who is starting with Alfresco the better way to perform a connexion with Alfresco Respository is to use Apache Chimistery you can read more in this post cmis or web scripts use? you will found valuable link.
the thing that you have to understand is that you have to hundle the connexion with Alfresco, i mean by that if Alfresco is down or not you will found informations in this valuable post See if Alfresco Server is available
Hope that helped you.

- 1
- 1

- 1,756
- 4
- 19
- 39