Creating a library application - which method to use? - ruby-on-rails

I was hoping to get some advice. I want to create an application which is like a library that holds a lot of different information including documents, pics etc where a user can log in and search for different topics and see the definition of terminology. For example users would be able to click on the word 'electical current' and a definition of electrical current would appear with also links to supporting information. The user will not be allowed to edit any information only read it.
I am wondering what is the best language to use to do this? I know that storing all the information in a html file is definitely not the way to go. But I am not sure what to use - whether html linked to a database is a good option (I've heard that this is also not great because your database code is still accessible) or whether ror is a good option. I decided that ror would be a good framework to use but I still have some doubts such as:
the application will not be hosted on the internet but only on an intranet would ror still be good for this?
the 'site' is basically static except for a few users who will have admin access although it may have more user specific functions later on.
Any advice would be great. Thanks in advance.

It seems to me that a wiki type system would be fit for your purposes. You can create one without writing any code by using a free service such as Google Sites.

I agree with #Finbarr that your problem statement sounds like it could be solved by a wiki.
I suggest mediawiki since it is open source--you can add to it or change the core software if necessary.
Or any other opensource wiki could be used. See wikipedia article
Re: which language: your problem statement is pretty broad. From what you've told us, any language would do.
Best advice: find the open source wiki that most closely meets your needs and then learn the language that it was developed in. Usually that's php or perl. But you can also find Ruby on Rails wikis such as Instiki
Added: Welcome to Stack Overflow. Note that your question is quite broad. So it may get closed for not being specific enough. Stack Overflow is aimed at answering specific questions about software programming. See the faq.

Related

Allowing others to copy and tweak my Rails app online

I have developed a relatively simple Rails web application that others (non-programmers) may find useful. I would like to provide a web interface for anyone who wants to create their own copy of my app and change some minor settings, like the appearance, the name of the app and some of its resources, that type of thing. What kind of technology would allow me to do this? Thank you in advance!
GitHub is probably one of the most popular tools to support this, but there are many others such as SourceForge. I'd start from there and do some research to decide the best one for your purposes.
The best way to collaborate code online is through git. The most popular sites for git management include GitHub and BitBucket. Here's a good article suggesting nine alternatives.
However, you stated it would be used by "non-programmers". I can't tell if they will find it useful through the function of the application or the simplicity of the code, so it seems reasonable to also suggest non-git options.
You could use something like Amazon Web Services or Google Cloud to host the static files. See the AWS S3 docs regarding creating a bucket and adding an object.
If you would like to host the entire application online and allow users to easily edit and view the application in-browser, check out cloud9.

A ticket System to integrate in Rails

I want to add a Ticket System to the web app I'm developing.
The idea is very simple:
Users can open tickets when they have problems and
the Admin can see the tickets the users have submitted.
I'm looking for a ticket system but I have found only systems that are external to the web. I want to add it IN my wep app.
¿Do you know any ticket system por rails?
Thanks
I think using some external gem like noted above would be either an overkill or a hassle due to mentioned bad documentation.
Judging by your problem description this is quite simple to implement.
Create model for tickets and associations with users (I assume you
already have users model fully set up).
Authorize access to tickets' actions depending on user status (admin
or not)
Create corresponding views
P.S.
You could have a look at Redmine code. It is an open source project management software written in rails. I am sure this could give you a good idea of how to build your own or even borrow bits of code from there (if the app license that you are building fits)
Maybe Simple-Ticket would fit you. Though beware the basic implementation and the fact that there is no documentation provided nor written specs.
Have a look at restrospectiva. It doesn't have any documentation though

Code-Editor Plugin

I'm looking to find some kind of plugin similar to this plugin stackoverflow uses to ask questions. Allowing the person who is asking the quesiton to customize his/her question with code, images, bold letters, etc..I like how it knows that your typing code when you tab once or twice for example. I would be using it for an mvc4 project to let users type tutorials with a little code in there description. I tried looking at code mirror but it seems way to complicated to use. Are there any simple ways or plugins I can implement something like this into a textarea or some kind of input? Thanks for any adice
Here's a few libraries that you can take a look at:
http://steamdev.com/snippet/
http://www.tinymce.com/
http://codemirror.net/
Personally I use the first one. They are all easy to implement though, what problem did you experience using codemirror?
FWIW, the editor that is used on StackOverflow is open source so you can incorporate it into the site you are working on. The editor uses markdown syntax instead of full on HTML (such as TinyMCE) so it's a little more limited in what kind of formatting it supports. Whether it serves your needs or not will depend on how rich an editing experience you need to provide and how complex the resulting output needs to be.

Fetch a snippet of string value from any website

I'm trying to create a rails app that fetches album scores from PitchforkMedia.com
For example, I want to grab the score 8.0 from this album as shown below in the image.
In my brief research, I came across a similar question asked from asp.net point of view.
Generally, the answers suggested
using http request
parse the HTML source
identifying unique flags around the variable score
Some answers came with use of built in asp.net functions.
Are there equivalent functions available in Ruby or Ruby on Rails?
Or can someone suggest some other way doing what I want to do?
Any suggestion will be appreciated. Thank you.
Edit 1: This is completely for personal use and education. Assume that there is no legal ramification for data mining from websites.
I would use Mechanize to scrape the content that you are interested in. Ryan Bates has a great screencast on how to use Mechanize.
You need to make sure you're reading the site's terms of use before you start screen-scraping data, especially if it's not for personal use.
This is a portion of Pitchfork's terms of use, and most other sites have something similar.
"Any reproduction, copying or redistribution of the Materials or design elements of the Website for any purpose are strictly prohibited without the express written consent of Pitchfork or its owner if Pitchfork is not the owner."
Screen scraping definitely falls in this category.

How to structure Ruby on Rails website

I'm curious to learn Ruby and Ruby on Rails. I have previous experience with PHP and some basic C/Objective C and Java.
I have done a couple of 'Get started with Rails' tutorials and want to try do create a complete site now. I do have some questions.
Is the entire website an app? I mean, sure, the simple 'blog-with-comments' examples fit in a single app. But what if you want more? Say, a forum, a blog, community, shop, task manager and so on (only random examples here... :) ).
Should I split these things into different 'apps' or not? I would still need them to communicate with each other and share user data and so on...
Any ideas?
Regards
Linus
In general, your core competency as a rails app -- that which you provide the most value for your users. You can then supplement from there, so your support section might be GetSatisfaction and live on support.yourdomain.com.
Your online shop could be a link to your shopify page at shop.yourdomain.com, etc.

Resources