Hot answers tagged

98

Java Proper Java Standard Edition is the "normal" version designed for general computing. It, like all other variants of Java, is a strongly, statically typed, bytecode-compiled, Object-Oriented language run on a virtual machine with fully automatic garbage collection. It has most of the features of the language. Examples of applications would be ...


59

For smaller companies (it's not clear how big yours is), three environments (dev, stage, production) are common. Larger companies will often have a QA environment between dev and stage. These normally break down as follows: dev: Working code copy. Changes made by developers are deployed here so integration and features can be tested. This environment is ...


52

It is deprecated as a general technique, because - as you noticed - creation and destruction of short lived objects per se (i.e. memory allocation and GC) is extremely cheap in modern JVMs. So using a hand-written object pool for your run-of-the-mill objects is most likely slower, more complicated and more error-prone than plain new.* It still has its uses ...


23

The answer to the concrete question: 'Is object pooling a deprecated technique?' is: No. Object pooling is widely used in specific places - thread pooling, database connection pooling etc. General object creation has never been a slow process. Pooling in itself consumes resources - memory and processing power. Any optimization is a trade-off. The rule is: ...


18

To clarify some things: Java - a programming language. JavaSE - a term that refers to Java, and a collection of standard libraries and utilities. JavaEE - a term that refers to Java, and a collection of libraries used for building "enterprise applications" (usually web applications). There is nothing you can do in JavaEE that can't be done in JavaSE, but ...


17

I've grown to love Dropwizard for an overall solution Rather than go with some huge application container approach, Dropwizard advocates a lightweight solution that offers much faster development cycles. Essentially, it provides the glue for the following well-known frameworks: Jetty (HTTP) Jersey (JAX-RS) Jackson (JSON or XML) Guava (excellent additions ...


16

Field injection is a bit too "spooky action at a distance" for my taste. Consider the example you provided in your Google Groups post: public class VeracodeServiceImplTest { @Tested(fullyInitialized=true) VeracodeServiceImpl veracodeService; @Tested(fullyInitialized=true, availableDuringSetup=true) VeracodeRepositoryImpl ...


13

I am a bit surprised that a test environment is not present as well, as a location for code to go to before being promoted to staging. To answer the question: A stage environment should mirror the production environment as closely as possible. It is used for verification of deployment procedures - making sure that when code is production ready it can be ...


12

I don't use Erlang, but I know someone who does, and from everything he's described it as it sounds like exactly what you are looking for. (It was designed by an enterprise (Ericsson) for enterprise use, after all.)


11

I suspect they have been pulling your leg. Java EE is nothing but a Java SE running a container application (like JBoss) that supports the additional Java EE frameworks. Not knowing the SE would be a major problem for your future in Java coding.


11

SLF4J is basically an abstraction layer. It is not a logging implementation. It means that if you're writing a library and you use SLF4J, you can give that library to someone else to use and they can choose which logging implementation to use with SLF4J e.g. log4j or the Java logging API. It helps prevent projects from being dependent on lots of logging APIs ...


10

Common Lisp has a long history of being used professionally. It has two commercial implementations: http://www.franz.com/ http://www.lispworks.com/ And several high-quality open source implementations.


9

First I would have corrected the interviewer by telling him, that since version 5 it's named JavaEE. Further I would have detailed the parts that make up JavaEE, e.g. JPA, JSF, JSP, etc...


9

Core Java is not an official name in Java platform (it is the name of a book); also Enterprise Java is not an official name. However these two terms tend to refer to two distinct parts of Java: Core Java usually refers to Java SE which consists of the Java Language, the JVM and JDK (which itself contains the compiler some tools and a pretty large ...


8

Start a Github account, and host projects you've worked on there. and as birryree stated, working on open source projects can be good. This can also be done via github.


8

Not at all - in fact I'm investing heavily in Java as a platform at my company (a startup developing SaaS applications and tools for data mining). Here are the reasons: Picking Java as a platform doesn't mean you have to use Java as a language. We use Clojure as the primary application development language, occasionally dropping into Java where needed. ...


8

Don't bother with archetypes until later For all information you need to know about Maven, have a read of "Better Builds with Maven" (PDF). However, that's a bit of overkill for what you're trying to achieve. To get started, lay out your web application following the standard Maven structure for web apps as follows. (You don't need a Maven archetype for ...


8

Most corporations don't live on the bleeding edge so they still use JEE. However, most recruiters just copy paste from their buzz word dictionary. Additionally I still see J2SE when in reality its JSE.


8

The Spec Lead and the EG group will decide via a JSR as part of the Java Community Process. They are typically conservative in their deprecation and remove cycles.


8

If you haven't read about MVC (model view controller), do so. You shouldn't have code in a JSP, just display. Putting code in JSP is very 1900's. Seriously though, if there is no code in the JSP, you aren't testing the JSP. You are testing the action/flow. Then you could use HttpUnit or Selenium. The big difference is that Selenium tests from a real ...


8

There are a number of reasons why you might want to upgrade your underlying infrastructure, and you should evaluate each of them as empirically as you can. For example, you might upgrade because: The vendor is no longer supporting the version you're using There's an critical bug or security fix There's a new feature you want to take advantage of It will ...


8

I wouldn't suggest doing a rewrite a whole application. Especially one that is currently being used by the customer. You will never cut over to the new system until it can do everything that the old system does. While you are writing the new system, the customer and management are going to get impatient and want those new features. You, or someone else will ...


8

Your primary difficulties I feel are that you have a mismatch between a very linear and custom workflow in an older application that do not coincide with the user interaction workflows that are common on the web. Web applications that interact with a server application that contain the business logic communicate in a Request/Response messaging style. The ...


7

Measure It completely depends on your use case, size of your objects, your JVM, your JVM options, what GC you have enabled and a whole host of other factors. In short: measure it before and measure it after. Assuming you're using an object pooling framework (like from Apache) then it shouldn't be too painful to swap between implementations. Extra ...


7

You have Haskell for Enterprise Linux. The haskell wiki even includes a survey page about how to use Haskell in the Enterprise. Erlang (as mentioned by Chris) is definitely also a good suggestion. It is built to scale, be fault-tolerant and stay in continuous operation for many years. Personally I'm more of a fan of the static type system that Haskell has. ...


7

You're mixing apples and oranges, kind of. Servlets (or inheriting from HttpServlet) let you access HTTP request parameters and respond with something, via (or on top of) an existing HTTP server implementation. Although using Javascript as the language, Node.js is at a lower level than that. It starts from actually implementing the HTTP server. You can go ...


7

It is a little unclear if you mean sharing the same J2EE container or physical server. Regardless, my suggested approach is the same but I don't know if I am suggesting option 2 (which I think I am) or a third option you had not considered. If you try and host lots of apps as one app it means you will suffer from far more from things like threading overhead ...


6

Well, the key here is familiarity. IMHO, the only way to achieve familiarity is by practice- use Spring, Hibernate, etc. and you will increase your knowledge about them. One of the strengths of the Java ecosystem is the great number of libraries/frameworks which come with great documentation- Spring's reference manual is excellent and reading it will teach ...


6

I would say that just by reading your analysis, you're saying there are alot of static methods and singletons. Static methods shouldn't be an issue by themselves, but if they're being used to proxy calls to the singleton objects, I would work on making those either rock solid, or replacing them with a more sane object model. Static methods are useful for ...



Only top voted, non community-wiki answers of a minimum length are eligible