简体   繁体   English

Web应用程序与MEAN堆栈和Java

[英]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. 我几年来一直是Java / J2EE开发人员,不幸的是,由于我日常工作和公司的背景,最近我没有学到那么多东西。

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 登录用户的Web应用程序
  • Need to retrieve information from third-party API (think Twitter, Facebook, Pinterest...) 需要从第三方API检索信息(想想Twitter,Facebook,Pinterest ......)
  • Many concurrent accesses to the same features (API information retrieval) at the same time 许多并发访问同一功能(API信息检索)的同时
  • Accessible through Web and eventually via Mobile 可通过Web访问,最终通过Mobile访问
  • Cron/Quartz to regularly (every night?) send users their updated information via email Cron / Quartz定期(每晚?)通过电子邮件向用户发送更新的信息
  • Dashboard with real-time information 带有实时信息的仪表板
  • Notifications by email or web when something happens (new Twitter follower...) 当事情发生时通过电子邮件或网络发布通知(新的Twitter粉丝......)

My knowledge is the following: 我的知识如下:

  • Java/J2EE with a bit of Spring/Hibernate, quiet a lot of Maven/Ibatis Java / J2EE带有一点Spring / Hibernate,安静了很多Maven / Ibatis
  • Deploys on Tomcat/JBoss 在Tomcat / JBoss上部署
  • HTML, CSS and Javascript, basic. HTML,CSS和Javascript,基本。 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 (ie 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) ie MongoDB + Express.js + AngularJS + Node.js 对于引擎部分(即从第三方检索信息,在网络和移动设备上显示,每晚发送电子邮件......),我正在考虑一个完整的MEAN堆栈(尽管我更喜欢mean.js mean.io看起来更成熟)即MongoDB + Express.js + AngularJS + Node.js
  • for the administrative part (new users creation, login management): Java + Spring/Hibernate + regular MySQL + AngularJS 对于管理部分(新用户创建,登录管理):Java + Spring / Hibernate +常规MySQL + AngularJS
  • Amazon EC2 instance with a Apache+Tomcat for the administrative part 带有Apache + Tomcat的Amazon EC2实例用于管理部分

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? MEAN堆栈是否也可以处理所有管理/登录功能?
  • Is it crazy to pretend that I can get to learn MEAN stack with (at the moment) a limited knowledge of Javascript? 假装我可以学习MEAN堆栈(目前)对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? 有没有一种简单的方法将Node.js与Java代码集成? 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. 例如,我想利用Node.js的非阻塞功能,但是例如调用Java方法来访问第三方API。

Thanks in advance for your advice. 提前感谢您的建议。

Nicolas. 尼古拉斯。

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 的NodeJS
  • MongoDB MongoDB的
  • AngularJS AngularJS

NodeJS 的NodeJS

There are many tutorials online and you will need to learn Javascript and what that means on a NodeJS server. 网上有很多教程,你需要学习Javascript以及NodeJS服务器上的含义。 The asynchronous nature of Javascript will look very different from Java (I know, that was my transition as well). Javascript的异步特性看起来与Java非常不同(我知道,这也是我的过渡)。 A tutorial I like: Mixu's Node Book An eBook I like: Node Beginner 我喜欢的教程: Mixu的Node Book我喜欢的电子书: Node Beginner

MongoDB MongoDB的

I'm still working on this myself, but MongoDB is different than a relational SQL database. 我自己也在研究这个问题,但是MongoDB与关系型SQL数据库不同。 You will need to think a little differently here as well. 你也需要在这里有所不同。 Plenty of tutorials out there for MongoDB. 很多关于MongoDB的教程。

However, I will say it is possible to combine NodeJS with SQL. 但是,我会说可以将NodeJS与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. 我喜欢在使用SQL数据库时使用knexJS It's awesome. 这很棒。

AngularJS AngularJS

Angular is a huge framework. Angular是一个庞大的框架。 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 尝试解决这个问题的路径很多,这里有我预订的链接: 在周末学习AngularJS

That said, you wouldn't need to use Angular in you app. 也就是说,你不需要在app中使用Angular。 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. 一些框架可能支持它,并将它们的NodeJS后端基于Angular前端,但您可以使用现有的前端技能(甚至, 喘气! ,jQuery)来使您的网页驱动您的后端服务器。

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. MongoDB当然可以处理您的管理内容。

  • Could the MEAN stack also deal with all the administrative/login features? MEAN堆栈是否也可以处理所有管理/登录功能?

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? 假装我可以学习MEAN堆栈(目前)对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. 找一个看起来很不错的NPM包,使用它,继续前进。 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? 有没有一种简单的方法将Node.js与Java代码集成? 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. 例如,我想利用Node.js的非阻塞功能,但是例如调用Java方法来访问第三方API。

Sure, a Java client can call to to a NodeJS server. 当然,Java客户端可以调用NodeJS服务器。 If you created a NodeJS API server, you could write a Java Client to test it out. 如果您创建了NodeJS API服务器,则可以编写Java客户端来测试它。 You can even do other crazy things from NodeJS to Java code , but I would suggest leaving Java behind for now. 你甚至可以从NodeJS到Java代码其他疯狂的事情 ,但我建议暂时留下Java。 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. 对于很多网络内容(HTTP请求等),我认为你会惊喜地发现在NodeJS中做一些事情,你需要为Java中的等价物做些什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM