Rails - Dynamic vs static application for an e-learning platform - ruby-on-rails

I am about to start developing an e-learning platform where users will be able to watch educational videos for school curriculums and take quizes and so on. The part im not sure about is how exactly should i go about creating each course on the website. Should I create it as a static page where all the content is added manually through code for each course and each video, or should i make it as a CMS whereby each video for each course is uploaded through an upload form and then displayed (using paperclip for example)? Can someone explain to me which is the best approach and why? Baring in mind that video uploading will not be on the user's part, only I will be uploading and adding content to the website.

You should go the CMS way, because it will make your life easier. By generating a lot of static pages, you will see that there are things you want to reuse at another point and then you have to code them another time. With a CMS you can predefine objects like a survey or video content, so that the admin or course leader can use these things in a more efficient way. Mostly, admins aren't techies, so they would be thankful for such a CMS.
This is also important for the following development. Let me give you an example:
You created hundrets of surveys, but then somebody discovers a bug. You need to change your code in too much places. While generating only one model of a survey means also only one fix.

Related

Should I be using clean URLs or URL parameter in my Web App?

Which URL structure should I use for my Web-app?
Clean URLs like this
http://dashboard.company.com/sales/john-doe/2017/32
or with URL parameters?
http://dashboard.company.com/sales?person=john.doe&year=2017&week=32
Are there any guidelines for this?
Edit to explain my question better From the user perspective, the two ways are identical in ways of sharing the url. For the programming part they are not, I use Flask. I want know if there's a standard way of handling it, what is the better way?
Background
I am developing a Sales Dashboard for internal use at my company. It display the sales of every sales person. I want to make the reports shareable so that my colleagues can send their own page for a certain weeknumber with each other, or whatever. Or the boss can easily get the page for a meeting with the sales person.
No SEO
Just to stress this point. I don't need clean URLs for SEO.
It doesn't matter at all, by adding the parameters as GET or POST they will be visible but if you use a framework for your app, you should use clean as possible because the parameters to the controllers must be specific and not by data. Otherwise if is not a big project you can use like that but you need to make sure that soon you wont have something like lang?en or something which will be as main parameter. It's up to you, read GET x POST differences and you'll figure it out better.

Making app for Offline Browsing

I am new to objective c and still learning. I am making an app for my project in which user can download the whole website or webpage for later browsing..so i need some guidance, so if any one can give some suggestion that would be great
There are many ways to achieve what you asked for. Either by saving the websites data in temporary folder or you may save the whole site as pdf.

Using cloud storage for images in a Ruby on Rails app

I have been struggling with an efficient way to store and manage the pictures I need in a Ruby on Rails app I am building. I will use a real estate app as an example:
In my real estate app I have a House model and a House controller. On the House #show page I want to list information on the house as well as display pictures for that particular house. Some of the houses have five pictures, others have one. What is the best way to store these pictures and display the ones that pertain to that particular house?
Obviously I do not want to store them with the app, that would be way too bulky. I have tried using Amazon S3 buckets and the Amazon SDK but was unable to get it up and running. Amazon's documentation is all over the place. I currently have pictures stored in a Google Cloud Storage Bucket. They have a public link so an individual image is easy to display. The problem lies in the fact that each house might have a different number of pictures associated with it.
Google's documentation is difficult to navigate, especially when it comes to Ruby. If there were an easy way to access my bucket and filter the files stored there, this would be a breeze. Any ideas? Does anyone know how to do this in Ruby? This type of photo storage is very common and I am surprised at the difficulty I've had in getting it set up. Thanks for your help.
Amazon S3 is one of the best options out there, but it can be a little confusing. Try the paperclip gem for adding file associations to your models.
It gives you multiple options for how to store files and makes it easy.

How iOS Google Now can show different card template

I wanted to know the technology decision behind the iOS Google app.
As we can see, in the app's Google Now feature it renders many different card templates for different scenarios, and those templates seems to be very flexible based on server inputs.
I was wondering if this is implemented all based on HTML5? or they just have many templates built in and render them locally? I'd vote for the HTML5 route but not sure if this still involved some native code to make it more responsive?
Thanks!
As we (well, most of the community) are not Google employees we can't tell you what they really did, but I'd say that it is possible to do this dynamically in the app.
We did develop something similar that responds to definitions sent by the server and transforms them to custom designed forms following basic rules.
Google reuses the design of those cards for different plattforms, the easiest solution should be showing some WebView and using HTML5.
I agree with Kevin, as this answer is entirely based on personal opinion, too.
The way I would go is to create a card class which will load some JSON data and format it with HTML and CSS. Looking at each card it would be hell to format things that way natively. I mean, attributed strings is not the way to go. Too much logic for deciding which card get a bigger text or a picture.
Additionally, the top header is most likely "localized" as well, so you get the location and load a localized image. But that is Google by nature.

Creating photo albums with Wordpress on an existing site

I'm looking for a solution to a particular query. I've got a website that I have made for a client and I coded my own image uploader/thumbnail creator but it's not handling what he wants very well.
So basically I'm looking for alternatives, and someone suggested using Wordpress and one its plugins to help upload albums. This seems straight forward after a bit of reading. But can I integrate it with my current set up:
A user logs into their account on the site (I've set up user accounts in a DB),
They see which albums are associated with this account.
They open the album and the images appear.
So I guess what I'm asking is, how configurable is wordpress to fit in with my current set up. I need to be able to only display albums related to the logged in user to them.
Tbh if my current way worked consistently (the upload/thumbnail creation is all done in PHP), I would prefer to use that, but this has gone on for a while and I just want to give him a clean solution.
You can consider to use this wordpress plugin:
http://wordpress.org/extend/plugins/nextgen-gallery/

Resources