Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AngularJS 2.x & ES6 #1339

Closed
mrzepinski opened this issue Apr 4, 2015 · 17 comments
Closed

AngularJS 2.x & ES6 #1339

mrzepinski opened this issue Apr 4, 2015 · 17 comments
Milestone

Comments

@mrzepinski
Copy link
Contributor

Hi,

Is there any chances to start thinking about migration?
AngularJS 2.x and ES6 are just around the corner.

Basic starterkit %1: https://github.com/pkozlowski-opensource/ng2-play
Basic starterkit %2: https://github.com/shuhei/babel-angular2-app
Yeoman generator: https://github.com/swirlycheetah/generator-angular2

@jdubois
Copy link
Member

jdubois commented Apr 4, 2015

There won't be a migration, we will support both, like we do for Java 7 and Java 8.
I personally will wait until a stable version is released, but if you want to have a look and send feedback you are welcome : you could first start a sample project migrated to AngularJS 2. But I think we have 1 or 2 years before taking AngularJS seriously.

@jdubois jdubois closed this as completed Apr 4, 2015
@jdubois jdubois modified the milestone: 2.8.0 Apr 20, 2015
@doronma
Copy link

doronma commented Mar 31, 2016

any change yet?

@deepu105
Copy link
Member

nope

@deepu105
Copy link
Member

angular 2 would be for Jhipster 4.0

@erhan14
Copy link

erhan14 commented Apr 28, 2016

what is the expected timeline for Jhipster 4.0

@jdubois
Copy link
Member

jdubois commented Apr 28, 2016

how could we have a release date, when AngularJS 2 doesn't have one!

@rpoitras
Copy link

I'm curious if any of the contributors have had a chance to evaluate
Angular 2 with respect to JHipster integration.

I've been working on a POC at work over the last few weeks and it has been
pretty solid so far. I haven't had any problem with beta breaking
changes. Component libraries are still thin if you're wanting material
design. Bootstrap looks good to go. It's going to take awhile for the
whole ecosystem (including JHipster) to have Angular 2 supporting
solutions. However I think it's doable if starting a new project to work
with the beta and wait the month or so for an official release.

My nerves over TypeScript have eased. 3rd party libs can be used in any
form really; full support, .d.ts, or just declare a var or module for the
namespace and use the JS lib directly. So mixing and matching ts and js is
not a barrier. Overall Angular 2 has been a pleasure to use.

On Thu, Apr 28, 2016 at 4:01 PM, Julien Dubois [email protected]
wrote:

how could we have a release date, when AngularJS 2 doesn't have one!


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1339 (comment)

@deepu105
Copy link
Member

We would wait for angular2 to release first
On 30 Apr 2016 10:32, "rpoitras" [email protected] wrote:

I'm curious if any of the contributors have had a chance to evaluate
Angular 2 with respect to JHipster integration.

I've been working on a POC at work over the last few weeks and it has been
pretty solid so far. I haven't had any problem with beta breaking
changes. Component libraries are still thin if you're wanting material
design. Bootstrap looks good to go. It's going to take awhile for the
whole ecosystem (including JHipster) to have Angular 2 supporting
solutions. However I think it's doable if starting a new project to work
with the beta and wait the month or so for an official release.

My nerves over TypeScript have eased. 3rd party libs can be used in any
form really; full support, .d.ts, or just declare a var or module for the
namespace and use the JS lib directly. So mixing and matching ts and js is
not a barrier. Overall Angular 2 has been a pleasure to use.

On Thu, Apr 28, 2016 at 4:01 PM, Julien Dubois [email protected]
wrote:

how could we have a release date, when AngularJS 2 doesn't have one!


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
<
#1339 (comment)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1339 (comment)

@gmarziou
Copy link
Contributor

@rpoitras Thanks for feedback, do you have any code to share?

@rpoitras
Copy link

At first I was disappointed that JH wasn't immediately jumping on the ng2
bandwagon. But I have to agree that waiting is the sensible decision.
Even when Google releases there is still going to be some time as the
eco-system develops. There is a lot to look forward to the future of the
front end, we just have to be a little patient.

Code sharing is tricky. My work is not owned by me ;-). I am pushing for
us to be more involved in the community. Things change slowly in large
companies.

But if there is something in particular you're having trouble with, I might
be able to help.

What I've done so far (pretty early into development):

  • combine ng2 front end with SpringBoot server
  • use gradle build in combination with npm
  • no gulp, no bower. npm scripts for task running and node_modules for
    dependencies
  • geo map (Leaflet) with end to end data, HTTP REST from front end brokered
    by server side calls to remote APIs
  • using RxJS Observable pattern on HTTP responses
  • TypeScript. Even though JS and Dart are options, not sure if they are
    viable ones. Google is pushing TypeScript. But it is really nice to use
    IMHO.
  • Trying to follow the patterns and recommendations in the Google docs and
    best practices by John Papa and Minko Gechev.
  • for UI components currently using ng2-material from Justin DuJardin. May
    switch to the official Angular2 Material once it becomes more mature.

On Sat, Apr 30, 2016 at 3:54 AM, Gaël Marziou [email protected]
wrote:

