Wednesday, December 3, 2014

Creating Nice Alerts with sweetAlert

When building JavaScript-driven websites we often have the need to provide feedback to our users to let them know if the action they have performed has been successful or not. In the early days of the web, developers used to create messages using the window.alert() function. While alert() works in practice and it's also consistent across browsers, it's not very flexible and, to be honest, its look and feel is terrible. Today there are several approaches adopted that range from modals to inline messages. In this article I'll introduce you to sweetAlert, a library that acts as a replacement for the JavaScript's alert() function.


What is sweetAlert?


As mentioned in the introduction sweetAlert is a replacement for JavaScript's window.alert() function that shows very pretty modal windows. It's a standalone library that has no dependencies, and it's made from a JavaScript file plus a CSS file. This library comes in three different flavors. The first is a library that you can use in any web project, the second is a fork that is specifically adapted to work with Bootstrap, and the third is a fork that you can use in your Android projects. This project is constantly under work as you can see from the fact that the last version was released just few days ago. Now that you know what this library is all about, let's see how you can use it in your website.

Continue reading %Creating Nice Alerts with sweetAlert%




by Aurelio De Rosa via SitePoint

Integrating Social Media without Sacrificing UX

Although there’s some correlation between an active social stream added on a website and improved search rankings, it’s tough to tell whether the boost comes from added social media activity or whether the addition of social to the website actually affects SEO.


Even though it’s tough to quantify its effect on search marketing, adding social media to your website for specific purposes delivers tangible value to your users:


Image2 - DC Sitepoint-How to Integrate Social Media Into a Website Without Sacrif

Event notifications


If you use your social media feeds to keep followers up-to-date about business related events, adding the stream to your website provides something helpful to your customers.

Frequent customer interactions


If your brand attracts a lot of positive user-generated content and customer interaction, showcasing your social feeds helps you position yourself as a customer-centric business.

B2B content curation


When you’re operating B2B, you can provide value to your customers by sharing the latest industry news and trends on your website. Incorporating your social stream into your website makes this easy.

Recruiting talent


One of the most valuable uses of social media on your website can be recruitment. If you post job openings on social, then a social stream on your website can alert people who are researching your company to ways they can join your team. Read more on SitePoint...

Continue reading %Integrating Social Media without Sacrificing UX%




by Chris Brown via SitePoint

Integrated and Collaborative Code Reviewing with Beanstalk

This article was sponsored by Beanstalk. Thank you for supporting the sponsors that make SitePoint possible.


Do you perform code reviews in your team? It’s a useful technique to find bugs quickly and improve the quality of your code. Simply put, the process works like this: A developer will present a code example to their team or superiors, explain what they have written, and then receive feedback on how they could improve their code. That sounds easy, but in reality it can often be complicated, time-consuming and difficult to take on.


But today I’m going to talk about Beanstalk, a platform that can help to incorporate a code review process into your workflow, seamlessly making it a part of your coding habits.


Let’s first have a look at the common code review techniques used by development teams and highlight where there’s room for improvement, before moving on to talk about how Beanstalk can help.


Code Review Tools and Techniques


There are many benefits to reviewing code. Some of the more important ones are as follows:



  1. Bugs are identified and eliminated quickly.

  2. Team members always know what’s going on in the team.

  3. Reviewed code is more readable.

  4. Various optimisations may be done in code review, improving speed.


Let’s look at how code review is usually done. Often teams adopt one or more of the following techniques to review code:



  1. Pair programming : Two programmers sit at the same workstation and write code together, with one typing out the code and the other offering suggestions. While this seems like a good solution, it comes with some problems. For example, sometimes the senior member in a team can take over and do most of the work, defeating the purpose of the pair programming.

  2. Over the shoulder review : Usually a senior member looks over the developer’s shoulder while the latter explains what they’ve done. This is a quick, lightweight, ad hoc technique to perform code review, and that may work for small teams and projects. But as your project grows and your team expands, it’s just not possible to do over the shoulder reviews effectively.

  3. Email : Here the version control system sends code to reviewers via email. Usually this is done once a new commit is pushed to the repo. But things can quickly get messy with this technique. It requires you to keep track of multiple email chains to review code and suggest changes. Also, because it uses email it’s also difficult for other team members to know what is going on in the review.

  4. Code review meetings : The developer schedules a specific meeting dedicated to code review, with one or more reviewers reviewing the code. Issues are noted as a part of the process. Once the developer addresses those issues, the reviewers are notified. Of course, as with any meeting, scheduling and executing a code review can be tricky and time consuming.


