I want to preface all of this by saying I'm a pretty new developer. If there's any clarification needed because my question is not preicse enough I'll gladly provide!
So as part of my current education we're doing something they call pop-up internship where you go to visit a company for a day or two and run through a couple different departments to get a feel for how different companies might tackle some of the daily tasks they encounter.
One company in particular had an app in development that really got me interested. They were building a web application for one of their customers based on the Angular framework from what I understand. The backend/serverside code was written in Java. The interesting part is that they used some way to turn the expoted Java-WAR into a file they would include in the Angular project. This allowed them to call methods from that service and, what was the most interesting to me, the classes for the project were only defined in that Java code yet perfectly usable in that Angular code. I saw some kind of service URL in the code which I assume is somehow being used to make the actual calls in some way.
Unfortunately I wasn't able to dig deep enough/get into the deeper questions I had regarding the whole procedure.
I don't have any experience with Java, writing mostly little PHP and C# applications so far so I wondered - is a model like this possible to set up with Angular and PHP? If yes, where do I need to look in terms of guidance to set something like that up with my Angular project? What are some key things I need to know before tackling something like this? Is it even worth doing like that?
There's a lot floating in my head right now regarding this because this is kinda exciting to me, any and all help would be greatly appreciated
Top comments (2)
You can make it with Swagger :
First, you have to find a library to document your API with Swagger.
Then you can download a "swagger.json" who describe your API. Import this file in the Swagger Editor (File > Import File) and then on Generate Client select Javascript.
You can also automate this with Swagger Code Gen
P.S : Instead of Swagger, you can make the same with GraphQL, OData ...