I am new in programming and this question may really be stupid but I still want to ask because I don't know what practices are possible and what are not. You see, right now I am studying basic J2EE. Our assignment is to make a web-based application using JSP and servlets. One of my problems is doing the forms.
I know that HTML is the best practice in making the forms in JSP because almost all people are using it(based on the examples on the books/internet). But Java also have its own forms which is the Swing, AWT and it all worked by using the events. If i don't want to use HTML, can I use Java's Swing/AWT or is it for the desktop applications only? Aside from what I've mentioned, what else can I use?
What you are talking about is called Rich Internet Applications RIA. These are web applications that make your web pages look like desktop applications. You can achieve this with Grails and Flex, GWT and JavaFX. There is a number of very interesting and great environments you can use like Vaadin, Open Laszlo, based on GWT. GWT and the frameworks based on it generate JavaScript and produce separate output for every browser environment.
These are the tools for the future. I do not really understand why these technologies are not mainstream yet.
Here is a list of the various RIAs frameworks available. Expect to welcome newcomers in SourceForge in the near future.
But Java also have its own forms which is the JSwing, Swing, AWT and it all worked by using the events.
Yes java has many Components in Swing and AWT.
And both Swing and AWT Components support Event Handling.
But I never have heard of JSwing.
If I don't want to use HTML, can I use Java's JSwing/Swing/AWT or is it for the desktop applications only?
Swing and AWT are for the desktop application only.
But as Orbit said
In Appletz? – Orbit
You can definetly use Swing components on an applet and then embed the applet on your JSP page.
I know that HTML is the best practice in making the forms in JSP
Using HTML will be a lot easier than using Applet to make a form
As Andrew said
Applets are a PITA to develop and deploy, and most users prefer pure HTML (or dynamic HTML, using JavaScript) to applets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With