Thursday, January 30, 2014

Free Eclipse Plug-ins For Java Developers



Code Quality Plugins

1.FindBugs – This plug-in is utilized with eclipse IDE and is the software used for locating bugs in Java programs. It’s a free software licensed under Lesser GNU Public License. For further information you can go to -FindBugs

2.Checkstyle – This plug-in can be integrated to IDE Eclipse ensuring the Java code follows the coding standards. For further information you can go to - Checkstyle

3.ECLemma – This is a free tool that can be taken via Eclipse Public License providing fast development and test cycles. You can make use of the “launch” in the code coverage mode that functions like actual run/debug mode. For further information you can go to - ECLemma

Text Editor Plugins

4. AnyEdit Tools - The plug-in helps to add new editor to output consoles, toolbar, and it also help to import and export data. It is licensed under Eclipse Public License v1.0. For further information you can go to - AnyEdit Tools

5. Eclim - Eclim helps to bring Eclipse functionality to one of the best editors - Vim, wherein development can be done in various languages and it also provides bug fixing provisions. It is released under GPLV3. For further information you can go to -Eclim

6. Eclipse-rbe - Eclipse-rbe is used for editing Java resources and its features include warnings for missing values, sorted keys, conversion from/to Unicode etc. It is licensed under GNU library or LGPL. For further information you can go to - Eclipse-rbe

Dependency Management

7.Apache IvyDE – This is an Eclipse plug-in assisting in integrating Apache Ivy’s feature of dependency management to Eclipse. It also assists in managing dependencies in ‘ivy.xml’. For further information you can go to - Apache IvyDE

8.M2eclipse (Maven Plugin) – This assist in managing both simple and multi module projects, and Maven integration for Eclipse (M2eclipise) that assists in launching maven from Eclipse. It offers features like dependency management and automatic downloading. For further information you can go to - M2eclipse (Maven Plugin)

Version Control Integration Plugins

9.Subclipse - Subclipse is a SVN plug-in which offers support for subversion of Eclipse IDE and it is licensed under EPL 1.0. Subeclipse 1.6.x supports ColabNet Merge Client. Subclipse provides easy interface to use the features. For further information you can go to -Subclipse

10.EGit - EGit plug-in provides support, synchronizes view, reading for .git/ exclude files, provides rebasing and has streamlined commands for pulling and pushing. For further information you can go to - EGit

11.MercurialEclipse - MercurialEclipse is one of the active Version Control System which gives you access on registration. It is a reliable plug-in which provides cloning repositories, push-pull synchronization and enables easy rollback. For further information you can go to -MercurialEclipse

Framework Development 

12.Spring Tool Suite – This offers development environment and tools like XML file wizards and graphical spring configuration editor that can be used for easy development. For further information you can go to - Spring Tool Suite

13.Spring IDE – This assists in developing Spring Application and offers interface for using the graphical editing framework. It display graphs of relationships and beans through the configuration files. Spring IDE
Continuous Integration Related Plugins

14.Hudson Status – This is a simple plug-in displaying the status (red/green) of a application on Hudson build server. It is quite a powerful continuous integration server used in a number of large software development projects. For further information you can go to -Hudson Status

15.Sonar Plugin - Sonar Plug-in for Eclipse provides powerful integration of Sonar with Eclipse. It highlights code quality problems as we browse the code. Since the code quality standards definition is centralized on Sonar server, it ensures all developers are following same quality standards. Sonar is a open source platform used for centrally controlling the source code quality of software projects. For further information you can go to - Sonar Plugin 


Webservice SOAP & REST




SOAP

SOAP comes from the bowels of XML-RPC, which was done way back in 1998. SOAP once stood for Simple Object Access Protocol but this was dropped with v1.3 of the standard, being blessed on June 24, 2003. SOAP was born of Microsoft, based on WSDL and UDDI. WSDL and UDDI have faded, but SOAP has much of its DNA in these specs. SOAP is currently owned by the W3C.
SOAP message model
SOAP characteristics:
  • Exposes operations that represent logic
  • provides a loose coupling for integrating diverse systems
  • designed to be extensible with the raft of WS-* specifications
  • Designed for distributed computing
  • Has a standard error messaging and error types
  • Aligns with EA requirements in that it supports various transports, e.g. HTTP, SMPT, UDP, JMS, etc.
  • supports enterprise security with WS-Security
  • supports language neutrality (you can use it with JAVA, Python, Ruby, Lisp, Perl, PHP, C, C#, etc.)
  • is ACID when using WS-AT
  • With WS-RM supports reliable messaging
  • Has strong typing, so supports strong governance
  • broadly supported in the industry

REST

REST was developed in parallel with HTTP/1.1. The largest implementation of a REST system is something called with WWW. REST works on a server-client conceptual basis, again, with clients initiating requests to servers, which process and return responses. This request / response paradigm is built upon the transfer of resource representations. A RESTFUL approach is not limited to HTTP, by the way. But, an example of HTTP yields the REST verbs (read methods from an OOP paradigm), URIs, Internet media types, request and response codes, etc. Here is a maintained list of REST examples.
Importantly, there are constraints on a design to maintain its RESTFUL nature. These are meant to be helpful, constraining forces:
  1. Client-server
  2. Stateless
  3. Cacheable
  4. Layered System
  5. Uniform interface – decouples architecture to allow client and server to evolve independently
  6. Code on demand (optional) – a server can pass logic to a client that may be executed, e.g. javascript or (shudder) applets.

Comparison

  • REST exposes resources that represent data, while SOAP exposes operations that represent logic
  • REST uses VERBS (Methods: GET/POST/DELETE) while SOAP uses the one verbPOST
  • REST emphasises simple p2p communication over HTTP, while SOAP emphasised loosely coupled distributed messaging
  • REST supports multiple data formats, while SOAP encodes everything in XML with data attachments
  • REST emphasises stateless communication while SOAP supports stateless and stateful operations
  • SOAP is better at asynchronous messaging, pub/sub and has strong typing (in the WSDL)

Strengths

REST has benefits because:
  • REST can be consumed by any client, even a web browser using Ajax and .js
  • REST is lightweight. Doesn’t require XML parsing, consumes less BW, doesn’t require a SOAP header for each message
  • REST is very widespread and highly adopted by many web resources
  • REST can be made very safe, since one can filter on anything that is not a GET verb.
  • Great for web services, exposing data over the internet.
  • Great for low BW and CPU requirements.
  • Great for combining data from multiple sources in a browser.
SOAP has benefits also:
  • SOAP will allow for custom exception codes, will allow for client side artefacts from a WSDL, has strong support in many IDEs
  • SOAP is much easier to use for stateful, asynchronous designs
  • SOAP is considered more secure by many because parameters are encoded in the message, not the URI. SOAP has support for contracts, acquiring tokens, etc. Note that REST doesn’t require params in the URI, but it often happens. Many would argue that this is breaking REST.
  • SOAP has reliability as part of its contract, e.g. WS-RM
  • SOAP can be governed more easily, it can be discovered more easily
  • Great for enterprise applications requiring contracts and reliability measures.
  • Great for asynch processing



Monday, January 27, 2014

SOAP UI : Error loading. java.lang.Exception: Failed to load url;




I am trying to create a new project in SoapUI, and I keep getting the same error no matter what URL I try to load in there. In order to make sure it wasn't my local hosted web service causing the issue, I tried the URL from this page: http://www.soapui.orgRecording/re ... affic.html which uses http://www.webservicex.net/CurrencyConvertor.asmx?WSDL as the example. 

When I create my project as follows:
Image

I get the following error:
Image


Solution
Are you on a secured network? If so please configure the proxy settings on SoapUI. The Proxy settings is located here: File>Preferences>Proxy Settings. Click on File again, save preferences and you might even want to restart SoapUI.



Thursday, January 16, 2014

Java Performance Checklist



Most of these suggestions apply only after a bottleneck has been identified:

  • Establish whether you have a memory problem.

  • Reduce the number of temporary objects being used, especially in loops.

  • Avoid creating temporary objects within frequently called methods.

  • Presize collection objects.

  • Reuse objects where possible.

  • Empty collection objects before reusing them. (Do not shrink them unless they are very large.)

  • Use custom conversion methods for converting between data types (especially strings and streams) to reduce the number of temporary objects.

  • Define methods that accept reusable objects to be filled in with data, rather than methods that return objects holding that data. (Or you can return immutable objects.)

  • Canonicalize objects wherever possible. Compare canonicalized objects by identity.

  • Create only the number of objects a class logically needs (if that is a small number of objects).

  • Replace strings and other objects with integer constants. Compare these integers by identity.

  • Use primitive data types instead of objects as instance variables.

  • Avoid creating an object that is only for accessing a method.

  • Flatten objects to reduce the number of nested objects.

  • Preallocate storage for large collections of objects by mapping the instance variables into multiple arrays.

  • Use StringBuffer rather than the string concatenation operator (+).

  • Use methods that alter objects directly without making copies.

  • Create or use specific classes that handle primitive data types rather than wrapping the primitive data types.

  • Consider using a ThreadLocal to provide threaded access to singletons with state.

  • Use the final modifier on instance-variable definitions to create immutable internally accessible objects.

  • Use WeakReferences to hold elements in large canonical lookup tables. (Use SoftReferences for cache elements.)

  • Reduce object-creation bottlenecks by targeting the object-creation process.

  • Keep constructors simple and inheritance hierarchies shallow.

  • Avoid initializing instance variables more than once.

  • Use the clone( ) method to avoid calling any constructors.

  • Clone arrays if that makes their creation faster.

  • Create copies of simple arrays faster by initializing them; create copies of complex arrays faster by cloning them.

  • Eliminate object-creation bottlenecks by moving object creation to an alternative time.

  • Create objects early, when there is spare time in the application, and hold those objects until required.

  • Use lazy initialization when there are objects or variables that may never be used, or when you need to distribute the load of creating objects.

  • Use lazy initialization only when there is a defined merit in the design, or when identifying a bottleneck which is alleviated using lazy initialization.


  • No wildcard imports.
  • Overloads appear sequentially.
  • Braces are used even when the body is empty or contains a single statement.
  • 2 spaces indentation.
  • Column limit can be 80 or 100 characters.
  • No C-style array declarations.
  • The default statement in switch statements are required.
  • Modifiers appear in the order recommended by the Java Language Specification.
  • Constants use CONSTANT_CASE. Note that every constant is a static final field, but not all static final fields are constants.