Archive

Archive for July, 2016

Cross-Platform Native Apps With A Single Code Set Using Telerik NativeScript

July 29th, 2016 No comments

Mobile applications are now a critical part of most enterprises, and there are many ways to create them, but what are the differences between these options and how do you choose between them? Do you choose to create native applications as Google and Apple intend? Do you choose to develop a mobile web hybrid application? Or do you find a middle ground?

We’re going to look at some of the common problems with developing mobile applications, both native and hybrid, and how NativeScript by Telerik fills the gap. We’ll proceed to develop a NativeScript Android and iOS application from scratch (using the supplied source code), and then convert the same application to use the bleeding-edge Angular 2 JavaScript framework.

The post Cross-Platform Native Apps With A Single Code Set Using Telerik NativeScript appeared first on Smashing Magazine.

Categories: Others Tags:

Blogging for Beginners Vol. 2: Plugin Basics, Theme Choice

July 29th, 2016 No comments
antispam-bee

In the first part of our small series “Blogging for Beginners”, you’ve picked your web host and decided on a domain. In this second part, we’ll help you install the most important plugins, as well as find a theme, so you can start blogging soon.

Plugins and a suitable theme are very important parts of any WordPress blog. They determine what your blog looks like and how it acts. Design is an important topic, as a horrible design can scare off potential readers.

Choosing the Right Theme

A theme is what determines the appearance of your blog. Via programmed functions, a theme is also able to decide which options you have when it comes to customization – whether you get to choose colors or can determine basic layouts.

Conventional themes can display content in one to three columns. This means that you have a main content area, and up to two sidebars, into which supporting content is placed – the latest comments, or the newest articles, for example.

The

The “Hueman” Theme in a Three-Column View. It is also possible to display it with two columns.

You’ll get most themes in a two-column layout. This layout has established itself. On the left, you’ll find the main content, and the sidebar is on the right. A good theme lets you customize a lot of different things. The color of links and the content area, whether you are able to use a background image, how many columns the layout has, and whether you can use a custom logo or not.

The shown theme can do all of that and a lot more. You can get it for free on WordPress.org. By now, WordPress.org offers about 4,000 free themes to choose from. Search for them within your admin area and install them with one click.

Example: a Two-Column Theme

A Two-Column Theme. The Theme is an Edited

The Example of a Two-Column Theme. Content on the Left, Sidebar on the Right.

Theme: A Refined Version of the Graphy Theme from WordPress.org

Searching for, and Installing Themes

Theme Choice

Under Install => Themes => Design, You’ll Find all Free Themes.

Filter the Themes for Characteristics on This Display.

This Display Lets You Filter the Themes for Characteristics.

Download Link

The WordPress Plugin Basics

Plugins are important. They extend the WordPress functionality by a lot of useful functions. For example, they serve the purpose of spam prevention within the WP comment function. I have created a list of plugins that should be a part of any blog.

All presented plugins have proven to be effective and are in constant development.

1- Antispam Bee

The most important plugin. It prevents spam comments and makes sure that your blog only contains comments written by humans.

2 – Yoast SEO

yoast-seo

This SEO plugin is indispensable. It optimizes the distribution of meta article tiles, and the respective meta description, and is able to optimize them for the visibility in Google search results. In this case, meta title and meta description is the information important to Google. Here is an example of how both can be displayed in the search results:

The SEO Meta Data. The Meta Title and the Meta Description.

The SEO Meta Data. The Meta Title and the Meta Description.

This editor appears below each post under Write Posts. You can manually edit the information for a better description.

3 – Publish Confirm

publish-confirm

Publish Confirm makes sure that you don’t accidently publish unfinished articles. The plugin creates a small pop-up in which you need to confirm a second time that you want to publish the post. Although it doesn’t do much, this plugin is one of the absolute essentials and I use it on each of my websites.

4 – Autoptimize

autoptimize

Autoptimize helps you accelerate your website. It accumulates almost all JavaScript files in a single one and compresses the code. The plugin does the same to your CSS files. This makes for a faster loading time of your blog.

5 – Cachify

cachify

Cachify is the optimal addition to Autoptimize. Cachify caches your website and sends the cached page to your visitors. This increases the website’s speed significantly, making both the visitors and Google happy, as the loading time is a ranking factor.

Professionals state that Cachify, when combined with an extensive speed optimization, is the fastest caching plugin on the market. On top of that, it is also capable of optimizing large websites. It’s suited very well for beginners too, because of its simple set up.

6 – Contact Form 7

contact-form-7

With the help of this plugin, creating a form for your contact page becomes a piece of cake. Very effective and, above all else, very easy to set up.

7 – Optimus – WordPress Image Optimization

optimus

A website’s images and graphics are the bottleneck of loading speed. Thus, a good plugin for image optimization is crucial. You could use this plugin for free, however, I strongly recommend purchasing a premium license, as the free version only optimizes images of up to 100KB. The premium license is 19 Euro a year. In return, you’ll get the best plugin for image optimization with support for the WebP image format.

Highly Recommended: A Professional Backup

Actually, this should’ve been number one. However, you won’t get a really good backup for free. I’ll address it nonetheless. When blogging, a backup of your blog is the most important thing of them all. Created daily and automatically, and also equipped with a one-click recovery function.

So many things could happen. Your blog could get hacked. It’s also possible that a plugin or theme update destroys your website. Then, there’s no other option aside from restoring the latest backup. When this can be done with one click, every cent is well-spent. Of course, there are free backup plugins as well, but when it comes to restoring the website, you need to manually import the database via phpMyAdmin.

This takes a while and requires expertise knowledge. That’s why I’ve been using a paid solution for years now.

The VaultPress Backup Service

VaultPress

You can get the required plugin for free on WordPress, but the backup function requires paying for the service. The service is an offer from Automattic, the company behind WordPress.

This Simple: Recovering a Backup

Restoring a Backup Using VaultPress. One Click on

Restoring a Backup Using VaultPress. One Click on “Restore” is all it Takes.

The Functions in a Video:

Conclusion

Today, you’ve completed all the preparing work. You have picked a theme and installed the most important plugins. In the next episode, we’ll deal with a blog’s most important aspect: the content. How it should be formatted, where you can get information, and so on…

(dpe)

Categories: Others Tags:

Draw a Location Pin Icon in Adobe XD

July 28th, 2016 No comments
Dansky_Learn How to Draw a Location Icon in Adobe XD

In this tutorial, we’re going to learn how to draw a location icon in Adobe XD.

The Steps (1-7)

1. Create a new document/artboard.

2. Select the Ellipse Tool, Left-click and hold Shift to draw a circle. Give the circle a fill colour of #DE503D, and deselect any borders.

draw-location-pin-icon-adobe-xd-1

3. Using the Selection Tool, Double-click on the circle to go inside the shape, to be able to edit each of the anchor points individually. Left-click on the bottom anchor point for the circle shape, and Drag downwards. This will be the ‘point’ on the location pin icon.

4. Double-click on the bottom anchor point to convert the curved lines either side to straight lines.

draw-location-pin-icon-adobe-xd-2

5. Next, select the Ellipse Tool, Left-click and hold Shift to draw a small circle. Give the circle a fill colour of white (#FFFFFF), and deselect any borders. Position this smaller circle inside the top half of the location pin shape, ensuring that any space to the left/right sides and above, is equal.

draw-location-pin-icon-adobe-xd-3

6. Hold Shift and Alt to either increase or decrease the size of the circle accordingly.

7. Once you are happy with your location pin icon, the last step in to Drag over both shapes to select everything, and in the Pathfinder options on the right, select Subtract. This will effectively ‘knockout’ the smaller white circle from the location pin shape, turning this into one complete and finished icon with a transparent background.

draw-location-pin-icon-adobe-xd-4

Download Adobe Experience Design CC (Adobe XD).

Read More at Draw a Location Pin Icon in Adobe XD

Categories: Designing, Others Tags:

Web Design in 4 Minutes

July 28th, 2016 No comments

Jeremy Thomas explains web design (the basic applying style to content part) through an interactive step-by-step walkthrough. I could see this being an ah-ha moment for plenty of folks in the early stages of understanding web design.

Direct Link to ArticlePermalink


Web Design in 4 Minutes is a post from CSS-Tricks

Categories: Designing, Others Tags:

Looking fast beats being fast

July 28th, 2016 No comments

You’d be forgiven if you thought that you had to design your clients’ websites to be fast all the time. After all, in modern, UX best practices, a site has to be fast to reduce the bounce rate, keep site visitors engaged, and keep them coming back.

Users don’t like slow sites because everyone’s used to things getting faster on the web. If they have to wait five seconds for a news site to load, but a comparable news site will load pages in just two seconds, you can bet that the faster site will get the visitors.

For your…site to please visitors…it doesn’t have to be fast, it just has to feel fast

However, one very curious aspect of web design is that perception is reality. For your client’s site to please visitors and retain them, it doesn’t have to be fast, it just has to feel fast.

Understanding this distinction can empower you to design sites with great UX and engaged visitors. Here’s how…

Why fast sites matter

It’s not just me saying that fast sites are highly desirable—the data says it too. Moz says that you can improve the conversion rates of the sites you design for your clients if you make them fast.

Case studies bear this out, too: Mobile webpages that are only as much as one second faster than other pages see a 27% boost in their conversion rates. That can be huge from a sales perspective!

Clearly, when sites are faster, visitors stick around longer, become more engaged with your content, and then convert at higher rates.

What matters is your visitor’s experience, which is dependent on their perception

But visitors don’t sit at their screens with a stopwatch checking the speed of your landing page, no one but you is measuring the actual speed of your site. What matters is your visitor’s experience, which is dependent on their perception.

Skeleton screens

What’s a skeleton screen? A skeleton screen is a blank webpage that gradually fills up with content as the page finishes loading. Skeleton screens are an intelligent and effective alternative to techniques like progress bars or spinners, which trials show create a perception of a slow page load.

Google’s product director, Luke Wroblewski, conducted a case study where he used spinners for a native app’s interface that he was working on. Each time a page loaded, users were greeted with the spinners, which displayed loading progress. The result was that users thought the app was actually slower than prior versions.

This can be explained by the fact that progress bars and spinners call users’ attention to the load process—which creates a perception of slowness.

On the other hand, techniques like skeleton screens call users’ attention to the fact that the page is gradually filling up with content and therefore showing them real progress. By focusing on the actual progress instead of the wait time, skeletons screens make your visitors and users feel like your site is faster already.

Changing up site colors

Colors also have a great impact on the perception of your site’s speed on your visitors. You can make your users think that your site is loading quite fast based on the color that you choose when the page is loading. Choose a relaxing color, and your users feel that your site is actually faster than it is.

According to the Journal of Marketing Research (via Adobe) if you want to make page loading time feel quicker use the color blue on the page while a download is occurring.

There are also other dimensions to color, such as chroma and brightness. The former is a color’s saturation or pigmentation while the latter is the tint that a color appears to have.

brightness…has the most impact on…users’ perception of site speed

Research indicates that low-chroma colors (those that are more subdued) relax users and therefore make them perceive a site as faster. On the brightness side, high-value colors appear as though they’ve been mixed with white; we generally call those pastels. These high-value colors produce more relaxed feelings in your users, therefore helping your site’s perception as fast.

In fact, brightness is the factor that has the most impact on improving users’ perception of site speed.

It should also be noted that research also indicates that more relaxed users in general deliver more positive outcomes for sites, such as more conversions, likes, and shares.

Calls to Action

Simply put, the way you use the call to action on your page can significantly impact how your visitors perceive your site’s speed. For example, if your call to action is buried down at the bottom of a long landing or sales page, so small and hard to read that it takes people a while to find it, or not seamlessly supported by the information architecture on the page, then it will take people longer to find it.

When it takes visitors a longer time to see your call to action, then it can definitely feel that your site is slower than it is. After all, put yourself in the user’s shoes, they land on your page and are trying to make sense of the goal of said page. When they don’t immediately see the call to action button, it’s going to confuse them and take him a while to make sense of what’s going on, which all contributes to a heavy feeling of a slower site.

Therefore, when designing a call to action for a page, incorporate it seamlessly as part of the main page element. For example, Kayak does this well on its car rentals page. At a glance, users can tell that the page’s call to action (the search button) is an integral part of the main page element, which is the search bar for car rentals. As a result, they’re able to quickly understand the whole point and purpose of the site.

Sites that only feel fast still deliver awesome UX

Designers need to always follow the main rule in web design: Design for user experience. One of the best ways to do this is to design for site speed, but, knowing the psychology and behavior of your visitors, you can also design your site to merely feel fast as opposed to actually being blazingly fast.

Don’t treat this as an alternative to building a fast site. While a fast site can be made to feel slow, it’s a lot easier to make a site feel fast if it actually is. Ultimately, what matters is user perception.

Featured image via Joseph Sohm / Shutterstock.com

LAST DAY: The Design Deck – Playing Cards for Designers – only $14!

Source

Categories: Designing, Others Tags:

Easy: How to Switch Your WordPress to HTTPS

July 28th, 2016 No comments
Safe: Switching WordPress to HTTPS Made Simple

Switching WordPress to HTTPS, meaning an SSL certificate, is often determined as being difficult on the internet. However, as always when it comes to things said on the web, be careful. The truth is that it is rather easy, and everyone that has at least some experience with WordPress, and can install the CMS can do it. In this article, I’ll guide you through each necessary step, one by one.

In this article, we’ll assume that the SSL certificate has already been assigned to your domain by the web host. For over 90 percent, this should be the case. Only your own dedicated server will have you do this work. This shouldn’t be a problem, however, as it’s pretty easy.

The only more complicated thing is the creation and allocation of a free Let’s Encrypt certificate. However, I’ll assume that a proper, paid https is used. At my host, this only costs 23.90 EUR a year and is immediately assigned to the domain.

Step 1: Login Into the WordPress Admin Area

After logging in, go to the menu item “Settings => General” and change the two entered addresses to the HTTPS version. You only need to add the lower case “s.”

switching the WordPress Admin Area to HTTPS

If that doesn’t work for you, there’s another way to shift the WordPress addresses. Log into your web hosting package or server via (S)FTP, and add the following code to the wp-config.php

View the code on Gist.

Copy and paste the following code below the table prefix, save, and reupload the file. Now, you have gained access to your website via HTTPS.

Schritt 2: Overwriting All URLs in the Database

The dynamic URLs, like the ones of the scripts and files, are already accessible via HTTPS. Now, it’s about shifting the static URLs of the images in the articles to SSL as well. For that, you could use a plugin, but it’s more comfortable and safer to use the Database Search and Replace Script by interconnect/it.

However, before using the script, please create a complete database backup in phpMyAdmin. You never know…

Script Download and Call-Up

Download the script folder, unzip it, rename it to “replace”, and load the entire folder (not just the files!) into your WordPress installation’s root index. Now, call up the script by entering your domain followed by the word replace into your browser’s address bar.

https://yourwebsite.com/replace

After that, you should be able to see the script.

search-replace-script

The access information of your database is already entered, you only need to enter your old URL in the upper left input field, and the HTTPS version on the right. Other settings are not required. A click on “live run” then changes the URLs in the database.

replace-database

The script will realize the required entries in a rather short amount of time. An error message may pop up, as the script attempts to increase the execution time and the PHP memory limit. Just ignore these notifications.

The Success Notifications. All Tables Have Been Altered Successfully.

The Success Notifications. All Tables Have Been Altered Successfully.

As soon as this step is done, scroll down in the script until the “Delete” button becomes visible, and click it. The folder with the script will then be deleted from the server, as it poses a large security risk.

Step 3: Changes to the htaccess File and the wp-config.php

.htaccess

In this final step, the .htaccess file is extended by an important aspect. The following code will cause a constant 301 redirection of the HTTP to the HTTPS version of your website. The website will only be accessible via HTTPS, and on top of that, the code will notify Google that there is no HTTP version of your website anymore.

View the code on Gist.

wp-config.php

This code snippet has to be placed in the wp-config.php of your WordPress, below the table prefix.

View the code on Gist.

Then, login is only possible via the HTTPS version.

The Final Result

You should now see a green version on the landing page and all articles.

https auf Startseite und einzelnem Artikel in grün.

However, it is possible that there are still files coming from HTTP. Then, the lock will either display in gray, or the resources will be blocked by the server. The menu item console in the developer tools of your browser will inform and show you the resources that are not encrypted.

console

Most of the time, you have integrated these files yourself, maybe in the theme’s header or footer. This can be helped with an integration of the file with //www.your-file.com, without a prefixed HTTP or HTTPS. Now, the HTTPS version will always be loaded, if possible.

Conclusion:

Following this guide step by step, nothing should happen, and the process should be finished successfully in less than an hour. How did it go? Have you already shifted your website to HTTPS?

(dpe)

Categories: Others Tags:

Top 4 Cloud Computing Languages To Learn Now!

July 27th, 2016 No comments
cloud-computing-languages-to-learn-now

Top 4 Cloud Computing Languages To Learn Now!

The Cloud is here, and it’s here to stay. And if you love programming, script-writing, and earning the cushy income that skill set can award you, you’ve probably looked into coding on cloud-based platforms. And while you might think that the Cloud you’ve chosen to work on might limit you… think again! The cloud can accommodate just about any language, depending on the interface you’re running.

We’ve put together a comprehensive list of some of the most in-demand programming languages for the cloud. If you don’t know them now, you should probably start learning! As hot as they are now, it’s likely that the growth of big data and machine learning will only make them more so.

Learning SQL:
SQL is still the king of coding languages, and the price-points of SQL developers and database admins is all but proof. In a time when the US median income for a household is about $52,000, SQL-savvy coders can earn an average of $92,000. With the rise in big data (which usually means bigger databases), and the continuing reign of SQL as one of the most common languages out there, job security is nearly guaranteed into the future (a worthwhile perk, in the ever-changing tech industry). But beyond that, there can be a lot of personal pleasure in SQL coding. At its heart, writing SQL is basically creating processes which automate themselves. If you’ve even been frustrated to tears by needing to manually create reports or datasets, this might be the language for you.

cloud-computing-languages-to-learn-now

Learning R:
R is a programming language which sees a lot of use in the area of data analysis and software development. Especially if the sciences intrigues you, this could be a hot language to learn: it’s incredible in-demand with scientific investigators, and has had a recent surge in popularity no doubt related to the rise in data-related work and positions. If data-mining is your bag, there’s nothing better. Couple that with the fact that it has many business applications and the fact that being able to program in R is considered one of the highest-paying skillsets to have and you probably agree that you should be learning it now!

Python:
If you’re all about lofty goals and raising the bar, Python might be the cloud programming language for you! Some of the most popular IaaS management softwares are written in Python, and it’s an incredibly marketable skill which is applicable to many different environments. Though it’s easy to learn, it’s more elegant than similar languages like Php and Ruby. And, as with the other languages, it’s a money maker. The average salary of a Python developer is over 6 figures.

Learning Clojure:
Clojure is based on JVM, and in the opinion of most coders proficient in its use, is mature, stable, and easy to learn. It’s a Lisp, with all of the advantages that entails, and is built with concurrency in mind: meaning immutable data and less problems! If you’re a little slapdash with your coding, that means that Clojure helps protect you from yourself. And, like the above languages, it’s perfect for processing a great deal of data.

The Bottom Line:
There are hundreds of languages out there which can be used on the cloud, from Deadfish to Scala. But if you’re going to pick a new one to learn for developing on the cloud, you might as well pick one which has a lot of applications, offers substantial job security, and can make you a lot of money. For those looking to expand their skillset or jump into the field, SQL, R, Python, and Clojure are our top 4!

Read More at Top 4 Cloud Computing Languages To Learn Now!

Categories: Designing, Others Tags:

Are You Looking for a Pleasant Experience with a WordPress Theme?

July 27th, 2016 No comments
4

Stress is an unwelcome partner when you are designing a website. Some design tools, including WordPress themes, can create stressful experiences. They are, at times simply difficult to use.

Problems you may encounter with such a product can eat up valuable time, and take that time away from what you should be doing – design. Technical problems also take the fun out of web design, to the point where a project becomes a chore, and you can’t wait to finish it.

This kind of theme may have bugs, a steep learning curve, or seems designed by developers for other developers. It’s time to take a breath and start searching for something better.

This theme could be your answer. Not only does it have the features and functionality you need. And because of its easy-to-use, intuitive, integrated front-end builder, it is actually enjoyable.

1

A web designer taking a relaxed walk in the park after working with a difficult WP theme.

Intuitiveness in a WP Theme is a Sign of Good Code in the Back End

Intuitiveness and simplicity can often be difficult to find in a WordPress theme for one very good reason –these kind of themes are hard to code. Bugs create technical issues. Bloated code can as well, but in most cases it is simply inefficient, and it tends to be a resource hog.

A theme creators’ experience can tell you a great deal about what you might reasonably expect in terms of its performance. Experienced developers know how to make your life simpler, if they have worked with more than one coding languages. You don’t have to become a developer to make a tool work for you.

For example, Kallyas‘ creators have several years of experience on WP and Joomla themes. That tells you that with Kallyas, they have delivered a theme that is simple, adaptable, intuitive, and enjoyable to use.

An example of a well-designed, intuitive homepage for an eCommerce website.

With Kallyas, you can focus on design, without having to worry about delivering a website that includes code your client has no need for. Kallyas’ experienced creators have taken care of that issue. They have provided you with a customizable theme that features smart, optimized, efficient code.

How Could an Integrated Front-end Builder Increase the Quality of Your Work?

If you are a web developer, a front-end builder may not seem like such a big deal. You are used to writing your own code, and managing everything from the back end. That is what you do, and there is no real need to change.

If you happen to be a web designer, the chances are your coding expertise is somewhere between slim and none. Any need to write code, as a part of your design activity, will simply slow you down.

3

The intuitive interface of an integrated front-end WP visual builder.

Front-end builders are noted for being great time-savers, and productivity boosters. They can also have a positive impact on the quality of your deliverables. The reason is simple. If you are spending time going back and forth between the front end and the back end, you can lose focus on the consistency of your design.

Kallyas builder’s simple, fast, steps are the keys to producing higher quality work:

  • Drag and drop your element (images, video, or text),
  • edit it, and
  • select your settings, save, and close

Another benefit of a WP integrated front end builder: if your client wants changes on the layout, you can make them in seconds. No stress, no hassle, and a more enjoyable experience.

Check out this video to see the integrated, front-end builder in action:

Loading Time Matters

As a web designer, you should not have to be concerned about accessing and managing the resources needed to build a page or a website. Your WordPress theme should perform that task for you, that is why you are paying for this product. If it does so efficiently, both you and the user will have beautiful, intuitive, and stress-free experiences.

2

When you enter a page built on a regular WordPress theme, your device isn’t going to receive only the elements that make up the page. It will also receive other elements Those other elements are unnecessary, and only serve to clog up the code.

The result? Slower page loading times, and impatient users (Note: remember that mobile users are not noted for their patience).

Kallyas solved that problem when it designed and developed its integrated, front-end builder. Thanks to this WordPress theme’s front end builder, the only elements that are received when loading a page, are those that are needed.

Quit Fighting Code, and Make Web Design More Enjoyable

You’ve been told that working harder and longer does not always produce high quality results. Quite the opposite is often true. If you can perform your web design activities in a relaxed manner, you’ll be able to focus on the creative work. And that will be reflected in the quality of your work.

Experienced creatives seek out tools and methods that don’t interfere with their preferred style of work. Kallyas, with its intuitive front end builder, will provide you with all necessary element to get the job done.

5

Check Kallyas out. Read more about why this WP theme is so easy and relaxing to work with. Kallyas promises not to disappoint in terms of code agility, resource optimization, and UI quality.

Kallyas is a WP theme you won’t regret investing in.

Read More at Are You Looking for a Pleasant Experience with a WordPress Theme?

Categories: Designing, Others Tags:

Remote Control WordPress at Scale

July 27th, 2016 No comments

This is the third and final article in a series on “remote control WordPress”. That’s my nickname for this strategy of managing network settings on one “control” install, and then pulling those values into all your client installs. The advantage is that it saves staff members from having to toggle the same settings on the same network plugins, across many multisite installs.

Article Series

Part 1: The WP REST API for Remote Control WordPress
Part 2: OAuth Fun with OAuth1
Part 3: Remote Control WordPress at Scale (You are here!)

In the first article I demonstrated how to expose network settings for querying via the WP API. In the second article, I demonstrated how to query those settings, even when they require an OAuth header (which they always should). In this article, I’m going to put all of the pieces together and show you exactly how I’m using this in production.

What You’ll Need to Follow Along

If you’re familiar with the series, you know that we need two WordPress multisite installs to pull this off:

  • First, we need the control, where we’ll manage settings. I’m using my personal website as the control in these demos.
  • Second, we’ll need a client install to query settings from the control. I’m using my local MAMP for this.

Just like in the last article, the control install should have the WP REST API V2 plugin and also my CSS-Tricks WP API Control plugin network activated. These are dissected in the earlier articles, although it’s worth re-pulling the control plugin, as I recently fixed a PHP warning.

Sort of new territory: both the control install and the client install should have my CSS-Tricks WP API Client plugin network activated and fill-in-the-blanks’d. That process is described for the client install in the second article. Just go ahead and copy your filled-in version of that plugin into the control now as well; there’s no need to re-do the OAuth drudgery for the control.

Also sort of new territory: Now that you’ve performed the steps in the second article, you can go ahead and uninstall the OAuth1 plugin from the control.

Totally new territory: Both the control and the client need a feature plugin to demonstrate how to use the CSS-Tricks WP API Client in a meaningful way. I have prepared such a feature plugin for you, it’s called CSS-Tricks Can He Loginz?.

Got everything? Good. We’re about to get… abstract!

The Abstraction Layer

Things in this article series have gotten a little complex. In the second article, we did a ton of work in order to query network settings from the control blog. We did so via a demo shortcode that simply logged the results of the API call. In real life, I run many “feature” plugins to do things like Google Analytics, admin notices, white-labeling, you name it. If we want to manage the settings for all of those feature plugins via remote control, it would be really troubling if we copy/pasted all of that API work into each one. Therefore, we need one plugin that offers us a framework for getting network options from the control install, and all of our feature plugins can use that framework. We need an abstraction layer!

Wikipedia tells us,

In software engineering and computer science, abstraction is a technique for managing complexity of computer systems.

That’s exactly what I’m doing in my CSS-Tricks WP API Client plugin. Just browse the list of files and you’ll get a sense of where I’m going with this:

  1. `control_panel.php` renders a network settings UI in wp-admin/network/, which our feature plugin will instantiate. It has a handful of nuances that are crucial to this article, which I’ll detail below.
  2. `remote.php` calls the control install to query for a given network setting. It merges the remote settings with the local settings in order to actually hand off the full roster of settings to power a feature plugin.
  3. `crud.php` gets and sets network options. If the lack of a core API for network admin bothers you, crack open this file and consider getting excited about it. It’s playing only a minor role in this article.
  4. `oauth.php` authenticates to the control install. It’s used here, but not discussed. We dissected it last article.
  5. `demo.php` offers a hello-worlding shortcode for this entire process, which we did in the previous article. We’re neither discussing nor using it here.

Alone, this plugin does absolutely nothing, which is perfect. Feature plugins will make use of it in order to create, review, update, or delete network settings, including settings that are managed on the control install.

To be perfectly clear, the CSS-Tricks WP API Client plugin would still be pretty cool even if we weren’t doing all of this remote control stuff: Part of it’s value is that it gives us a consistent framework for doing network settings pages across our codebase, which is great in its own right.

I’ll deep-dive into the relevant portions of the CSS-Tricks WP API Client plugin later. For now, I want to introduce our feature plugin which will use the abstraction layer.

This Is It

Photograph of American singer-songwriter Kenny Loggins

Our feature plugin, CSS-Tricks Can He Loginz does one thing, and it does it well: It adds a photograph of American singer-songwriter Kenny Loggins to the wp-login page. The Can He Loginz plugin requires that the API Client plugin be active as well:


The feature plugin is active, but the abstraction plugin is not.

It carries two network options, one of which is managed on the control blog, the other is managed on each client install, just to demonstrate both scenarios. That’s an important point: A given plugin might have many settings, some of which are the same on all of your client installs, some of which differ. Our feature plugin has one of each.


The settings page for the feature plugin.

The example obviously is farcical (if you don’t know who Kenny Loggins is, don’t worry. Just know that his music is pretty ironically good at this point, and that the plugin settings relate to some of his song lyrics) but the ease with which this feature plugin integrates with the CSS-Tricks WP API Client is really cool. Check out this code, which registers our feature plugin with the abstraction layer. Done. The Can He Loginz plugin now has a settings page in network admin, with remote control functionality.

Let me emphasize that: Given the setup tasks we’ve accepted and performed thus far in the series, achieving remote control WordPress for a feature plugin is basically a one-liner.

The settings, silly as they may be, are defined in an array here. That’s where we could easily add, remove, or redefine settings.

Now, to see what the Can He Loginz plugin actually does with those settings, open a fresh browser and view the login page:


Login page as altered by our feature plugin.

As promised, it’s displaying our photo and using our options in a couple of text blocks.

Whoa…

Right?

The crux of the matter occurs in my function here called merge(), from my class that calls the control install. First, it grabs your client settings – the ones that you’d want to be able to customize on each blog. In our example, that’s the “shoes” checkbox. Next, it loops through all of the remote settings on the control install, such as the “danger zone” setting from our example, and adds them to the output as well. The result is sort of like if you’d called get_site_option() on your client and on the control, and merged the results – in fact that’s exactly what happens behind the scenes via the WP API.

To help illustrate this, notice a subtle difference between how the settings UI is displayed on the control vs the client:


Client on the left, control on the right.

In both screens, the first setting is a remote control setting, so when viewed from a client install, it’s disabled. That same setting, on the control, is enabled. Conversely, since the second setting happens to expect a differing value on each client install, it’s enabled on the client and disabled on the control. That logic occurs here, in my class that draws the control panel UI.

Also of note is caching. The client caches the result from the control, and it has the ability to break that cache by re-saving the settings from the client UI.

What is the Eggs:Basket Ratio Here?

In the comments section of the first article in the series, MF Simchock expressed concern that, if the control install experiences downtime, then all of the client installs will be unable to call their settings. While that is true, there are a few things we can do to mitigate this. A couple of those things are outside the scope of this series:

  • Do whatever you have to do to prevent web traffic from going to the control install. It serves one purpose: To set and serve network options to the client installs. Configure that server as such. I’m out of my element here, but I wonder if there would be a convenient way to whitelist by IP, where you’d maintain a list of your client install server IP’s, and check that all requests originate from that roster.
  • If your control install is on the same box as your client installs, it’s likely that an outage on the control would also be an outage on your client installs. Something like CloudFlare’s Always Online could help with that scenario.

What we can do from within our codebase is to never cache results that seem wonky. Check out this code, which reviews the HTTP response from the control, and neglects to cache the result if it’s 40x or 50x.

What About WP-CLI?

In the first article, commenter “cidas” suggested that we could more easily achieve remote control WordPress via WP-CLI. He’s not wrong. We could absolutely write a CLI script to either push or pull settings between the clients and the control. That’s not something I’m qualified to write about, and I have no plans to pursue it in production. A few reasons:

  1. It happens to be further outside my skillset than the API/plugin arena.
  2. If we require command-line skill as a hiring/training pre-req for our settings wranglers, it’s going to have a big impact on our business model. It could be a good impact, it could be a bad impact. Right now, I’m okay with no impact!
  3. I think a CLI solution would lend itself more to the control pushing data to client installs, rather than clients pulling from the control. That scares me because a buggy script could corrupt live client data.

Next Steps

The best thing that could possibly happen to this effort would be for the WP API to be fully merged into core, along with the OAuth1 plugin. Monitor those projects for updates if you embark on the remote control lifestyle.

Other than that, I’m not inclined to make this any fancier or complicated than it needs to be: I think it’s ready. My next move is to continue implementing it on larger, more heavily trafficked, more important projects, and to continue to smooth out any rough edges.

Certainly, you could unit test the heck out of it, which I’m not digging into in this article. You could also wire in support for more field types (color picker, datetime picker, whatever). And I guess you could make it prettier. I have exactly zero CSS for the settings page, which I actually consider a good thing.

I had sort of expected for this third article to be the longest and most complicated in the series, but there really isn’t much to it. After all, our feature plugin is able to join this remote control lifestyle with just a small handful of code, all of which is a low-complexity affair of declaring a slug and settings. It feels like an extremely weird and overly complex way to get a network setting, but I think it’s far better than handling the same setting many times across many installs. I’m ready to go full-speed ahead with this paradigm, and I want to make it even better. If you try working through it, I’d love to hear what the pain points are.

Article Series

Part 1: The WP REST API for Remote Control WordPress
Part 2: OAuth Fun with OAuth1
Part 3: Remote Control WordPress at Scale (You are here!)


Remote Control WordPress at Scale is a post from CSS-Tricks

Categories: Designing, Others Tags:

50+ fresh resources for designers, July 2016

July 27th, 2016 No comments
50 Vector Flat Style Icons Pack

Hey there! We are proud to return fully stacked with a collection of resources and tools that will make the most out of your web design/development skills. We are committed to bring you the best of the best in terms of freebies, we’re sure you’re gonna enjoy them.

50 vector flat style icons pack

A great set of 50 beautifully crafted flat style icons that come available in PSD, AI, SVG, PNG and EPS format files.

70 flat social sketch icons

An amazing set that comes with 70 vector icons in, both monochrome and colored styles, including icons for social media, services, software, and more industries.

70 Flat Social Sketch Icons

Vector avatar generator

A great set of 900 gender-sorted items and 3,400 symbols to generate avatar icons in a nice flattish, outlined style. They’re delivered in Ai format, and organized in 12 different categories.

Vector Avatar Icons Generator

150 isometric flat 3D icons

An amazing set of 150 isometric icons of general purpose items. Inspired by the flat style, and literally taken to another dimension, these 3D icons come in 6 different PNG sizes and include their Ai source file.

150 Isometric  Flat 3D Icons

46k Windows 8 icons bundle

An amazing set of more than 46,000 icons designed under the guidelines of Windows 8. They come with source PSD vector files, and 8 size variations in PNG format.

46k  Windows 8 Icons Bundle

37 restaurant PSD blocks

37 hand-crafted restaurant blocks, meant to create an impressive landing page for food services using customizable PSD files.

37 Restaurant PSD Blocks

Magic watercolor textures bundle

A collection of different handmade watercolor textured backgrounds. There are 7 different freestyle watercolors, in 4912×3264 resolution.

Magic Watercolor Textures Bundle

True grit’s textures sample pack

An amazing sample pack that includes a bunch of premium, pro-quality textures, vector assets, and brushes. There are 25 bitmap and vector textures, 3 vector halftone patterns, and 10 assorted brushes including dirty, grainy, grungy and worn brushes.

True Grit's Textures Sample Pack

10 incredible marble ink textures

A great collection that comes with 10 marble-like ink textures for backgrounds, in 6000×4000 resolution and 300 dpi.

10 Incredible Marble Ink Textures

Dramatic color grunge textures pack

A collection of 10 JPG images delivered in 3500×2500 resolution.

Dramatic Color Grunge Textures Pack

Gravity business card smart object mockup

An amazing mockup that provides a customizable card design (front & back), shadows, and background.

Gravity Business Card Smart Object Mockup

50 flat material inspired brushes

A set of neatly crafted brushes for Illustrator that make a beautiful representation of different flat style materials such as ropes, pipes, tubes, wood planks, strings, and more.

50 Flat Material Inspired Brushes

Fuchsia: stylish business card template

A very fancy and stylish business card template delivered in both PSD and Ai formats, completely layered and ready to be edited and printed.

Fuchsia: Stylish Business Card Template

VSApp: mobile & web PSD template

A PSD mobile and web UI kit for delivered in PSD format files that includes a smooth 404 page, bundle sections, slideshows, download pages, and more.

VSApp: Mobile & Web PSD Template

Fade: dark & modern mobile app UI kit

A UI kit for mobile devices, with a bunch of features like an entries editor, music and video player, image gallery and more; all with a green-black color palette.

Fade: Dark & Modern Mobile App UI Kit

Mercatus: mCommerce UI kit

An mCommerce UI kit that has over 120 different screens built for Sketch, with a set of original icons and assets created for the kit.

Mercatus: MCommerce Mobile UI Kit

FeedApp: modern mobile app UI kit

A great UI Kit for mobile applications based on an app that tracks users moods, from time to time the user can evaluate how they are feeling in 4 different categories.

FeedApp: Modern Mobile App UI Kit

Popo: wide sans font

A beautifully crafted sans font that features wide characters, with a low crossbar design as well as smooth edges and ends for all of its uppercase features.

Popo:  Wide Sans Font

Golden Sans: professional multiweight font

A modern high-quality sans font that counts on 7 different weights for its premium version, it supports multi-language features and quite a few glyphs, which make it a very versatile font.

Golden Sans: Professional Multiweight Font

Mercurial: modern wiggly strokes font

A monospace decorative font that features a regular wiggly line on its character’s strokes and that comes with of the full Latin alphabet, a number of accented letters, numbers, and a bunch of glyphs.

Mercurial: Modern Wiggly Strokes Font

SpeedHunter: vintage central line font

A central-lined designed font that features a vintage/retro style that has only uppercase characters, perfect for signs and displays.

SpeedHunter: Vintage Central Line  Font

Inflecto: modern sans typeface

An amazing modern sans font, the name of which alludes to its curved design. It was made especially for displays, headers, and big titles.

Inflecto: Modern Sans Typeface

EXO: modern one-page PSD theme

A PSD one-page template meant for company work purposes, using customizable layouts, containing a lot of features like “about us”, “team, history”, and more.

EXO: Modern One-page PSD Theme

Minimal portfolio PSD template

A minimalist portfolio template delivered in PSD format that was made to present artwork or graphic design, containing fully customizable shapes and well-grouped layers.

Minimal Portfolio PSD Template

Pilumnus: fancy portfolio PSD template

A PSD template specifically designed for featuring artists portfolios in a fancy way with a grid gallery and a clever background.

Pilumnus: Fancy Portfolio PSD Template

Fashion eCommerce PSD template

A one-page PSD template designed for building fashion eCommerc websites that counts on social icons, a layered design, a tight-tile and more to see.

Fashion ECommerce PSD Template

Boron: beautiful image blogging WordPress theme

An impressive blogging theme for WordPress that features an image-grid home page, with Ajax content loading.

Boron: Beautiful Image Blogging WordPress Theme

Revolve: modern agency WordPress theme

A vertically scrolling WordPress theme crafted for agency portfolios, personal blogs, business, andc photography. It offers a complete customization, and multiple options for building a website instantly.

Revolve: Modern Agency WordPress Theme

Classic Interior: modern interior design site bootstrap template

An impressive bootstrap template for interior design agencies that comes with PSD files, it features elegant visual effects, and was designed with HTML5, CSS3, and Bootstrap for a clean and responsive feel.

Classic Interior: Modern Interior Design Site Bootstrap Template

Beam: corporate portfolio bootstrap template

An amazing corporate portfolio website template that features a modern and elegant look.

Beam: Corporate Portfolio Bootstrap Template

3D CSS stat graphs

A statistics graph built using pure CSS.

3D Statistic CSS Bars

Fade background color animation as you scroll

A snippet that uses Javascript and CSS to create an animation of a fading background color change as the user scrolls down.

Fade Background Color Animation As You Scroll

Material design interactive lists

An interactive list, using JavaScript to animate the checking and unchecking of items. It also allows the adding of tags to every item for clarity and sorting.

Material Design Interactive Rekord Lists

SVG path transformer

Code that allows the responsive manipulation of an SVG figure created, changing width, height, padding, position and, its full shape overall.

SVG Path Transformer

SVG animated medical icons

Animated medical icons made with CSS and JavaScript.

SVG Animated Medical Icons

DOM deployment to canvas

A script that renders a DOM tree onto a canvas in an aesthetically pleasing manner, it also intends to serve as an educational primer.

DOM Deployment to Canvas

Color-wander: seeded random based generative artwork

A creative tool that generates beautiful artworks in node/browser based on a seeded random which can be used for backgrounds or animations.

Color-wander: Seeded Random Based Generative Artwork in Node/Browser

Botlist: assorted bots store

Botlist is an online app store for bots that accomplish multiple purposes, the search can be filtered, the users can upload their own bots and more.

Botlist: Assorted Bots Store

Solr: open-source enterprise search platform

An open-source enterprise search platform that is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more.

Solr: Open-source Enterprise Search Platform

Horizon: pealtime open-source JavaScript backend

An open-source backend that lets developers build and scale real-time web applications, including convenient APIs and services that make it easy to use modern JavaScript frameworks like React, Angular, and React Native.

Horizon: Realtime Open-source JavaScript Backend

JWT Inspector: JSON web tokens inspect & debug browser extension

A Chrome browser extension that decode and inspect JSON Web Tokens in requests, cookies, and local storage. It will be available soon for other browsers.

JWT Inspector: JSON Web Tokens Inspect & Debug Browser Extension

Npm-gui: frontend NPM tasks GUI

A GUI tool for NodeJS-based projects to install, uninstall or search packages, its can easily work with package.json and the node_modules folder.

Npm-gui: Frontend NPM Tasks GUI

Siteleaf: friendly static site CMS

A content management system designed for a better web, featuring integration with existing tools, easy tracking using Github, and an API for your content and much more.

Siteleaf: Friendly Static Site CMS

HyperDev: full-stack web apps developer playground

A developer playground for building full-stack web apps fast, combining automated deployment, instant hosting, and collaborative editing.

HyperDev: Full-stack Web Apps Developer Playground

Opentest: seamless screen, mic, and camera recording for Chrome

A service for Chrome that allows you to seamlessly and simultaneously record your screen, microphone, and camera to store your recordings unlimitedly in the cloud. It also provides you you with direct URL links for instant sharing.

Opentest: Seamless Screen, Mic and Camera Recording for Chrome

Image visual center tool

A tool that finds the visual center of an image. It calculates a visual weight value for every pixel on the image, and then the algorithm tries to balance that weight in all directions.

Image Visual Center Tool

Formstone: responsive media query events jQuery plugin

A plugin that can track global changes to screen size based on an existing grid system. This is useful when many elements need to be resized at any change to the target screen size.

Formstone: Responsive Media Query Events jQuery Plugin

Cool radial SVG effect slider

A simple, responsive slider, with a radial transition effect powered by SVG clip paths and mask elements. It pops open a growing circle as you click on the arrows.

Cool Radial SVG Effect Slider

React D3 components library

A tool that compiles your code into React components, it also comes with a series of D3 template charts converted to React components for developers who are unfamiliar with D3.

React D3 Components Library

Anypixel.js: software & hardware displays framework

An open-source software and hardware library that makes it possible to use the web to create big, unusual, interactive displays out of all kinds of things.

Anypixel.js: Software & Hardware Displays Framework

OpenShare: customizable social platforms API wrappers

A completely customizable API wrapper for all major social networks and platforms that, unlike other social sharing tools, doesn’t retarget and profit from your users.

OpenShare: Customizable Social Platforms API Wrappers

Holmes: fast & easy page searching JS plugin

A JavaScript plugin that allows you to search text inside a page instantaneously, filtering out all of the non-matching elements.

Holmes: Fast & Easy Page Searching JS Plugin

TensorFlow: open source machine intelligence software library

An open-source software library for machine intelligence. Its vast reach of interactivity makes it applicable in a wide variety of domains.

TensorFlow: Open Source Machine Intelligence Software Library

Anime.js: powerful JavaScript animation library

Quite a powerful animation library developed in JavaScript that allows you bring to life CSS, individual transforms, SVG paths, DOM attributes, and JS Objects.

Anime.js: Powerful JavaScript Animation Library

CloudRail: multi-platform unified API

An amazing multi-platform library that allows you to integrate several APIs into a single service counting on full documentation, easy integration, metadata acquisition, and more.

CloudRail: Multi-platform Unified API

Laura Worthington’s Yana Typeface (3 Font Styles) – only $15!

Source

Categories: Designing, Others Tags: