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.

I'm working on a rails application, and so far I've focused on the api and the functionality. But now I'm more and more reaching a point where I will want to add static content, descriptions of the software and help information. Information that is generally in a CMS system.

How do I in the best way structure this so I can still work with the application. Yet maintaining the look and feel of the rails application?

Do write a CMS in my app? That seems a bit far fetched. Are there any Gems that do this?

What is the de facto standard for architecting this scenario?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

It depends on the scenario. So far we needed a few 3-4 pages of static pages. so we made a separate controller for such static pages. as they are not needed to be handled by rails each time, we enabled page caching for them. However, these are implemented when we need to match the layout. When we don't need to use the layout, we better put them in /public directory.

now i've seen several similar questions recommended to use high volatage. i guess you can give it a try. you can also check this discussion.

a cms may be appropriate when the static pages will be created dynamically, i mean it will be created after the application is deployed by user without the help of developers. if you already know that you have a few static pages, i guess it is better you create them during development. but when you foresee that in future they may grow, it's surely good idea to implement a basic, at least, cms.

share|improve this answer
1  
Good point about CMS and when the data changes. Help files for example should change with the application and thus be updated as I update the project. –  Morten Jun 26 '12 at 14:19
    
if help files are the only static pages, they may not needed to be built with cms. you can update them when feature of site changes. but suppose, you deployed a feature but later found you need to improve the help pages. now you need to deploy the app again after updating the help pages.i won't like to do it personally and for that i will surely develop a small cms so that i can update help pages on/after deploying the newer version. –  HungryCoder Jun 26 '12 at 14:27
    
deploying is cheap :) –  Morten Jun 29 '12 at 14:25
add comment

I concur with HungryCoder: for a few static pages a "pages" - controller is the simplest solution.

some point for switchning to a CMS style solution:

  • will your pages be translated into another languages? when? by whom?
  • how often will the pages need to be changed (don't forget simple changes like telephone numbers)? by whom?

in a worst case scenario you could end up as the guy that word- and pdf-documents are sent to by impatient costumers every week, for conversion and inclusion in some "static" page ;-)

share|improve this answer
add comment

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.