sproutcore & rails: where does the sproutcore application live within rails' directory structure?
I have a working Rails 3 app service plain old HTML CRUD and I want to build a sproutcore cl开发者_Go百科ient for the same. I (think) I understand Rails and Sproutcore, but I have an embarrassingly silly newbie question:
Where do I put the sproutcore app within the rails project structure?
Specifically, given that I have:
myapp/
app/
...
public/
...
And I need to say:
sc-init SOMETHING
What would the SOMETHING be? (myapp? public?) Where does the sproutcore app html come from? What are the best practices for serving that (routes?) What really does sc-server do that I can't do with WebBrick/Mongrel, etc.?
Thanks so much!
The sproutcore todos tutorial has a section at the end where the plug the app into several "backends" including Rails3. The Rails3 bit is here: http://wiki.sproutcore.com/w/page/Todos+06-Building+with+Rails+3
I haven't deployed a built SproutCore app yet, so I can't answer where the files should live in the Rails site structure (but I'm guessing within public/
because you're essentially serving HTML and a lot of Javascript as static assets).
sc-server
lets you run your application in your localhost while you're developing it, so you don't have to do sc-build
every time you tweak something with your application. Remember that it's the output of sc-build
which will be the production site; you won't be serving the site with sc-server
(nor would you want to).
精彩评论