Monthly Archives: May 2014

Dojo for Developers | Dojo Toolkit Features| Tutorials | Guides | References | Videos | Dojo API

Dojo Toolkit is:

  • Open source modular JavaScript library
  • cross platform
  • It has utility classes and interface widgets

The Dojo Toolkit is organized in several parts:

  • dojo contains the core and most non-visual modules.
  • dijit is a library of user-interface modules for widgets and layout.
  • dojox holds assorted modules not yet considered stable enough to include in dojo or dijit.
  • util includes build tools such as optimization, documentation, style-checking, and test

10 Reasons to use Dojo Toolkit

Dojo Loader

There are three ways to pass configuration data to the loader.

  1. Before the loader is defined, via the global dojoConfig object (See also dojo/config)
  2. On the <script> element for the loader, via the data-dojo-config attribute
  3. After the loader is defined, via the global require function

Dojo Toolkit for Developers – Widget Development

The Dijit Lifecycle

Each widget declared with _Widget as its base will run through several methods during instantiation:

1
2
3
4
5
6
7
([widget].constructor());
[widget].postscript();
[widget].create();
[widget].postMixInProperties();
[widget].buildRendering();
[widget].postCreate();  // this is the most important one!
[widget].startup();

Others

JavaScript Developers Time Saving Tips

JavaScript Developers Time Saving Tips:

Code Quality Tools:

Beautifiers:

Some JavaScript Style Guides:

Task Automation:

Automate tasks like minification, compilation, unit testing, linting and more.

ArcGis for Developers | ArcGis Javascript Api | Mapping Platform | References | Videos | Tutorials | Guides

ArcGis Javascript Api for Developers:

 

Free Training Sessions

Videos:

Quick Links:

Artifactory – An Open source repository manager

Artifactory

  • Open source repository manager
  • Acts as proxy between build tool (eg. Ant) & outside
  • Built on top of the Java Content Repository (JCR)
  • Supports Artifactory’s OpenMetadata(TM) technology, allowing every repository item to be attached with searchable XML metadata and user-defined properties.

Quick Links:

Official Site
Artifactory Demo

web.xml Deployment Descriptor

web.xml Deployment Descriptor

Java web applications use a deployment descriptor file to determine how URLs map to servlets, which URLs require authentication, and other information. This file is named web.xml, and resides in the app’s WAR under theWEB-INF/ directory. web.xml is part of the servlet standard for web applications.

Resources:

Web.xml Metawerx Wiki
The Deployment Descriptor: web.xml – Google

JAX WS - Java API for XML Web Services

JAX WS – Java API for XML Web Services

JAX WS – Java API for XML Web Services

  • Simpler way to develop/deploy Web Services
  • Server & clients communicate using XML
  • Can be invoked by XML-based protocol (e.g. SOAP) & messages (xml) can be transported over HTTP

service endpoint interface or service endpoint implementation (SEI) is a Java interface or class, respectively, that declares the methods that a client can invoke on the service. An interface is not required when building a JAX-WS endpoint. The web service implementation class implicitly defines an SEI.

JAX-WS client programming model 

  1. Dispatch client: work at the XML message level; work without any generated artifacts at the JAX-WS level.
  2. Dynamic Proxy client: invoke a web service based on a service endpoint interface.

wsimport tool

The wsimport tool generates JAX-WS portable artifacts, such as:

  • Service Endpoint Interface (SEI)
  • Service
  • Exception class mapped from wsdl:fault (if any)
  • Async Reponse Bean derived from response wsdl:message (if any)
  • JAXB generated value types (mapped java classes from schema types)

FAQ

  • How to generate JAX-WS artifacts of secure WSDL using wsimport?

Following command will generate the webservice artifacts of the given wsdl and copy into directory (directoryName)

wsimport -keep -d directoryName -verbose -Xnocompile -Xauthfile authFile.txt <WSDL URL>

Content of authFile.txt

http://username:password@hostname/Endpoint?WSDL

Resources

  1. JAX WS official site
  2. JAX-WS Release Documentation 2.2.8  (PDF, HTML)
  3. Building Web Services with JAX-WS (javaee 6)
  4. wsimport tool documentation