cancel
Showing results for 
Search instead for 
Did you mean: 

Am I being stupid!

idiotsguide
Champ in-the-making
Champ in-the-making
Hi Everyone,
Appologies if this is a very very basic question, but I seem to have read pages and pages of documents and watch several youtube vidoes and don't seem to be getting anywhere. I've setup quick start (tomcat/linux/alfresco4), and have the finance wesbite running. But I only did this to give me a headstart and an idea of what alfresco was doing. What I want to do is create a simple website with just one html page file to start with and get alfresco to populate the content.
I just dont seem to be able to find any documents to do this manually, i don't want to use spring surf, or anything else really, i just want to hand write HTML/java and plug the alfresco API's/Calls,etc directly into my HTML. I assumed that this would be a fairly standard thing to want to do, hence I now have the feeling that i'm totally missing the point!
Can anyone point me in the right direction?

Thanks very much for reading.
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
It is possible you've mistaken Alfresco's role. Alfresco is not a CMS in the same sense that, say, Drupal is a CMS. What I mean by that is that unlike most PHP-based content management systems, in Alfresco, the repository and the presentation are completely separate. The closest thing Alfresco has to a presentation framework is Surf, which you say you don't want to use.

So if you want a web page to get its content from Alfresco and you want to use straight HTML, your HTML page will need to do *something* to get that content. Here are your options:
  • Place JavaScript in your HTML page that does an AJAX call to the repository tier.

  • Don't use straight HTML but instead use a language that renders HTML, like PHP, Python, or JSP, and make calls from those scripts to the repository tier.

  • Use a web script that includes a view that renders as HTML. Query the repository from the web script controller. Render the data the controller places in the model in your HTML view (which is implemented as FreeMarker). Depending on what you are trying to do, you might be able to get what you need from Freemarker calls in your view without a controller. (Web Scripts are technically part of Surf, so maybe this violates your no-Surf requirement).

  • Use a front-end framework like Drupal, Liferay, or others that make calls to the repository tier.
In the above options, when I say "make a call to the repository tier" what am I talking about? You have options. You might be calling:
  • an out-of-the-box web script (restful)

  • a custom web script (restful)

  • CMIS (restful or web services)

  • Alfresco Web Services API
The above discussion assumes you want to do something dynamic. Of course you could also just create the HTML page in Alfresco, either manually or as the result of a transformation, and then publish it to your web server's file system.

Hope this helps clarify your options and the approaches available.

Jeff

idiotsguide
Champ in-the-making
Champ in-the-making
Hi Jeff,
Thanks very much for posting a reply, very helpful and makes a little more sense now.
I appreciate that the CMS part is not the main guts of Alfresco, but I have the job of writing a website that needs alfresco at its core so i've no choice, but it does seem like a good system. I'm very familiar with writing website based in ASP,PHP, etc so i'm sure I'll get there in the end!
I guess I'm just used to writing site from scratch, I've tried the Joomla/Drupal's before and while they are good system, sometimes they are a little overkill.
I'm going to try Spring thought as it seems like this would save me a little time writing code that's already been written.
But I would also like to know if there are any simple guides that can take you through implementing a single template page into the backend (with basic api calls).

Thanks again for your help.