cancel
Showing results for 
Search instead for 
Did you mean: 

How to start developing in Alfresco

vbutacu
Champ on-the-rise
Champ on-the-rise

Hello guys,

I just started messing around with alfresco and I read some documentation about developing extra stuff but I find it a little overwhelming as I'm not a professional developer and I really don't know what I'm going to need in order to accomplish my goal.

I would basically want to develop an additional module for alfresco that would allow me to manage employees permits requests for the HR office. What I'm asking from you is a quick "How To" on how to interact with alfresco in order to create this additional feature. I will try to explain as clearly as possibile my situation:

I installed alfresco my Windows computer and I followed the tutorial to setup Maven SDK, Java jdk and Eclipse IDE. I also managed to create the example amp project for alfresco-share. At this point I get stuck on how to integrate what I develop with my existing alfresco deployment and once I eventually develop something how to integrate the web part.

I tried to explain as clearly as possible, If you think I should provide extra information please tell. Thank you in advance for you comments.

Kind regards.

13 REPLIES 13

kaynezhang
World-Class Innovator
World-Class Innovator

I'm not very clear about what you said.

Since you had successfully created an amp project for alfresco-share.

Next step is to build the project and install the amp into share.

About how to install amp pleaser refer to Module Management Tool

https://community.alfresco.com/docs/DOC-5148-module-management-tool

binduwavell
Star Contributor
Star Contributor

In addition to MMT suggested by kayne zhang​, you may find the following documentation helpful for how to apply a generated AMP to your Alfresco install: Install the AMP file | Alfresco Documentation . MMT is the "low level" tooling used by the apply_amps script. It is also used under the hood by the Alfresco SDK to apply your customization when you are in the development process.

Thank both of you kaynezhang​ and binduwavell​ for you answers that helped clarify another issue. My main problem is once I write some java code how do I get to integrate it in alfresco. I'll make an example:

My intention is to make two java classes, one containing methods for db queries and another managing association between users and their permits requests. At this point I would like to make a graphic interface with a form and some buttons to interact with my java methods. This is the point where I get stuck. I read some tutorials about Java-backed web scripts but it's still not clear to me how to make my code interact with alfresco and where I'm going to put the code.

kaynezhang
World-Class Innovator
World-Class Innovator

I'm sorry I'm still not sure what you want to do.

If alfresco repository satisfy your need ,you don't need to extend alfresco at all. All you need to do is just use an client api (for example apache chemistry openCMIS) to call alfresco service and implement your business logic in your application.

If there is some feature you need but alfresco dose not support ,you can extend it using webscript .After development of your webscript ,you should deploy it into alfresco ,and then you can call it in your application using apache commons HttpClient library.

Hi Vlad Butacu​,

I also not clear on the concept of a class managing "associations for users and their permits."

Part of my confusion is that you might be saying that in an external database you are maintaining information about users and something called permits. Or these "permits" might be stored in alfresco and you are using the alfresco association (relationship) content modeling concept to tie repo nodes together. Or you might be talking about permissions where you want to possibly change what a user is or is not allowed to do in the repository. Or you could mean something else. So please attempt to clarify your use case further.

Now if you want to create a user interface there are really a lot of options. Do you want it to appear inside an existing page in Share? Do you want to add a completely new page to Share? Do you want a standalone UI that interacts with the Alfresco repository? The answer here will likely lead to further questions, so if you could provide more details on your use case it might help us get right to the point.

Sorry for the confusing explanation. I will try my best to clarify:

I installed a fresh copy of alfresco and presented it to HR office. They liked it as it was for content sharing, calendars and stuff but they asked me if I could develop something that people could use to request days off. This "thing" would have to be some sort of form to fill and submit then it would have to be reviewed and approved by their manager and then HR Office would need to have a full view of all those requests.

My intention is to create some additional tables in the existing alfresco database to use for this purpose then write some methods in java to read and write inside those tables. I could write a standalone web application but I want to integrate this in alfresco to make use of the active session for authentication, groups management and roles.

I have some basic programming knowledge but the whole alfresco architecture is a bit overwhelming for me so I started this post hoping someone would help me get straight to the point where I develop something then I tie it to alfresco somehow.

This might not be the best solution but it's the best I could come up with.

kaynezhang
World-Class Innovator
World-Class Innovator

You don't need to create additional tables,you can use custom model to save leave  and permission data. And combine with workflow you can  implement review and approve process.

About how to create custom model,define workflow ,configure share please refer to http://ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html.

Thanks a lot for the link, it's been very useful to get a grasp on how to start.

For this use case I would suggest looking at one of the following approaches:

1) Activiti (embedded) workflow - this is likely the best solution but may require the most work.

2) Use the new model manager to create a custom type (folder if you don't need to assciate with conten), with appropriate statuses and form layout. Then small customization to trigger creation of this type easily.Then smart folders to show requests in different states to appropriate people.

Possibly a custom datalist with a appropriate status fields for approval, etc.

---

There are other options, including creating your own pages with Aikau or Surf or a whole special purpose app with the new app development framework.