Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webapp with MEAN stack and Java

I've been a Java/J2EE developer for a few years now, and unfortunately lately I haven't been learning that much because of the context of my daily job and my company.

That's why I've decided to tackle my own personal project, which would have the following details/features (the first one are the most prioritary)

  • Web app for logged-in users
  • Need to retrieve information from third-party API (think Twitter, Facebook, Pinterest...)
  • Many concurrent accesses to the same features (API information retrieval) at the same time
  • Accessible through Web and eventually via Mobile
  • Cron/Quartz to regularly (every night?) send users their updated information via email
  • Dashboard with real-time information
  • Notifications by email or web when something happens (new Twitter follower...)

My knowledge is the following:

  • Java/J2EE with a bit of Spring/Hibernate, quiet a lot of Maven/Ibatis
  • Deploys on Tomcat/JBoss
  • HTML, CSS and Javascript, basic. Enough to perform basic stuff, but not enough to build a responsive and shiny web for example

My soft skills:

  • I want to learn new techs
  • I need to learn new techs (to update my CV)

After reading quiet a bit about many tech available, I've thought the following:

  • for the engine part (i.e. retrieve information from third party, display it on the web and mobile, send the email every night...), I was thinking of a full MEAN stack (I'm more attacted to mean.js even though mean.io look more mature) i.e. MongoDB + Express.js + AngularJS + Node.js
  • for the administrative part (new users creation, login management): Java + Spring/Hibernate + regular MySQL + AngularJS
  • Amazon EC2 instance with a Apache+Tomcat for the administrative part

What do you think + Some questions:

  • Is it crazy to pretend I'll tackle in a different way the engine part and the administrative part?
  • Could the MEAN stack also deal with all the administrative/login features?
  • Is it crazy to pretend that I can get to learn MEAN stack with (at the moment) a limited knowledge of Javascript? The point of course is to learn it... I know there will be quiet a learning curve, but I'm ready for it.
  • Is there an easy way to integrate Node.js with Java code? has anyone tried it? For example I would like to take advantage of non-blocking capabiltiies of Node.js, but call Java method to access the third-party API for example.

Thanks in advance for your advice.

Nicolas.

like image 913
nicolasdaudin Avatar asked Aug 12 '14 17:08

nicolasdaudin


1 Answers

This will be a huge undertaking. That is not good or bad, just a statement : )

There are a lot of technologies you are mentioning and each one will have a bit of a learning curve. Having just watched American Ninja Warrior last night, you're learning curve is sounding a lot like The Warped Wall! Don't be discouraged, prepare to start small, and you'll be OK.

The three big pieces you'll have to cover are:

  • NodeJS
  • MongoDB
  • AngularJS

NodeJS

There are many tutorials online and you will need to learn Javascript and what that means on a NodeJS server. The asynchronous nature of Javascript will look very different from Java (I know, that was my transition as well). A tutorial I like: Mixu's Node Book An eBook I like: Node Beginner

MongoDB

I'm still working on this myself, but MongoDB is different than a relational SQL database. You will need to think a little differently here as well. Plenty of tutorials out there for MongoDB.

However, I will say it is possible to combine NodeJS with SQL. If you're doing this to learn, you can turn all the knobs at once. If you want to see something working, you can just use the DB as your normally would. I like using knexJS when working with a SQL database. It's awesome.

AngularJS

Angular is a huge framework. People love it. Easy to use once you know it. I've read its easy to get started and then more difficult to master. Lots of paths to try and tackle this one, here's a link I've book marked: Learn AngularJS in a Weekend

That said, you wouldn't need to use Angular in you app. Some framework might support it, and base their NodeJS backend around an Angular frontend, but you could use your existing frontend skills (even, gasp!, jQuery) to make your web pages drive your backend server.

My thoughts on other questions you've asked

  • Is it crazy to pretend I'll tackle in a different way the engine part and the administrative part?

You could separate the two, but if this is just for learning, do everything in one. MongoDB can certainly handle your administrative stuff.

  • Could the MEAN stack also deal with all the administrative/login features?

Yep. Some frameworks have those as default packages as well.

  • Is it crazy to pretend that I can get to learn MEAN stack with (at the moment) a limited knowledge of Javascript? The point of course is to learn it... I know there will be quiet a learning curve, but I'm ready for it.

It is not crazy, but the learning curve is quite large. Having an app/goal in mind will be good drive for you. Also, don't try to do everything perfectly the first time. Find a NPM package that looks pretty good, use it, and move on. Don't worry about all the details right now. Do that on your next app, or once you have a functional baseline.

  • Is there an easy way to integrate Node.js with Java code? has anyone tried it? For example I would like to take advantage of non-blocking capabiltiies of Node.js, but call Java method to access the third-party API for example.

Sure, a Java client can call to to a NodeJS server. If you created a NodeJS API server, you could write a Java Client to test it out. You can even do other crazy things from NodeJS to Java code, but I would suggest leaving Java behind for now. For a lot of the web stuff (HTTP requests and the like), I think you'll be pleasantly surprised how fast it is to do something in NodeJS that what you would need to do for an equivalent in Java.

like image 157
clay Avatar answered Oct 18 '22 09:10

clay