So those are some existing ways of managing code review, which each have their problems. Let’s have a look at a better way.


Introducing Beanstalk


Beanstalk is a code hosting solution for development teams. Once you signup you can start creating repositories (repos) to host your code. In case you’re not aware, a “repo” is a storage space for your code. You can create a new repo by clicking on the “Create a repository” button in your Beanstalk dashboard. You can also create “branches” for fixing bugs or developing new features. We’ll discuss branches more later on.


Beanstalk promotes a three-step process to ship your code :



  1. Commit your code

  2. Review with the team via Code Review

  3. Deploy the final reviewed code


This is a useful way to release your code because code review is built in as an essential step in the development workflow. This means the code quality will be improved and bugs eliminated earlier. Developers can update their code based on a comment or issue, make their changes and then get feedback from reviewers.


Code Hosting and Committing


To start using Beanstalk’s code review tools you’ll first need to host your code. This process is very simple. If you don’t have a Beanstalk account yet, go ahead and create one.


Once you’ve created an account you can go to the “repositories” tab to create a new repository. You can create both git- and subversion-based repos, but we’ll be using git for this example. In case you are new to git, here’s an article to help you get up to speed.


Creating a repo is easy. Once you click on the “Create a repository” button you’ll be presented with a wizard. It’ll ask you to choose a title and repo type (git, subversion or another.) Once you fill in the details your repo will be ready.


Here’s a screenshot of the repo creation wizard.


Repo creation wizard

I created a simple git repository to demonstrate the process. My repositories tab looks like this:


My repositories tab

Once your repo is ready, you’ll get a URL (mine is http://ift.tt/1zR0uZa). You can use this URL to push ‘commits’ into your repository.


Again, if you’re unfamiliar with source control, think of commits as snapshots of your code at a particular point in time. Once you’ve committed some changes, you can always revert back to that point in the future.


Pushing code to a repository


Now your new repo is ready you can start committing the changes. If you have your source code on your machine you can commit locally and push those to your Beanstalk repo.


Every repo has one or more ‘branches’. The normal workflow involves a master branch for production. Every feature and bug fix should start in a new branch and be submitted for code review once it’s completed. Once the review is complete and issues are resolved, the branch can be merged back into the master branch and its changes applied to the production code.


The ‘branches’ tab, shown in the screenshot below, lists different branches in your repo. You can also create new branches and delete existing ones.


Beanstalk branches tab

For more information on working with branches check out this tutorial.


Now you have the basics in mind, let’s create our first code review.


Read more on SitePoint.


Continue reading %Integrated and Collaborative Code Reviewing with Beanstalk%




by Sandeep Panda via SitePoint

3 Ways to Develop Cross Platform Desktop Apps with PHP

PHP as a cross-platform desktop app development language? Blasphemy! Nonetheless, it’s possible.


A few years ago, everything those interested in bringing PHP to the desktop had had was the now long abandoned GTK PHP. Since then, new players have appeared, though let’s first answer the “why”.


Why?


Whyyyy_461298_679209

Why would anyone develop cross platform PHP apps for the desktop? Why not opt for something that can actually tie into the low level APIs of the operating system, like Adobe AIR? Why not go with something outdated and bloated but reliable, like Java? Why not make it a Chrome app and if you need native support, use Native Client? Hell, if you want a scripting language, why not just go with Python? Everything goes, as long as we avoid having to bundle a server with the whole shebang, right?


Continue reading %3 Ways to Develop Cross Platform Desktop Apps with PHP%




by Bruno Skvorc via SitePoint

Professional Voiceovers

Professional Voiceovers is a voiceover service showcasing the best voice talents online. Finding the right voice holds the key to the success of projects that require voiceovers. We have lots of talents with different voices to meet all of your needs




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

shavad.com

Web & Graphic Designer This is my Portfolio, Feel free to look around and if you like what you see, Get in Touch




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Triptych

Where poetry meets code. Three poems, three composers.




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery