Top Bookmarks – How to Get Started with Spring MVC & Eclipse

Spring MVC Lifecycle

The article lists down top bookmarks (pages) which helped me to quickly get started with Spring MVC with Eclipse. Also, presents some key information at a very high level. Spring MVC Framework Tutorial Spring MVC Form Handling Example  Spring MVC Hello World Example  Spring 3 MVC Hello World Example Spring 4 MVC Hello World Tutorial – Full Example  Following are high level steps to get started with your first Spring MVC project using Eclipse: Download Java EE eclipse and configure server for ease of deployment from within Eclipse. Create a Dynamic Web Project in Eclipse. Drag and drop below mentioned Spring and other libraries into the folder WebContent/WEB-INF/lib. One of …

Continue reading

Posted in Java. Tagged with , .

Top 15 Mobility Architect Interview Questions

The article lists down some of the questions I happen to discuss with candidates appearing for mobility architect/lead position. These are mostly architectural level questions and cut across most mobility platforms. Feel free to share questions you came across in your interviews. What are different types of mobile apps? Mention some of the platforms you worked with?Native vs Mobile Web vs Hybrid applications Native Apps, Web Apps, and Hybrid Apps Native, HTML5, or Hybrid: Understanding Your Mobile Application Development Options When develop for native apps and when mobile web? Mobile Website vs. Mobile App (Application): Which is Best for Your Organization? What are key differences in architecting/developing consumer apps and …

Continue reading

Posted in Mobility. Tagged with , .

How to Add Tomcat 8 to Eclipse Kepler

The article represents steps required to configure Tomcat 8 with Eclipse Kepler. Download Tomcat 8 and place it within any local folder. Download Eclipse Java EE Kepler As of date, Tomcat 8 is not supported in Eclipse JaveEE Kepler. However, you could add the Tomcat 8 by doing following: Go to the WTP downloads page, select the latest version (currently 3.6), and download the zip. Here’s the current link. Copy the all of the files in features and plugins directories of the downloaded WTP into the corresponding Eclipse directories in your Eclipse folder (overwriting the existing files). Start Eclipse and click on “Servers” tab in the workbench. Go ahead and …

Continue reading

Posted in Java. Tagged with .

How to Get Started with Bootstrap (UI) & Eclipse

The article represents steps required to get started with Bootstrap (UI) with Eclipse IDE while working with a dynamic web project involving JSP, Servlets etc. Even before we go ahead, you may be wondering on why should you care about adding bootstrap to Eclipse. Why BootStrap? The interesting thing about bootstrap is that it helps you to get started as quickly as possible with cool looking UIs that can be created out-of-box HTML/CSS code snippets. As a matter of fact of fact, I landed up with Bootstrap after I was searching for some rapid Java UI builder for Eclipse using which I could easily build fancy UIs while focusing on …

Continue reading

Posted in Web. Tagged with .

Test-Driven Development (TDD) Shines with Mocking

The article presents a perspective and some code samples on how one could some cool stuff with Test-driven development (TDD) and Mocking. The code samples are done in Java. Lets briefly understand what is TDD and mocking? What is TDD? Test-driven development, simply speaking, is a software development process in which developers write tests first and, then writing enough code to pass those tests. Once all of the tests pass, they do code refactoring to enhance code quality. Following are key advantages of adopting TDD as your development process: Enforces the developers to thoroughly think through various different test cases which could be used to test the functional/business requirements. It, …

Continue reading

Posted in Unit Testing. Tagged with , .

Law of Demeter Coding Violations & How to Fix Them

The article lists down Law of Demeter Violations and presents solutions on how to fix them. The code samples are written in Java. Feel free to share your comment, if any. What is Law of Demeter Principle? There are several good pages on the web which could be read to understand the object-oriented principle, Law of Demeter. Following are some of them: Demeter: It’s not just a good idea. It’s the law. Object-Oriented Programming: An Objective Sense of Style PMB Coding Violations The group of programmers working on a Demeter system, back in 1980, came up with this programming principle which they termed as Law of Demeter. According to them, …

Continue reading

Posted in Software Quality. Tagged with , .

Unit Tests – Mocking vs Stubbing Vs Spying

The article lists down some good reads (from different webpages on internet) on unit testing concepts such as mocking, stubbing and spying and represents summarized information on these concepts. Mocks Aren’t Stubs What’s the difference between a mock & stub? Mocking vs. Spying in mocking frameworks Mocking and stubbing in Ruby on Rails What’s the difference between faking, mocking, and stubbing? After going through all the above pages, I could arrive at following definitions: Mocking Mocking is a unit testing phenomenon which is used to replace real objects with test objects that mocks the behavior. These test objects are called as Mock objects. The point to note is that mock …

Continue reading

Posted in Unit Testing. Tagged with .

Top 5 Unit Testing Best Practices

The article lists down top 5 unit testing best practices that one could adopt to be able to write great unit tests with greater code coverage. Test-Along, if not Test-Driven Many a times, rookies have been found to start writing unit tests once they have written most of the code, e.g., towards the end of the coding. However, to make the most of unit tests, one should write them as they write the code. This is somewhat different and less difficult than writing tests first and code later as in test-driven development (TDD). Following are some of the advantages of doing “test-along” development: One could achieve greater code coverage by …

Continue reading

Posted in Unit Testing. Tagged with .

Junit & Mock Framework Mockito Code Samples – Part 1

The article represents code samples for Junit tests and Mockito, a mocking framework. In addition, it describes different aspects of unit testing and mocking. Software Requirement The goal is to create a simple piece of software which caters to the requirement of school admission where in applicants submit their admission application.   Class Design & JUnit Tests To meet above requirement, following different component is designed: Core Components (Key Ones) AdmissionApplication.java: Consists of method recordNewApplication which validates the submitted application, and later, stores in the database after successful validation. ApplicationValidation.java: Consists of methods for validating business rules associated with admission such as mandatory inputs (first name, last name, class, gender, …

Continue reading

Posted in Unit Testing. Tagged with , .

JUnit Tests Code Samples for Testing Exception Scenarios

The article presents an example of unit tests which tests both happy path and exception scenario. Business Requirement User trying to open an account must be validated against the business rules related with users’ registration. Following are different business rules: User must provide a valid email address User must provide his first name User’s age must be 18 and above   Class Design To demonstrate the unit tests with happy and exception scenarios, following classes have been shown below: SignupValidation: Consists of code validating business rules SignupException: Custom exception representing Signup business rules failure EmailValidator (Get the code from this page). SignupValidationTests: Unit tests for testing signup validation code Class …

Continue reading

Posted in Unit Testing. Tagged with .

Unit Tests – An Alternate Functional Requirements Documentation

The article presents a perspective on how unit tests could be written in a way that they could be used as an alternate form of documentation for understanding functional requirements. Many a times, it has been found that developers, primarily rookies, did not have a clarity on how to name unit tests. Thus, many of them have been found to name the unit tests such as testXXX where XXX is name of the method which they wanted to tests. There has been many recommendations on how to name unit tests, some of which are following: Given…When…Then… Check the page by Martin Fowler (http://martinfowler.com/bliki/GivenWhenThen.html) WhenXXX_ExpectYYY Names representing different use case scenarios …

Continue reading

Posted in Unit Testing. Tagged with .

Mobile Testing Tools & Methodologies used @ Expedia

The article lists down tools & methodologies used for testing Expedia mobile apps (both mobile web & native). Test-driven Development (TDD) TestNG: TestNG is a unit testing framework similar to JUnit. Apart from unit tests, TestNG can also be used to cover other categories of tests such as functional, end-to-end, integration etc. EasyMock: It is, primarily, used for mocking and custom solution for stubbing. As a mocking framework, EasyMock provides mock objects for interfaces by generating them on the fly using Java’s proxy mechanism.   Automated Acceptance Testing Frank (iOS): Frank, primarily, allows you to write and execute automated acceptance tests (using Cucumber) against your iOS application to verify its functionality. Simply …

Continue reading

Posted in Mobility, QA. Tagged with , , .

Tea-Time Java Quiz #1

Interview questions

Tea-Time Java Quiz is intended to be quick 5 questions Java quiz which one could quickly take from time-to-time to test their Java knowledge on the ongoing basis. [WpProQuiz 2]

Posted in Java. Tagged with .

Content Framework for Lunch & Learn Sessions on IT Applications

The article represents a framework using which one could plan their content for taking an introductory session on their applications. The primary objective of such presentation is to provide the audience with following information: Business overview Applications overview The proposed framework aims to satisfy the education needs for different stakeholders including delivery manager, project manager, development & testing teams. Presenters talked differently In my recent experience, I attended a series of sessions taken by leads of different project teams working for the same customer. Except for few of them, most of these sessions were not very interesting and audience enjoyed lunches more than the sessions. Following are some of the …

Continue reading

Posted in Software Engg.

APIs Performance Testing with Twitter Iago

The article talks about performance testing tool, Iago, which is created at Twitter for testing their core database interfaces, storage sub-systems and domain logic, up to the systems accepting front end web requests. Performance requirement of Twitter platform? Simply speaking, end users expect to read & post tweets with a very fast response time and, Twitter is expected to respond in that manner irrespective of load arriving at it with absolutely no room for any slowness, whatsoever. That is a tough one, isn’t it? This is unlike many enterprise business systems where users can be a little forgiving by waiting for the response to show up. So, they needed to …

Continue reading

Posted in Performance Engineering. Tagged with , .

Mobile Apps Testing Frameworks Used at LinkedIn

The article lists down tools & frameworks that are used for mobile app testing at LinkedIn. Vows: Vows is a behavior driven development framework for Node.js. It is used to do asynchronous testing with Node.js. The primary feature of the framework is its support for asynchronous testing with Node and, the ability to run concurrent tests. Vows also supports code coverage reporting. Robotium: Robotium is an Android test automation framework that has full support for native and hybrid applications. It supports black-box UI tests for android applications. It is used to test native LinkedIn android app. Selenium: Selenium is used to automate end-to-end testing with mobile web browsers. FoneMonkey: FoneMonkey …

Continue reading

Posted in Mobility, QA. Tagged with , , .