- Main RSS feed: all Java programming articles published in the past 3 months
- Java threading feed: recent articles on multithreading and concurrency (including both "classical" thread programming and the Java 5+ concurrency libraries)
- Java Web programming feed: articles on topics such as Servlets and AJAX programming
- Java collections and algorithms feed: articles covering the Java collections framework itself, plus other algorithm-related frameworks such as compression
- Java performance feed: performance and profiling-related articles
- Java Regular expressions feed
The Javamex companion blog. This blog includes both technical articles relating to the programming information that you'll find on the Javamex site, plus information covering the IT industry more generally.
Showing posts with label web programming. Show all posts
Showing posts with label web programming. Show all posts
Wednesday, December 10, 2008
RSS feeds of Java tutorials
The Javamex web site now publishes various RSS feeds containing links to articles published recently or on particular topics of frequent interest. The available feeds are as follows:
Wednesday, November 19, 2008
What is the Java equivalent of...?
If you're a C/C++ programmer who has more recently moved into Java, you may welcome a new section of the Javamex site loosely entitled What is the Java equivalent of...?
The section aims to examine Java equivalents of some of those awkward little features of C/C++ that people tend to miss or not know how to achieve when they migrate to Java. For example:
What is the Java equivalent of unsigned? In C/C++, you can tell the compiler to treat an integer variable as unsigned by adding the unsigned modifier to its declaration. In Java, integer primitives are generally unsigned. But as we see, bitwise operations generally only require the right shift operator to be modified (so that Java uses >>> where C/C++ uses >> to operate on unsigned values). And for arithmetic operations, judicious use of the AND operator can often get us round the problem.
What is the Java equivalent of const? In C/C++, this operator tells the compiler not to allow the variable in question (or the value it points to) to be modified. We discuss the nearest Java equivalents, which actually depend on the circumstances.
The section on memory management in Java vs C/C++ looks at equivalents of operators such as new and malloc(), and their opposites. We see that in general, C/C++ puts more burden on the programmer to deal with memory management issues. Possible C/C++ bugs relating to memory management include allocating memory on the stack and then letting it "escape" the function; such bugs are not possible in Java. But there are issues that do crop up in Java that we sometimes need to be aware of, such as how garbage collection object finalization works, or how to deal with a "raw" block of memory (one typical use of malloc() in C/C++).
If you have a suggestion for a new topic in the Java equivalents section, please leave an appropriate comment on this blog. Corrections or suggestions for the existing articles are always welcome too!
The section aims to examine Java equivalents of some of those awkward little features of C/C++ that people tend to miss or not know how to achieve when they migrate to Java. For example:
What is the Java equivalent of unsigned? In C/C++, you can tell the compiler to treat an integer variable as unsigned by adding the unsigned modifier to its declaration. In Java, integer primitives are generally unsigned. But as we see, bitwise operations generally only require the right shift operator to be modified (so that Java uses >>> where C/C++ uses >> to operate on unsigned values). And for arithmetic operations, judicious use of the AND operator can often get us round the problem.
What is the Java equivalent of const? In C/C++, this operator tells the compiler not to allow the variable in question (or the value it points to) to be modified. We discuss the nearest Java equivalents, which actually depend on the circumstances.
The section on memory management in Java vs C/C++ looks at equivalents of operators such as new and malloc(), and their opposites. We see that in general, C/C++ puts more burden on the programmer to deal with memory management issues. Possible C/C++ bugs relating to memory management include allocating memory on the stack and then letting it "escape" the function; such bugs are not possible in Java. But there are issues that do crop up in Java that we sometimes need to be aware of, such as how garbage collection object finalization works, or how to deal with a "raw" block of memory (one typical use of malloc() in C/C++).
If you have a suggestion for a new topic in the Java equivalents section, please leave an appropriate comment on this blog. Corrections or suggestions for the existing articles are always welcome too!
Tuesday, October 28, 2008
Section on Java Servlets
The newly updated section on writing Java Servlets, looks at issues such as the following:
Comments and suggestions for extra material are always welcome, of course!
- some of the "mechanics" of getting start with Servlets, such as getting the appropriate version of the JDK and some Servlet hosting tips such as the features and quotas that you should be looking out for in a Servlet hosting package
- the anatomy of an example Servlet
- dealing with HTTP sessions, and why you should use the Java Session API to handle them;
- dealing with "raw" cookies when you need them;
- deciding if you need to modify your Servlet to work with keep-alive connections: in some configurations, you may be beneficial to add some code to set the Content-Length header; we discuss how to find out if this is necessary.
Comments and suggestions for extra material are always welcome, of course!
Subscribe to:
Posts (Atom)