News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Ruby on Rails and SMF

Started by arekanderu, December 23, 2009, 10:25:30 AM

Previous topic - Next topic

arekanderu

I didn't find anything related to this so i though i could post here and get some feedback.

I am building a website with login system with Ruby on Rails. Unfortunately the Rails community does not have any decent forum plugins and since I have been using SMF for some time now to other PHP projects i though i could write a Rails plugin to communicate with it.

Since we are talking about two different languages the bridging must be done through web services. Each time a new user will be registered/delete/whatever at the main site i would like to communicate with SMF and make the changes to the SMF database as well. I know that there is an SMF API available but i would really appreciate some design-thoughts in order to make this as robust as possible.

Thank you for any replies

Arantor

No, it doesn't have to be done through web services (and in any case, none exist other than RSS style syndication), because you can still make direct database calls, however this process would be at best difficult because of the differences in how the two environments handle connections and sessions.

Norv

The SMF API seems a good point to start IMO, I think I'd go for it too, at least for starters. There are two other ways SMF offers for integrating with external code though, SSI API and SMF's integration hooks, you might want to take a look at them too.
You'll have to write the code to make whichever of these available as web service yourself, though. I'd go for a prototype script which forwards practically directly to each function you choose from SMF's API, and see how it goes from there.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

arekanderu

Thank you both for your answers. I'll start writing some stuff and come back with code :)

chanman

Let me know if you find a good way to bridge the two. I have put off a ruby migration for probably a year based on php/ruby compatibility. May have to code an entire new forum software if we go that direction.

Arantor

It does ultimately depend on how closely you want to integrate your Ruby solution with SMF.

Advertisement: