scotch/sapling — pull request #4 by DjebbZ (2012-09-05 15:21:01+00:00)
Title: Converting code to Javascript (end)

Hi,

I just finished converting everything. It was great ! I hope my CS-to-JS manual conversion is alright and didn't introduce bugs. This conversion was the occasion for me to read more about Angular, especially the officials docs. Learned a lot.

Now I have many suggestions/questions/notes from this line-by-line review :

1. Error messages in account/controllers.js are polluting the global namespace. Shouldn't they be a service instead ?
2. In account/controllers.js, AccountLoginCtrl, r variable in $scope.Login is unused
3. In auth/profile/service.js, the `defaultAuthProfile` isn't used nor returned. What's its purpose ?
4. What is ds/services.coffee for ? Reading the code doesn't help…
5. I may have missed something, but is the flash service even used ? I see several services calling flash.Add, but I can't listeners… What are the flashes for ?
6. In the flash service again, the `Get` function return creates a copy of the `flashes` array, but doesn't assign it nor use it. Why ?
7. Flash service again : IMO the `Get` function service should use the `Clear` function since it does want to delete previous flashes.
8. Flash service again : the `Pop` function doesn't use the `position` parameter.
9. Flash service, last round : I'd like to understand the way it's declared. There's a `serv` object polluting the global namespace, then the real deal is a property of this object, then the `factory` is called on `serv`. Whereas every other service is declared directly in the `factory` call. Why ?
10. Throughout the application I see different entities : authProfiles, persons and users. What are the differences ?
11. In user/service.js, you use the auth method found on the Google Group. Shouldn't the redirection happen, i.e the last line `$location.url(redirectUrl)` be uncommented ?