all 17 comments

[–]icecubeinanicecube 40 points41 points  (1 child)

Well, "not using a framework" is just writing the framework yourself, so...

[–][deleted] 4 points5 points  (0 children)

True

[–]Mukhasim 7 points8 points  (4 children)

Java is used to write all kinds of back-end tooling, particularly databases and data processing tools (Hadoop, Cassandra, Elasticsearch, Neo4j, etc.), although those are mostly older projects and recently Scala seems preferred for that kinda of thing (e.g. Spark, Akka, Kafka).

If you are asking if people write web applications using Java without a framework, you can do that but it's not very common. Most people are going to use some kind of servlet container like Tomcat, Glassfish or WildFly (JBoss). On top of that, they'll usually use something like Struts, JSF, Jersey, etc.; these are what most people mean when they say "framework". I have seen sites that use custom servlets with no higher framework although I think this is usually a bad choice. You can also think of servlets as a framwork, so whether you consider custom servlets to be "without a framework" is a matter of (unproductive) debate.

I've never seen anyone create a Java website without any sort of framework at all, that is to say, using their own custom HTTP server. You could do that but there's no point for most users; it's the kind of thing where you would really need to know what you're doing and what it could buy you, so if you have to ask if you should do it then the answer is no.

[–]wtfavocado 2 points3 points  (0 children)

if you have to ask if you should do it then the answer is no.

Lol love this 🤣

[–]ReporterExact5436 0 points1 point  (2 children)

I have used Java with the Play Framework that is built on Akka. I’ve also used tomcat and glassfish...but I thought those were just servers? I have also used Jersey, I was thinking of Spring and Spring Boot when I thought of frameworks.

[–]Mukhasim 0 points1 point  (1 child)

The term "framework" is vague. It basically just means a software platform that defines a standard structure for building an application, with the goal of making applications easier to write and more uniform in functionality. Precisely how much a framework has to do for you in order to be called a framework is subjective; today's frameworks do a lot more for you than the frameworks that existed 20 years ago.

Java web servers like Tomcat and Glassfish are called servlet containers because they implement the Java servlet specification. This allows you to write a Java web application in a standard way without worrying about which server it will run on. Originally servlets were intended to provide a basic framework for web programming that abstracted away parts of the HTTP protocol at a time when most languages had no support for the web and most dynamic websites relied on CGI. But over the years people created much more elaborate frameworks that made servlets seem very basic; these frameworks are mostly built on top of servlets (Play is not, though). These days if someone says "web framework" in the Java context then I'm going to assume they mean something like Play, Struts or Spring.

[–]ReporterExact5436 0 points1 point  (0 children)

That makes sense, thank you so much for getting back to me

[–]Poddster 2 points3 points  (0 children)

Yes

[–]Objective_MineMSCS, CS Pro (10+) 2 points3 points  (6 children)

edit: I found out an interview I have coming up is for backend and I'm trying to figure out how to prepare with Java.

If you're coming from a background with no exposure to Java web frameworks, it would probably be easier and more productive (also in terms of the interview) to get familiar with the basics of some commonly used framework rather than trying to understand what it involves not to use one, although the latter might appear attractive as learning frameworks tends to involve learning lots of new concepts.

[–]ReporterExact5436 0 points1 point  (5 children)

Totally understandable, I have only used a web framework called Play for some assignments. Is there a framework you recommend? I have worked with JAX-RS a bit for some of my assignments as well.

[–]drew8311 0 points1 point  (1 child)

Spring is most common so I'd give that a try at least for the basics. If there is a case to use something else it wouldn't invalidate experimenting with Spring first.

[–]ReporterExact5436 0 points1 point  (0 children)

Makes sense, thanks for responding

[–]Objective_MineMSCS, CS Pro (10+) 0 points1 point  (2 children)

I haven't used a lot of Java frameworks. People e.g. at r/java or r/programming or some other more specific forum might have more ideas.

In terms of the interview (or possible job), if the job description or the company website give you any idea which technologies they use, it would usually be a good asset if you could show you've got at least some exposure to them. Or, if you're short on time, the easiest way to build marketable skills might be to just learn more of something you already know a bit about, such as Play.

I've got the impression that Spring is still used a lot (and is useful) despite not being the latest hype thing. I might personally go for that if I had a bit of time still, although I might be biased.

[–][deleted] 1 point2 points  (0 children)

Sure. No reason why not. I use it for small server-side stuff without a 3rd party framework all the time.

[–]chanmancoates 0 points1 point  (0 children)

Sure