• Post Reply Bookmark Topic Watch Topic
  • New Topic

Learning JavaScript within the context of the Java  RSS feed

 
Mark Richardson
Ranch Hand
Posts: 108
2
  • Mark post as helpful
  • send pies
  • 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?
 
Mark Richardson
Ranch Hand
Posts: 108
2
  • Mark post as helpful
  • send pies
  • 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.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark Richardson wrote:Also, I don't want to end up picking up a framework like Vaadin

shudders
 
Mark Richardson
Ranch Hand
Posts: 108
2
  • Mark post as helpful
  • send pies
  • 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
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 3
  • Mark post as helpful
  • send pies
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!