How is java used in web development




















I'm not counting one-time experiences with other languages and crappy devs certainly aren't unique to Java. Somebody has to not suck at it but IMO, I'm not overgeneralizing. There is a problem with Java devs at the median level. It's a cultural phenomenon in my experience. Such a nasty one that I've stopped taking work with Java shops unless I know the devs in question.

Is this mean hosting java web applications is too expensive? I did a search but I don't know which one have the standard prices so I can have a big picture about it. Any Linux hosting environment where you get a login account to the machine will be fine - I personally use Ubuntu on Amazon Web Services for my Java hosting. The main reasons for using Java in web development boil down to the following: Client demands it.

For better or worse, some clients have "accepted technology lists", and if you propose something not on that list you'd better have a really good explanation why--and why something on the list couldn't be used. Develop on Windows, deploy on Unix.

Most development machines are Windows, some are Mac, and very few are Linux--just as you would expect with regular client machines. However on the server, you're just as likely to see some form of Unix as you are a Windows server. Java is probably the closest to write once deploy anywhere it's not perfect, but better than some alternatives. Management choice.

Let's face it, choosing Java over another language will have more to do with being able to find programmers and replace team members who leave the project than being based purely on the merits of the language. Berin Loritsch. About 2: please configure your IDE correctly. Eclipse has this stupid idea of defaulting to some Windowish file encoding which can bring havoc in a Linux server. I was actually referring to assumptions about where certain files live, and any time you have to interact with the operating system.

Raynos, if only that were true. Unfortunately, unless you have the same standard libraries on all platforms, that cannot hold true. The core C language is very portable, I give you that. However, anything that is OS specific like creating a thread, opening a socket, or creating a UI element has something in the API that cannot be ported with a simple recompile. With Java, no recompile is necessary, much less changing the code to use the new system API.

BerinLoritsch you mean to say that after 40 years we don't have generic APIs for OS-specific stuff that just works cross-platform with a simple re-compilation? I can imagine it being true in the 80s though.

Show 1 more comment. Technically speaking: If you can define a architecture that is amenable to the hot-spot optimizer. If you anticipate the need for the massive OO overhead Java imposes.

Paul Nathan. Python is nice because it actually succeeds at a lot of the things Java pretends to. And it's not hard to make it play well with others when you must solve a problem with some other language.

I don't know about Ruby, but Rails devs are something of a crapshoot in my experience. It's the JQuery effect. People who know what they're doing like it because it's fast and effective in the right hands.

People who don't know what they're doing like it because they don't have to know as much. Erik Reppen: On the other hand, Ruby as a language has a nicer and more consistent design than Python.

I really think these language comparison are often a matter of taste and one tends to favour the languages they are more familiar with. Rian Fowler. The problem with Java's rigidity, IMO, is that you end up with a lot of devs who don't understand why their code is forcibly organized the way it is in the first place.

When everything must look like OOP, sometimes the inevitable result is that nothing actually is. Brian D. Benchmarks vs. That may be a median talent level issue more than a language thing though. ErikReppen: Definitely a talent thing.

PHP or Rails just cannot compare. But Java's libraries and some of the tools make it too easy to lose all that speed doing uselessly complicated things. Vitaly Olegovitch. Security The main reason for large companies choosing Java over other solutions is because it is considered to be much more secure. This is mainly because it is supported by such a large company now oracle.

Holy War! Fight Fight! Mchl Some of it comes from the language or rather from its VM. How many times have you seen buffer overrun hacks aimed at Java app servers? It's just not worth the effort. Having said that, Java is considered more secure by "the industry" than it is, and a false sense of security can bite back hard. My point here was that you need to diffrentiate between Java as a language, and Java runtime environments.

There's nothing that makes Java language more or less secure than any other language. Over 9 million developers use it worldwide. The greatest feature of Java is its multifaceted nature.

Of course, the development of traditional desktop and even mobile apps is great. But what if you want to enter the web development territory? Then, Java will become a perfect one to start. An important feature of Java is that compared to some C languages, Java code is easier to maintain.

This is because it does not allow developers to execute commands that could lead to bad programming. Java has been tested, refined, extended, and validated by a huge number of developers, that is why it is a trustworthy programming language. It has become an indispensable tool for developers.

All programming languages have pros and cons. Taking them into account, specialists choose the appropriate one for the implementation of certain tasks.

Java is a high-level programming language, the main advantages of which are:. Web services designed in Java can be launched on any device if it is connected to the web server via the Internet protocol of the browser. It was created as a distributed programming language with a built-in mechanism for sharing data and programs among multiple computers, which increases productivity and efficiency while in other programming languages, you need to use an external API for distribution.

In addition, Java also supports socket programming and CORBA distribution methodology for exchanging objects and assignments between programs written in different languages. Java EE is not the only thing on the Java server side as many seem to think. Facebook also does something similar.

It's funny how everybody talks about how great ruby and PHP are and that all the sites are built around them, but then when you look at how inefficient they are, most large organizations have to switch to something else. Also, running Tomcat within Eclipse I can restart an app in under a second. I'm rarely hindered by restarting my apps 2 There's no silver bullet, guys. Ruby or any language doesn't make you 10x faster.

Java and any other static language, have two huge benefits, almost worry free refactoring, and API discovery without documentation. Show 14 more comments. For "small" applications, this is even more true if you have to because this is the "standard" and the company uses it work with monster application servers such as Websphere, whereas more often than not Tomcat for example is good enough Why oh why do I have to work with that messed up administration console? Jalayn: In my experience it's because they only want to maintain one application server program for everything, rather than admin WebSphere for Team A, Tomcat for Team B, Glassfish or something else for Team C The new Java 6 EE - especially the web profile - allows for some pretty simple webapps.

A newbie's learning curve is huge and full of nested layers of acronym soup, confusion between specs eg JAX-RS and impls eg Jackson and more.

Show 5 more comments. Web Frameworks: When I first start programming web apps in Java, Struts just came out, and it wasn't great, but it was the best thing available. Batteries not included: One of the most annoying parts of Java was the fact that most of the libraries that you use were not included in java itself, you had to include a ton of 3rd party libs from places like apache commons.

Too many options: For some reason there seems to be way too many different ways to do the same thing in Java. App servers: Java web applications are really heavy, and require a lot of resources to run. App Hosting: If you aren't running your own server it is real hard to find shared hosting for your java apps at a reasonable price. Development Time: When I developing in java, I found myself much slower then what I can do in python.

Templates: The web templating systems in Java aren't that good, and I think I have tried them all tiles, freemarker, velocity, etc. I'm with you on many points, but take issue with some. Heavyness : JBoss AS 7 is pretty light and fast. Testing : Arquillian is the best test tool I've used in ANY language, though it's only just become mature enough to be usable. Dependency hell : Just use Maven; it should be standard and mandated part of JAva. Note that all of above adds to "batteries not included" problem, which is a huge one.

Feels like Java EE is a sub-framework on which you're supposed to build your own framework to then build your app. Very inefficient. Every tool is also horribly buggy, and JSF2 is simply an instrument of developer productivity destruction. I also think you missed a critical point: The learning curve and bugs really slow things down. CraigRinger I haven't used eclipse's dynamic web module or JRebel, so you you are right, it might be gone.

If you liked IntelliJ, try PyCharm — it's based on the same core. Show 8 more comments. Current gig: Financial Services. Adrian J. Well of course you have. There's more to web applications than writing code, you have to know how to tune your servers, write optimal SQL and so on. That company had 2. NET devs and no real server admins. The company that bought the company I was with also got that app in the deal. They were a massive Java shop and therefore had more resources available to guarantee stability.

It seems disingenuous to me that you've written that sentence stated as cause and effect. We all know that's not why. Also, sorry about all that ColdFusion experience ; — Jordan. Too be fair, investors tend to want to see the flavor of the year. But I still personally can't think of a worse choice for rapid prototype development barring very-high-quality Java devs which are not easy to find.

