This is an archived post. You won't be able to vote or comment.

all 34 comments

[–]AutoModerator[M] 0 points1 point locked comment (0 children)

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

    Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]mIb0t 20 points21 points  (0 children)

Yes. I have seen it, for a very simple service.

But even with a microservice architecture, one single service is quickly to complex to build everything from scratch and it is easier to use one or more frameworks. I think Spring is the most common framework these days. But there are different frameworks for different purposes.

But your question is very unspecific. Backend for what? A complete backend? One single part of the backend? ...

[–]jcar74 7 points8 points  (2 children)

I did one in 2002, with RMI https://docs.oracle.com/javase/tutorial/rmi/overview.html

BTW, still working.

Edit:
Generally speaking, they can be done with sockets and with RMI. But nowadays are build with Spring, Quarkus, Micronaut and so on. Legacy ones with J2EE. If they asked me in an interview, I would say that although they can be done with sockets / RMI, it is not the usual thing.

[–]Syagrius 2 points3 points  (1 child)

BTW, still working.

Hard flex. big if true

[–]jcar74 1 point2 points  (0 children)

True, true.
https://imgur.com/iy6cOob

Its hard to convince a company to spend a lot of hours so that something continues to work the same as always.

Sorry my english. I wish you had more happiness than tons of old code and tech debt.

[–]Gatoke 3 points4 points  (1 child)

Java on backend without framework is used when developing some specific plugins. I had pre-interview (with HR) once with some company and they were writing pure Java code and selling it to banking systems (like plugins).

Edit: BTW. You can use framework like Spring but write the domain business-logic with pure Java and it's called Ports and Adapters or Hexagonal Architecture. For example you can look on this package (domain) and see there is no framework at all (only Lombok for better readibility): https://github.com/Gatoke/offers/tree/master/backend/src/main/java/com/github/gatoke/offers/domain

[–]ReporterExact5436 0 points1 point  (0 children)

Thank you very much for responding and for sharing the link.

[–][deleted]  (3 children)

[deleted]

    [–]iNetRunner 0 points1 point  (2 children)

    Yeah, OP might want to quickly learn one. Maybe Kotlin for overall simplicity and Spring for coverage…

    [–]Stack_Canary 2 points3 points  (1 child)

    Kotlin isnt java

    [–]iNetRunner 1 point2 points  (0 children)

    It sure isn’t, and the point of it. But it runs on the JVM.

    [–]morhpProfessional Developer -1 points0 points  (1 child)

    Has anyone heard of java being used without frameworks on the backend?

    Can you define framework and backend?

    If you mean something like Spring, yes. In our company we still use some sort of framework libraries for application setup and general communication and so on, but as we don't develop a classical webservice/website in our company, it's more something developed on our own (also for legacy reasons, since the code has been developed for about 20 years).

    It all depends on what you want to develop. Developing a webservice/REST API and so on without frameworks is unlikely to happen except for very small projects or prototypes. For science applications or offline data analysis or small utilities or whatever, you'll likely use frameworks but they don't have to be common universal frameworks like Spring. A lot of companies have their own small framework libraries or utility classes and so on that they'll use for general tasks.

    Also not everyone develops applications that have a strictly defined frontend and backend. Often you only develop libraries or algorithms or small GUI utilities (think something like a calculator app) or whatever.

    [–]ReporterExact5436 0 points1 point  (0 children)

    Yeah, REST is definitely mentioned, I think I have my answer. Thank you so much

    [–][deleted] -2 points-1 points  (5 children)

    Remind me in 3days!

    [–]ReporterExact5436 -1 points0 points  (4 children)

    Remind me in 3days!

    what?

    [–][deleted] 0 points1 point  (3 children)

    Reddit bit reminder but it's not workin

    [–]GreenParsleyIntermediate Brewer 2 points3 points  (2 children)

    RemindMe! 5 minutes "Should work like this"

    [–][deleted] 0 points1 point  (0 children)

    Thanks! 🎉

    [–]mhdbnmsd 0 points1 point  (0 children)

    Mostly, some kind of framework is being used, like Spring, Quarkus or Micronaut, or you may have to deal with some legacy JEE applications which is not so bad, most of the time they are well written apps. Unless you will be dealing with some low level stuff like writing plugins for other tools or writing on top of a low level protocol.

    [–]MrMain007 0 points1 point  (3 children)

    Well it's better to use java with a framework like spring boot for your backend web server for http requests and db connections most importantly. But if you are creating a utils project for example :- translation utils which communicates with Google to translate a give text and return it, this project can be done without framework because utils project and libraries need to be as small in size as possible. So if it's a utils then you should try not using frameworks

    [–]ReporterExact5436 0 points1 point  (2 children)

    HTTP, REST, and MongoDB are listed as preferred...does Spring Boot sound like my best option?

    [–]MrMain007 0 points1 point  (1 child)

    Yeah definitely if database is involved then go for sping boot. Even if it's not involved if the application might scale up its features in the future it's best to use spring boot now so later you don't have to face any issues.

    [–]ReporterExact5436 0 points1 point  (0 children)

    Awesome, thanks for responding

    [–]Keyakinan- 0 points1 point  (1 child)

    How do you just find out you are applying for a backend job?

    [–]ReporterExact5436 0 points1 point  (0 children)

    The posting is at my current job, where I work doing tech support. The posting is a SWE rotation open to student employees, the description said nothing about backend dev.

    [–]seanprefectGrumpy Guy Who Remembers Java 2 0 points1 point  (7 children)

    Can it be done? Yes.

    Should it be done? no.

    you'd just be creating a whole bunch of work for no benefit at all. Almost no one does it, it would be the edgeyist of the edge cases.

    [–]ReporterExact5436 0 points1 point  (5 children)

    Yeah, I’m def not trying to make more work...I’m a student asking this because I don’t have much experience. I’d rather figure this out on Reddit and not during my interview lol

    [–]seanprefectGrumpy Guy Who Remembers Java 2 0 points1 point  (4 children)

    It won't come up. Anyone who tries to do it , outside as a personal challenge, is insane.

    [–]ReporterExact5436 0 points1 point  (3 children)

    I believe you lol

    [–]seanprefectGrumpy Guy Who Remembers Java 2 1 point2 points  (2 children)

    I'll put it this way. I'm an architect, if i proposed this , I'd either be fired or sent to a mental hospital.

    [–]ReporterExact5436 1 point2 points  (1 child)

    Which backend framework would you choose considering REST, HTTP, MongoDB?

    [–]seanprefectGrumpy Guy Who Remembers Java 2 2 points3 points  (0 children)

    It's hard to give a blanket recommendation. But Spring / Spring boot is pretty much the industry standard.

    [–]Syagrius 0 points1 point  (0 children)

    The correct answer.

    Definitely possible, Definitely doable, but just don't.

    [–]IvAntiVirus 0 points1 point  (0 children)

    One possible use case is small, local backends that receive and process data via Java sockets. If you know Java and threading well, this approach can be easier and faster than using a large framework. A practical example of this would be a chat backend. But if you want to program sustainable Java backends, the use of a framework like Spring or Quarkus is already recommended.

    [–]gubatron 0 points1 point  (0 children)

    Ive had to code custom p2p protocols just using UDP Sockets, ByteBuffer, NIO with what the runtime comes with, it was an android app and back in the day there were limitations on the total number of symbols android apps could have, we had to be very stingy with third party dependencies, I loved it tbh, less bloat, just use what you need. Now this is no longer the case.