@rpoitras https://github.com/rpoitras Thanks for feedback, do you have
any code to share?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1339 (comment)

@gmarziou
Copy link
Contributor

gmarziou commented Apr 30, 2016

Regarding dropping gulp and bower:

  • How to minify?
  • SASS compilation?
  • How did you manage deps that are available only as bower components (maybe leaflet is one of them)?

I agree about TypeScript.

My team also tried ng2-material but gave up as it was too hard to find working version, currently I think it's safer to use CSS only; Bootstrap or Material Design Lite.

For JWT authentication, we used angular2-jwt which worked well wth JHipster.

@rpoitras
Copy link

Minify? Not doing it yet. It should be a simple as installing uglify-js
and following it's API. Same basic idea for SASS, however I will take a
look at PostCSS first. In general it's easier to write a npm script as
opposed to a gulp task because the of the added layer of the plugin is
removed. The only drawback I've found is that you can't comment in .json
files. Search npm scripts vs gulp. There's lots of good articles on the
topic, like this one
https://medium.freecodecamp.com/why-i-left-gulp-and-grunt-for-npm-scripts-3d6853dd22b8#.hzdorby7b
.

I haven't found a case yet where I couldn't get a package from npm.

For 3rd party lib usage and TypeScript I favour typings
https://github.com/typings/typings over tsd
http://definitelytyped.org/tsd/.

Yes JWT is nice.

On Sat, Apr 30, 2016 at 11:25 AM, Gaël Marziou [email protected]
wrote:

Regarding dropping gulp and bower:

  • How to minify?
  • SASS compilation?
  • How did you manage deps that are available only as bower components
    (maybe leaflet is one of them)?

I agree about TypeScript.

My team also tried ng2-material but gave up as it was too hard to find
working version.

For JWT authentication, we used angular2-jwt
https://github.com/auth0/angular2-jwt which worked well wth JHipster.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1339 (comment)

@gmarziou
Copy link
Contributor

Yes I know this trend which says that npm is enough. However, I still don't know how to inject dependencies automatically into index.html as this is done by looking at bower.json of each dependency.

@rpoitras
Copy link

I'm using SystemJS to load modules. You could probably still use wiredep
to automatically add the JS script tags if you wanted to go that route.

On Sat, Apr 30, 2016 at 12:00 PM, Gaël Marziou [email protected]
wrote:

Yes I know this trend which says that npm is enough. However, I still
don't know how to inject dependencies automatically into index.html as this
is done by looking at bower.json of each dependency.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1339 (comment)

@gmarziou
Copy link
Contributor

Yes I guess we have to rethink all the toolchain and try to simplify it as much as possible for JHipster users.

@deepu105
Copy link
Member

I have seen the npm script bandwagon and gave it some thought, its good for
POC and in theory but practically for a complex build like that of JHipster
its more messy and hard to do. People use gulp in production for that very
reason.
Few reasons why I wouldnt consider npm only scripts for JH

  1. Its a hell managing to get the build to work properly in linux,
    windows and mac
  2. some of the scripts will become so complex that you would need to
    write your own build script js files, which is not very different from
    using gulp. why reinvent the wheel
  3. Its really not readable. add to that no commenting and its a
    beginners hell. only the person who wrote and npm script experts will know
    what is going on
  4. Its possible to replace any gulp build with npm scripts but exactly
    what are we gaining in the end?

Thanks & Regards,
Deepu

On Sun, May 1, 2016 at 12:43 AM, Gaël Marziou [email protected]
wrote:

Yes I guess we have to rethink all the toolchain and try to simplify it as
much as possible for JHipster users.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1339 (comment)

@rpoitras
Copy link

Good points. You may be right on complexity in a large projects across multi-platforms. Personally speaking I feel I'll be more comfortable with the multi JavaScript files. Maybe my gulp skills are not at a good enough level, but I have a hard time debugging issues with gulp tasks.

I suppose the biggest draw in considering using npm scripts over gulp/grunt tasks is you lose your dependency on the plugin. Whenever a new version of a tool comes out you don’t have to wait for the plugin support. Then there is just one API to learn from the original writer(s). I’ll find out in time if my thinking is flawed.

Rob

On Apr 30, 2016, at 1:08 PM, Deepu K Sasidharan [email protected] wrote:

I have seen the npm script bandwagon and gave it some thought, its good for
POC and in theory but practically for a complex build like that of JHipster
its more messy and hard to do. People use gulp in production for that very
reason.
Few reasons why I wouldnt consider npm only scripts for JH

  1. Its a hell managing to get the build to work properly in linux,
    windows and mac
  2. some of the scripts will become so complex that you would need to
    write your own build script js files, which is not very different from
    using gulp. why reinvent the wheel
  3. Its really not readable. add to that no commenting and its a
    beginners hell. only the person who wrote and npm script experts will know
    what is going on
  4. Its possible to replace any gulp build with npm scripts but exactly
    what are we gaining in the end?

Thanks & Regards,
Deepu

On Sun, May 1, 2016 at 12:43 AM, Gaël Marziou [email protected]
wrote:

Yes I guess we have to rethink all the toolchain and try to simplify it as
much as possible for JHipster users.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1339 (comment)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub #1339 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants