Java Web Framework

VG008

Senior Member
Joined
Dec 9, 2010
Messages
803
Reaction score
41
Location
Johannesburg
Hi Guys

I need some advise on a Java web development framework.

Currently our company is using PHP for development, but we want to move away from PHP for various reasons.
One of the problems we want to address is the slow roll out of websites/changes, since the development team has to code most UI functionality from scratch .

Our requirements are:
1. Rapid web development
2. Framework that is stable, offers a lot of built in functionality and giving the developer flexibility when needed
3. Light weight
4. Built in security components
5. Open source
6. MVC Architecture

Thus far I've received recommendations to use Spring or JSF with Prime faces.

Now, prime faces looks very appealing since it has drag and drop components. However prime faces is a UI framework only, so I will still need a framework for middleware & backend server stuff.

On the prime faces website (http://www.primefaces.org/whyprimefaces.html), it does state that prime faces can be used with Spring, however is this a good architecture? I read that spring is a request-based framework and prime faces is a component based framework.

Any help is much appreciated!

On a side note, I've noticed the following South African websites use JSP. I guess they are using it for a reason. Better frameworks available?

FNB
Ebucks
Discovery
Absa
Standard Bank
Kalahari
 
Spring MVC using JSPs and apache tiles /end thread




It satisfies all your requirements, except no 4. But this is a good thing. Security has nothing to do with web apps, and comes in many flavors depending on your needs. Having a web framework dictate your security is a bad thing. Luckily spring MVC seamlessly integrates with spring security.

What exactly does "code most ui functionality from scratch" mean?

Drag and drop / RAD "HTML" has no place in the real world

DO NOT go down the faces route


Your biggest challenge however is going to move php devs to java. They will thank you in the long run though.
Deployments and deployment environments are also drastically different. There is no "just replace this file on the live server to fix bug X"
 
Last edited:
Thanks, will look into apache tiles.

What exactly does "code most ui functionality from scratch" mean?

Drag and drop / RAD "HTML" has no place in the real world

DO NOT go down the faces route

We don't require drag & drop HTML, but certain components that are prebuilt and reusable.
For instance, it took a lot more effort for us to develop a light box 'page' compared to the code available on prime faces (http://www.primefaces.org/showcase/ui/lightBox.jsf)

DO NOT go down the faces route
Any reason why?
 
Biggest challenge you will have is getting PHP developers to think in OO and re-use. You need to make sure that you have at least one very experienced/seasoned Java developer/architect with a ton of hands-on experience in your team, otherwise your PHP-to-Java migration will fail miserably (and you will only notice it in 8-12 months when you need to start scaling).
 
Biggest challenge you will have is getting PHP developers to think in OO and re-use. You need to make sure that you have at least one very experienced/seasoned Java developer/architect with a ton of hands-on experience in your team, otherwise your PHP-to-Java migration will fail miserably (and you will only notice it in 8-12 months when you need to start scaling).

Currently the developers are using OO design. Initially we are not migrating our existing system to java.
This project is more of R&D, but if we can pull it off we will most likely hire a senior java dev.
 
Thanks, will look into apache tiles.



We don't require drag & drop HTML, but certain components that are prebuilt and reusable.
For instance, it took a lot more effort for us to develop a light box 'page' compared to the code available on prime faces (http://www.primefaces.org/showcase/ui/lightBox.jsf)


Any reason why?

As an experiment, get a designer to make a HTML/css page layout. Then take that, and attempt to use it with JSF :)


Everything that JSF gives you, can be implemented faster, more readable, and more flexible using JSP/JSTL/HTML and things like bootstrap or jqueryui
 
Currently the developers are using OO design. Initially we are not migrating our existing system to java.
This project is more of R&D, but if we can pull it off we will most likely hire a senior java dev.

I always LOL when OO and PHP are used in the same sentence - a constant office debate I have and I am a PHP developer. Currently studying as well so have the constant frustration of lack of true OO support in PHP.

Those devs are going to have a step uphill and a lot of egos will be destroyed.

But if the guys are reinventing the wheel with PHP, they will do the same in Java regardless of the tools they are given.

(Oh, and I'm looking at switching to Java development so I'm not dismissing your intentions)
 
I always LOL when OO and PHP are used in the same sentence - a constant office debate I have and I am a PHP developer. Currently studying as well so have the constant frustration of lack of true OO support in PHP.

I sadly agree with it. Don't get me wrong, the level of re-use people produce with PHP is great, but it's far from OO. If the whole team has not experienced any production-class Java implementation (i.e. running a web-app on Tomcat - irrespective of the framework used), I predict that it will be a steep learning curve with plenty of mistakes and time wasted. You will be better off (if this direction is strategic for the company) to start off with a very good Java developer (he/she needs to be a team-lead) - you will struggle to find people of that calibre (and more so will be shocked about salary expectations even for the most mediocre skill set).

If you do Java right, you will produce a very robust and scalable stack of applications. If you do it wrong, your back-end systems will be flooded, you will re-invent everything, your performance will be poor and you will have security issues all over your app.
 
I predict that it will be a steep learning curve with plenty of mistakes and time wasted. You will be better off (if this direction is strategic for the company) to start off with a very good Java developer (he/she needs to be a team-lead) - you will struggle to find people of that calibre (and more so will be shocked about salary expectations even for the most mediocre skill set).

I agree with you. Currently we are just researching the possibilities. If we decided to switch over, we will hire a few java developers. Currently the web team is very small, so this will be a good opportunity to expand the team.
 
I agree with you. Currently we are just researching the possibilities. If we decided to switch over, we will hire a few java developers. Currently the web team is very small, so this will be a good opportunity to expand the team.

My suggestion is to look at a high-level Java setup like this: CentOS with Varnish fronting a number of HTTP servers fronting Tomcat. Look at a caching technology (such as EhCache) and lean towards a web-framework such as Struts. Hibernate is great if you know what you are doing (for performance reasons I personally prefer the "handcrafted" data-layer we implemented). Plan for RBAC (role-based access control) from the beginning - this should cover not just authentication but also authorisation.

Avoid EJBs or any overengineered mechanism for persistence or messaging. Design your application/transactional system to be completely stateless (i.e. you can cluster and load-balance, but you don't rely on sticky sessions or user sessions). Look at performance tooling such as New Relic (very cheap and very good) to spot issues quickly.

Don't waste time on doing your own CSS/theme. There are some great responsive themes available (like this one).

Seeing that you are in Joburg, no problem to bounce off some ideas over coffee if you want to (although my current schedule is quite hectic due to some unforeseen legal issues :whistle:)
 
I would be interested to know who in their right mind would choose to use struts over spring mvc :)
 
Last edited:
Thanks dude, much appreciated! I will look into the technologies you suggested.

We were looking into Glass fish instead of Tom cat. What is your take on this?

tomcat is the worlds most used java webapp container for a reason. performance performance performance. and ease of config
 
Thanks dude, much appreciated! I will look into the technologies you suggested.

We were looking into Glass fish instead of Tom cat. What is your take on this?

Glassfish = Oracle. Enough said. Although it's free/opensource, Oracle has already commercialised it with the commercial supported version being Oracle Glassfish Server. I honestly do not have any hands-on experience with Glassfish, but can tell you that our Tomcat installation (highly optimised but follows on a high-level the patterns I described above) beats uptime and throughput of installations at Vodacom or FNB (in both cases I have 1st hand experience) at almost zero cost.

BTW: For the "rebels" - ditch MySQL (as it is managed in a similar fashion by Oracle as Glassfish) and go with MariaDB (or Postgress) or any NoSQL database....

If you can, go cloud (Rackspace or AWS) but be aware that if international bandwidth breaks (which happens often in SA) your customers will not be able to access your services.
 
I would be interested to know who in their right mind would choose to use struts over spring mvc :)

Going to throw in a spanner: If the dev team is already doing PHP, wouldn't the transition to Ruby on Rails be easier than Java and yet still achieve the same benefits? I would think that ROR/PHP developers would be easier (and more cost-effective to source) over Java.
 
Going to throw in a spanner: If the dev team is already doing PHP, wouldn't the transition to Ruby on Rails be easier than Java and yet still achieve the same benefits? I would think that ROR/PHP developers would be easier (and more cost-effective to source) over Java.

I honestly dont have any ROR experience, but from what I have seen, it seems it would be more "similar", from a PHP -> Other point of view. Maybe semaphore could comment.

moving from PHP to anything would be a plus in my books :D
 
When I started reading this thread, I was also wondering why you are not considering Rails. When I got to the bottom, I see MagicDude has suggested that. :)
 
Thanks, but long term I think java will be better off.

One of our sister companies are developing there transactional systems in Java, and we might integrate with them if all goes well, so I think java will be better.
 
Top
Sign up to the MyBroadband newsletter
X