Here is another CafeTownsend demo build with AngularJS and Rails. All
JavaScript code is written in CoffeeScript.
Live demo on Heroku:
http://cafetownsend-angular-rails.herokuapp.com/
Source code at Github:
https://github.com/sectore/CafeTownsend-Angular-Rails
Blog post:
http://www.websector.de/blog/2012/01/17/fun-with-angularjs-rails-coffeescript-sass-another-cafe-townsend-example/
P.S.: The design (layout) of this example based on a similar demo for
using SpineJS I have created few weeks before
http://www.websector.de/blog/2011/12/31/spine-js-cafe-townsend-example
Any feedback are welcome, thanks!
-Jens
--
http://www.websector.de
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
While maybe trendy, this example still seems the opposite of elegant or lean code - bad enough Angular adds non-standard code (tradeoff for power) but using Rails creates the code bloat of 2 MVC frameworks and Rails itself is pretty bloated and slow, much less adding backstage magic. And Coffeescript (whether producing a cleaner js or not) is non-standard. So this example says hey, lets add more code bloat, add a slow framework, and add in a bunch of non standard code and create a slower running and maintenance nightmare
A better, more elegant solution would entail either 1) no server mvc, using procedures in the db instead, or 2) using a lean nodejs type of listener on the back
Less code = less bugs, less languages or language derivatives = more maintainable
While maybe trendy, this example still seems the opposite of elegant or lean code - bad enough Angular adds non-standard code (tradeoff for power) but using Rails creates the code bloat of 2 MVC frameworks and Rails itself is pretty bloated and slow, much less adding backstage magic. And Coffeescript (whether producing a cleaner js or not) is non-standard.
So this example says hey, lets add more code bloat, add a slow framework, and add in a bunch of non standard code and create a slower running and maintenance nightmare
A better, more elegant solution would entail either 1) no server mvc, using procedures in the db instead, or 2) using a lean nodejs type of listener on the back
Less code = less bugs, less languages or language derivatives = more maintainable
While maybe trendy, this example still seems the opposite of elegant or lean code - bad enough Angular adds non-standard code (tradeoff for power) but using Rails creates the code bloat of 2 MVC frameworks and Rails itself is pretty bloated and slow, much less adding backstage magic. And Coffeescript (whether producing a cleaner js or not) is non-standard. So this example says hey, lets add more code bloat, add a slow framework, and add in a bunch of non standard code and create a slower running and maintenance nightmare
A better, more elegant solution would entail either 1) no server mvc, using procedures in the db instead, or 2) using a lean nodejs type of listener on the back
Less code = less bugs, less languages or language derivatives = more maintainable
--
Services are singletons. As such they are great for
DataServices
Shared, in-memory data stores, etc.
Custom services can be injected into Controllers and other services
Controllers are not singletons.
Controllers are instantiated (As I understand it) per rendering of
view (e.g. use of partial).
Controllers are `Presentation Models`.
So to me the goto<XXX>View logic should ideally be in custom service.
But my understanding could be wrong. Any thoughts Angular Team ?
- ThomasB
> --http://www.websector.de
On Jan 17, 2:01 pm, sectore <sect...@gmail.com> wrote:
> On Jan 17, 7:58 pm, ThomasBurleson <thomasburle...@gmail.com> wrote:> Question:
> > 1) Your Controllers configures routes and use of partials.
> > Would that not be best done in a Service?
>
> As I Angular understood $route is already a kind of a service and it
> should be handled within a controller. Anybody?
>
> -Jens