From . NET to Java, what technologies or frameworks do you use?

Asked

Viewed 205 times

5

I currently have a . NET-based work infrastructure with Angular JS and a possibility of a new project using Java has emerged.

With . NET I use the following technologies:

ASP.NET Identity
Used for authentication and authorization. Management of access users with roles.

ASP.NET Web API
A REST layer that is consumed by an HTML5 client with Angular JS, with ASP.NET Identity-based authentication and authorization features.

ASP.NET Web Pages
How the client-side uses Angular JS instead of generating templates using . html (pure) that would not allow using any server-side preprocessing, I chose to use . cshtml (web pages) that makes it possible to do checks like this:

<div>
    @if (User.IsInRole("admin")) { 
        <a href="/api/emp/excluir/5">Excluir</a> 
    }
</div>

That is, if the logged-in user does not have privileged information, or certain parts of the template, will never be sent to the browser. This is necessary to increase safety.

As the Java world has a multitude of frameworks available for the most diverse needs, which technologies in Java could be used to maintain a similar architecture?

2 answers

4

My suggestion is this: As of version 2.5.0 the Demoiselle Framework facilitates the use of an architecture quite similar to the one you commented. Reference guide

If you already work with Apache-Maven, you can use the Demoiselle-html-Rest archetype to generate an example application.

Imagem da seleção do arquétipo demoiselle

  • thanks for the tip, I’ll keep the question open because I’ll still decide ...

  • ok. if you need help developing the solution in the framework I suggested, use the Demoiselle tag when asking the questions here in stackoverflow. The project community also offers a free distance learning (EAD) course with tutoring through the Moodle platform. https://moodle.ead.serpro.gov.br/blocks/course_catalog/guia_aluno.php?exibe=c&org=2&categoria=2220&url=

2

Authentication & Authorization

You can use JAAS which has its own specification, however, its configurations usually change from supplier (implementer) to supplier. If you want to leave the pattern, you can use Spring Security, it is easier to use, easier to understand and more flexible.

View

You can use JSP primitives that fit the scenario you mentioned, or, if you have to use templates, you can use the Tiles that makes the job a lot easier (I would say it’s a JSP++)

REST

You can use JAX-RS which is a standard in java, we have as an example the Resteasy of Jboss or even the Jersey (reference implementation).

The advantage of all these technologies, is that they all manage to integrate and are already well accepted in the market.

  • thanks for the tip, I’ll keep the question open by enqto, but already gave me a good idea of where to start

  • Wouldn’t it be better to make an app on the technologies you already have domain ? I believe angular + . net should do an excellent job, maybe switch to angular + java is just more of the same :o)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.