Add a comment. I think this has changed, though, now you can host Java web apps on GAE at no cost. Although ASP. Net isn't hard to find and it is cheap. Net hosting. On the other hand, I've wanted to try to get a site up in Java and couldn't find a shared host that runs Java and having to use a VPS doesn't interest me for a learning project. It's far easier to host many sites on a server for PHP than it is for Java and added to that it is far easier to find cheap web hosting solutions for PHP than for Java.

You are right Mark, fixed. Kibbee - Arvixe That is who I use. I have the personalASP Pro plan. Show 6 more comments. If you are interested in modern, productive tools and frameworks take a look at: The Play framework Google Web Toolkit Vaadin Tapestry 5 But I think most truly modern web development on the JVM platform is likely to be done in one of the new JVM languages rather than using Java directly, with Java simply providing the backbone in terms of underlying libraries and back-end infrastructure.

Vaadin is a great tool for creating intranet and big enterprise applications. It's not that well suited for a startup I guess. That is unless you embrace how it looks, because it's too hard to change it. The learning curve is still immense though. You could add Tapestry5 tapestry.

CraigRinger JSF is easy. Your comment reads like the question itself: a religious rant — jwenting. Does Google, Amazon, or LinkedIn count as modern? Care to elaborate on the "the rats nest that C is becoming" point? I'm not quite sure why you say '"Don't repeat yourself" was a response to the xml hell and long build cycles of Java web development. Personally I don't like dynamic languages.

Static languages make me more productive when I can see all type errors fast in my IDE and use refactoring tools. You should have a look on Play Framework it's a Java web framework inspired by Ruby on Rails and makes you productive with Java.

An powerful framework, like rails also means that if something is bad implemented then most people can't replace it by something else, because that component is too tight with the framework. As someone fighting Django, allow me to just say: Coyote21 is absolutely right. You can get basic CRUD up and going in five minutes, but the second you start adding business logic when this record is updated, a record must be inserted in this table, and If you're into Rails but need Java, look at Seam Forge.

Beware, it uses JSF2, which is horriying to work with, but Forge its self is pretty good. Show 1 more comment. Performance,scalability and stability are a bit lower on the priority list. So I suppose these are the reasons webstartups avoid java. Daniel Iankov. Great string manipulation? Syntax sugar? What do you even mean by that. Rapid iterative process? Java has it Tomcat inside Eclipse is painless.

Java unfun? The "fun" features in other languages tend to obfuscate and make things less clear. Strings in switch I wonder if they'll become more popular in Java when it gets lambdas? It's probably a comfort zone thing but Java just feels verbose - and very much like I've been handed enough bits to build 50 different types of car with no guarantee any 2 parts will fit together. I can't believe that two people have argued that Tomat inside Eclipse is painless and makes Java development efficient.

I find that it makes each development cycle much quicker, but requires daily maintenance, including repeatedly refreshing, rebuilding, cleaning tomcat, redeploying, restarting and sometimes restart Eclipse and repeating the earlier steps.

If my car needed that much maintenance, I'd never get to work. Brandon I will second that. I lose patience with RoR. Show 10 more comments. The biggest complaints I hear from developers The Syntax is too long. Just to print something we have to write System. You cant really use a simple VI like editor and write out a working piece of code in a few hours. Weak test frameworks. Even though the testing frameworks are very similar in Java and Ruby, Ruby takes a step forward by making thing easily available for testing.

This is especially true if you are using DB extensively in your application. Even many of the Web frameworks dont think about testing. Templates are a pain. Makes the relatively simple language into a Noodle Soup. Not Cool. Most Java applications are written in huge companies, which is associated with Bureaucracy that does not go so well with developers. People don't think Google when they think Java. It has also to do a lot with no books coming out indicating do X in Y days.

Dont like to compile. To most developers compilation is a decade old phenomenon. It made sense in 80's with C but mordern computers can do a lot more. They dont write code in compiled languages. Java is one of the very few languages that is compiled and used to write web applications. Too many Oops Concepts. Even though developers have quietly adopted the Oops domain. They dont like it in full. They dont like when you write an application with 10 classes with each class doing just one thing.

Makes you open 's of files and imagine interaction across 's of classes, sometimes with frameworks. Makes the whole programming activity a chore. This could be true with most languages but I have seen that Java Developers pay a lot of attention to what a class does.

Its the Java Developers who often come up with a code with 's of classes. This is good from many perspectives but non java developers hate it. Lots of the rest is more a JSF2 issue than a Java issue. I love OOP. I also know OOP which is why I would disagree that the vast majority of Java devs are doing too much of it. You can write a class but if your code is still a tangled spaghetti mess, all your really did was find a way beans to write crap procedural code with pointless structures wrapped around what might as well be simple functions or structs at best.

If there's one company that is "high" on Java, it's Google. Much more than Apple or Microsoft. I found it complex to start with, but once I got going, I love it. Of course, I was using Spring before that, so anything else is going to look like an improvement Not to mention that unit testing becomes way easier with properly done OOP. Show 2 more comments. Jessica Brown. Its getting insane, spring j2ee maven ant hibernate, you spend all your time writing xml config.

It's not just the frameworks. It's the obscene levels of conformity to things that make no sense. Exposing a lot of properties means you're doing it wrong. Slapping a vanilla getter and setter on that just adds a pointless method call and changes nothing, yet no Java dev will over just dangle properties off an object like that, because the community reinforces that that's somehow more wrong than what they're already doing.

But seriously, the XML instead of code thing Michael Brown. I don't agree with the paragraph that says: He's most likely a self-taught programmer. This is untrue these days, nowdays most people from 30's that program are competent programmers and have at least a degree. I'm painting the prototypical web startup. I didn't say anything about them being competent.

You can be self-taught and competent at the same time. I'm not sure what you're disagreeing with. This was to be my answer. Java is pretty much the only current web technology that isn't designed so that any competent developer can just pick it up and use it.

The second part of your answer is pretty much what Paul Graham wrote in The Python Pardox — user I'll take more choices and a little more complexity over PHP's over built-in methods. PHP is just so easy to setup. Good programming requires discipline, patience and effort Unless they both stink but one is much more of a PITA to set up than the other. Daniel Pryden. I tend to disagree with the "faster". In theory they should be but there are some massive php sites out there and nearly all the anecdotes about performance problems relate to MySQql or other underlying databases.

On the other hand almost every J2EE app I have come on contact with needed extensive tuning before performance was even acceptable. James: do you have anything besides vague anecdotes to back that up? Java regularly outperforms dynamic languages in benchmarks. I'm no Java zealot, but performance is not Java's problem. There are no performance problems with Java itself "not quite as fast as C but faster than anything else". However J2EE, plus frameworks, plus ORM, plus dependency injection, plus overkill design is almost guaranteed not to perform; there is so just too much potential for hidden bottlenecks and unforeseen interactions — James Anderson.

Basic: What is your point? There are lots of broken libraries and frameworks for any language. Yes, there is lots of crufty and out of date documentation -- but that's hardly unusual either. Conversely, there are some fantastic libraries, frameworks, and tools for Java.

Are you seriously trying to suggest that there should be one end-to-end framework for every application ever? Basic: Backwards from what? In the year and a half since I first wrote this answer, I've moved on and am currently working at Google, and I can assure you that Java is used very heavily for web application development at Google.

Of course, Google's needs are very different from the needs of many other companies, but Java is a different beast entirely when you use the right libraries and frameworks -- just check out some of the things Google has open-sourced Guava, Guice, GWT, Protocol Buffers, etc.

Show 9 more comments. Let's be clear though. The language Java, is not hard to learn. It's all the layers of crap built around working with Java to make up for its shortcomings verbosity, protecting you from yourself and your teammates by being inflexible as all getout, the absurd quantity of libraries relied upon, etc ErikReppen Very true. I am having to work on a Java project but have a background in.

The language and syntax is easy as anything I've come across to understand. It's the verbosity that's really driving me nuts.

What I used to in 1 line now takes and often an XML config file edit. Not to mention that without spending hours upon hours reading, picking the "right" framework for a job is a nightmare - and that's before you find out that your scenario is considered an edge case, isn't supported and if you don't like it, rewrite it. I want to spend my time solving the big problems — Basic.



0コメント

  • 1000 / 1000