TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Developing and running a Java EE Hello World application

119 点作者 lukaseder超过 10 年前

30 条评论

realusername超过 10 年前
I&#x27;ve also done some JEE quite a long time ago and I hated every second of it. I&#x27;m not sure however if my experience is representative of the the Java community. There is no problem with the language itself nor the VM which is also working quite fine (while taking a lot of RAM). But I really have a problem with the community, everything seems over-engineered and super complicated in Java, even with simple things.<p>Nothing works by default, you always have to include stuff here and there, write one or two xml files before anything would work, I&#x27;m fine with configuration but I should at least work by default. Maven is a nightmare to use, it&#x27;s so complicated I would generally not use it. I would just like a package manager which is only doing packages like any other language.<p>The main problem with the Java community in my own opinion is they are building pyramids while other languages are building stuff out of bricks, it&#x27;s the opposite of the UNIX philosophy.
评论 #8666677 未加载
评论 #8667644 未加载
评论 #8666699 未加载
评论 #8666871 未加载
评论 #8667114 未加载
评论 #8667941 未加载
评论 #8666830 未加载
AndrewDucker超过 10 年前
Except that that&#x27;s not just a &quot;Hello Word&quot; page.<p>That&#x27;s routing to the right page, transaction and session control, storing the text of the message in a separate class than the one that returns the response, and using a template to return the resulting HTML.<p>Looking at the section with the actual example code in it, you could do it in about half that, if you wanted a simple version that just returned &quot;Hello World&quot;.<p>If you don&#x27;t want routing, templating, separation of concerns, etc. then you wouldn&#x27;t be using a framework like that, of course.
评论 #8666643 未加载
评论 #8666692 未加载
pearjuice超过 10 年前
Taking a cheap jab at Java EE just because their &quot;Hello World&quot; introduction article is a bit lengthy is bad form. Judging by the insulting &quot;kids&quot; reference in your title, Java EE has a completely different mindset than you are used to and the target audience doesn&#x27;t include you.<p>That doesn&#x27;t mean the millions of other developers and billions of other platforms running Java are inferior.
评论 #8666577 未加载
评论 #8666687 未加载
metafex超过 10 年前
And yes kids, enterprise applications at large companies are exactly as hard to maintain as you may have guessed (after this article).<p>Old legacy codebases in Java are one of the worst things I&#x27;ve ever seen. (spiked with old stuff nobody maintains anymore and also nobody pays you to upgrade, such fun times)
gexla超过 10 年前
Setting up any web stack is a pain in the ass and probably just as long of a tutorial. For example, write out a tutorial which goes from base Ubuntu install to &quot;hello world&quot; on Rails, I bet it&#x27;s just as long or longer. I suppose it depends on how much detail you want to include. There are just more &quot;one click&quot; install options for other stacks.
评论 #8666635 未加载
评论 #8666647 未加载
评论 #8666636 未加载
IndianAstronaut超过 10 年前
I don&#x27;t think the point here is to get simple web apps up and running quickly. It is to build large scale systems that are stable. So yes, there will be overhead and lots of boiler plate stuff. Even projects like Django still have this overhead.
makach超过 10 年前
At first I thought this was a big wtf but really there isn&#x27;t much to it. It is a rather good, detailed step by step documentation of how to set up a hello world example. +1
brianmcc超过 10 年前
This is not a simple Hello World app, it&#x27;s a minimally viable end to end EE stack using one particular combination of many available technologies, intended to be deployed within an app server. And I am pretty sure OP knows it if he&#x27;s deploying apps with &quot;just Jetty and JDBC&quot;. Big deal; so what? Why the snarky post?
klez超过 10 年前
Is the point of this saying that J2EE is bloated and that simple operations are made seemingly impossible?<p>Of course you wouldn&#x27;t write an &quot;hello world&quot; in j2ee, what would be the point?<p>All that stuff makes it easier later to write more complex stuff, so I really don&#x27;t see the point of this submission.
评论 #8666573 未加载
评论 #8666639 未加载
kev6168超过 10 年前
I laughed at the end. Reads like a badly written TV script, with so much buildup, tension and all kinds of weird characters in the beginning and middle of the show, then at the end comes a huge anticlimactic duh. &quot;Hello Word!&quot;.
th3iedkid超过 10 年前
i don&#x27;t think the point of the article is to introduce JEE , its rather in the very first line :<p>&gt;&gt;&quot;This tutorial is intended to help you get started with developing applications for Java Platform, Enterprise Edition (Java EE) in IntelliJ IDEA. &quot;<p>They intend to show all JEE bells and whistles in one tutorial so that , people can look at this and know what they need to do to work on IntelliJ developing JEE application.<p>Not starting out on JEE itself.Which to be honest might require more of a different learning curve ,
S4M超过 10 年前
I don&#x27;t do web apps with java, so I honestly don&#x27;t know if it&#x27;s the proper way to do it, a satire, or if there is a more straightforward way.<p>Especially, I don&#x27;t see why one has to write both the class HelloWorldServlet and HelloWorldBean; couldn&#x27;t one just inherit from one class or implement one interface?
评论 #8666611 未加载
评论 #8666742 未加载
assertnotnull超过 10 年前
Java main feature: fast on JVM, not on the dev. I&#x27;ve worked for 5 months to make a 4 pages - 3 grid &amp; upload form using GWT, Spring, SOAP.. seriously?? It&#x27;s a different stack but still it&#x27;s overkill. You know what is the best part? our app is not even scaled. Why are we bothering then? Do we crunch tons of data to justify the need of a JVM? No. Is speed really a concern? It seems not.. I didn&#x27;t even hear we are doing caching. It&#x27;s only transform database beans to DTO and modify for display. Java is not a technical requirement here. It&#x27;s just a lazy business standardisation solution.<p>To me It&#x27;s like, the enterprise wants a flyswatter to kill a fly but you end up with a bazooka factory and the fly dies of age. But the bazooka factory is very efficient on the CPU. That&#x27;s the important part you know..
Koziolek超过 10 年前
And now kids let&#x27;s build something little more complicated. App with distributed transactions in cluster (each step on different node).<p>Full JEE stack is terrible if you would like to write sad CRUD applications. But if you need something more than simple access to DB it is very good solution.
renke1超过 10 年前
I think the usual way would be to use JSF and CDI beans instead of using EJBs and Servlets though. The only thing that is quite annoying is creating the web.xml from scratch for the first time. The shown approach is rather bad for simple (and modern) Hello World.
laichzeit0超过 10 年前
The main problem with JavaEE is hardly the development part. It&#x27;s the maintenance and support part. When relatively inexperienced programmers write complex applications (because it makes this easy) and then something goes &quot;wrong&quot; in this pyramid of abstractions and layers and layers of libraries &#x2F; frameworks interacting with one another and the application servers. That is when it gets interesting. Yeah there are great production performance monitoring tools like Dynatrace but it&#x27;s not a silver bullet.
lennartcl超过 10 年前
Ahh Enterprise. Protip for anyone applying for an enterprise job: just copy-paste <a href="https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;EnterpriseQualityCoding&#x2F;FizzBuzzEnterpris...</a> when they do the mandatory fizzbuzz test in the job interview. And then complain in the github issue tracker if you didn&#x27;t get the job.
评论 #8670083 未加载
评论 #8670084 未加载
Terr_超过 10 年前
Apples and oranges. Its not <i>supposed</i> to be a small app, it&#x27;s a skeleton being built to support something much heavier.
fsloth超过 10 年前
I&#x27;m a complete foreigner to web development and JVM. I&#x27;ve been dabbling in setting up Clojure projects a bit at home. It took a one command line call approximately (lein something-something) to get the more or less equivalent web stack up and running (to my understanding). After reading this, I suddenly understand how awesome that was.
svckr超过 10 年前
Next time, kids, we&#x27;ll do the same without support from our fancy IDE! O wait, no. Let&#x27;s _not_ do that.
mangecoeur超过 10 年前
Lackey: &quot;Boss! Boss! Our system is a hopelessly complicated, over-engineered monstrosity! The &quot;Hello World&quot; tutorial is 20 pages! Our business is doomed!&quot;<p>Boss: &quot;Calm down Jenkins. Just write &#x27;Enterprise&#x27; in front of everything, the suits will love it!&quot;
评论 #8666794 未加载
eskimo87超过 10 年前
It&#x27;s way easier to run a Hello World web app with Netbeans!! In fact, a new web app project by default creates a project with default settings&#x2F;xml with index web page saying &quot;Hello world&quot; - it can&#x27;t get any simpler than that! give it a try :-)
davidgerard超过 10 年前
I used to <i>joke</i> that &quot;hello world&quot; in Java was twenty files and two security holes.
jupake超过 10 年前
This looks like a deliberately anti-java post or something taken completely out of context.
estefan超过 10 年前
Ha! What a load of crap! I can&#x27;t see this &quot;Java&quot; catching on...
insin超过 10 年前
Alternatively, here&#x27;s Adam Bien&#x27;s (JSON) version of Hello World with JEE:<p><a href="https://www.youtube.com/watch?v=zESNqWcY0pY" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=zESNqWcY0pY</a>
ris超过 10 年前
I think as much as anything this shows how using GUIs for complex things can just have the effect of making them exponentially more complex.
jpgvm超过 10 年前
2&#x2F;3rds of the page before you start writing code. -_- And people wonder why it&#x27;s going extinct...
tulsidas超过 10 年前
I flew an 747 last week to go to the store round the corner, didn&#x27;t make sense either
smegel超过 10 年前
Not sure whether to laugh or cry.