Re: Last words on AngularJS

2015-08-25 Thread Stephen Price
I think the problem you are experiencing, Greg, is that you are looking for
the right way to write Javascript apps. Is that what you mean by best
practice?

I look at that as being similar to someone saying they are looking for the
right woman. There is no right woman, there are just a large set of
permutations of women. As soon as you try to apply rules of classification
(ie a filter to apply to separate right from wrong) then you are applying
an artificial, subjective ruleset.

Try not to think of it in terms of right and wrong. Javascript is a guide,
Greg. She can help you to find the path.


On Wed, Aug 26, 2015 at 8:18 AM, Greg Keogh gfke...@gmail.com wrote:

 Did you come across yeoman and angular generator?

 https://github.com/yeoman/generator-angular#angularjs-generator-

 Those tools scaffold/generate code base on “best practice”.


 This is a great illustration of my gripe with the JS ecosystem.

 *Yeoman generator for AngularJS - lets you quickly set up a project with
 sensible defaults and best practices. There are many starting points for
 building a new Angular single page app, in addition to this one. To see a
 comparison of the popular options, have a look at this comparison.*

 Due to best practise confusion we need a JS tool to generate sensible
 code which wraps the underlying JS language and you need to install yo,
 grunt-cli, bower, generator-angular and generator-karma as dependencies to
 make it all work. I reads like an IT comedy sketch.

 I'll bet there are people arguing that the best practices aren't the
 best and they know and have implemented better ones! I might write a best
 practice generator in JS and when it's bootstrapped far enough I'll get it
 to write itself.

 *Greg*



RE: [OT] New laptop

2015-08-25 Thread Ken Schaefer
What are your requirements? Size? Weight? Workload?

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Tom Rutter
Sent: Wednesday, 26 August 2015 10:06 AM
To: ozDotNet ozdotnet@ozdotnet.com
Subject: Re: [OT] New laptop

Tried out the surface and found it too small and awkward. Keyboard was a little 
annoying

Cheers

On Tue, Aug 25, 2015 at 8:12 PM, Dave Walker 
rangitat...@gmail.commailto:rangitat...@gmail.com wrote:
I've heard that the surface pro works really well with it.

On 25 August 2015 at 22:01, Tom Rutter 
therut...@gmail.commailto:therut...@gmail.com wrote:
Anyone here got a new win 10 laptop lately? Recommendations?

Cheers




Re: [OT] New laptop

2015-08-25 Thread Dave Walker
I've heard that the surface pro works really well with it.

On 25 August 2015 at 22:01, Tom Rutter therut...@gmail.com wrote:

 Anyone here got a new win 10 laptop lately? Recommendations?

 Cheers



[OT] New laptop

2015-08-25 Thread Tom Rutter
Anyone here got a new win 10 laptop lately? Recommendations?

Cheers


Re: TypeScript summary

2015-08-25 Thread Bec C
+1 for Greg's comments. Coming from a sql background I found it relatively
easy to jump into c# and .net but my jump to JS wasn't so smooth

On Wed, Aug 26, 2015 at 9:55 AM, Greg Keogh gfke...@gmail.com wrote:

 I hope this is my final essay on JavaScript (and so do you!). In summary,
 a few weeks ago I volunteered to write an in-browser script driven demo app
 which is simply a navigation stack of 4 screens. Angular is so currently so
 trendy I spent several hours attempting to learn and use it, but due to
 lack of an IDE, no debugging, no guidance, the custom terse syntax and
 complex dependencies I gave up (then I learn it's being rewritten in
 TypeScript anyway). I've expressed my anger at the 'zoo' of uncoordinated
 and competing JS libraries.

 I spent all of yesterday optimistically studying and trying TypeScript, as
 the familiar IDE and structure seemed ideal for someone from a C++/Java/C#
 background. Given my belief that the JS world is really chaotic, my overall
 conclusion is:

 *TypeScript is organised chaos.*

 I was reminded of moving from C to C++ 20 years ago. C was so freeform you
 could write spaghetti. C++ helped you write object oriented modular
 spaghetti. Just like that, TS is trying to tame the JS spaghetti and make
 it feel OOPish and respectable to people with my background, but it's still
 just putting a wedding gown on a pig.

 The good news is though, that once I eventually found guidance on how to
 organise multiple TS source files, how to use module { } like namespaces,
 when to use the reference, and why you use --out to concat files, then TS
 is probably the least worst option I've seen so far for writing large JS
 apps. At least you will finish up with organised modular chaos.

 So you might be able to tame JS with TS, but we are still stuck with the
 cumbersome DOM and jQuery. While trying to give my web page app behaviour I
 had to have jQuery reference web pages continuously open so I could
 remember the arcane and inconsistent syntax to do the simplest things like
 toggling visibility or setting text or class attributes. This isn't really
 a JS related problem, but I find manipulating the DOM from JS and jQuery
 tedious beyond endurance.
 In fact my endurance is exhausted. I will not write the demo and have
 commissioned someone else to do it. They write this sort of thing for a
 living, so I look forward to learning how they do it. I've learnt a lot in
 recent weeks anyway and have decided that for future work like this I will
 use TS and jQuery because they're the least worst (for now), and the rest
 of the JS ecosystem can go to hell.

 *Greg K*



Re: [OT] New laptop

2015-08-25 Thread Tom Rutter
Tried out the surface and found it too small and awkward. Keyboard was a
little annoying

Cheers

On Tue, Aug 25, 2015 at 8:12 PM, Dave Walker rangitat...@gmail.com wrote:

 I've heard that the surface pro works really well with it.

 On 25 August 2015 at 22:01, Tom Rutter therut...@gmail.com wrote:

 Anyone here got a new win 10 laptop lately? Recommendations?

 Cheers





RE: Last words on AngularJS

2015-08-25 Thread Nelson Chan
Just curious when you were experimenting with your AngularJS demo project and 
getting frustrated,

Did you come across yeoman and angular generator?
https://github.com/yeoman/generator-angular#angularjs-generator-

Those tools scaffold/generate code base on “best practice”.
Although they aren’t designed to incorporating the app into a ASP.NET codebase, 
but you can still take them as a reference.

However, personally I enjoy writing SPA as a completely standalone client 
(using plain html,js, bower etc and host it out of ASP.NET (even just an amazon 
s3 will do)
And it will be very easy to package the app as a hybrid mobile app – it’s just 
a matter of adding phonegap or something into your grunt/gulp build script
That will separate your backend web service and client and make your life much 
more easier.


Regards,

Nelson Chan

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Thomas Koster
Sent: Tuesday, 25 August 2015 11:42 AM
To: ozDotNet ozdotnet@ozdotnet.com
Subject: Re: Last words on AngularJS

It looks like ECMAScript 6 introduces lots of new features [1]. At first I 
thought this was a joke, but a quick scan over the standard [2] appears to 
confirm this. Do not expect adoption by browsers for several years, though.

JavaScript, despite its flaws, used to be simple. But it seems a language has 
to be multi-paradigm these days to stay relevant. See C# = 3.0, Scala, Swift 
and recent additions to C++. I call such languages Frankenstein's Monster 
languages because they cherry-pick features of their predecessors, sometimes in 
bizarre combinations, without advancing the art. Swift was especially 
disappointing; after all the hype of a new programming language by Apple, 
Swift turned out to be prosaic. Now JavaScript is evolving into a typeless 
Scala, and becoming equally grotesque. Just look at this list of some of the 
new features for JavaScript:

  *   modules (a la Pascal/Modula)
  *   block scoping (a la structured languages)
  *   class definitions and inheritance (a la OO languages)
  *   property accessor functions (a la OO languages)
  *   lambda expressions (a la functional languages)
  *   pattern matching (a la functional languages)
  *   iterators and generators (a la Python)
  *   string interpolation (a la Perl and macro languages)
  *   binary and octal literals (a la assembly and C)
Some new features will at least make a few of those frameworks in the zoo 
obsolete. For example, mustache.js and handlebars.js should hopefully disappear 
if the new string interpolation feature is good enough.

[1] http://es6-features.org
[2] http://www.ecma-international.org/ecma-262/6.0

--
Thomas Koster


On 25 August 2015 at 08:58, Greg Keogh 
gfke...@gmail.commailto:gfke...@gmail.com wrote:
I just wish there were some JS standards. Imagine flying on Air JavaScript: you 
get to one of the dozens of airports on roads that have peeled off old roads to 
other airports, then there are 16 wildly different types of plane all claiming 
to get you to your destination somehow, some planes can't fly without being 
towed by other planes, some planes are still being assembled on the runways, 
some passengers have even brought their favourite pieces of plane with them to 
help build a new plane once they convince other passengers to join them.

I still want to use TypeScript to run the show, mainly because of the familiar 
IDE and its benefits. I'm going to spend more time today trying to find 
guidance about how to structure a reasonably serious TS project, and how to use 
jQuery from within. Web searches do produce a few possibly useful results on 
this subject, but they all get tangled in dependencies on other JS libraries 
and I my eyes glaze over at the hurdle.

Greg



Re: Last words on AngularJS

2015-08-25 Thread Greg Keogh

 Did you come across yeoman and angular generator?

 https://github.com/yeoman/generator-angular#angularjs-generator-

 Those tools scaffold/generate code base on “best practice”.


This is a great illustration of my gripe with the JS ecosystem.

*Yeoman generator for AngularJS - lets you quickly set up a project with
sensible defaults and best practices. There are many starting points for
building a new Angular single page app, in addition to this one. To see a
comparison of the popular options, have a look at this comparison.*

Due to best practise confusion we need a JS tool to generate sensible
code which wraps the underlying JS language and you need to install yo,
grunt-cli, bower, generator-angular and generator-karma as dependencies to
make it all work. I reads like an IT comedy sketch.

I'll bet there are people arguing that the best practices aren't the best
and they know and have implemented better ones! I might write a best
practice generator in JS and when it's bootstrapped far enough I'll get it
to write itself.

*Greg*


TypeScript summary

2015-08-25 Thread Greg Keogh
I hope this is my final essay on JavaScript (and so do you!). In summary, a
few weeks ago I volunteered to write an in-browser script driven demo app
which is simply a navigation stack of 4 screens. Angular is so currently so
trendy I spent several hours attempting to learn and use it, but due to
lack of an IDE, no debugging, no guidance, the custom terse syntax and
complex dependencies I gave up (then I learn it's being rewritten in
TypeScript anyway). I've expressed my anger at the 'zoo' of uncoordinated
and competing JS libraries.

I spent all of yesterday optimistically studying and trying TypeScript, as
the familiar IDE and structure seemed ideal for someone from a C++/Java/C#
background. Given my belief that the JS world is really chaotic, my overall
conclusion is:

*TypeScript is organised chaos.*

I was reminded of moving from C to C++ 20 years ago. C was so freeform you
could write spaghetti. C++ helped you write object oriented modular
spaghetti. Just like that, TS is trying to tame the JS spaghetti and make
it feel OOPish and respectable to people with my background, but it's still
just putting a wedding gown on a pig.

The good news is though, that once I eventually found guidance on how to
organise multiple TS source files, how to use module { } like namespaces,
when to use the reference, and why you use --out to concat files, then TS
is probably the least worst option I've seen so far for writing large JS
apps. At least you will finish up with organised modular chaos.

So you might be able to tame JS with TS, but we are still stuck with the
cumbersome DOM and jQuery. While trying to give my web page app behaviour I
had to have jQuery reference web pages continuously open so I could
remember the arcane and inconsistent syntax to do the simplest things like
toggling visibility or setting text or class attributes. This isn't really
a JS related problem, but I find manipulating the DOM from JS and jQuery
tedious beyond endurance.
In fact my endurance is exhausted. I will not write the demo and have
commissioned someone else to do it. They write this sort of thing for a
living, so I look forward to learning how they do it. I've learnt a lot in
recent weeks anyway and have decided that for future work like this I will
use TS and jQuery because they're the least worst (for now), and the rest
of the JS ecosystem can go to hell.

*Greg K*


Re: [OT] New laptop

2015-08-25 Thread DotNet Dude
Also heard that but new model coming oct/nov I hear

On Tuesday, 25 August 2015, Dave Walker rangitat...@gmail.com wrote:

 I've heard that the surface pro works really well with it.

 On 25 August 2015 at 22:01, Tom Rutter therut...@gmail.com
 javascript:_e(%7B%7D,'cvml','therut...@gmail.com'); wrote:

 Anyone here got a new win 10 laptop lately? Recommendations?

 Cheers





Re: TypeScript summary

2015-08-25 Thread William Luu
RE: DOM manipulation.

Here's a (intro and) comparison between DOM manipulation jQuery and React
http://reactfordesigners.com/labs/reactjs-introduction-for-people-who-know-just-enough-jquery-to-get-by/

On 26 August 2015 at 10:03, Bec C bec.usern...@gmail.com wrote:

 +1 for Greg's comments. Coming from a sql background I found it relatively
 easy to jump into c# and .net but my jump to JS wasn't so smooth


 On Wed, Aug 26, 2015 at 9:55 AM, Greg Keogh gfke...@gmail.com wrote:

 I hope this is my final essay on JavaScript (and so do you!). In summary,
 a few weeks ago I volunteered to write an in-browser script driven demo app
 which is simply a navigation stack of 4 screens. Angular is so currently so
 trendy I spent several hours attempting to learn and use it, but due to
 lack of an IDE, no debugging, no guidance, the custom terse syntax and
 complex dependencies I gave up (then I learn it's being rewritten in
 TypeScript anyway). I've expressed my anger at the 'zoo' of uncoordinated
 and competing JS libraries.

 I spent all of yesterday optimistically studying and trying TypeScript,
 as the familiar IDE and structure seemed ideal for someone from a
 C++/Java/C# background. Given my belief that the JS world is really
 chaotic, my overall conclusion is:

 *TypeScript is organised chaos.*

 I was reminded of moving from C to C++ 20 years ago. C was so freeform
 you could write spaghetti. C++ helped you write object oriented modular
 spaghetti. Just like that, TS is trying to tame the JS spaghetti and make
 it feel OOPish and respectable to people with my background, but it's still
 just putting a wedding gown on a pig.

 The good news is though, that once I eventually found guidance on how to
 organise multiple TS source files, how to use module { } like namespaces,
 when to use the reference, and why you use --out to concat files, then TS
 is probably the least worst option I've seen so far for writing large JS
 apps. At least you will finish up with organised modular chaos.

 So you might be able to tame JS with TS, but we are still stuck with the
 cumbersome DOM and jQuery. While trying to give my web page app behaviour I
 had to have jQuery reference web pages continuously open so I could
 remember the arcane and inconsistent syntax to do the simplest things like
 toggling visibility or setting text or class attributes. This isn't really
 a JS related problem, but I find manipulating the DOM from JS and jQuery
 tedious beyond endurance.
 In fact my endurance is exhausted. I will not write the demo and have
 commissioned someone else to do it. They write this sort of thing for a
 living, so I look forward to learning how they do it. I've learnt a lot in
 recent weeks anyway and have decided that for future work like this I will
 use TS and jQuery because they're the least worst (for now), and the rest
 of the JS ecosystem can go to hell.

 *Greg K*





Re: TypeScript summary

2015-08-25 Thread Tony Wright
I wouldn't mind knowing what is so good about React. I'm not enjoying the
syntax of React so far. At the moment if I was to build a new substantial
app it would be using Angular. I feel that you can write some pretty
substantial applications in Angular. Having had a dabble with React, I
don't get the same feeling, so I am wondering if the hype is bigger than
the product itself?

I know React is more about the V in MVC and Angular covers the entire MVC
pattern in Javascript, but I am trying to understand - are they still
essentially trying to solve a similar problem? I can go without using C#
MVC applications at all (excepting WebApi) with Angular, so is the
difference that React is meant to be used in conjunction with C# MVC
solutions?



On Wed, Aug 26, 2015 at 11:57 AM, William Luu will@gmail.com wrote:

 RE: DOM manipulation.

 Here's a (intro and) comparison between DOM manipulation jQuery and React

 http://reactfordesigners.com/labs/reactjs-introduction-for-people-who-know-just-enough-jquery-to-get-by/

 On 26 August 2015 at 10:03, Bec C bec.usern...@gmail.com wrote:

 +1 for Greg's comments. Coming from a sql background I found it
 relatively easy to jump into c# and .net but my jump to JS wasn't so smooth


 On Wed, Aug 26, 2015 at 9:55 AM, Greg Keogh gfke...@gmail.com wrote:

 I hope this is my final essay on JavaScript (and so do you!). In
 summary, a few weeks ago I volunteered to write an in-browser script driven
 demo app which is simply a navigation stack of 4 screens. Angular is so
 currently so trendy I spent several hours attempting to learn and use it,
 but due to lack of an IDE, no debugging, no guidance, the custom terse
 syntax and complex dependencies I gave up (then I learn it's being
 rewritten in TypeScript anyway). I've expressed my anger at the 'zoo' of
 uncoordinated and competing JS libraries.

 I spent all of yesterday optimistically studying and trying TypeScript,
 as the familiar IDE and structure seemed ideal for someone from a
 C++/Java/C# background. Given my belief that the JS world is really
 chaotic, my overall conclusion is:

 *TypeScript is organised chaos.*

 I was reminded of moving from C to C++ 20 years ago. C was so freeform
 you could write spaghetti. C++ helped you write object oriented modular
 spaghetti. Just like that, TS is trying to tame the JS spaghetti and make
 it feel OOPish and respectable to people with my background, but it's still
 just putting a wedding gown on a pig.

 The good news is though, that once I eventually found guidance on how to
 organise multiple TS source files, how to use module { } like namespaces,
 when to use the reference, and why you use --out to concat files, then TS
 is probably the least worst option I've seen so far for writing large JS
 apps. At least you will finish up with organised modular chaos.

 So you might be able to tame JS with TS, but we are still stuck with the
 cumbersome DOM and jQuery. While trying to give my web page app behaviour I
 had to have jQuery reference web pages continuously open so I could
 remember the arcane and inconsistent syntax to do the simplest things like
 toggling visibility or setting text or class attributes. This isn't really
 a JS related problem, but I find manipulating the DOM from JS and jQuery
 tedious beyond endurance.
 In fact my endurance is exhausted. I will not write the demo and have
 commissioned someone else to do it. They write this sort of thing for a
 living, so I look forward to learning how they do it. I've learnt a lot in
 recent weeks anyway and have decided that for future work like this I will
 use TS and jQuery because they're the least worst (for now), and the rest
 of the JS ecosystem can go to hell.

 *Greg K*