tags:

views:

102

answers:

5

i observed that generally all good CMS, forums and portals are written in PHP only. Some of them are written with the help of python, ruby etc.

Some of the CMS which were build in Java, were not so flexible as wordpress is. Is JAVA(J2EE) not good for building a wordpress like CMS?

A: 

As always, it depends :)

An advantage of PHP is that it is available on a lot of web servers and quite "simple" to program. Also, it was designed with the intent of being integrated into web sites.

In principle, you could do this with Java as well, either with JavaScript (which really doesn't have too much to do with Java...) or as an Applet. The important difference is that applets are run on the client side, so when you actually want to manage content it would be on the wrong end, and you'd have to think about how to authenticate etc.

Lagerbaer
i think applet work can be done using advanced javascript frameworks like jquery. And Java support is available on simple shared hosting servers even.
articlestack
+3  A: 

i observed that generally all good CMS, forums and portals are written in PHP only.

That's a broad generalization. Case in point: one of the most widely-used CMS systems in the world is Microsoft SharePoint, written mainly in .Net/SQL Server.

To your specific question, PHP has a great community around it and lends itself to rapid application development. Technically, Java is arguably better structured and more object-oriented, but in my experience there is a higher bar to entry.

Ultimately, it comes down to what you are comfortable with and the specific requirements of your application.

Tim
It's also traditionally been much harder to find Java web hosting, more expensive too, so less attractive for a 'personal' CMS than PHP on the cost front.
Brabster
@Brabster - totally agree. PHP is also much more 'plug and play' from an install and maintenance perspective, i.e. I would MUCH rather support a basic PHP environment than a J2EE environment.
Tim
articlestack
+4  A: 

Facebook, portals and forums use PHP. Banks and flight ticket reservation systems use Java. I think it pretty much summarizes their difference.

With amusement applications, it's important to get things done quickly and easily, and some dirtiness is acceptable. With real business, robustness, security and clarity are the primary goals, overriding the ease of getting things done quickly.

Joonas Pulakka
+1 for a good observation. I also think it's related to how quickly a business can change. For a while, Java/Oracle was one of the only viable options for enterprise business applications, and many organizations have never found the value in moving to anything else.
Tim
if we talk about security, ofcourse Java is best. even i had worked for banks and some other systems.
articlestack
+1  A: 

I think the primary reason is that many CMS's have grown from an initial small implementation instead of being designed from the start to be able to be big.

Small implementations are nice and easy to do in PHP or other scripting languages, and you can grow them pretty big, but if you know up front that you want something big you make it part of the original specification.

These days most people agree that you need a strong, fast, scalable runtime system where the major contenders these days are the JVM and the .NET runtime.

When you have made THAT decision, PHP is not the immediate, intuitive choice for a big scalable system.

Thorbjørn Ravn Andersen
What language will you suggest, if i think to redesign stackexchange?
articlestack
redesign or reimplement?
Thorbjørn Ravn Andersen
+1  A: 

For an example of a fully-featured CMS written in Java, take a look at Alfresco.

Michael Borgwardt
Alfresco is positioned as an ECM system rather than a CMS and the web content management module is much weaker than the document managements parts. That said, a JCR implementation, like the one used by Alfresco, is an excellent foundation for a CMS.
Nils Weinander