Thursday, 18 February 2016

Unit testing in database driven projects

DbUnit is a JUnit extension (also usable with Ant) targeted at database-driven projects that, among other things, puts your database into a known state between test runs. This is an excellent way to avoid the myriad of problems that can occur when one test case corrupts the database and causes subsequent tests to fail or exacerbate the damage.

http://www.dbunit.org/

Managing project dependencies while using Ant

Ivy (The agile dependency manager) - Ivy is a tool for managing (recording, tracking, resolving and reporting) project dependencies. It is characterized by the following:
  1. flexibility and configurability - Ivy is essentially process agnostic and is not tied to any methodology or structure. Instead it provides the necessary flexibility and configurability to be adapted to a broad range of dependency management and build processes.
  2. tight integration with Apache Ant - while available as a standalone tool, Ivy works particularly well with Apache Ant providing a number of powerful Ant tasks ranging from dependency resolution to dependency reporting and publication.
Ivy is open source and released under a very permissive Apache License.

Ivy has a lot of powerful Features, the most popular and useful being its flexibility, integration with ant, and its strong transitive dependencies management engine.

The transitive dependencies management is a feature which lets you get dependencies of your dependencies, transitively. In order to address this general problem, ivy needs to find metadata about your modules, usually in an ivy file. To find the metadata and your dependencies' artifacts (usually jars), Ivy can be configured to use a lot of different repositories.

http://ant.apache.org/ivy/index.html
http://ant.apache.org/ivy/history/latest-milestone/tutorial.html

Open source API

Joda Time - Java date and time API -

Joda-Time provides a quality replacement for the Java date and time classes. The design allows for multiple calendar systems, while still providing a simple API. The 'default' calendar is the ISO8601 standard which is used by XML. The Gregorian, Julian, Buddhist, Coptic, Ethiopic and Islamic systems are also included, and we welcome further additions. Supporting classes include time zone, duration, format and parsing.

Guidelines & Best practices

Refactoring -
http://martinfowler.com/bliki/OpportunisticRefactoring.html
http://www.refactoring.com/catalog/index.html

CSS Best Practices -https://developer.mozilla.org/en-US/docs/CSS/Writing_Efficient_CSS?redirectlocale=en-US&redirectslug=Writing_Efficient_CSS
https://developers.google.com/speed/docs/best-practices/rendering
http://www.onextrapixel.com/2012/05/03/css-tricks-how-to-speed-up-css-rendering/


Implement Continuous Integration (Build and Deployment)
http://www.lordofthejars.com/2012/09/deploying-jee-artifacts-with-jenkins.html

Other best practices
  1. Use javadoc tags to imrpove internal documentation quality
  2. Check the software aging signs are not existing
  3. Exception object creation is slow so should be used carefully 
  4. Jenkins best practices
  5. Jenkins configuration backup plugin

Buying a wireless router

Router with best WiFi range - http://compnetworking.about.com/od/wirelessrouters/f/bestwifirange.htm
802.11n Info - http://compnetworking.about.com/od/80211nwirelessrouters/802_11n_Wireless_Routers.htm
Cable Vs DSL Modem - http://www.youtube.com/watch?v=VLcPvz5k-Ac
Setting up cable modem and Router -http://www.youtube.com/watch?v=rEUAAiAIKbw&feature=relmfu
Setting up DSL modem and Router -http://www.youtube.com/watch?v=4clBtigoFpA&feature=fvwrel
Setting up Only Router - http://www.youtube.com/watch?v=kawBR2YtjmA&feature=fvwrel
Installing only DSL Router - http://www.youtube.com/watch?v=JPqKgVn_JsU&feature=related

Quartz

maven dependency - http://quartz-scheduler.org/downloads/catalog

Quartz sample http://www.mkyong.com/java/quartz-scheduler-example/
Tutorial -http://www.quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/
Example - http://www.quartz-scheduler.org/documentation/quartz-2.1.x/examples/

Tutorial - http://www.roseindia.net/quartz/index.shtml
Quartz cook book -  http://quartz-scheduler.org/documentation/quartz-2.x/cookbook/
Documentation  - http://quartz-scheduler.org/documentation
Other Module dependencies - http://quartz-scheduler.org/downloads/catalog
Quartz inside web app- http://onjava.com/onjava/2006/03/01/job-scheduling-in-web-application.html
 http://stackoverflow.com/questions/4905671/email-notifications-and-reminders-in-java-web-app-using-quartz-scheduler
Quartz available jobs - http://quartz-scheduler.org/api/2.1.0/org/quartz/jobs/package-summary.html
API Doc- http://quartz-scheduler.org/api/2.1.5/index.html

Salil's Bookmarks