Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
NtotheTC
Dec 31, 2007


I posted a little about this in the web dev thread but it's very interesting to me that in a world where average bandwidth is steadily increasing to the point where things are sliding more towards "dumb client/smart servers", these sort of frameworks that put a lot of the logic into the client side are gaining popularity.

I use Django primarily and one of the features I love about it is the effort they put into disconnecting the business logic layer from the presentation layer. I don't know how these .js frameworks flow when done properly but do they basically require developers to be front-end AND back-end?

Also, is there not a lot of code duplication required? For example, having to write client-side validation on form fields to gain the benefits of the fast response times/lack of page refresh, but also write validation on the back-end to cover off the genuinely prickish users that try to bypass all your client-side js code?

Adbot
ADBOT LOVES YOU

NtotheTC
Dec 31, 2007


I hate AngularJS. Is it ok to say that here? Like really hate it.

NtotheTC
Dec 31, 2007


Lots of reasons I guess. I hate Javascript from the outset. I despise the dev environment i.e. node, bower, grunt, etc. I hate Typescript, I also hate people who don't use Typescript. I hate the lack of best practices, I hate the piss poor documentation, I hate that tests are so annoying to write.

NtotheTC
Dec 31, 2007


You can specify the controller for the directive using require:

code:
app.directive('myDir', function() {
  return {
    require: '^theControl',
    scope: {
      jsonVar: '@'
    },
    link: function(scope, element, attrs, ctrl) { //ctrl is your controller
      ctrl.variable = scope.jsonVar;
    },
  };
});
I dislike doing this, I personally like the controller to modify the scope of the directive not the other way around. But I'll be honest everyone has a different way of doing things and I'm really not sure mine is the best, so if someone has a better way of solving this I'd be interested too.

NtotheTC
Dec 31, 2007


Angular 2.0 is going "full mobile" right? With browsers as an afterthought? I'm not sure how I feel about that

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply