• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Is it possible to write Java code in Wordpress?

 
Ranch Hand
Posts: 109
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know it's possible to program javascript into a wordpress website. However, I only learned Java and I have a website where I teach Romanian. I want to create my own chatroom but there are a few things that bug me.
1. I read somewhere on this forum that servlets are no longer being used. Is this true and why?
2. The code will be deleted/messed up each time there is an update to the theme for some reason.
3. Maybe it's not as easy to create a chatroom than it is to just do it in Javascript?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know about WordPress and Java. However:

Sergiu Dobozi wrote:1. I read somewhere on this forum that servlets are no longer being used. Is this true and why?


No, this is not true. Applets are obsolete. Applets are small Java programs that run on the client side (in a browser) on a web page. They were what made Java cool in 1997, because at that time the World Wide Web consisted mostly of static pages with text and images. Now you could make web pages interactive! The Java browser plug-in has a bad name, because there have been many security problems with it in the past, and applets have been replaced by JavaScript long ago. In Java 9, the Applet API is going to be deprecated and Oracle is most likely not going to ship the browser plug-in with Java anymore.

Servlets, however, are still used very widely and are the basis for almost all Java web application frameworks. However, most people don't program directly with servlets - they use one of the more powerful web application frameworks, which runs on top of servlets. For example Spring Web MVC (part of the Spring Framework).

Sergiu Dobozi wrote:2. The code will be deleted/messed up each time there is an update to the theme for some reason.


I have no idea. This has to do with how WordPress works. I've done a little bit of customizing themes with WordPress for my own blog. If you mess with the files of an existing theme, your changes will be overwritten if there is an update to the theme. But you can make a child theme, and then this won't happen. This has however nothing to do with programming in Java, and I am far from a WordPress expert.

Sergiu Dobozi wrote:3. Maybe it's not as easy to create a chatroom than it is to just do it in Javascript?


If you create a chatroom, you'll need some part of it running on the server side, to store and forward the messages that people type in. So, you might write part of it in JavaScript that's running in the browser, but there will also need to be a server side part, which you could write in Java. I have, however, no idea how that would integrate with WordPress.
 
Sheriff
Posts: 7647
522
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could also have a look to Vaadin framework. Their website I see also provides some video tutorials (<-- here) to start.
 
Saloon Keeper
Posts: 6516
158
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WordPress is written in PHP, so if you're thinking of extending it, Java would not be the best choice.
 
Tim Moores
Saloon Keeper
Posts: 6516
158
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess my previous answer was too circumspect: no.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic