how to use ajax with json in ruby on rails?

What technology should I use for building my website and what are the best resources for it?

  • So I've got a few ideas for some sites that I want to build. The sites will, for the most part have user signups, data storage (material uploaded) and will need to have a rich UI. I could probably accelerate the development by using Flex or Silverlight but I really don't want to depend on plugins for the idea I currently want to build on. It's something that has to be accessible to everyone so PHP is my current option. Especially since it has such a large community surrounding it. About myself as a developer. I'm not a noob developer. I know programming concepts. But I am completely new to web programming. I do know web architecture and AJAX conceptually but I've never touched PHP or java script in my life.Oh I am also not developing a web app here. I just want a few pointers to some good resources out there that could have me applying knowledge to building this site on the http://go.It is critical that I will need to know a) site design b) AJAX c) Knowledge on implementing a site in a scalable way so that it doesn't become a monolithic block at any time. It has to support agile development d) Security. The site will include payment options so the last thing I'd want would be SQL injections into a non encrypted database and everyones personal info getting stolen. (Stop 'gawking').I need to know how to secure the site on ALL fronts e) FTP services for the site. So yea. That was a little too much to form into a search query and I don't want to spend time right at the start looking for material that might suit my http://needs.So I was hoping for some pointers in the right direction to some resources that help me get into the real development ASAP. I've also been told to look at drupal and ruby on rails. Opinions and answers anyone? Both for dev platform and resources. thanks

  • Answer:

    Simply put, use the platform that you are most productive in. I use Rails because that's what I'm most productive in, and if I were to develop a site for what you're thinking of, there are plugins in Rails that take care of most of the work for you, i.e Paperclip for upload, Devise for user sign ups.

Brian Jones at Quora Visit the source

Was this solution helpful to you?

Other answers

The first thing to recognize is that your vision will change as you progress through your project, so it's important to pick something that is both robust enough to meet your demands, yet flexible enough to iterate without causing major headaches. For this reason, I would steer away from major frameworks like Ruby On Rails, or Drupal, for your initial foray into the web world. Yes, they can deliver rapid results, and they can also deliver massive headaches.  Get the basics down, Javascript, jQuery, PHP, MySQL. Everything else grows from that basic understanding of front and back end. You can use this education to inform your choice of technology in the future. Firebug is your best friend. Learn about POSTs and GET's, learn how to pass data between the web layer and the database layer, without refreshing the page.  I echo John's sentiment above, steer away from the large, expensive tech stacks. Compare the documentation for .NET (http://msdn.microsoft.com/en-us/library/w0x726c2(VS.100).aspx) versus PHP (http://www.php.net/manual/en/language.types.string.php). Especially look at the important bits, code examples and community. PHP has a rich community versus the dead zone that is the MSDN.

Sean Canton

Hi there, Now, since you say you are developer & need to build a site that can be scaled. I suggest you to develop sites using Drupal CMS. It has lot of advantage to it. HTML5, CSS3, Ajax, Javascript, a lot of support is already available. Check out my answer here - Also, I have explained here http://www.tech-magneta.com/freelance-drupal-development. Please expand the points for description) Creating a site from base coding level will take a lot of time. Whereas, with drupal & its huge community you wont have to reinvent the wheel of coding. Basic functionality like Login- Authentication is in-built Creating user roles & assigning them permissions is easy HTML5-CSS3 responsive theme are available now. Functionality that you need may be avilable most probably in form of contributed modules. Just go through the main http://drupal.org site & you will know. Or may be google your functionality requirement by typing - "drupal [followed by needed functionality]" & you will get most of the answers. Drupal is secure, highly scalable, can be used developed, sustain & maintain overtime. Hope this help. Regards, https://about.me/AniketMohite

Aniket Mohite

Most any technology that's in widespread use will do what you need. While there are many who might suggest that one platform is vastly superior to the others, I don't think it's the case. If I could suggest one route however, it would be to move in the direction of open source. You'll be free of expensive server and development software licenses, and it provides for a healthy balance between controlling your project's future, but still having a healthy network of support. As such, I'm a big fan of projects like Linux, Apache, PHP, MySQL, Mongo, etc. For your rich frontend, Javascript and HTML5 is quickly becoming a great solution.

John David Anderson

Since you haven’t yet get in depth in any WEB programming language you have some options: Use Js for all, use any Node.js framework for the server side and use something like AngularJS (specially since Ng2 is in RC1 at the moment of writing), it’s easier to write when both your server and client are in the same language. Use Rails, it comes with lots of benefits, remarkable ones are sweet dev ecosystem, easy to integrate testing, database versioning, easy deployment to some platforms like Heroku, already configured for protecting you from most security issues (off course including SQL injection, XSS, CRSF and all), but you will lack a bit in the UI front unless you manage to integrate with a front-end framework. Use both Rails and AngularJS with Rails 5 API mode, the new standalone Action Cable package to import it in the Angular 2 app to be able to use WebSockets, and Angular itself is awesome flexible for UX (Plus the benefits of #2). Use php (not really, almost all legacy code and learning resources are spaghetti code), php is not bad, but there’s better, if you’re going to use php, you’re better suited using JS since you will use it anyway if making an UI rich app.

Carlos Esteban Lopez Jaramillo

If you've not got exp with php, js (but would like to!) - how about starting with something simple like Wordpress? It has huge amounts of online resources - and you can play around with free themes and plugins just to get an idea of how bits of functionality would work and fit together. All without wasting too much time trying to grapple with more complicated DIY apps! I wouldn't recommend Flex or Silverlight for a normal "site-type-site" (accessibility is a thing).

Adam Marshall

First, what languages are you proficient in or what do you feel most comfortable working with? It sounds like you want a CMS with file transfer capabilities built in. I would find a CMS package with everything that you want, that is built in the language you are most comfortable working with. You may look towards something like Joomla, Wordpress, or Drupal in the PHP world. You may want to go with something else like DotNetNuke, Umbraco, etc. if you are not comfortable with PHP.

Bruce Rick

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.