museyoucoulduse / github-users

Show info about github user
GNU Affero General Public License v3.0
0 stars 0 forks source link

code review #1

Open przemkow opened 7 years ago

przemkow commented 7 years ago

So do considering only angularJS it's more or less like that:

  1. try to do not use bower, you can do exactly the same using only npm :)
  2. isolate features in separate files. config, controlers, services and filters should be in separate files, usually with convention name.service.js or name.controller.js
  3. do not use .container(ng-controller='PersonasShowController as showPersons') syntax, you should specify this code in router (check ui-router or regular angular router for that)
  4. avoid inline styles, do not use class in jade/put. for instance this button(class="btn btn-sx") can be replaced with button.btn.btn-sx()
  5. in general ng-bind works faster than {{ }} with that you also do not need to use ng-cloak to prevent showing brackets before angular is loaded
  6. do not use extends layout.pug or extends layout.pug. Use ng-view provided by router for extending views
  7. point for you that you do not have $scope :)
przemkow commented 7 years ago

if you have any questions feel free to ask :)

museyoucoulduse commented 7 years ago

Thank you very much... I will continue my course in JavaScript. As far as I know for the backend I can use any Django, Rails, Sinatra or ASP.net, am I right? They will communicate with frontend by the API endpints... Is this the way it's done?

On 09/28/2016 02:19 AM, Przemysław Fałowski wrote:

if you have any questions feel free to ask :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/museyoucoulduse/github-users/issues/1#issuecomment-250115615, or mute the thread https://github.com/notifications/unsubscribe-auth/ARuewCDU807gieYSMNS_Np2Cjfc7Pk8lks5qujEWgaJpZM4KIl6x.

przemkow commented 7 years ago

for providing API you can use whatever you want, it just needs to be json api :) for angular check also this course https://www.coursera.org/learn/angular-js/ it helped me a lot when i was starting with that technology.

museyoucoulduse commented 7 years ago

for learninig angular I use https://www.coursera.org/learn/single-page-web-apps-with-angularjs

On Sep 28, 2016, at 02:35 AM, Przemysław Fałowski notifications@github.com wrote:

for providing API you can use whatever you want, it just needs to be json api :) for angular check also this course https://www.coursera.org/learn/angular-js/ it helped me a lot when i was starting with that technology. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.