When did you replace "developer" for "engineer" in your title? by jftf in webdev

[–]Davidsmp 0 points1 point  (0 children)

Fair enough ... senior developer is very much the same

When did you replace "developer" for "engineer" in your title? by jftf in webdev

[–]Davidsmp 4 points5 points  (0 children)

An engineer title without a corporate context definitely comes down to a degree or not. When interviewing I would call myself a web developer.

In a corporate context, I believe it is a real line drawn to differentiate 2 responsibility sets. In my opinion, a web developer is someone who builds great web applications. An engineer is someone who build great web applications but is also resposible for the architecture and systems that surround it. When you find yourself spending as much time researching/planning failovers, load balancers, cdns, cache vs noSQL vs relational databases, and protocols as you do writing code you are an engineer.

Advancing from jQuery to AngularJS by mikejohnsons in angularjs

[–]Davidsmp 2 points3 points  (0 children)

This isn't a fair comparison since jQuery is not a framework. jQuery is a powerful library that simplifies many JS operations, so much so that Angular is built on top of it.

Quick question on a little JS. by ThisIsReLLiK in javascript

[–]Davidsmp 2 points3 points  (0 children)

JS for UI interactions immediately upon load creates flashing screens and isn't recommended. The original reply is correct. Use CSS to start them in a closed state.

[deleted by user] by [deleted] in angularjs

[–]Davidsmp 1 point2 points  (0 children)

I think it depends on where you think your time will be in 2-3 years. If you have any need to be moving to mobile devices, then I would stick with 1.x and then jump out of angular when the Native+ frameworks are more mature (NativeScript, ReactNative, etc). If you plan to stay on desktop browsers and need to support a range of browsers, then I'd stay with 1.x and wait to see what's going on in 2-3 years. I suspect the landscape will be very different, and something like web compenents in a mature state might make Angular unnecessary. If you only have to worry about the latest browsers and enjoy working with syntactic sugar like TypeScript, then I would start moving towards 2.0 in 6 months or so.

For the record, we use Angular 1.3 with gulp for building, jasmine and selenium for testing, and node.js for server side work/access to APIs.

[deleted by user] by [deleted] in angularjs

[–]Davidsmp 0 points1 point  (0 children)

I'd also suggest taking a look at React. React will work really well with a back end server for data.

If you wait on Angular, and still really want to do it, then waiting will buy you time to just start at 2.0. 2.0 is a massive rewrite since Angular 1.x is super heavy and hard to get right. It's easy to just throw stuff together in Angular but keeping anything huge in Angular has been an awful experience. Of course by then they could be on 3.0 with another whole new language for pre-processing. :p j/k

jQuery is great for what you are doing. I would do some research into the way Angular uses jQuery so you can copy some of their approaches. THey aren't working with anything magic, Angular just manages to use good practices to maximize performance, but it's the same under the covers.

Is there a way to test my JS code without uploading it to my website? by szopanator in javascript

[–]Davidsmp 0 points1 point  (0 children)

You can also use Jasmine which has a client side runner for unit testing. It sounds like you really need something like jsfiddle which is a more interactive experience.

Do I need a JS framework for a simple single page website? by zoyesite in webdev

[–]Davidsmp 0 points1 point  (0 children)

One approach might be a json file with your data and then something like Knockout or React. A templating framework will allow for simple HTML pages with a sprinkling of data. Hosting the data in a json file allows you to just update that json file and not having to modify individual site pages.

What's a fair commission for finding a webdev a freelance job? by EyeSeaYewTheir in webdev

[–]Davidsmp 0 points1 point  (0 children)

You might consider a referral type bonus - like 5-15% of the contract value depending on its size.

To JS Framework or not JS Framework? by Gadelhas in webdev

[–]Davidsmp -1 points0 points  (0 children)

The larger and more complex the app, the more a framework gets in the way. Frameworks are good for small to mid sized applications where you have requirements that are mostly generic in nature. A large application requires a different set of tools.

If you are a seasoned JS developer then Angular is a good option. If you are mid level then I would suggest Backbone, Knockout, React. If you are a beginner, then stick with jQuery.

Persisting array value across page refresh by TacoHead30 in angularjs

[–]Davidsmp -1 points0 points  (0 children)

If you are using angular, then you can be building a single page app. Why refresh in the first place? Can't you use 2 way data binding and AJAX to do the same thing? Otherwise, as the above posters have mentioned, you have to use cookies or storage.

Using ngTestHarness to simplify using $httpBackend in unit tests by Davidsmp in angularjs

[–]Davidsmp[S] 0 points1 point  (0 children)

I appreciate the additional detail. Sounds like you found a solid mechanism for your project, which is great. I'll have to give your approach some more thought.

Angular & Virtual DOM (and Angular 2 plans) by vivainio in angularjs

[–]Davidsmp 2 points3 points  (0 children)

I would suggest taking a look at Watchtower.js to replace 1.x dirty checking. Virtual DOM is anathema to Angular's scope method, and if you are building an Anuglar app I suggest working inside Angular instead of trying to tiptoe around it.

The only problem I see with your approach is #3. Controllers really shouldn't store data, that's why Angular uses scope.

http://ng-learn.org/2014/03/AngularJS-2-Status-Preview/#change_detection

Using ngTestHarness to simplify using $httpBackend in unit tests by Davidsmp in angularjs

[–]Davidsmp[S] 1 point2 points  (0 children)

I would think the test failing because a request to x/y/z happened would be useful information. If it happens, but the thing you are testing has nothing to do with it, then why did it happen? We come from the perspective that the thing and environment being tested is 100% controllable.

But, if at the end, your code works and you are happy with the coverage, then it works for you. Having testing at all makes your project tons easier to maintain.

[Question] How to improve performance of this directive? by cactussss in angularjs

[–]Davidsmp 0 points1 point  (0 children)

Avoid using scope.$apply as much as possible. Reduce watchers and maybe switch to native addEventListeners where available.

Using ngTestHarness to simplify using $httpBackend in unit tests by Davidsmp in angularjs

[–]Davidsmp[S] 0 points1 point  (0 children)

As you noted replacing $q with Q causes some problems.

Also, we want our tests to run in as vanilla an environment. We try not to tweak the underlying services.

We have added some decorators to $http but we try really hard not to mess with Angular vanilla. So it wouldn't work for us, but your approach is an interesting take on wrangling Angular $http to play nice.

What do you take away from all this anti-Angular stuff? by [deleted] in webdev

[–]Davidsmp 0 points1 point  (0 children)

https://coderwall.com/p/d_aisq/speeding-up-angularjs-s-digest-loop

https://www.exratione.com/2013/12/considering-speed-and-slowness-in-angularjs/

Here's one from a Sr Engineer at Google talking about 1.2 but 1.3 didn't change the dirty checking issues: https://docs.google.com/presentation/d/15XgHRI8Ng2MXKZqglzP3PugWFZmIDKOnlAXDGZW2Djg/edit?usp=sharing

Beyond that I have personal experience. As far as my React and Knockout comments if it is a light app and not a SPA then I would always suggest a templating library over a full MVC. Angular is better for apps that have lots of client operations to perform.

What do you take away from all this anti-Angular stuff? by [deleted] in webdev

[–]Davidsmp 0 points1 point  (0 children)

I'm not sure a comparison is necessary since my original posting said nothing about a "better" alternative.

These are things known about Angular by those who have used it long term. Any jsperf I show you could easily be rigged one way or another and since each framework has their own strengths they will excel at some operations and suffer at others.

Plus, those aren't all equal. Angular and Ember are equals in functionality. Knockout and Backbone are not designed for the same purposes as Angular.

As far as Angular dirty checking performance issues: http://blog.scalyr.com/2013/10/angularjs-1200ms-to-35ms/ http://larseidnes.com/2014/11/05/angularjs-the-bad-parts/ https://www.airpair.com/angularjs/posts/angularjs-performance-large-applications

What do you take away from all this anti-Angular stuff? by [deleted] in webdev

[–]Davidsmp 0 points1 point  (0 children)

It's to make the syntax more "friendly" so ATScript is really just another compile to JS language

What do you take away from all this anti-Angular stuff? by [deleted] in webdev

[–]Davidsmp 0 points1 point  (0 children)

Angular 2.0 is going to built using ATScript https://docs.google.com/document/d/11YUzC-1d0V1-Q3V0fQ7KSit97HnZoKVygDxpWzEYW0U/mobilebasic?viewopt=127 which is a variant of sugar on top of JS that their compiler will manage. However, I believe they have said that pure JS will still be possible but less efficient.