Last week, Shane Johnson and I spoke at the Alfresco code camp in Chicago. This event was organized by CITYTECH, and it was a great opportunity to share some of our Alfresco 3 experience with the community. From what I understand, the attendance rivaled that of code camps in New York and Boston. Hopefully, this is a positive indicator of the growing Alfresco presence in the Chicago/Midwest region.
Shane kicked things off with an excellent presentation on Surf as an application framework, which transitioned nicely into Share exercises. In the afternoon, I took over. Fortunately for me, only one person made a quick exit when that happened
I covered Web Studio, Alfresco’s new web content authoring and site construction application. It was first available in the labs 3c release, and now in the labs3d/final release. I provided a few hands on exercises that demonstrated the following:
In the spirit of Jeff Pott’s code camp at home blog post, I thought I would post the application the Chicago code campers walked away with. Please note, if you are not familiar with web studio or Alfresco 3 at all, I would recommend starting with these tutorials. Otherewise, here are the steps to get started with the app.
Install Alfresco labs 3.
Download and extract webapp.
Start alfresco.
Open http://localhost:8080/studio in a browser login as admin/admin
Create a new web project based on the blank website
Mount the avm filesystem view
This is the Alfresco repository that stores web content.. On my linux machine, this is done by executing
sudo mount -t cifs -o username=admin,password=admin //localhost/avm /media/alfresco/cifs/v
Copy the contents of the extracted ROOT folder to /path/to/avm/mount/point/newwebprojectname—admin/HEAD/DATA/www/avm_webapps/ROOT
Go back to http://localhost:8080/studio or refresh the broswer and you are all set!
You should see something like this:
These steps are a little awkward. At the code camp, we distributed a vm to minimize these setup tasks. Perhaps if there is a demand, I can make the entire vm available. Also, to get the full effect, drop some files (pdfs, docs, etc.) in the Guest Home folder via the alfresco explorer app found at http://localhost:8080/alfresco
So here is the basic structure of the application. There is a template defined with four regions. Header, navigation, spaces and headlines. The header and navigation are just using out of the box components. The spaces region is using the custom spacechildren webscript, which can be found in the WEB-INF/classes/alfresco/site-webscripts directory. This webscript uses the CMIS api to list content in the alfresco repository. Next, the headlines webscript grabs a feed from yahoo finance using data configured on the component (The stock symbol). Again, the source can be found in WEB-INF/classes/alfresco/site-webscripts.
Thats about all there is to it. One thing to note, I ran into this issue, but unless you are using open jdk, you should be all set.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Feb | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||