Hi,

I've controller methods which my mobile app calls to retrieve JSON.

I'm curious what is the best practice in naming mobile methods? Do I put
all the mobile calls into a new controller? Right now I'm only prependng
'mobile_' in front of the methods like session/mobile_create.

Right now the mobile functions are quite different from the Web ones. So a
sessions/create VS sessions/mobile_create is different and so mobile_create
news to exist.




--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b503e356-56d9-44aa-a968-e8111caaaa3d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Mike at Feb 26, 2014 at 8:44 pm

    On Tuesday, February 25, 2014 6:43:52 AM UTC-5, Brandon wrote:
    Hi,

    I've controller methods which my mobile app calls to retrieve JSON.

    I'm curious what is the best practice in naming mobile methods? Do I put
    all the mobile calls into a new controller? Right now I'm only prependng
    'mobile_' in front of the methods like session/mobile_create.

    Right now the mobile functions are quite different from the Web ones. So a
    sessions/create VS sessions/mobile_create is different and so mobile_create
    news to exist.



    I'm not sure I understand exactly what you're doing, but I'm assuming when
    you refer to a mobile app you mean a rails app running on a mobile device
    (as opposed to an app developed in Cocoa or Android that is accessing your
    API). In that case, I would recommend Rails 4.1 as they have developed a
    standard that is a lot easier to use. Look at the section "ActionPack
    Variants" at the following link:

    http://coherence.io/blog/2013/12/17/whats-new-in-rails-4-1.html

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9d6745aa-e194-42cb-9572-ce42eeb33373%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Brandon at Feb 27, 2014 at 2:34 am
    Thanks for the link Mike. Actually I my mobile app is using PhoneGap. So it
    does JSON calls to my User controller.

    Been looking for a better way to organise the methods. Right now in
    addition to Create, I also have Mobile_create in the User controller
    because Mobile_create is slightly different from Create.
    On Thursday, February 27, 2014 4:44:24 AM UTC+8, mike wrote:


    On Tuesday, February 25, 2014 6:43:52 AM UTC-5, Brandon wrote:

    Hi,

    I've controller methods which my mobile app calls to retrieve JSON.

    I'm curious what is the best practice in naming mobile methods? Do I put
    all the mobile calls into a new controller? Right now I'm only prependng
    'mobile_' in front of the methods like session/mobile_create.

    Right now the mobile functions are quite different from the Web ones. So
    a sessions/create VS sessions/mobile_create is different and so
    mobile_create news to exist.



    I'm not sure I understand exactly what you're doing, but I'm assuming when
    you refer to a mobile app you mean a rails app running on a mobile device
    (as opposed to an app developed in Cocoa or Android that is accessing your
    API). In that case, I would recommend Rails 4.1 as they have developed a
    standard that is a lot easier to use. Look at the section "ActionPack
    Variants" at the following link:

    http://coherence.io/blog/2013/12/17/whats-new-in-rails-4-1.html
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0354fb1c-8de3-41c4-b70a-500d3fbe7ca9%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 25, '14 at 11:44a
activeFeb 27, '14 at 2:34a
posts3
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Brandon: 2 posts Mike: 1 post

People

Translate

site design / logo © 2022 Grokbase