Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java in webpage

 
monte duglus
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone tell me how to use Java in webpage designing? & How to change look by using it?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Long ago, elements called applets were loaded into web pages to create small mini-apps within the page. They are now obsolete and disabled by default in most browsers. They should no longer be developed.

Today, Java serves its function in web apps on the server, not the client. Servlets and JSP are the core technologies in Java for creating Java-powered web apps.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
monte duglus wrote:How to change look by using it?


HTML pages are styled using CSS, not Java.
 
salvin francis
Bartender
Posts: 1309
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
monte duglus wrote:Anyone tell me how to use Java in webpage designing? & How to change look by using it?

I think GWT / Vaadin / GXT can help you there These are pure java based solutions. However, I can't comment if they are still being actively supported.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
salvin francis wrote:
monte duglus wrote:Anyone tell me how to use Java in webpage designing? & How to change look by using it?

I think GWT / Vaadin / GXT can help you there ...


Unsaid is that these do not create Java in web pages or in any way execute on the client. Rather, they are "compiled" into HTML, CSS and JavaScript for the front end. They are generally regarded as stop-gap solutions for shops that are unable to do real web application development for whatever reasons.
 
salvin francis
Bartender
Posts: 1309
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Unsaid is that these do not create Java in web pages...

Fair enough, I'll explain in detail.

monte duglus, The browsers such as Mozilla firefox, chrome, Internet explorer are capable of displaying only HTML to the end user. All design and UI are only shown in HTML. To make things more interesting, they allow a designer to add a scripting language such as javascript. A scripting language is quite unlike a full fledged programming language. This is since it is executed in another program. A scripting language is, in my opinion, a language to access the existing objects exposed by another program. So, basically this just boils down to accessing the same HTML dom and modifying it to interact with the user.
Additionally, there are other plugins available across browsers that enabled the page to do more. Using these plugins, the browsers were able to display even more dynamic programmed content such as activex objects (in internet explorer) as well as flash and applets. However, HTML too is getting upgraded to support more items such as videos and canvas. Thus the need for such plugins is eliminated.

Coming back to the main topic, the browser does not have the actual capability to run java (Applets are long dead). So, java cannot be directly used for web designing and changing its looks. However, some smart guys came up with an idea that it could be possible to make such a compiler(or maybe a translator?) that can convert a special java code into javascript output. This javascript can dynamically generate the full HTML dom and thus be shown on the screen. Special here means, its only a subset of the standard java library so, File and similar API would be skipped out. This is the platform called GWT. Other apis such as GXT and Vaadin are based on GWT.

Bear Bibeault wrote:regarded as stop-gap solutions for shops that are unable to do real web application development for whatever reasons.

Here is where I differ in opinion, I wouldn't call it a stop-gap. GWT can be used to build truly amazing web application. As far as I believe, I think Google Docs, Google Adwords, Google wave (scrapped off), google wallet, was made in GWT. Having said that, its last release was in november 2014, so I don't know if its still actively developed now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic