Amazon Polly

Add Amazon Polly to Your WordPress Website using AWS Management Console and quick setup options.

Login to your AWS Management Console.

Configure a new IAM role with AWSforWordPressPluginPolicy and attach it to your new EC2 instance.

Login to your blog admin and download AWS for WordPress Plugin.

Configure AWS Polly set up options.

Enable Polly and start listening to your blog!

Developing Scrum Teams to Wipe Out Toxic Work Culture

If you are feeling repulsive every day to get back to work and to avoid the toxic work culture, you are not alone. Hostile work environment and workplace harassment exists even in Fortune 500 companies. Scrum teams and agile methodologies are a perfect solution to wipe out instability and insecurity in the teams.

Toxic Work Culture

Toxic work culture is common in organizations and definitely in all insecure teams. It is as evident as bullying in schools and ragging in colleges. You can only suck it up so much! Using your peers against you has become a norm for Human Resources and Project Managers. The insecurity and instability have led to more repulsive and reclusive teams.

You can differentiate toxic work culture in the first week itself. Everything is so rosy until you join and while you are getting acquainted with the new environment, the onset of personal attacks will begin. By the way, this has nothing to do with how well you are educated, how hard you are working, or how much you are willing to change to match the company’s expectations. It is just like that.

Scrum Teams

On the other hand, Scrum teams are proving to more empowering teams by self-organizing and cross-functional methods. All teams are agile and are welcoming input for continuous improvement. We all learn from each other and that is true for organizations as well. New hires who are Scrum certified are now becoming mandatory for teams. Even your organization is not following agile scrum, getting certified will provide new ways of working and enabling each other.

Modern organizations like NewBoCo #newboco are training the youth in both software as well as agile scrum certifications and placing them in client place. Getting certified is the best way to understand why the clients are preferring Agile Scrum trained professionals. While some may think the Scrum certifications are unnecessary and only technical certifications are needed. But, how the technical certifications are helpful if your thought process is small and basic work habits are toxic. I think more than the technical certifications, Scrum certifications will help to improve the teams. Technical skills can be learned in a short time but the time taken to modify an entire organization mindset is more. Certified Scrum Master and Certified Scrum Product Owner are the two certifications, to begin with. Even if your organization is not developing software, your teams can get benefitted by Scrum knowledge. This will help in the optimization of resources and time.

Scrum teams help each other and become high performing teams. They are continuously helping each other in technical and/or any personal issues. If one team member is having a problem, others are willing to pitch in instead of putting them further down. Helping will multiply further and foster a healthy workplace. All staffing companies must ask their consultants to get Scrum certified if the Client company is having Agile Scrum in their policy. This will help in a smooth transition and avoid unnecessary situations.

Amazon Web Services (AWS) Cloud Practitioner Test

Amazon Web Services (AWS) Cloud Practitioner Certification is the first step into cloud computing with Amazon Web Services (AWS). If you are an existing architect you could get the certification in your first attempt itself! A lot of revision of the concepts and terms is needed before signing up for the test.

Amazon Web Services certification has different learning paths based on role or solution or specialty.  Amazon Web Services (AWS) Cloud Practitioner Certification will help in understanding the concepts and basic terms of AWS.

Domains 

The AWS Cloud Practitioner Test is in four domains:

  1. Cloud Concepts – 28%
  2. Security – 24%
  3. Technology – 36%
  4. Billing and Pricing – 12%

Register

You can sign up for the test via your free AWS account. The test is conducted at a testing center near you. The AWS Cloud Practitioner Test comprises of 65 questions and you have 90 minutes to complete the test. The questions are multiple-choice or multiple select questions. You have an option to review the questions or to skip them for answering later. There is a short survey about your profile at the end of the test.

Test Questions

Test questions mainly comprise from the basics of the AWS. You will need a lot of eLearning and revision just to understand the concepts and familiarize with the terms. You will notice that some of the questions are interlinked and you can connect the answers while reviewing the questions.

The basic training from the AWS Training website will cover most of the test concepts. However, you will need an additional study on the Amazon Database services. Official Study Guides must be reviewed for new and updated AWS concepts.

Scores

Your score will be from 100 to 1000 and the passing score is determined by the AWS community. You need 70 percent to pass the test and you will receive a score report to your email. Do refer official AWS Cloud Practitioner exam guides. The cost of the test is $100 for two attempts. You will have fourteen days to retake the test if you fail the first attempt. Preparing notes will help and mock tests will assist in the review.

Developers, testers, business analysts, product owners, scrum masters, managers, administrators, and all IT professionals alike are recommended to take AWS certifications. Definitely looks good on your resume and organizations are preferring IT professionals with AWS knowledge and/or experience. Good luck on the AWS certifications and your first step will be AWS Cloud Practitioner Test! 🙂

Amazon Web Services (AWS)

The magical keyword in the Information Technology industry is the ‘Cloud’ and Amazon Web Services (AWS) is definitely leading the game. Globally distributed organizations require high-available and fault-tolerant services that are possible with AWS. The pay-as-you-go option from AWS is another reason for organizations to subscribe to AWS services.

Amazon Web Services (AWS)

Fortune 500 companies are preferring Amazon Web Services (AWS) in addition to their traditional data centers and original applications. Seamless integration with existing systems is a major plus for AWS. The elasticity and scalability of the AWS help organizations build cost-effective cloud computing services. The on-demand delivery of IT resources and applications via the Internet with pay-as-you-go options is the key advantage of AWS. Agility, reliability, and elasticity are the benefits of AWS.

Access

Users can create an AWS account via there corporate or personal email. AWS services can be accessed via the AWS Management Console, AWS Command Line Interface (CLI), or AWS Software Development Kit (SDK). Users can subscribe or core services and integrated services and create instances. AWS Cloud Practitioner Certification will help to better understand the AWS and learn/share best practices with the community.

Core Services

  1. EC2 – Elastic Cloud Compute: Cloud storage for storing your applications and data
  2. EBS – Elastic Block Storage: Add on storage volumes with pay-as-you-go options
  3. S3 – Simple Storage Service: Managed Storage Service that is scalable for high volumes. Stores application data
  4. AWS Global Infrastructure: Regions, Availability Zones, Edge locations to facilitate provision in multiple locations
  5. VPC – Virtual Private Cloud: Private network with configuration, security control, subnets, route tables, and Internet Gateway
  6. AWS Security Groups: Has builtin firewalls and to specify which traffic to allow

Integrated Services

  1. Application Load Balancer (ALB): Enables routing of instances
  2. Auto Scaling: Automatically adjusts instances based on conditions and capacity management
  3. Route 53: DNS resolution strategies and routing
  4. RDS – Relational Database Services: Managed service to provide relational database services on Cloud.
  5. Lambda: Compute service without provisioning. Create an environment, routines, and functions. ETL and REST API
  6. BeanStalk: Platform-as-a-service for quick deployment of applications. Supports all programming languages
  7. SNS – Simple Notification Service: Send emails/alerts/mobile communications for alerting users
  8. Amazon Cloud Watch: Monitor AWS applications/services and set alarms
  9. Amazon Cloud Front: Content Delivery Network that has local caching and scale out options
  10. Amazon Cloud Formation: Infrasructure-as-a-service; Template with a resource stalk

Five Pillars of AWS Architecture

AWS Architecture and design principles are based on the five pillars for your systems:

  1. Security: Identify Access Management(IAM), Data protection, incident response, traceability, security at all levels
  2. Reliability: Ability to recover from disruption, Scale horizontally
  3. Performance Efficiency: Virtualize resources, deploy in multiple regions, serverless architecture
  4. Cost-Optimization: Maximize ROI, Optimization over time, Match supply with demand, Measure overall efficiency
  5. Operational Excellence: Fault-tolerant and high availability systems

High Availability Systems

The following are the services that support high availability systems through AWS:

  1. Elastic Load Balancer
  2. Route 53
  3. Amazon Cloud Watch
  4. Elastic IP Address
  5. AutoScaling

Fault-Tolerant Systems

The following are the services that support fault-tolerant systems through AWS:

  1. Amazon Simple Queue Service
  2. Amazon Simple Storage Service
  3. Amazon Relational Database Service

Amazon Shared Responsibility

Under AWS Shared Responsibility model, the user is responsible for user data, application, and guest operating system. AWS is responsible for managing Hypervisor, network, and physical resources.

  1. User Data
  2. Application
  3. Guest Operating System
  4. Hypervisor
  5. Network
  6. Physical

Identity and Access Management (IAM)

Identity and Access Management (IAM) in AWS is possible with users, groups, roles, and policy documents.

  1. User: Every user is given permanent credentials also with multi-factor authentication.
  2. Group: Multiple users are categorized into Groups.
  3. Role: Temporary credentials are given to roles based on the users and groups.
  4. Policy Documents: Policy documents establish rules for providing or denying access to the users/groups/roles.

AWS Security

AWS has a resilient infrastructure with high security and strong safeguards. Compliance management and cloud-based governance are possible with AWS Security. Distributed Denial of Service (DDoS), data encryption, key management service, hardware-based key storage, access control and management, and multi-factor authentication are some other features of AWS Security.

AWS Security also passed compliance requirements from many government authorities. Users can run their own scans on top of the AWS Security for compliance.

  1. Amazon Inspector: A tool to improve security and automated security assessment
  2. AWS Shield: Managed Distributed Denial of Service that safeguards applications. The basic AWS Shield is free for all users and the Advanced AWS Shield can be purchased.

AWS Pricing

AWS Pricing has multiple payment options for users. There are pay-as-you-consume or Pay per GB options. Users can pay less when they use more or pay less when paid all upfront. There are monthly payment options for users. Pricing Dashboard, Simple monthly calculator, and TCO calculator assist users in determining the services and duration.

Users can get discounts for reserved instances and there is no charge for inbound data transfer. The AWS free tier provides access for 12 months to try out their services. Users can map usage to pricing and see their pricing on the Consolidated Pricing dashboard.

AWS Support Plans

Amazon Trusted Advisor is a service to advise customers on fault-tolerance, security, performance, and cost-optimization. Users can view recommendations, weekly notifications, and download reports.

AWS Support Plans exist for Basic, Developer, Business, or Enterprise. Technical Account Manager, Trusted Advisor, and Account Assistance is available to users.

Constant Learning

AWS is an ocean and how users can best use those services for their business is constant learning. Good luck on your AWS journey!

Certified Scrum Master: Say Nothing and Let the Development Team Figure it Out

Yes, in ideal development scrum teams, Scrum Master does not provide a solution but facilitates the discussions towards the solution. Certified Scrum Master is the servant leader in Agile Scrum teams to help achieve their goals. Scrum Master helps improve the business value and assists in the implementation of Scrum both at the team level as well as at the organization level.

Scrum Master

Scrum Master is one of the key roles in the Scrum team who ensures the relationships in the team are smooth for the operation of the Scrum team. Scrum Master definitely teaches, explains, shares experiences, and has a positive outlook toward the implementation of the Scrum. Whenever a difficult situation arises in the team, Scrum Master does the coaching and raises awareness so the team members are able to find the solution themselves. Scrum Master removes any external impediments the team is facing and in certain cases help the team to remove the impediments themselves.

Facilitation is one of the key responsibility of the Scrum Master. They help organize the Scrum events such as Sprint Planning, Daily Scrum, Sprint Review, and Sprint Retrospective. Scrum Master works with the Product Owner to ensure the team has everything needed to achieve their goals.

Scaling Scrum

Scrum Master plays a key role in Scaling Scrum at an organization level. Large Scale Scrum is a challenge in the big organizations and coordinating the multiple Scrum teams is needed. Scrum Master helps the team realize the team capacity and backlog refinement. Scrum Master guides the teams in the Forming, Storming, Norming, and Performing stages of the Scrum Team.

Scrum Master initially works at the team level to make them self-organizing and high-performing. Next, Scrum Master observes the team from a broader perspective. Next, Scrum Master expands the coaching at an organization level to inculcate a culture change. Working with other Scrum Masters is crucial for a Scrum Masters to understand the best practices.

At times, Scrum Master lets the team fail and understand the situation and adapt in the next Sprint. Even when the team becomes self-organized, the Scrum Master is needed for continuous improvement and performing teams. A Scrum Master is open to experimenting, asking questions, encourage conversations, and finding out better ways to get things done.

Scrum Master can introduce fun games and conduct cupcake get-togethers to encourage conversations. Offering small gifts and appreciating the team on achievements helps in team engagement.

Certification

To get Scrum Master certification, you need to attend a two-day paid workshop by a Certified Scrum Trainer. ( Only about 300 worldwide). After completing the class, you can take the test online from your home or office. The test is a 50 question multiple choice test and you have one hour to complete it. In order to receive the certification, you need to get 74%. You have 90 days to take one more time without paying fees.

The test has most questions from the Agile Manifesto and the Scrum Guide. It is an open book test and hence you can have the material by you for reference during the test. However, the time limit is crucial. Some questions on the Scrum roles may be confusing but it is okay. You have an option to get back to a skipped question if you are unsure. The test is included with the training fees for the first two attempts.

Getting the certification definitely helps boost the resume and understand the Scrum concepts. To maintain the certification, you need to keep earning the educational units. Every organization has a different way of adopting Scrum. Some Scrum Masters might perform dual roles as a developer or a tester. Scrum Masters can work on multiple teams and definitely help in backlog refinement in certain Scrum adaptations. Often developers are frustrated as to why the Scrum Masters are following up outside of the Scrum events. Ideally, Scrum Master is helping change the mindset of the organization to improve the business value.

Product Owner and Scrum Master

Agile Scrum is being in practice with many software development teams as well as teams in non-software development. How the Agile Scrum is implemented is dependent on each organization and how they adapt the Scrum principles. However, getting certification from a Certified Scrum Trainer will guide the teams in the Scrum principles and roles.

Often, we come across Scrum teams where the Scrum Master is writing user stories or the Product Owner is conducting the Scrum events. In some teams, Product Owner is also part of the development team. This may be customized according to the organization. But, certified professionals can clearly see the improper implementation of Scrum. Scrum teams are cross-functional and self-organizing. The three important roles in the Scrum teams are the Development team, Product Owner, and Scrum Master. Each has their own responsibilities.

Product Owner

In Agile Scrum teams, Product Owner becomes the business representative for the Scrum teams. Here are the responsibilities of a Product Owner:

  • Always available for the team, knowledgeable in technical and business domain, and is agile
  • Communicates the product vision and product roadmap
  • Manages the product backlog
  • Writes user stories and acceptance criteria/tests
  • Prioritize the product backlog and sprint backlog
  • Responsible for backlog grooming
  • Determines the sprint duration and estimating the user stories
  • Communicates with the business team and the development team
  • Works closely with the business to know actually what they want from the product
  • Quickly adapts to the change requests from the business
  • Partners with the Scrum Master for the overall performance of the Scrum team
  • Works only for one Scrum team
  • Attends daily scrum (optional)
  • Does not speak until spoken to 🙂
  • Lets the development team figure out how they are going to develop the product
  • Responsible for the business outcomes
  • Prepare the release plan
  • Maintains continuous feedback from the business
  • Seeks questions and answers from internal and external stakeholders
  • Uses tools to maintain the backlog, calculate sprint velocity, and maintain burndown charts

Scrum Master

Scrum Master is responsible for removing any impediments to the development team and oversees end-to-end implementation of the Scrum principles and events.

  • Monitor the Sprint events and gatherings including Sprint planning, Sprint review, Sprint retrospective, and daily scrum meetings
  • Facilitates the Scrum by being a mentor and coach
  • May monitor one or more Scrum teams
  • Approaches business to remove impediments
  • Partners with the Product Owner for Scrum implementation

Development team

  • Decides how to develop the product increment
  • Picks the user stories for the Sprint
  • Participate in all the Scrum events
  • Perform code reviews
  • Performs many functions and self-organizes to meet the Sprint goals
  • Complete the user stories vertically so the customer can start using the increment
  • Ensure the committed user stories for the Sprint are complete in all aspects
  • Works for only one Scrum team even if reporting to Project Manager from another team
  • Cannot take up any work from outside the team
  • Being agile to implement changes in future sprints
  • Looks out for each other for the success of the Scrum team
  • Complete all stages of development including testing
  • Communicate with Scrum Master and Product Owner

Self-organizing and cross-functional Scrum teams are the latest way of getting things done efficiently. Collaboration and communication are key to the success. Managing complex projects can be simplified using the Scrum principles and events. Lots of discussion and consensus is required before actually starting the work so the teams can deliver what the customer actually wants.

The Scrum has changed in 2018 and here is the 2017 Scrum guide for your reference. Getting the Scrum certification from a Certified Trainer will help the Scrum teams to know what they are doing right and what is the ideal way Scrum teams are supposed to work.

scrumguidenov2017

 

Are You Ready for the Next Gen Coders…

The typical requirement of four year or three year bachelor degree with over ten years of experience in the related field is not relevant in the IT industry anymore. The new wave of coders are high school graduates with technical training and on the job apprenticeship are ready for your high-tech job within an year! Here is the best part, they are already aware of the agile Scrum processes and are ready for the 60K to 75K IT Job! Quad Cities is one of the regions adapting the trend and is getting ready to manage the young coders!

Youth start coding as young as twelve through the different programs in school or local STEM institutions. They learn typing in schools and are better at organizing work with the Google Docs. Initially used for getting work done, now schools have started using computers for educating students in computers. Engineering, Nursing, Coding, and other STEM courses are popping up in the school curriculum. Robotics has become a mandatory activity for kids in and out of school. High schools have created vocational courses so that the kids can be a certified nurse after passing high school. Some local high schools have made engineering an optional course in all four years so they are ready for the vocational jobs.

Special programs for girls in coding and computer science are in place to encourage coders. The traditional mindset of limiting women to just the Business Analyst or Tester roles will not work anymore. Women in IT are now developing more programs and managing those projects as well. The next gen women coders are able to take up the challenges with more communication skills, perfection, and confidence!

Ignite Quadcities, QCESC, Career Cruising QC, and CoWorkQC in the Quad Cities and NewBoCo and Vault in Cedar Rapids are some of the latest organizations developing young coders. The next generation workforce also have founded an organization and done some consulting in their high school years. Government grants and funds to encourage STEM programs and trade schools has also added to the new trend. Some trade schools do charge some amount for the training. By partnering with local IT companies, they allow local IT managers to visit the students during the apprenticeship and teach what is required at their organizations. Some local colleges are allowing the credits from the trade school to transfer to a degree so the kids can have a Bachelors degree as well. The trade schools are also allowing the kids to work in the Scrum process under a certified Scrum Master so the kids are aware of the process in the IT organizations. In addition, the trade schools are also willing to take older workforce who are stuck in minimum wages through out their lives and are willing to work hard for the change.

The next generation coders are already learning Java (!) during their high school years and participating in the local hacking and coding marathons. Online courses from Khan academy and Udemy are paving a way to learn coding in a systematic way. We do not need the specialists (?) anymore as we can employ our local kids to work in our IT organizations. However, whether they are going to work long enough in the same organization is questionable. Also, are they ready for super stress and long working hours demanded by the Information Technology work. A trade school course can get them a job but is not a substitute for the Bachelors degree and the kids must work towards the degree while working in their dream IT job!

 

Scrum Teams: Powerful Way of Getting Things Done

Scrum alliance is a modern technique to improve team work and customer collaboration. With reduced levels of intermediate communication, Scrum teams are revolutionizing how things are done. Mainly created for software development teams, Scrum principles and Agile methodologies are being incorporated in to all businesses.

Scrum

Scrum is a framework of Agile model for software development. Mainly focusing on face-to-face interactions, delivering working software at frequent intervals, incorporating change at any time during development, and customer collaboration, Scrum teams are increasing in many Fortune 500 companies.

Scrum Teams

The Scrum teams are self organizing and are a group of five to nine people. The small size lets them focus more on the tasks and communication. Product owner, Scrum Master, and the development team are three main roles of Scrum teams.

  1. Product owner: Responsible for gathering requirements from customer and acts as a main collaborator.
  2. Scrum Master: Oversees the sprint and makes sure the Scrum principles are being followed.
  3. Development team: Self organizing team members focused on the development of the product.

Team members focus on empowering each other and get things done in an efficient manner. Developing, testing, implementing, and incorporating customer requested changes are all completed within a short period of time called Sprint, which is typically two to four weeks.  The teams compete to increase their velocity with each sprint. Special tools such as Jira, Rally, Trello, and so on are used to record and measure the Sprints.

Scrum teams help to avoid ongoing distractions and smart phone addictions. The daily scrum meetings and face to face communication gives every one a chance of participation and a feeling of being important. Daily scrum meetings let the scrum teams discuss tasks done, tasks ahead, any obstacles within ten to fifteen minutes. This will set the focus of the Scrum teams and team members can watch out for each other.

Team members are able to develop Scrum values such as focus, commitment, courage, openness, and respect by working in Scrum teams. Overall efficiency and work environment are seeing an improvement through the Scrum teams.

Certifications

Scrum Certifications are helping teams get familiar with the Scrum principles, key terms, mandatory meetings, and so on. You can register at any local event and get certified. The certifications provide a guidance on the implementation of the Scrum in any business.

  1. CSPO: Scrum Certified Product Owner
  2. CSM: Scrum Certified Master
  3. CSD: Certified Scrum Developer
  4. CSP: Scrum Certified Professional
  5. CST: Scrum Certified Trainer
  6. CEC: Certified Enterprise Coach
  7. CTC: Certified Team Coach

Various requirements have to be met for advanced certifications while some require an interest to work in Agile Scrum teams. Ongoing participation in Scrum events and re-certification is recommended. Find a certification event near you and get started today!

Scrum Teams in Real Life

Scrum teams have proved to be efficient in many small businesses and even at family level, Scrum teams are performing better. Typical attitude of working in a silent secluded manner are being overtaken with a more collaborative and interactive approach of Scrum.

Small businesses are mostly practicing Scrum and are Agile without being aware. However, if they practice the Scrum teams, they can be more self regulating and self organizing. Everybody appreciate the daily scrum and are in loop of whats happening. Customer appreciates the working models and can let the Scrum teams know any changes needed. The Scrum teams are also feeling empowered with the regular communication and feedback from Customer.

There are some new terms and way of working that Scrum teams must get familiarized. Once, the habit is formed, there is no stopping for the Scrum teams in software development, conducting business, as well as in daily lives!

 

 

The Death of Crypto Currency

Investors were all frenzy earlier this year with the enormous growth of the Crypto Currency such as the Bitcoin and Ethereum. Working on the blockchain methodology and peer-to-peer payment systems, the Crypto were attractive as an alternate currency. The lack of fees for local and international transactions proved to be a rebellious way of paying. However, the software fork updates this month has made the Crypto Currency loose billions of dollars.

Crypto Currency

Crypto Currency is a term widely used for digital currency or virtual currency which is independent of any bank or financial institutions or country. It is just a process of continuous verification of transactions through software and hardware code. For every verified piece or block of code, a unit of digital currency is issued. Some Crypto Currency such as the Bitcoin and Ethereum have become the official currencies in some parts of the world. Organizations and regular stores have started accepting the Crypto Currency as a means of payment. Individuals with appropriate technology set up are able to mine the Crypto Currency in their homes. Some opt for pool mining, some investors set money in exchanges, while some buy the stocks reserved for the Crypto.

Crypto Currency can be bought with real-time currency worldwide. Several exchanges such as GDAX and Coinbase have made buying the Crypto Currency easier. In some parts of the world, Crypto ATM’s are made available for users with which they can buy the digital currency. There are fees for the transactions on the exchanges. Anonymity of users and transactions are possible in the Crypto networks. High security of the software and hardware have led to billions of transactions. Users may see a delay between when the time of order and the processing of orders due to the continuous verification.

All exchanges follow minimum Know Your Customer and Anti-Money Laundering policies. Since the network is driven by software and users themselves, the investments are not secure. Recent software glitches made users loose money due to the issues. The exchanges do not guarantee the money lost in the wallets. Also, during the software updates or forks, the money may be lost which cannot be recovered.

Investment

This year, the IRS has exempted transactions in Bitcoin up to $20, 000 in Coinbase. New regulations are being developed worldwide for regulating Crypto Currency. Billions of users are investing in the Crypto Currency due to the rapid growth. Bitcoin has risen from around $100 to up to $4000 since its inception in 2009. Similarly, Ether which is preferred by the organizations also seen a huge growth from about $8 to around $403 this year.  Early investors have seen growth up to 400 per cent. Short term investors have lost some amount due to the volatility of the Crypto Currency.

The network users and miners have started to have disagreements on how the transactions were processed. Some believe that the transaction processing can be outsourced to third parties for faster processing. Some say that all transaction processing must be within the network. Several updates of the software fork SegWit have been introduced in to the system. Investors do withdraw their money during the updates as the software may be unpredictable. In the past, users of MtGox, a popular exchange, lost all their money due to the difficulties in the exchange. All exchanges lock the withdrawals during the software updates.

With every update and the differences in the system, investors are suspicious about the Crypto Currency network. Some believe that after the network is stabilized, the Crypto will reign. Some are getting in to panic mode and avoiding Crypto altogether. Finally, the Crypto Currency has huge scope to grow as it fell rapidly this year. Users can invest while it is in low and hope it will rise again from death.  Let me know your experiences with the new found luck – Crypto Currency. 🙂

 

Contact Forms Comparison

Contact form is an integral part of any website. It provides a medium for the customer to connect directly with the users. Traditional html forms always work but Wufoo, Google Forms, WordPress Contact Form, and so on are the latest contact forms taking over the website world. They are equipped with inbuilt functionalities which otherwise require hours of programming.

HTML and PHP

Traditional HTML Contact forms involve creating forms with ids and capturing them via php and storing in database. The values from the MySQL database could be later retrieved in to a Excel sheet or a web page. This version works fine even now. The developer needs to take care of SQL injection, blank values, naming the fields in the database, and so on. With HTML 5,  the inbuilt validations come in handy for developers. A lot of code needed to store and retrieve values from database. Further, the out put where the values are displayed or stored must also be taken care of. Sending the form values to an email via the mailto function is the safest and simplest way to achieve the goal. Adding recaptcha is another safety measure for added security. In addition, blocking spam bots at server side is good for securing your website and contact forms.

Wufoo

Wufoo is another way of adding contact form to your website. However, the entire data and control is with them. Wufoo has four pricing options. The basic version of the form lets you add the fields and put the code on your website. The form also comes with captcha so you don’t have to worry about any additional coding. The data is stored on Wufoo site which can be accessed via your Wufoo login. Wufoo lets you create three forms and three reports in the basic package. The reports are awesome too and you can customize any way you want. The report can further be downloaded in to a Excel file or as a CSV file for further processing. Wufoo forms are great for basic requirements. But, if you want the paid versions you can buy Wufoo membership depending upon your requirements. The basic version also leaves the big message about ‘Form created with Wufoo’ message on your website. You can remove that with paid version. Wufoo also has surveys and emails which can be added later with paid packages.

WordPress ContactForm Plugin

Another gem is the WordPress ContactForm plugin, which you need to set up to be used on your website or blog. The ContactForm plugin is free and can be set up by downloading the plugin from the WordPress Plugins. You can have multiple forms with this plugin and can set up the colors and fields based on your client’s requirements. It comes with captcha for added security. But, ContactForm 7 needs to be updated for latest bug fixes and releases. You can send emails with contact forms in them using this plugin. However, you need to be aware of how to set it up otherwise you will end up with lot of errors. This has to be tested in multiple browsers and devices as the form throws an error if you give invalid input names that are reserved in this plugin. I think this ContactForm is great again and the data can be import or export data from the WordPress admin tools.

Google Forms

If you are a big fan of Google and use Google Apps for most of your web business and data management, Google Forms are a great way. With your google login you can create the form and get the code in your website. Once you submit the form, thank you message from Google Forms remains on the screen. You can edit the colors and fields and set up is easy. You can limit the number of responses, include surveys, send confirmation messages,  and so on. The plugins available for Chrome make the set up even more efficient. If you want to send an attachment with the confirmation message, you have to set a trigger for the function on the form submit. First, save the document to be sent in your google drive, then get the id of the document by opening it in a new window. Set up the Google script to send the mail with subject, body, and attachment to the email specified in the Google Contact Form. You may need to test it out multiple times before you can successfully send the attachment. Spend some time to get a hang of the Google script and related errors. Google Forms Example shows that the data can be saved in an excel sheet on your drive or you can specify the format required. The beauty of the Google Forms is that the Contact Form data sheet on your drive is instantly updated. Sending confirmation messages and sending mail to self is also simple. You can set to send you daily or weekly reports as well.

Let me know how you incorporated Contact form in your website and which you think is the best! Here is one so you can contact me. 🙂

 

Waze : A new way to travel

Recently, a friend suggested Waze app while traveling. I remember seeing ads about Waze, but never looked in to it. This time I decided to try it out.

Waze is a mobile app which can be downloaded in App Store or Google Play. What it basically does is navigate your drive from place A to place B. It is just like a GPS or google maps. In addition to the navigation, Waze is driven by community. Other drivers or ‘wazers’ will help you reach your destination without much disturbances. Other wazers will post a road block, object on road, vehicle stopped on shoulder, reroute, construction zones, traffic delays, and most importantly Cops! Yes, your fellow drivers will post any thing they observe during the drive and you can get alerts while you are driving. How cool is that! You can like or dislike a post. You have to be a wazer in order to post an event. You can view other posts and comments even if you are not logged in as a wazer.

If you are a member, the app shows fellow wazers and the speed with which they are driving. Track other wazers along your drive and bump them. We even got few honks from other wazers on our drive! How cool is that. I mean there is no more privacy in your own car and in your pleasant trip! 🙂 If you have bored teenager or preteen, this app could come quite handy to engage the kids. They might help you with the directions and as well as any upcoming police vehicles. Remember, the app consumes a lot of mobile data. So, keep that in mind. However, this app replaces all other devices on your drive such as the GPS, Police scanner, radio, and so on. Waze app even has commentary by your favorite artist. If you are visiting a city with major events, the Waze app will give you live updates, traffic rerouting, marathon routes, and so on.

If you discovered the Waze app recently or you are a long time wazer, let me know what your thoughts on that! Happy Wazing, Wazers!

Integrate a WordPress Blog to Your Bootstrap Website

So, you built a great website in bootstrap. Your site is live and great, works fine in all devices and browsers, everything is perfect. Now, your customer wants to add a blog to your website. WordPress has great themes for blogs but none of them are going to look like your custom website. Here is how you can integrate the WordPress blog into your website and make the blog look same as the rest of your website. You can create your own WordPress theme!

WordPress Blog

WordPress blog is great as it is perfect for content management, backend, and frontend. You can add multiple users, media, plugins, comments, and so on. Backups and versioning is great with WordPress blogs. Corporates have been building full fledged websites using WordPress Divi themes. Inorder to integrate a WordPress blog to your HTML site built using bootstrap, you can follow certain steps and achieve same functionality.

Settings in the cpanel

  1. First install WordPress in your root folder and give the folder name blog.
  2. Download bootstrap and save in the wp-content-themes folder.
  3. Save additional css such as font-awesome and other css you used in your Bootstrap website in the same folder as bootstrap css
  4. Create new index.php, home.php, header.php, footer.php, sidebar.php, functions.php, page.php, single.php, style.css. Each of the files have their significance in creating your theme in WordPress.
    • index.php: Loads your blog
    • home.php: Loads the blog posts from the database
    • header.php: Loads the header in every post when the get_header() function is called
    • footer.php: Loads the footer in every post when the get_footer() function is called
    • sidebar.php: Loads the sidebar contents when the get_sidebar() function is called
    • functions.php: Needed to load the jQuery in wordpress package to this website and also the sidebar contents
    • page.php: Loads the page you create and can act as a template for every page in your WordPress blog or Website
    • single.php: Loads the individual post which the user clicks in a page with comments function
    • style.css: Loads the styles for this blog
  5. Edit header.php and copy paste the content including the navbar from your existing website template. Edit the css href to php function bloginfo. Load the stylesheet_url using the function. Add wp_head and wp_enqueue_script to load jquery in this page. Save header.php. In the navbar list, add wp_list_pages function to get the additional blog page you created in the WordPress admin login. This way, your WordPress blog will be at the end of the menu items in your website. After the blog is setup, go ahead and edit all the pages of your website and add menu item blog to link it to the blog page.
  6. Edit footer.php and copy paste the footer section of your website template. Remove all the javascript functions at the end and add wp_footer() function. Save footer.php.
  7. Edit sidebar.php and add the function dynamic sidebar to get the sidebar content on all pages and make the sidebars widget friendly. It will load the sidebar contents if there are any existing. Save sidebar.php
  8. Edit index.php and load the get_header() function first. Next, in a loop check the posts and load the posts and the title and content using the the_title and the_content functions. If there are no posts display a message, saying there are no posts. At the ends, load the get_footer() function.Save index.php
  9. Edit page.php. Load the header and footer contents. Divide the page into two columns and load the posts in the left column and the sidebar in the right column. Save page.php
  10. Edit functions.php. Add function to register the scripts such as bootstrap.min.js and script.js in the page. Then enqueue the scripts of your page. Add another function to register the sidebar contents and the before_widget, after_widget, before_title, and after_title style of the sidebar contents. Save functions.php. You can override the default jQuery that comes with the WordPress install with a latest version in the functions.php.
  11. Edit home.php and load the header, footer and sidebar. In a if condition, check if there are any existing posts. For every post, get the post title, links, content, and date, using respective functions. If there are no posts, display a message. Save home.php. WordPress uses home.php to load the blog posts. Save home.php
  12. Edit single.php and and load the header, footer and sidebar. Get the contents of the post and get comments section. This page will be loaded if a single post is clicked. Save single.php
  13. Edit style.css and import the bootstrap, font-awesome, and other css used in your website. Edit the navbar and footer styles to load exactly the same way as the rest of your website. WordPress uses style.css to load the style for your blog. Save style.css.
  14. If you have multiplepages in your blog, you can have a front-page.php and load the header, footer, and sidebar there.

Settings in the WordPress login

Login to your website and blog using the WordPress credentials. Delete the existing page and create a new page called Blog. In the Settings, go to Readings and set the page to load the latest posts. In the appearance settings select the new them you have created. Go to Live Preview and test the site if it is loading properly. Make your current theme as the default theme for your WordPress and start writing blogs. Voila! you are almost done.

Keep checking for the WordPress updates and backups. Test it in all devices and browsers for responsiveness. Maintain your site and the WordPress blog at the same time with minimal distraction to the user. Add some ads to your blog to make some dollars!! 🙂

Tawk.to – live chat on your website

I recently came across this tool tawk.to that is used for incorporating live chat on your website. What’s amazing about this tool is that it is completely free and can be installed on your android or iPhone as well!

Tawk.to is a web tool that is free to signup. You need an email and a valid website where you want the live chat to be installed.

Once installed, you can manage the chats from your desktop or laptop. Users with valid email address can be configured as an agent. Many agents can be set up and the users can start chatting.




 

The web chat is a must for all websites who want to sell their products or services. The instant chat lets users get answers immediately. Their queries can be answered and any further sales leads can be developed.

Tawk.to application has inbuilt tracking and analytics of the chat and the website in general as well. It gives you the number of visits and pages where the users spent and so on.

All the chat history and communication between the agents is stored in the application. In addition, agents can answer the chats on the go by installing the mobile app. The chat sessions can be recorded on the phone and stored in the computer applications.

Agents are able to see what the user is typing in real time and it gives time to prepare for the answer. Time when the chat ended, when the user left the website, if the user liked or disliked this tool everything is recorded. The application lets you set the status message as available, away, or invisible.

I thought it is similar to any customer service web application but the answers are not customized or suggested.

Overall, tawk.to is a cool asset for your website and let’s you instantly connect to the user! Let me know your thoughts.

Assassins Creed Syndicate

In 19th century London, there are no rules. The city has gone to the dogs. Crime and corruption rules the streets of a once-great empire that stretched continents. One man controls it all, but he doesn’t live at 10 Downing Street. Crawford Starrick is a crime boss with roots in the evil Templars, who have plans for world domination. And now he sets his sights to India. Who will save this dying city and stop Starrick in his path of destruction?

Two people is all you need.

Jacob and Evie Frye are twins with a mysterious life, but we don’t know about their lineage until towards the end of the game. (No spoilers) Their father and mother stood against Starrick at the beginning of his horrible reign. As the Frye twins free London, they meet many historically significant characters, like Alexander Graham Bell, a genius inventor and inventor of the phonetic telegraph, more widely known as the telephone. Another figure they meet is famous detective Frederick Abberline, a Seargent at the time. (Search him up. He had a pretty interesting life) That specific Inspector happened to work on the Jack The Ripper cases.

This installment of the Assassins Creed franchise brings about a new tool, which is a grappling hook, which the twins can shoot out of their specially-made gauntlets. The classic hidden blade makes an appearance. Since there are two protagonists, you can choose to upgrade Evie and Jacob differently, as they have the same skill tree, but there are some skills that are specific to Evie or Jacob, such as Chameleon, which allows Evie to, simply put, “disappear” into thin air if she crouches idly. There is also a different weapon system, with three different types of weapons making their appearances:

  • Kukris: an Indian weapon meant for confrontational-type attacks. Ideal for Jacob.
  • Cane-Swords: an inconspicuous can which can extend into a deadly and stealthy sword. Ideal for Evie.
  • External Knuckles: includes Brass Knuckles. Can stun enemies very well. Ideal for either of the twins.

There are many more details in the game, and the only way to experience all of it is to play the game. Out of 5 stars, I would rate it 4 out of 5 due to the amount of bugs. Other than that, it is a very good game.

Note: all images and trademarks belong to Ubisoft.

How Social Media Can Improve Your Business

With the age of instant messaging and social media marketing, it is a clear fact that social media can improve your business. It is also proven that the success of your business largely depends on the reviews on all the social media websites. Here are a few suggestions to leverage social media.

Reviews, that can Make or Break
People in modern days have been relying more on the internet to preview a business before placing an order with them. Be it an online business or local business, customers are more and more relying on the reviews online. Word-of-mouth suggestions and opinions are always being considered before spending a dollar. Signing up for a new activity for your child, buying a new software or phone, eating out at a restaurant, all these chores are heavily being done based on the reviews!

Professional Organizations
There are certain professional organizations that provide reviews an ratings of businesses exclusively. These include Yelp, Angie’s List, Better Business Bureau, and so on. Customers look up a business on these websites before approaching a new business. The review providers are charging a heavy amount but you are not assured of the results! Professional associations with other local businesses is also a good way to improve your reach.




Social Media Reviews
Social media such as facebook, twitter, pinterest, instagram, dribble, youtube, google plus, and so on are also other great platforms to create a specific page for your businesses and making contacts through them. You can also leverage Linkedin to create a social presence. It is always better to have your own website to promote your business. The advantage of the social media marketing is that you can track the people and increase your marketing efforts based on the population. Here are some important tips to keep in mind about social media marketing:

  1. You can link your twitter and facebook accounts with the email address. Once you post on twitter, it will be automatically updated on facebook.
  2. In the same way, if you post on facebook, your post will automatically roll on twitter. How cool is that!
  3. Similarly, you can link your YouTube channel with facebook and twitter so once you post a video on YouTube, your other channels are automatically updated.
  4. It is very important to create a Google Business account and add your local address on the Google Business site. Its inbuilt tracking and insights will let you know the number of unique visitors and the type of visitors.
  5. You must create a public page on Google Plus account and link other social media accounts to it. Make contacts with other local businesses in Google Plus. Thus, Google will automatically send traffic to your website based on your local settings.
  6. You can link your WordPress account to facebook and twitter so that your posts automatically appear on all your social media networks.
  7. Also, create separate pages for each of your locations so that when users search for your business in that location, your name will appear.

Social Media also lets you to track the visitors so you can acquire their email addresses and make a email campaign to promote your business. It is important that the reviews on these websites and media are also a deciding factor whether a customer is likely to choose your business or not. With more users heavily relying on the reviews, you can leverage the available tools to improve your business reach.

YouTube Application Program Interface (API)

YouTube is the most popular video source for world wide web users. As a developer, if you would like to embed a YouTube application in your website or application, there are a number of tools available. However, there are some settings and customization required if you want to modify according to your requirements. Here are my insights.

YouTube API

To incorporate YouTube API into your website you will first need a security key or API Code. You can create one for your project by creating a google account if you don’t already have one.

  • After logging in to the Google Developers Console, create a new Project by giving title and description
  • Add corresponding API’s to your project by selecting YouTube Data API’s to start with
  • Create a security key for your project using the left menu for the domain
  • You can also create a OAuth key if required and add the domain and referrers




Connecting to YouTube

On the Google Developers YouTube page, there are scripts available in different programming languages such as Java, JavaScript, PHP, Python, and so on. You can follow the guidelines there to create the pages. If you are using JavaScript, you can create separate java script files and html file as given. However, you can include everything in one html page separating the scripts.

In the code replace the existing sample text with your security key that you generated earlier. Try running the code in a browser and everything must work fine. However, the console may show certain errors such as ‘cannot find property of undefined’ and so on. Start debugging the code and see where the error is occurring.

In most cases, the security key is incorrect or if you are trying to connect from a http to https websites. In other cases, the errors pop up due to the x-frame origin set to the sameorigin. If you check the response of the gapi, you can see the json response and all the resulting video lists.

Search.List

YouTube API has a function search.list which is used to search the youtube videos and get a response. You need to specify a search string and return type. Also, the maxResults or safeSearch options can be set based on your preferences.

Once you get the response json, the next step is to embed the video code of each video in to the iframe player on your html. You can use a player for web,ios, or andriod applications based on your device. Create an id to the iframe and set the source of the iframe to the youtube video code onclick of the video title. You can have a function to append code to the source url. In addition to displaying the video title, you can also display additional details about the video such as the thumbnail image from the json.

Other YouTube Functions

There are other functionalities that you can include in your website such as uploading a video, creating or modifying a playlist, searching a channel, downloading a video, getting the videos from users channel, and so on. The code is already there in the Google Developers, but the rel challenge lies in how you incorporate into your application. It also depends on how you customize the code and also taking care that your application does not crash due to the YouTube API. You also need to take care of the minimum units available per day and always upgrade more depending on the use.

The Power of Pega

Pega has turned out to be the most popular platform for building Business Process Management (BPM) and Customer Relationship Management (CRM) applications. Pega has powerful capabilities which can be used by the business and project managers to capture the requirements directly into the application without any need of coding. Pega Systems software has inbuilt features with which capturing and transforming customer requirements into technical details with a click of a mouse. I think Pega is cool is because of its features and easy to use capabilities.

Mega Pega Products

Pega has custom solutions for Marketing, Customer Service, Sales and Onboarding, Operations, and the most famous Pega Platform. Each solution has unique features such as customization and reports generation.

  1. Pega Customer Service has inbuilt directions for the customer service representatives based on the role they logged in or based on the incoming call. The messages can be customized and launched by a supervisor or manager depending upon the independent needs. Reporting is much easier with inbuilt range of reports that can be modified based on your requirement.
  2. Pega Marketing can be used to design, develop, and monitor marketing programs and campaigns which can be customized and prioritized based on the changing requirements. Marketing goals and up sell and cross-sell strategies can be included all in one place. Marketing channels can be unique based on the individual customer and can drive better results.
  3. Pega 7 Platform has cool features such as the Case Manager and Designer Studio which make building applications easier. The business processes can be captured using the Direct Capture of Objectives features. The process flow diagrams can be captured inside the tool and the business requirements documents can be saved in the application itself. You can define the business rules in the work flow diagrams and the process can be directed based on a predefined condition or rule.
  4. Pega Operations is used to drive warranty processes or insurance claims easier with its features. Order management becomes simpler with end-to-end visibility starting from placing the order to delivering the order. Disputes and conflicts can be managed effectively without loss of time and resources.
  5. Pega Sales Automation guides sales processes and handling with its unique capabilities. Guided selling and sales dashboards drive the sales processes which can be effective in managing customers and sales goals. The Pega Onboarding and know Your Customer features lets businesses build applications that meet the business needs.




Pega Customers

Many businesses worldwide have deployed Pega applications to meet their needs. Some of the customers include CISCO, Blue Cross Blue Shield, Linkedin, Farmers Insurance, Wells Fargo, Coca Cola, Expedia, GE Healthcare, PayPal, Xerox, and so on. Pega solutions can be applied in variety of industries including financial services, insurance, healthcare, communications, health sector, manufacturing, energy, life sciences, and so on. Most of the solutions are available in mobile and cloud as well and are compatible with other systems and services.

Major benefits of deploying Pega include:

  • Streamline operations
  • Effective Change management
  • Improve productivity and compliance
  • Increase profitability
  • Simplify and automate core processes
  • Enhance customer engagement

Pega Academy

Pega services include the Pega Academy and forums. The Pega Academy has the course paths and certification options for the Pega users. Some of the basic certifications are free with a corporate email which you try out to get the look and feel of the software. You can download the trial server and observe how the solutions work. Other certifications need corporate credits which your organization can provide if needed.

Try out the Mega Pega and let me what you think about it!

AngularJS Routes with $routeProvider and $stateProvider

AngularJS Routes are used to load different views or states depending on whether you use a ng-Route or ui-Route. The traditional way of linking the pages in your application is just fine, but with AngularJS routes you can handle dynamic binding better and the routes are easier to remember for the user.

Routing with Angular JS allows bookmarking the same url with different categories easier. Routes allow different views to load depending upon the url. Same route can be given to more than one view. For the user, only the keyword appears to be changed, even though the views are loading from different html pages. Basically AngularJS routes are two types:

  1. ngRoute: No nested routes are present
  2. ui.router: Nested routes are present

ng-Route

Include the angular-route js in the script file. You will also need a server for the routes to work. You can set up the Apache Tomcat server. We pass the ngRoute as a dependency to the module while defining an angular module.

var app =angular.module(‘myApp’, [‘ngRoute]);

Using the app.config service, we can define the different routes for the links. The keywords used are ‘when’ and ‘otherwise’. You can have any number of ‘when’ in a $routeProvider provided everytime you return a templateUrl and a controller for that route. For example, in your application you have two menu items, Login and Home. In that case, you have to have two route specified in your $routeProvider. Further, you have to create two additional html pages which have to load in those routes. Also, you have to create two controllers to define what happens in the html pages. Here is an example.

myApp.config(function($routeProvider){
$routeProvider.
       when(‘/home’,{
       templateUrl: ‘home.html’,
       controller: ‘HomeCtrl’
}).
      when(‘/login’,{
      templateUrl: ‘login.html’,
      controller: ‘LoginCtrl’
}).
      otherwise({
      redirectTo: ‘/login’
});
});

Remember to pass the $routeProvider to all the controllers as a function parameter.

myApp.controller(“HomeCtrl”, function($scope, $routeProvider){

});

In the index.html body you have to set up a container or placeholder for the views to load.  The a links are identified in the html with the ‘#’.

<a href=’#/login’>Login</a>|<a href=’#/home’>Home</a>

<div ng-view></div>

ui.router

Include the CDN of the ui.router javascript file in your index.html. ui.router uses a $stateProvider. We pass the ui.router as a dependency to the module while defining an angular module.

var demoapp = angular.module(“demoapp”, [‘ui.router’]);

In ui.router, all the routes are identified with a state rather than a ‘#’ Any number of child routes can be created using the $stateProvider. It uses application state changes to load the views accordingly.

The states are managed hierarchically. $stateProvider is defined inside the app.config service. It defines the different states and templateUrls to be loaded for the states. Each state can also defined along with the parent. Here, in this example, list is the child view of home.

demoapp.config(function($stateProvider){
    $stateProvider.state(‘home’, {
    state: ‘home’,
   url: ‘/home’,
   templateUrl: ‘home.html’,
   controller: ‘CarCtrl’
}),
   $stateProvider.state(‘login’, {
   state: ‘login’,
   url: ‘/login’,
   templateUrl: ‘login.html’,
   controller: ‘BarCtrl’
}),
   $stateProvider.state(‘list’, {
   state: ‘list’,
   url: ‘/list’,
   parent: ‘home’,
   templateUrl: ‘home.list.html’,
  controller: ‘ListCtrl’
});
});

In the child state, you have to specify the parent state. Remember to pass the state to all the controllers as a function parameter.

demoapp.controller(“BarCtrl”, function($scope, $state){

});

In the html, you have to refer to the states in the link. ‘ui-sref’ is used to link the states in the $stateProvider. ui-sref is the wrapper that supports the href in ui-routing. AngularJS will convert the state reference to a href automatically. Also, specify the ui-view to load the views in the container or placeholder.

<a ui-sref=”login”>Login</a>|<a ui-sref=”home”>Home</a><br>

<div ui-view></div>

Routing is pretty simple once you get a hang of it. Just implement and include the correct javascript files in the script tag.

AngularJS Directives

AngularJS directives are a cool way of defining behavior and using it any way you want. You can have a directive with your name and have it do any kind of work you want depending on the situation. AngularJS directives control your DOM behavior.

Directives

Directives guide the HTML compiler to control the elements so they can behave in a certain way. The rendering of HTML inside the AngularJS application is controlled by the directives. Depending on the type of directives, they can be used to change the behavior.  Think about it like the word ‘change’. You can use it to refer to ‘change of clothes’ or ‘spare change’. It depends on the context. Similarly, Directives too can be used to behave differently if used in different contexts.




Built-in Directives

Here are some key details about directives.

AngularJS has some crucial inbuilt directives which can make your application behave in a certain way. Directives can be integrated with the HTML or can be used in the Javascript.

One thing which is cool about directives is its naming. The naming of a directive follows camel case when used in Javascript: (ngApp). Whereas, if the directives are used in a HTML, the name is separated with a hyphen: (ng-app).

There are four basic directives:

  1. ng-app : To auto-bootstrap and initialize an AngularJS application
  2. ng-model : To bind between HTML control and application data
  3. ng-init : To initialize application data
  4. ng-view : To switch between different views

There are many builtin directives, here are my favorites:

  1. ng-controller : To attach a controller class to the view
  2. ng-bind : To replace the text of the element with value of an expression
  3. ng-repeat : To instantiate a template once per item from a collection
  4. ng-hide : To show or hide the given element based on given expression

Directives are defined in a similar way as the Controllers and services. They can be defined using app.directive method. The method takes a name of the directive and a function to define what happens in the directive.




Types of Directives

The four types of Directives are classified based on where they are applied. For example, let ‘kuul-stuff ‘ be the directive you wrote. Then,

  1. Attribute directives : The directive is used to change the attribute of an element                                                                                                            <span kuul-stuff=”expression”></span>
  2. Element directives: The directive itself is used as an element              <kuul-stuff></kuul-stuff>
  3. Class directives: The directive is used as a class                                       <span class=”kuul-stuff: exp;”></span>
  4. Comment directives: The directive is used in the comments section                <-directive: kuul-stuff exp ->

Custom Directives

Custom directives are a cool way of defining your own functionality or workflow. They enhance existing directives and are easy to integrate in the HTML. The custom directives are one of the super powers of AngularJS that makes it build powerful applications. Here are some details about custom directives.

Custom directives are defined using app.directive method. The directive function returns an object in its callback.

myapp.directive (‘myDirective’, function(){

—–     write your functionality—-

});

There are some options which must be specified while writing a directive.

  1. Restrict: Defines the type of directive<br>’A’ = Attribute directive, ‘E’ = Element directive, ‘C’ = Class directive, and ‘M’ = Comment directive. It is better to define Attribute or Element directive so you can determine what element a directive matches
  2. Template: Defines directive output content
  3. TemplateURL: Gives the path of the template to be shown
  4. Controller: Defines a controller in the directive which can be used to achieve a specific task.
  5. Controller As: Defines an alias for the controller so you can refer to the controller’s variables using the alias
  6. Scope: Defines the scope of the directive                                                            ‘false‘ = Default value, which means that the scope of the directive is shared by the scope of the parent. There is no local scope present    ‘true‘ = It means that a new scope is created for the directive. There is local scope present as well as we can access the parent scope.  ‘{}‘=Isolated scope means that there is no link between parent and directive scope. A new scope is created and cannot be accessed outside. Further, the directive cannot access the outside scope.                    It is suggested to have an isolated scope in large AngularJS applications to keep the data safe. However, isolated scope can be accessed outside using some techniques. There is some magic which will be revealed later. Okay, fine. Here is the key. Use the following property to achieve the given purpose.                                                                                                             ‘=’ = Handles two-way binding.                                                                     ‘@’=Passing string values to directives.                                                      ‘&’=External function invocation.
  7. Compile: Compile method is specified to achieve a function as soon as the page loads. It will return a link function. If the behavior occurs only once in the directive, use compile.
  8. Link: Link method is specified to achieve a function similar to compile but it loads after compile. If the behavior occurs multiple times in the directive, use Link.

The order the AngularJS guides the HTML compiler is:                                    Compile–>Controller–>Pre-link–>Link–>Post-link.                                             It depends on what you want to achieve in the directive.




Directive Example

Here is an example of a custom directive.

myapp.directive(‘kuulStuff’, function(){

return {

Restrict: A,

template: <span> Hey, I’m custom</span>,

templateUrl: ‘/kuulstuff/home.html’,

Scope: ‘true’,

Compile: function(telement,tattrs) {

console.log(“Hi, I’m custom”);

var linkfn=function($scope, element,attrs){

element.css(‘background-color, ‘red’);

}

return linkfn;

}),

controller: function(){

console.log(“In the controller”);

},

Link: function(scope, telement,tattrs){

console.log(“In the link”);

},

};

});

This is just ‘some’ information about directives in AngularJS. It may be a bit confusing in the beginning, but if you write more, you will be fine. Write your own directives and let me know how it goes. 🙂

AngularJS Controllers

AngularJS Controllers are where the most magic happens. Think that the controllers of an AngularJS application as the brain. The controllers are super smart and can define what happens on the (DOM) Document Object Model. AngularJS controllers along with the dependency injection form the super power of the AngularJS.

Controllers

Here are some key details AngularJS: How to Begin.

  •  Controllers are attached to the DOM through the ng-controller directive. When a controller is initialized, a javascript object will be created and all the functions in the .controller method can be accessed.
  • The initial state for the Angular $scope is available at the point where a controller is registered. All the properties of the $scope can be defined in the controller and can be accessed through the methods.
  • The .controller method can be used to add the controller’s constructor function to the module. Thus the constructor function is out of global scope.
  • Apart from the $scope, we can send additional parameters to the controller, such as services and functions. It is better to keep a controller as simple as possible. You can define as many controllers as you want in an AngularJS application.
  • A common practice of keeping controllers focused on the required logic is to define services and functions, which can in turn be passed to a controller through dependency injection.
  • Controllers can be nested and inherited. You have to note that the parent’s controller’s methods can be accessed in the child controller. And not vice versa.
  • Finally, remember that the controllers contain Javascript functions and are created by a standard Javascript object constructor and is bounded to a particular scope.

Example

Here is an example of how the Controller is initiated. You have to create an angular app called myapp. Also, you need to declare in the html to tell that it is an Angular application.

In the js:

myapp.controller(“MyCtrl”, function($scope){

$scope.message=”Hello”;

});

In the HTML or template:

<div ng-controller=”MyCtrl”>

{{message}}

<\div>

Your div is binded to the controller using the ‘ng-controller’ directive. The scope of the div is passed to the controller. The scope message variable’s value can be accessed in the div within the dual curly braces. Notice, how the name of the controller is defined with an ‘Ctrl’ and the double quotes used while defining and accessing the controller.

Similarly, you can have any number of controllers in your AngularJS application. You can have different Javascript files for each controller or just put it in one main file. This makes two way data binding easier and keeps your application simple!