Java Anti-Patterns

This page collects some bad code that may not look so obiously bad for beginners. Beginners often struggle with the language syntax. They also have little knowledge about the standard JDK class library and how to make the best use of it. In fact we collected all examples from everyday junior code. And we modified the original code to give it example character and such that it highlights the problems. String concatenation String s = ""; for (Person p : persons) { s += ", " + p.getName(); } s = s.substring(2); //remove first comma

Writing Password Filter For Windows (Active Directory)

Password Filter plays a primary role in decision-making regarding user passwords. Microsoft supports Writing custom password filter. By definition, a Password Filter is a system DLL that works with LSA service to ensure the password requirements while password reset. Password Filter is a system DLL that exports three functions with the following prototypes BOOLEAN __stdcall InitializeChangeNotify (); NTSTATUS _stdcallPasswordChangeNotify ( PUNICODE_STRING UserName, ULONG RelativeId, PUNICODE_STRING NewPassword );

Moving on to struts2 Action classes.

The Greeting Application. When a request comes to the container, it checks web.xml to decide how it should be dispatched. Here is the web.xml for our “Greeting” Application

Google Web Toolkit

GWT The GWT takes an unusual approach to Web application development. Rather than employing the normal separation of client-side and server-side codebases, GWT provides a Java API that lets you create component-based GUIs and then compile them for display in the user's Web browser. Using GWT is far closer to developing with Swing or SWT than the usual experience of Web application development, and it tries to abstract away the HTTP protocol and the HTML DOM model. Indeed, the fact that the application ends up being rendered in a Web browser feels almost incidental.

J2ME Core Concepts

Java 2 Platform Micro Edition At the heart of Java 2 Micro Edition (J2ME) are three core concepts: configurations, profiles, and optional packages.

Enterprise RIA

Enterprise Rich Internet Applications Agenda • What is JSF? • Rich Internet Applications (Web 2.0)

Struts2 - Step by step guide for the programmers

This tutorial explains struts 2 with the bare minimum. You won't get lost in the unwanted files under the struts example applications. Pre-requisites for this struts2 tutorial You should be comfortable working with eclipse and WTP. I have used eclipse 3.2.2 myself. Any 3.1 or latter should work, although not tested. You will also need web Tools plugins from the curresponding Calisto release.

Associations, Aggregation, Composition and Links in UML

An Association in UML is a relationship between two classes. Links represents the relationship between objects. Association defines how classes communicate each other, and link represents a state of the system where an object sends some message to another.

Two Search Utilities for Linux

locate If you know the name ( or part of the name ) of the file you are looking for, use 'locate'. You need to install “findutils-locate-4.2.27-12” if this command is missing in your system. locate is an indexing based search program. You should run “updatedb” for proper functioning of locate. Usually this is done using a cron job. locate will be faster than the “find” command, since it is using the index created by updatedb for searching.
Syndicate content