Fusing rails app with Radiant as extension?

I’m new to the radiant/rails scene, and I’m learning a whole lot. I love
radiant, but one of the things I want to do is to fuse one of my current
rails applications with radiant.

I’m guessing extensions would be the way to go? Or looking at the code
should I just customize radiant to have another tab that could manage my
application?

My application is fairly simple. Just a simple listing database. It has
6 tables, that I think could live easily in the same database as
Radiant’s?

Am I going about this the wrong way? Has anyone already done this and
have any tips?

I just installed RC2, as for my situation is better than using the
mental version via svn.

Thanks a lot for the help! This looks like an awesome forum, and hope to
be here a while!

  • Stefan

I guess my question is simpler now, kinda.

I read a few places that with the mental branch, and now RC2, fusing
together your own app with radiant would be easier. Since there isn’t a
whole lot of documentation on it, and I guess since I don’t feel like
delving into the source of Radiant, perhaps I could get an answer here?

So… I would create (or in my case copy) my MVC’s over, and then
integrate it into Radiant via an extension which can also put a tab into
the admin interface? What else would need to be done? I guess if I
wanted to access my data in layouts (whic I do) I would need to define
my own Radius tags, right, or does extensions make this easier somehow?

I’m all confused, on where, how, and mostly what extensions actually do,
and what normal coding still needs to be done. Perhaps it’ll all come to
me, and I should just try out and do this, but if at all possible, I
like to have a plan set in place, and documentation, or any reference
from people who have already done this would and have done/do.

Thanks for the help. it is much appreciated!

  • Stefan

You’re on the right track in your second paragraph. Nothing says that
you have to use Radiant for displaying information to the end user
(via Radius tags), but that is definitely the conventional way.

Look at the presentation I gave Tuesday for some more info about
general extension development:
http://seancribbs.com/customizing-radiant

For creating your own global Radius tags with mental/RC2, look up the
post on the Radiant weblog about time-sensitive content.

Sean

Awesome. Thanks. That helps a lot… but one question.

In RC2, where do I put my MVCs? The app directory is missing. Now that
just got me all confused.

Stefan wrote:

Awesome. Thanks. That helps a lot… but one question.

In RC2, where do I put my MVCs? The app directory is missing. Now that
just got me all confused.

Hmm is it because radiant is a gem? I’m guessing so. I’m still confused
though. Would it be better for me to move to MENTAL in order to do what
I want to do? or can I use RC2 and still customize it. I’m really
confused now.

Thanks,

Stefan

Okay, since I like to respond to my own questions, let’s do it some
more!

haha. Since RC2 is a gem, the app and lib folders are there right? Okay,
so I can create an extension with the help of this page:
http://dev.radiantcms.org/radiant/wiki/HowToWriteAnExtension

but now where do I put my models, views, and controllers. Will it work
if I just put them into a new directory of app? That’s where I’m lost.
right now.

Stefan wrote:

but now where do I put my models, views, and controllers. Will it work
if I just put them into a new directory of app? That’s where I’m lost.
right now.

You put them in the app directory of the extension. Extensions are self
contained mini rails apps.


John L.
http://wiseheartdesign.com

Yeah, I realized that when I started playing with it and the extensions
more.

That’s pretty freakin’ awesome!

Thanks a lot John, Sean, and all the Radiant developers.

I’ll let you know how the project comes along. It’ll be a pretty
largely visited site in my area, probably reaching 1 million page views
in its first month…we hope! :slight_smile:

Stefan Gomez
stefangomez(at)yahoo.com

Definitely an odd question:

Can you directly link snippets from outside Radiant?

I want to use my snippets to wrap phpBB and allow most modification of
phpBB through Radiant and a uniform look. Any ideas?

Thanks!
Andrew