Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

The site I work on is almost entirely in Javascript, it just goes back (via Ajax) to the server for authentication, database access, things like that. My boss would like me to add blogging, forum, and commenting capabilities. I don't want to implement it from scratch and I certainly don't want to integrate some HTML-generating PHP atrocity.

Ideal, I'm looking for a package that does all the backend work and offers ReST interface so I can write a Javascript-based UI that integrates nicely with the existing site. Does such a thing exist?

share|improve this question

2 Answers 2

There's always AtomPub, which is designed exactly for this use case. There is an open source Java AtomPub server by Apache called Abdera. Since all you care about is something which has a RESTful API, you may be able to find AtomPub servers implemented in other languages. Then all the work you have to do is to display the items you receive from the server as you wish. We did this once before, I believe we were using the AtomPub capabilities of Roller.

share|improve this answer
    
I'm astounded by the sheer volume of documentation about Abdera that doesn't exist. It looks -- emphasizing "looks" -- like a solution, but do you of any project that is using it? –  Malvolio Apr 6 '11 at 21:27
    
No, I have no experience with Abdera. I do have experience with Roller, though. I know that it's AtomPub implementation works just fine. –  Vanessa Williams Apr 6 '11 at 21:59

Google's Blogger API is a great solution. It's REST, and is 100% free.

In addition, there is a PHP Version of the Blogger API, so you don't need to worry about writing a wrapper around the REST API.

Since you're using JavaScript, you could possibly use an HTML Form to access the Blogger API. Check out the Google Blogger JavaScript API for more information.

UPDATE:

Don't use AuthSub, it redirects your users to a Google Login page. Instead, use Google ClientLogin. Read the PHP Version of the Blogger API - ClientLogin for details. This uses your login and password to access Blogger to read and write data. It's server-side, but you can still use AJAX to pull data unobtrusively from your server, while your server handles communications to Google.

One possible issue you may encounter is with comments. User Comments will be recorded as if they are from you. Google doesn't yet support creating comments on behalf of the user.

However, you could create the comment, and use your own custom markup to store the name of the commenter in the comment itself. Your application could then parse the name out when displaying the comments. A former colleague of mine actually did something similar in his Picasa API, Comments: Enabled. You can use a similar technique with Blogger.

Sure, there is some work involved, but you're most likely not going to find an out-of-the-box-yet-custom-solution. In my experience, either you adapt to an API, or you develop your own complete, 100% customized solution that conforms exactly to you.

Finally, the code is licensed under the permissive open source BSD license.

share|improve this answer
    
Jeez, almost perfect, but a miss is a good as a mile. If I use Blogger as such, I have to use their identification/authentication model. My users are already signed into my website, I need a way they can blog and comment without sign in again. Is the Blogger code open-source [ crosses fingers forlornly ] –  Malvolio Mar 2 '11 at 4:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.