Web application achitecture [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I've to rebuild a swing based application to move it to a web environment. This application has some functionalities that already exist in another web application. I want them both to maintain the same functionalities, even those that are shared, but I don't want duplicated code.
In terms of architecture/technologies, what is the best approach to reuse as much code as I can? A third service-oriented application that controls all the business logic and have the web applications serve only as front-end? But how to avoid code duplication on the front-end?
Any feedback will be much appreciated.

very broad question so it's hard to give exact solution. think about separating common functionality as a different service. then both application can just redirect to it or use its api.
if that's not an option then try to separate that logic to a library that will be included in other application. good frontend frameworks allow you to do it also with frontend code (directives, plugins, validators etc)

You could work with dependencies transforming the common utilities, access data and business rules in libraries. In first moment you can make a refactor separating tiers and responsibilities and then you can incorporate Maven in you environment to generate and start to work with dependencies.

Related

React for a Web Development Over Alternative [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
Can someone explain why is React so popular?
My understanding is that it helps with the V part of MVC design pattern for apps and is useful as its JS so can be used for UI perhaps in general.
Why would it be better than SPA (not sure I get what this means exactly, i.e. just using Javascript? - Real technical advantages of React Native over Web)
Also, it was created by Facebook so perhaps there is added benefit/functionality through that (if anyone can provide specifics that would help.
But what are the specific technical advantages/efficiencies about React is so advantageous and helpful to developers?
As an example, say I work for a bank and am designing a bank account app - how would React be useful over an alternative?
So it basically depends upon what type of application you are making . Few benefits that I found with react are:
It is based on the concept of virtual dom (main benefit of it): you can read more abt it from https://reactjs.org/docs/faq-internals.html
Easy to learn as mostly it is javascript, ES6 compared to Angular latest versions
Good community support
However, React alone is of no good use for big applications. So ultimately you have to use some state management tool like redux/ flux with it

Need design guidance to develope java spring hibernate web application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to create java web based application using Spring-Hibernate. I know its not difficult to implement the functionality, but i need some help/guidance from the architecture perspective. Can any one suggest me the best design which will cover interfaces,design patterns etc.
Also need which version should i use of spring and hibernate.
The best way to start implementing a web application using the technologies you mentioned is to follow a tutorial from the large variety of tutorials you can find using google.
Another good option is to find a skeleton for an application that someone has created and shared in a source code sharing service like github or bitbucket (check the licenses also). You can check-out the code and have an initial working example you can work on and expand.
If something does not work during these attempts, then please come back here, search if your question is already asked by someone else, and if not place your question with specific code snippets and error messages you may get.
If everything works well and you need advices on different ways to improve performance, your architecture and the software patterns, then come back here also with a specific question, or in some cases you will find codereview more suitable for this kind of questions.
Good luck!

How to organize or structure classes in Java? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am a PHP web developer, organising my source code with MVC where all the web pages are in the Views, the business logics are in the Models, and Controllers handles users' requests, pass the right models to the right views. I am starting working with Java. What I know so far is BCE, which is similar to MVC. B (Boundary) contains GUIs, C (Controllers) and E (Entity contains all the models and models can represent database tables).
How to organise source code in Java, comparing to MVC in PHP? Is the following answer correct to this question?
In Java, source code be organised in layers:
- presentation layer
- service layer
- data access layer
Is organising source code about system architectures?
Organising code is about software architecture and doesn't depend on the language. That said MVC, layers, service orientation, micro services etc. are all viable architectures and the choice would depend on your needs/projects.
As with everything there's often no single correct way so start with what you feel most comfortable with. When you gain more experience you'll probably see room for improvement but I'd suggest to start simple and learn on the way.
As for package structure: you'd normally map one aspect of your architecture to packages which could be subsystems, features, layers, etc. Again the choice depends on your preference, project and needs. At work we are using feature/module + layer but that's just one way that works for us.
The MVC structure is also a viable organization of your classes in java.
You can also use the SOA architecture for multi-tier Services-oriented applications. In fact, the choice really depends on your need.

Designing multi module Java EE application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Might be my question is abstract or out of context, but i am asking here since i have little idea how this happens.
I am wondering how big application/ platform break down there application in to multiple module and how they able to manage modules dependencies.
For example in some E-commerce application they tend to break down it in various modules like pricing,promotions,shipping.import/export and many more.
when we develop those application we hardly think about the underlying modules and how they have been designed to provides functionalists.
Most of those module are not web-applications but are standalone module and not deployed in the web-app as jar files.
can any one help me to understand how they break up things or is there any standard way to do this.any help/resources to get insight will really be helpful
E-commerce application [...] tend to break down [the application] in various modules
like pricing,promotions,shipping.import/export and many more.
[...]
Can any one help me to understand how they break up things or is there
any standard way to do this.
There are various ways from the technology point of view to modularize applications. Large systems are split into modules that must communicate with each others, and there are various technologies to do so: EJB, web service, libraries, database, file system, message queues, etc. It's way to vague to be answered.
In practice applications ten to be modularized according to the social structure of the company. This is Conway's law. Since pricing, promotions, shipping are usually different teams within the organizations, chances are that each team will have an engineering group, and the system will be modularized according to the organizational teams.
Try looking at the various maven archetypes available out there.
for example: http://appfuse.org/display/APF/Home
You can package many EJB jar archives within an EAR archive.

Authorization engine in java [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
In the course of my work i need to develop an authorization engine ( i'm already authenticated and i check access of a user to an action ) in order to store all the authorization logic inside a same place and be able to reuse it and i have created the mini library.
http://github.com/eltados/canny
what do you think about it?
Is there any lightweight Authorization engine library i could have a look at?
I'd use Spring Security before I developed anything of my own. Authorization and authentication are cross-cutting concerns. Spring properly puts them in aspects that you can configure down to the method level.
I only had a brief look and was wondering whether you had considered the following questions:
I'm not a fan of using a static attribute to store the Authorisation object and all the rules, this could lead to problems in clustered environments or when multiple applications share an appserver (I'm thinking shared classloader problems with JBoss here)
The canny engine provides no out-of-the-box functionality for dynamically accessing authorisation stores. As far as I can tell in order to get user/permission information from LDAP or a database, a custom rule needs to be created.
I'm not sure whether having the definitions of the rules in code is the best place, as it will mean having to rewrite/rebuild/redeploy code to change the rules.
Note, maybe I have misunderstood some of the concerns, but the readme and test classes were a little bit sparse.
Personally, Spring Security has been my Authentication/Authorisation framework of choice.
Hope that helps.
Three years later... You want to use XACML and a XACML authorization engine. There are open-source alternatives (WSO2, Heras AF, Sun XACML) and vendors alternatives (Axiomatics, IBM...).
Disclaimer: I work for Axiomatics.
Our solution can be an authorization service or used as a library you embed within your application - see more at http://www.axiomatics.com/

Categories