I was reading through my java book which is called Introduction To Java Programming Sixth Edition by Y.Daniel Liang and I was reading about databases. I just wondered if java is used in webdesign for the purpose of creating databases and if that was instead of MySql and what the advantages in using it.

I myself am interested in becoming a webdesigner and so my interests have been in Mysql php, photoshop etc. However as part of my degree course I am also doing java and I am just wondering what its uses are in webdesign apart from game creation?

It seems to slow to be used to create dynamic webpages and PHP and advanced CSS seem ot do a good job with that.

Recommended Answers

All 2 Replies

> I am also doing java and I am just wondering what its uses are in webdesign apart from game creation?
J2EE can be used for creating rich, easier to maintain, modular dynamic web applications. The advantage is that you don't need to learn a new language just to develop web applications. Your existing knowledge of java with a bit of practice will make you comfortable with the technology.

Java offers separation of the presentation, the business logic and the data access logic, a thing you won't see much in PHP built sites.

> It seems to slow to be used to create dynamic webpages
Slow? In what sense? Does this site look slow to you? Look at the business world around you and you would find most of the financial, banking and business critical sites are made using Servlets / JSP / EJB's. Also there are a lot of mature frameworks for Java which facilitate rapid development, something you would not find for PHP.

Oh and BTW, MySQL is a database while Java is a programming language and yes, you can create databases using Java.

in fact Java is overall faster (up to an order of magnitude in some cases) than CGI (C, especially Perl, Ruby/Rails, etc.) and php.

There are a number of reasons for this, most important of which is the nature of Java web application architecture.
Where CGI creates a new process for each request, taking valuable time to open scripts or executables, loading them into memory, and starting their operations, Java servlets are loaded only once (often at server startup time or else at the first request for them) and just create a new thread for each subsequent request.
As Java is since 1.3 a true compiled language at runtime (classes are compiled on the fly when this makes sense) execution speed is on par with C or C++. Combined with the shorter initiation time for requests the site gets faster. Combined with the capability of modern VMs to do on the fly optimisation of binary code to suit the exact operating system and hardware architecture it is running on (something impossible with C and C++ code) performance can potentially go even higher.

Java has been used very effectively for building large commercial websites for almost a decade.
Sites such as eBay wouldn't exist without it (or be a lot harder to maintain and perform not nearly as good).
Just because the URLs don't say "servlet" or ".jsp" doesn't mean it's not Java. Only someone well versed in the way Java based engines create html might be able to recognise Java based sites using the html sent to the browser alone.
Using the http headers more certainty can be achieved, but even those aren't any guarantee as most sites will be fronted by dedicated Apache servers which replace the headers of the Java application servers with their own.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.