I am looking for any basic Ruby on rails tutorial that uses RESTful web services with json, If somebody can throw a very basic app that implement those technologies i would appreciate, I have tried to google but i couldn't find anything.Also if you could give me a real world scenario where we would actually use that ,would be even more helpful.Thank you very much
For those coming to this question from google like myself, take a look at some of the tutorials here, they were a great help for me.
ActiveResource is the simple way to implement restful web service's in rails
http://www.ibm.com/developerworks/library/wa-railsactive/
http://api.rubyonrails.org/v3.2.13/classes/ActiveResource/Base.html
This could be helpful also
is a tutorial of Rails 4 with MongoDB
http://moredevideas.wordpress.com/2013/04/26/rails-4-with-mongodb/
MongoDB is a NoSQL database. MongoDB is a document-oriented database that stores JSON documents, and is schemaless, that means that each document can have it own schema.
Related
I built a web app in Laravel 5.2, and now, I would like to use Angular or Vue, so I am separating an API from my controllers.
Thing is actually, in my controllers, I use a lot :
Auth::user() to refer to the logged user.
What is the best way to deal with it???
Read books about API design. If the existing app isn't designed to be a RESTful API in the first place then you're in for a lot of learning. Laracasts has a great series called Incremental APIs.
Laracasts.com
Build APIs You Won't Hate
OK, I'm expanding my answer, despite this is not a great question, it is probably too broad. You need to look into Oauth 2.0 authentication for your API, you can still use a username and password, but OAuth 2.0 tokens over SSL is probably the best simple way to provide authentication for your API. If it is only used internally, or is read only then you may not really require authentication for the API at all. There's not enough information about your use case to even make a guess about that. Good luck!
I want to implement some analytics for my rails web application, e.g.:-
Who's using the app?
How often they are using?
What content in the app are the users viewing?
Can anyone please suggest me a Ruby gem or any way to start working on this ?
Thanks
I may mention you some names. Very useful tools that I use.
Clicky
Chartbeat
Woopra...
There are many more available, but i like these three the most ! :)
Recline.js seems a great tool to display data on grids, maps, etc.
I'd like to use the grid views, but to be able to save what is displayed to the user on a database. I'm currently using rails for this project.
In the docs, they say how to code a backend to integrate with it (http://okfnlabs.org/recline/docs/backends.html) but i wonder if there's already someone working on it ( I couldn't find it on the web)
Thanks
The Backend object in Recline.js a javascript component that talks to a data source of some kind, typically a web service. The Backend component talks to the interface of that web service, and it doesn't care whether it be programmed in Ruby, COBOL or Java, as long as it knows where to get and send the data, and in what format.
So in short there isn't, and can't really be a ready Rails backend, because the implementation depends more on the specifics of your application -- how to map the data in your database (MySQL?) to a service API Recline can understand, and vice versa.
You can use SOLR with Rails, so I dont know why you couldn't utilize the Recline.js SOLR functionality to search your rails data.
I have a rails-based restful server-side api.
I want to know what services are called the most, their response time, etc.
So this is sort of web analytics, but it's for server-side operation.
Is there any free service out there that can help out( google analytics is a good analogy)?
Did you try to analyze your logs?
It is a very good way to get the statistics you are looking for without using an external service
Here is a link: Rails log analyzer
try Apigee http://www.apigee.com/ it's free and could give you what you want.
I've had the same problem. A lot of services are for web analytics, this means they super general, and it's hard to configure it properly.
What I can suggest you is to use some kind of APM. There is one especially for Rails - https://appsignal.com/. But it's not free, price starts from 15 euro / month for 250K of requests.
I'm working on a tool in C# that interfaces the JIRA SOAP API. I have read the documentation but I can't find what I'm looking for. Does anyone know if it is possible to link an issue to another one via this api?
PS : Actually, my real need is to convert an issue as a subtask of an issue...
Last time I looked, JIRA's web service wasn't really actively supported or encouraged by Atlassian. It's very much a second-class citizen compared to the web front end, with very basic operations.
Also, it's not a WSI-compliant web service (it's an old Axis-based RPC_encoded service), and so modern web service stacks won't even bind to it. You might want check that your client can perform basic query operations before diving into the depths of the API.
You can actually go pretty far with Jelly scripts, but converting an issue to a subtask then linking it as a subtask... I'm not positive that you can go that far.