• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Android application server side

Redan

Lurker
Dec 2, 2016
5
1
Hi ,
I am developing a social-network android application, and i am a little bit confused an which server side framework to use.

I prefer to use the Java programming language because i already have some experience on developing using this programming language ( and i don't have enough time to master another one) .

So, i started learning some tutorials explaining the Spring MVC framework.

My question is :
Is it a good choice to have Spring MVC as the server side for my application ?
what are the prods and cons of using it ?

and if it is not a good choice, what other Java frameworks can i use ?

NOTE : It is very important to me to have the ability to implement a group-chat feature in the application (A real-time chat room) .
 
Spring MVC is an excellent choice of web framework. It's used in the majority of commercial web applications, and is the de facto standard. There's a good reason for that - it has an excellent architecture, and virtually ensures that your application code will have a good structure.
Spring MVC itself is just part of the Spring Framework. There are many other aspects which you are able to utilise. For example, if your application needs a database layer, then most of the standard database technologies link into the Spring Framework e.g. Hibernate.

As for alternatives, there are many. Web frameworks tend to spring up everywhere these days. We use something called Wicket. It's a very nice framework, taking the approach of a purely Java driven perspective. It virtually frees the developer from having to write Javascript, and the HTML is minimal too. It's great for constructing dynamic web pages and AJAX. As you can imagine, it's doing an awful lot of work for you in the background, by writing HTML and Javascript for you. Unfortunately this framework has nowhere near the uptake of Spring, and there is far less community support for it.
But if your application is suited to it, then Wicket could be a very good choice, if you want to focus mainly on the Java side. It's probably unique in its approach. I've not come across any other web framework where the developer can drive just about everything with Java code.

https://wicket.apache.org/

Other frameworks include:-

Apache Struts - Another good one, using a layered architectural approach, similar to Spring MVC, but not quite as good, although Struts2 is a big improvement.

GWT - Google's offering is also a good web framework, but I've not used this much

AWS - Amazon web services, might be worth looking into. I've investigated this a little bit and it seemed to be very good

In fact, if you just Google 'java web frameworks' it gives you some idea of the number of solutions available. But there's only so many hours in the day, and you can't try them all!

However if I was building a new web application now from scratch, I'd use Spring MVC. In my experience it's the best web framework out there. The pros are that your code has a good architecture, right out of the box. It's more or less perfect. but if there is a downside, it's that the learning curve could be a bit steep, as if you've not used Spring before, there are certain foundation concepts that you need to grasp, dependency injection being probably *the* most important. But if you can get the basics, it's well worth the effort.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones