When and when not to use webservices? [closed] - java

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
we are creating an appraisal system ,in which there will be a no. of validations and computations. Team leader decided to use web services for most of their logic ,which we are going to write.
I am just curious ,when we can moreover when we should web services and when we should avoid using it?

The team leader decided to use web services for most of their logic.
I would not advise putting the logic in web service code. Put it in a business logic layer, that can then be exposed via, for example, web services.
When should web services not be used?
When they are unncessary - without a specific scenario it's difficult to give a more meaningful answer.

Avoid using web services for method invocations that can be resolved locally (on the same JVM). Otherwise, use them.

Web services are the best/easiest way to do distributed operations. For example central server and many clients. If you have that sort of architecture then you need either web services or a web application.
If everything is stand-alone and local though then you don't need them and they will be less efficient than just doing things directly.

Web services and web application..
web services provide a standard means of interoperating between software applications.
When all major platforms could access the Web using Web browsers, different platforms couldn't interact. For these platforms to work together, Web-applications were developed.

Related

Best practices to build a hybrid Java application for both mobile and Web [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
We need to build a hybrid Java application for both mobile and Web. We plan to use Spring MVC and React Native.
Could you please advise us the best practices so that we can re-use the code as much as possible for both mobile and Web and it should be easy to maintain.
Should we build a common service layer and two different controllers for Web and mobile (using #Controller and #RestController). After that, these two controllers can call the same service.
For example, to display the information of all users of our application, we can have a common service UserInfoService, then we create two different controllers WebUseInforController (with path like /web/users/info) and MobileUserInfoController (with path like /mobile/users/info). These two controllers call the same UserInfoService. Is this a good idea?
Thanks a lot.
It all depends on your client requirement but I can suggest you some ways that may be helpful for you:
I worked on an enterprise financial application, on that application we follow the approach that we created a single server side (in your context single controller). That server side was used by by web application as well as android application. You can create services oriented or micro services application and expose your different services that will be reused in both android as well as web application.
**Web Application -----------> |Server side| <--------- Android Mobile Application**
Best Practise is that you should have a single server side and expose your services
And nevertheless there is another less economical and fast option as well:
You can go for web progressive applications. Progressive web apps are websites that look and feel like an app. This means users can access all information and capabilities without downloading a mobile app. Some big giants converted there applications into WPA e.g Ali Express, FlipKart, Twitter Lite, BookMyShow, Forbes and many more.
In the web progressive application you can follow any WEB architecture you want. You can even create an android application by using that website link in android. or that Application will work perfect in mobile browser as well.

System architecture : design considerations. Java vs Django vs RoR [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 6 years ago.
Improve this question
I'd like to designing new web application with few requirements and considering which language/framework I should choose.
Requirements:
Web based solution (web UI and backed)
Fast deployment and setup <- by this I mean just run by single command,
no configuration needed for total beginner. Similar to
Jenkins
java -jar jenkins.war
or Gerrit.
Some kind of que to run tasks asynchronously.
No code protection
Due to the fact that I want to be simple to run and deploy (without initial configuration needed) I am considering using Java EE/Spring framework.
Initially I was considering Django or RoR since deploy is pretty easy and development is way faster than Java but those
frameworks need some kind of scheduling framework like Celery + some kind of broker so additional configuration is needed.
I am not limited to any language,(besides PHP since I just do not like it :P)
If any of you have any thoughts about my design and want to share let's do it.
Thanks a lot for any kind of question/ answers.
It is a very open question and there is really no right answer for it. Rails is really great framework for web development, there are gems basically for everything but deployment is not as straightforward as java -jar and also it does not shine that much when you have SPA on the frontend.
If you're planning to build Single Page Application with one of the modern frameworks you may want to consider Spring Boot. Main benefits:
very ops friendly (java -jar), metrics, health checks
whole application config just in one file
great MVC framework for exposing REST endpoints
implementing tasks running in background is trivial.
few programming languages to choose from: Java, Groovy, Kotlin.
Grails 3 looks also promising but since I haven't used it yet I can only suggest having a look.

UI recommendation in Netbeans for a Maven web application [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 8 years ago.
Improve this question
I've always been a backend C/C++ developer. Working on a Java project (Netbeans), and I am trying to figure out how to do the front-end/UI. While I am a pretty good back-end dev, I haven't really been keeping up with the latest and greatest in frameworks, etc. for the front-end.
The Java back-end component can communicate with JSON over websockets. I am trying to figure out what front-end framework I should use. I also don't want to recreate my project, and would just like to add to my current Maven web application project.
So what's the verdict? What's hip and cool these days? HTML5? JQueryUI? (are they even mutually exclusive?)
Should also mention that I just want to make a quick UI, b/c I am planning on handing off the task to another programmer for a "proper" front-end component later on. At the same time, I do want my version to be "decent". So, in a nutshell, I want something that is easy to use, but still capable.
Thanks!
Assuming this a web app, Angular is getting popular and Bootstrap has been popular for a while. Use pre-built templates you can find for free or at a site like http://themeforest.net . Don't waste your time trying to code your own, unless its super simple.
You probably want to also think about how the backend will communicate with the front if you haven't already. For example, will it use Servlets, or a framework like Spring Roo? You can also build the front in a completely different language, like PHP, as PHP outsourcing is cheaper and easier to find than Java . PHP is a server side language like Java, but I'm talking about a situation where the website's backend communicates with the java backend via an API or sharing a DB. PHP has many MVC frameworks such as Symfony and Laravel.

Vaadin consuming REST and performance [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 8 years ago.
Improve this question
I have one question about how to construct app with vaadin and rest to gain good performace and scalability. I want to make rest api as a business layer and vaadin as ui for web. Ive made this decision cause my app will be also available as standalone version and on mobile os (ios and android). For me this idea is good if we are speaking about scalability but what about performance. Lets take about 5 thousand concurrent users for example.
I want to know general data about performance and will it be good for a lot of concurrent users. Only vaadin is hard to gain good performance with a lot of concurrent users (cause anyway almost all the code is running on the server). And if we also add rest api for any vaadin operation inside im scared that i will gain fatal combo.
Of course vaadin and rest api are located on the same server.
What do you think about it? Thanks a lot for answers.
I don't think it is a good idea, as Vaadin is a server side framework, so every action you do goes to the server, and from there on it has to make another rest service call to another server from where you have to get data and render it. I would rater suggest you to try some client side frameworks like ExtJS, Jquery, Angular JS, GWT etc... You render your UI on the client side using these frameworks and any action which requires data ops like fetching data or perform transactions you can make a rest service call to the server side. Using this approach you can avoid another redirection.
Now a days you the concept of RWD is getting popular, I think this would be a great choice for your use case. Build once deploy on any device :)
BTW, this is purely my opinion.

JAVA EE web application and big traffic [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 8 years ago.
Improve this question
I choose java to make my web application with maven + hibernate + spring MVC + apache tomcat server (Java EE).
My web application will have many users and many visitors every day.
But my friend told me that web application with java don't support a lot of connections and it's made just for Intranet and business application with network within an organization.
So is it true apache tomcat can't handle all that traffic ?
i'm not looking for who is the best between java, php and .NET i want just know if web application with java can handle a big traffic ?
also explain me if there is some other negative points of using java and apache tomcat server.
The Java based technology stack you describe is extremely scalable, if you want it to be, and I would have no worries about using it for high traffic applications.
You may want to look at distributed hosting and load balancing, to make things more reliable. Lots of high traffic applications use Java and Spring stacks.
using plain old jsp/servlets are faster than spring and hibernate because spring or hibernate have a middle tier with classes which renders the page slowly and takes more memory at the server.
For production environs with huge scale applications you will end up writing plain jsp/servlets as they are a breeze to write and maintain.
Also i would like to add that struts library(jar file) had some security vulnerabilities in late 2013 only. Stay away from Struts and Spring.
People may be down voting but there is truth behind what i have actually experienced.

Categories

Resources