• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Learning JavaScript within the context of the Java

 
Ranch Hand
Posts: 228
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know HTML and CSS. My understanding of Core Java is fair. I also know a little bit about Spring.
I want to learn JavaScript from scratch, but I would like to do so within the context of Java.
What should be my approach?
 
M Richardson
Ranch Hand
Posts: 228
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, I don't want to end up picking up a framework like Vaadin where I won't get to touch any JavaScript. In other words, I don't want a template-builder.
I simply want to be able to utilize and build upon my existing Java skills as I learn JavaScript.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mark Richardson wrote:but I would like to do so within the context of Java.


Big mistake. Big. Huge.

Despite a poor naming choice, Java and JavaScript have little to do with each other aside from reliance on C-influenced syntax. It has long been my contention that knowing Java is a detriment to learning JavaScript. There are too many expectations and concepts that get carried over that should not be. I know. I have the scars to show for it. To hamper yourself intentionally is to invite unnecessary obstacles to understanding JavaScript.

Especially once ES6 gets thrown into the mix, the divide between Java and JavaScript grows wider than ever. You'd think that with lambdas added to Java, and with classes added to JavaScript that there would be some convergence, but the opposite is true. The implementations of the concepts are very foreign to one another.

Learn JavaScript on its own terms as a language distinct and separate from Java. To do anything else is to do yourself a huge disservice.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mark Richardson wrote:Also, I don't want to end up picking up a framework like Vaadin


shudders
 
M Richardson
Ranch Hand
Posts: 228
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:

Mark Richardson wrote:but I would like to do so within the context of Java.


Big mistake. Big. Huge.

Despite a poor naming choice, Java and JavaScript have little to do with each other aside from reliance on C-influenced syntax. It has long been my contention that knowing Java is a detriment to learning JavaScript. There are too many expectations and concepts that get carried over that should not be. I know. I have the scars to show for it. To hamper yourself intentionally is to invite unnecessary obstacles to understanding JavaScript.

Especially once ES6 gets thrown into the mix, the divide between Java and JavaScript grows wider than ever. You'd think that with lambdas added to Java, and with classes added to JavaScript that there would be some convergence, but the opposite is true. The implementations of the concepts are very foreign to one another.

Learn JavaScript on its own terms as a language distinct and separate from Java. To do anything else is to do yourself a huge disservice.



I should probably clarify:

What I meant to say was that I want to learn JavaScript (which will take time and energy) but I don't want to take a sabbatical from learning Java. Therefore, is there any type of stack or project which I work on where I keep current on both skill-sets?

I'm imagining something along the lines of... a java back-end and web-service which is being accessed by a simple JS based front-end that I've built.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mark Richardson wrote:Therefore, is there any type of stack or project which I work on where I keep current on both skill-sets?



Oh sure. I do this all the time with every web app I write. While it's (arguably) hip to write back-ends using NodeJS and JavaScript, I still write the majority of my back-ends (as RESTful APIs) in Java.

Then write an SPA using JavaScript for the front end.

You can do so using just JavaScript and jQuery (no one, but no one uses just JavaScript in the browser, it's too painful and will actual hamper your efforts to learn JavaScript while you wrestle with browser bugs and difference rather than JS), or look into one of the modern front-end frameworks such as Angular or React. I'm currently using React and liking it a lot.

Contrary to what you might expect, using something like React will not cause you not learn JS in favor of the framework -- in fact, if learning ES6 is your goal, React is a good way to force that.

If you want to just start with ES5, then jQuery is likely the best way to go.

Avoid, like the bubonic plague that they are, antiquated frameworks like the aforementioned Vaadin or Google Web Toolkit.

And from your goals, you probably don't want to fall into the trap of using JSF or other server-side UI renderers. They stink of the tarpits and will not achieve your goal of embracing modern JavaScript development.
 
reply
    Bookmark Topic Watch Topic
  • New Topic