Monday, August 25, 2014

Test Drive on Driven Development process

Software Development process

•A software development process or life cycle is a structure imposed on the development of a software product.
•Six phases involved 
         - Requirements
         - Design
         - Development
         - Testing
         - Documentation
         - Maintenance

Traditional Development Process



Common misconception:
•TDD/ATDD is NOT about testing!!

Test Driven Development
•Short development iterations
•Based on requirements and unit test cases
•Necessary code to pass the test cases
•Refactor


Benefits-Test Driven Development
•Stability
•Necessary code to pass the test cases
•Refactor
•Cut rework
•Reduce bugs

Drawbacks-Test Driven Development
•Programmers like to code, not to test
•Big time investment
•Additional Complexity
•Effectiveness depends on developers

Behavior Driven Development
•User stories
•Ubiquitous language
•Format:
            - Given[context]
            - When[event]
            - Then[outcome]
•Power of 3
Examples-Behavior Driven Development 
A new frequent flyer starts off with Bronze status.
If she earns 300 points, she becomes a Silver Frequent Flyer. 

BDD solution:

Scenario: New members should start out with Bronze status
Given: Jill Smith is not a frequent flyer member
When: she registers on the frequent flyer program
     Then: she should have a Bronze status

Benefits-Behavior Driven Development 
•Deliver more valuable software
•Faster & Reliable releases
Reduced maintenance costs

Challenges- Behavior  Driven Development
•Writing good scenarios takes practice
Requires high business engagement and collaboration

Feature Driven Development
 Short iterations
•Developing by Feature
•Color coded UML
•Delivers frequent, tangible working results at all steps

Color coded UML
Yellow – Person / Organization
Blue – Description
Green – Place/ Thing
Pink - Time






Benefits-Feature Driven Development
•Bigger Projects
•More novice developers
•Critical projects

Drawbacks-Feature Driven Development
•Not as powerful on smaller projects
•High reliance on chief programmer

Acceptance Test Driven Development
Crystallize acceptance criteria
Develop right product


Example:
As an administrator, I want users creating accounts to be required to choose secure passwords so that their accounts cannot be hacked by someone using a password guessing program.



Benefits- Acceptance Test Driven Development 
 Avoid misunderstood requirements
•Thorough product testing
•Earlier defect detection

Drawbacks-Acceptance Test Driven Development
•Time constraint
•Getting entire team to follow the process
•Project progress may be slow due to additional work

Wednesday, August 13, 2014

Big Data - The king of Kings

There was a time when people used to say that the "Customer is king".. well.. You may be puzzled why I say it in past tense. Yeah... This is the golden era of Data.. You heard it right!!! Customer may/ may not be the king... Depends on how good the customer invests in your projects.. The real king is Data... And, Big Data is the king of kings.. I shall give you the insight of Big Data in this article.


Definition

Big data is a buzzword, or catch-phrase, used to describe a massive volume of both structured and unstructured data that is so large that it's difficult to process using traditional database and software techniques. In most enterprise scenarios the data is too big or it moves too fast or it exceeds current processing capacity. Big data has the potential to help companies improve operations and make faster, more intelligent decisions.


Characteristics of Big Data:


Volume
• Data Volume
• Expected 44x increase from the year 2009 to 2020
• From 0.8 zeta-bytes to 35 zeta-bytes
• Data volume is increasing exponentially



Velocity
• Data is generated fast and need to be processed fast
• New Online Data Analytics
• Late decisions --> missing opportunities
• Examples
–E-Promotions: Based on your current location, your purchase history, what you like -> send promotions right now for store next to you
–Healthcare monitoring: sensors monitoring your activities and body -> any abnormal measurements require immediate reaction

Variety
• Various formats, types, and structures
• Text, numerical, images, audio, video, sequences, time series, social media data, 
multi-dimensional arrays, etc…
• Static data vs. streaming data

• A single application can be generating/collecting many types of data
• To extract knowledge, all these types of data need to be linked together / integrated



Big Data Customers:

Web and e-tailing

• Recommendation Engines
 • Ad Targeting
• Search Quality
• Sentiment Analyses
• Abuse and Click Fraud Detection




Telecommunications

• Customer Churn Prevention
• Network Performance Optimization
• Calling Data Record (CDR) Analysis
• Analyzing Network to Predict Failure


Government

• Fraud Detection
• Cyber Security Welfare
• Justice


Healthcare & Life Sciences

• Health information exchange
• Gene sequencing
• Healthcare improvements
• Drug Safety



Big Data Myths

• Always means data above or in range of TB
• Is always about social media. Doesn't apply to me.
• Will replace Enterprise Data Warehouse
• Is just a buzz word. No Practical Applications!
• Is New Concept
• Will be future.
• Is Expensive
• Is only for data scientists. Or is magic.
• We have enough hardware. Don't need any more.
• We will build it when we need it.
• Big Data is about Hadoop.

WHAT IS HADOOP?

• Cute Little Yellow Toy Elephant
• Framework to handle Big Data
• Open Source - Apache
• Power, Popular & Supported
• For reliable, scalable, distributed computing
• Created by Doug Cutting (of Yahoo) and Mike Cafarella
• Built for Nutch search engine project
• Written in Java

CORE OF HADOOP?

HDFS- Hadoop Distributed File System (Storage)

Stores multiple copies of file parts on multiple machines.
1. Distributed across “nodes”
2. Fault Tolerant & High Throughput
3. Low Cost Hardware

4. NameNode tracks locations.

MapReduce engine (Processing)

Execute your logic on multiple computers in parallel.
1. Splits a task across processors / nodes
2. “near” the data & assembles results
3. Self-Healing, High Bandwidth
4. Clustered storage

5. JobTracker manages the TaskTrackers




Components






Conclusion


Big data is more than simply a matter of size; it is an opportunity to find insights in new and emerging types of data and content, to make the business more agile, and to answer questions that were previously considered beyond human reach. 


Tuesday, July 29, 2014

Alfresco 5.0 Community edition features:


Its very exciting to learn that Alfresco made a big leap by releasing 5.0 community edition :) :) The Enterprise edition may be out in another two months!!!  Below are the key features that I learnt from Alfresco personnel through their posts:

1. Filtered search is available. Now we can search any word or title from the entire system just by searching in the search bar. Oh wait!!! we did already have a search feature in Alfresco 4 editions.. Isn't it?Yep we do have.. This new feature enables us to look for documents along with the filters. It really makes easy for the users to apply multiple filters and look for a more specific search results.


2. Instant Search Results feature (Live Search) provide near real-time search results for Documents, Sites and People immediately as the user is typing in the search box. This is a great interactive way to explore search results and find items from any screen in Share.


3. Alfresco Share has a good preview feature to view various types of documents. However, for more complex document types, it required the 3rd party Flash plugin. To overcome this, a pure HTML5 based document previewer has been added which provides better browser support, faster performance and no reliance on 3rd party plugins.

Below are the notable changes in the previewer:

1. Multiple pages can be displayed on screen
2. Mini summary view
3. Search button
4. Link button
5. Download button





4.The inline HTML editor used to edit .html content, comments, wiki, blog and discussion pages in Alfresco has been upgraded to TinyMCE4. This provides a more modern looking editing experience with various minor improvements. TinyMCE4 features an improved interface and a nice full screen editing mode.


5. The new Sites Manager feature in Share Admin Tools enables an Administrator to control access and delete sites from a single admin screen.


These are the notable changes in Alfresco 5.0 Community edition apart from the cool looking UI... Hope to see many more such wonderful features from Alfresco!!!




Wednesday, July 23, 2014

Acceptance Test Driven Development

ATDD is a social form of software development which requires members of a development team (including testers, developers and users) to fully understand the acceptance criteria that have to be fulfilled by the system early on in the development process.



This ensures that all stakeholders understand the main objectives of each requirement in terms of the functionality it provides to the end-user. The acceptance criteria are often developed from a user’s perspective and in this case user personas and user stories can come in handy.
In ATDD, acceptance criteria for each requirement are written before coding starts. These criteria are best described by business representatives such as the requirements analyst.
When the acceptance criteria are developed and run on the system, any failures are noted and the developers refactor those components by adding the minimum code needed to help them pass the test at the next attempt.
This process is carried out iteratively, usually at the end of each sprint, until the final product is ready for deployment.
As you can see, ATDD is practically identical to TDD in the later stages, the main difference being that the actual testing is preceded by a joint effort between different team members to mutually agree upon the acceptance criteria to be fulfilled.
This gives further direction to the team and helps them keep in mind the bigger picture that is the ultimate purpose of the finished product, rather than be absorbed in the nitty-gritty of code tweaking.
The motto for ATDD would be: Show me where I need to be and I’ll get there eventually.

Monday, July 14, 2014

jBPM and Activiti- An Analysis

Business Process Management is an essential part of every web application. These web applications can be anything like Portal, CMS, CRM or ERP. In the open source world, organizations are mostly selecting either Activiti BPM or jBPM. Here are the glimpse of features and comparison.

Let us start with Google trends, which show us popularity of both the products. jBoss jBPM is one of the oldest product available in the market while Activiti BPM has launched somewhere in the year 2010. However, if we can look at below chart, we can see that the interests of people change from time to time. 



As per Google Trends


jBoss jBPM is one of the popular BPM 2.0 tool in its category. While on other side, Activiti BPM Engine is one such light weight and easy to use for Java developers. In that respect, both have a stiff competition on its success. The success claim comes with big difference between Activiti BPM and jBoss jBPM will not be in the process engine, but which will be the more sophisticated tool that we'll be able to build on top. Activiti is new but on its track to attract market and on path to success as jBPM did once upon a time.

jBPM 6

jBPM 6 is the latest community version of the jBPM project.  It is based on the BPMN 2.0 specification and supports the entire life cycle of the business process (from authoring through execution to monitoring and management).
It offers open-source business process execution and management, including
  • Embeddable, lightweight Java process engine, supporting native BPMN 2.0 execution
  • human interaction using an independent WS-HT task service
  • BPMN 2.0 process modeling in Eclipse (developers) and the web (business users)
  • web tooling to model, deploy, execute and monitor your processes, including for example a data and form modeler, simulation, deployment, task lists, etc.
  • web-based business activity monitoring and reporting that allows you to define your own reports
  • managing and deploying your processes using technologies underneath like Git and Maven
  • an execution server that you can remotely connect to (REST, JMS) and can be deployed in a clustered environment for load balancing and high availability
  • tight, powerful integration with business rules and event processing

Activiti

Activiti 5.15.0 is the latest community version of the Activiti project. It's a Java process engine that runs BPMN 2 processes natively.  It will have the following key properties:
  • Allows user updates to be combined with process updates in a single transaction
  • Runs on any Java environment like Spring, JTA, standalone with any form of transaction demarcation.
  • Easy to get up and running with the setup utility
  • Built to support the cloud scalability from the ground up
  • Very simple to add new custom activity types and complete dedicated process languages
  • Rock solid
  • Extremely fast
  • Transactional timers
  • Asynchronous continuations
  • Hidden event listeners for decoupling software technical details from business level diagram
  • Ability to test process executions in isolation in a plain unit test
I have referred few articles and given below are the differences between jBPM and Activiti:
  
Description
Activiti
jBPM
Community members
Activiti has a base team consisting of
Alfresco employees. In addition,
companies like SpringSource,
FuseSource and MuleSoft provide
resources on specific components. And of course, there are individual open source developers committing to the Activiti project.

jBPM has a base team of JBoss
employees. In addition there are individual committers.
Spring support
Activiti has native Spring support, which makes it very easy use Spring beans in your processes and use Spring for JPA and transaction management.

jBPM has no native Spring
support, but you can use Spring
with additional development effort.
Business rules support
Activiti provides a basic integration with the Drools rule engine to support the BPMN 2.0 business rule task.
jBPM and Drools are integrated on a project level and therefore there’s native integration with Drools on various levels.

Additional tools
Activiti provides a modeler (Oryx) and designer (Eclipse) tool to model new process definitions. But the main differentiator is the Activiti Explorer, which provides an easy-to-use web interface to start new processes, work with tasks and forms and manage the running processes. In addition it provides ad-hoc task support and collaboration functionality.

jBPM also provides a modeler
based on the Oryx project and a Eclipse designer. With a web
application you can start new
process instances and work with tasks. The form support is
limited
Project
Activiti has a strong developer and user community with a solid release schedule of 2 months. Its main components are the Engine, Designer, Explorer and REST application
jBPM has a strong developer and user community. The release schedule is not crystal clear and  some releases have been postponed a couple of times. The Designer application is (at the moment of writing) still based on Drools Flow and the promised new Eclipse plug-in keeps getting postponed


Conclusion:


From the above comparison, You can choose jBPM or Activiti, both will teach you and let you implement the BPM discipline main stages. Both are Open Source and ASL licensed.


Monday, July 7, 2014

Alfresco Activiti Workflows


Introduction to Workflows
The automation of a business process, in whole or part, during which documents, information or tasks are passed from one participant to another for action, according to a set of procedural rules.
Examples:
•   When you submit an insurance claim, you are initiating a workflow.
•   When you check on the status of your loan application, you are asking for metadata    about a running workflow.
   When you give the final approval for a piece of web content to be published, it is likely you are completing a workflow. 

Real-time results:

The Toyota car company adopted Ford’s assembly line in the 1950s to develop their own production system. Over the following years, the benefits of their system resulted in:
•   Productivity increases between 300% to 400%.
•   Labour productivity increased an average of 25% a year.
•   Defect rates reduced from over 2000 to less than 50 parts per million, and in many  to less than 10 parts per million.
•   Cost of quality cut by over 60%.
•   Work-in-process inventory cut by more than 80%.

Why Workflows?!



What is Alfresco Activiti?

  • Activiti is an open source, standalone workflow engine supported by Alfresco.
  • Another advantage is that Activiti can be used anywhere, any project!!!
  • Some popular workflow engines are- Orchestra, jBPM
  • All it needs Java !
  • Developing Alfresco Activiti workflow                                                                   – Eclipse Activiti plugin                                                                                         – Alfresco Activiti web editor (http://activiti.alfresco.com)

Why two workflow engines in Alfresco?! 
    Starting with Alfresco 4, Alfresco has two embedded Advanced Workflow engines to choose from: JBoss jBPM and Activiti.
     The JBoss jBPM engine is the original Advanced Workflow engine included with Alfresco. Desiring to have an Apache-licensed workflow engine, Alfresco hired jBPM creator, Tom Baeyens, and some of his team to start a new open source project aimed at building an Apache-licensed, BPMN 2.0 compliant workflow engine. The result is Activiti.
     Both jBPM and Activiti are open source and both can be used as standalone workflow engines in solutions completely unrelated to Alfresco and document management.

Types of Alfresco Workflows
  •     Alfresco basic workflows
  •     Alfresco advanced workflows

Alfresco Basic Workflow
  •      Are configurable by non-technical end-users
  •      Leverage rules, folders, and actions

Below is the typical basic workflow

                  

Assigning the user for user task


Another example:


Alfresco Advanced Workflow
  •      Are defined by business analysts and developers using a graphic tool or by writing xml.
  •       Leverage rules, folders, and actions
Below is the sample advanced workflow created by OMG:


Steps to deploy the activiti workflow:


 Below are the steps to deploy the workflow process created by Alfresco Editor:
1. Once the workflow is created, save it.
2. No error message is thrown if the created workflow is the correct one.
3. Export the workflow as xml file with the extension--> .bpmn20.xml
4. Note down the process id from the xml
5. Navigate to the shareconfig.xml file and rename the below:
     config condition= activiti$<Process-ID>
6. Restart the Tomcat server
7. Login to Activiti Explorer:
   localhost:8080/alfresco/activiti-admin
8. Upload the xml file that was created.


9. If the xml is uploaded without any error, it is clear that the file does not contain any faults in it.
10. Login to Alfresco Share
11. In the user dashboard, click on 'Start Workflow' from the 'My Tasks' dashlet

12. The page is navigated to Start Workflow.
13. From the dropdown list, select the workflow that we deployed.
14. The page is loaded with the workflow details.