Sunday, June 22

Tag: Web

Web Tricks

Managing User Permissions in Vue using CASL

There is one thing we can all agree on, no matter what language or platform we prefer for building applications — there has to be some form of control and access levels in our applications to ensure it runs smoothly. This is why the concept of user permission will quickly become commonplace for you once you build your first application. In server-side languages, user permissions can be done with little or no fuss. You can use sessions to hold a user’s information and there would be over a hundred libraries begging for the opportunity to help you manage what the user sees and when the user sees it. You can manage complex permission logic with the aid of a robust database. For JavaScript, this becomes a little tricky, given that all you may have to achieve this localStorage. In this tutorial...
Web Tricks

My Top 8 Visual Studio Code Tips and Features

Visual Studio Code has become one of the most used and loved Text Editors in recent years. Here are some statistics from the 2018 Stackoverflow Survey:- Most Popular Development Environments. Source: https://insights.stackoverflow.com/survey/2018/ 1. Visual Studio Code CLI Visual Studio Code comes with an inbuilt Command Line Interface. Once you've installed Visual Studio Code, and have it open, press ⇧⌘P to open the command palette for Mac, or just ⌘P and the press > button. Next, type in shell command, select Install Code Command in PATH, and press enter. Now if you type in code, Visual Studio Code will open, and code <path>, Visual Studio Code will open with the directory represented by Path. To see the command line interface however, type in code -h. code -h Visual Studio Co...
Apps, Web Tricks

How To Improve Test Coverage For Your Android App Using Mockito And Espresso

In app development, a variety of use cases and interactions come up as one iterates the code. The app might need to fetch data from a server, interact with the device’s sensors, access local storage or render complex user interfaces. The important thing to consider while writing tests is the units of responsibility that emerge as you design the new feature. The unit test should cover all possible interactions with the unit, including standard interactions and exceptional scenarios. In this article, we will cover the fundamentals of testing and frameworks such as Mockito and Espresso, which developers can use to write unit tests. I will also briefly discuss how to write testable code. I’ll also explain how to get started with local and instrumented tests in Android. Fundamentals Of T...
Web Tricks

Create Web Notifications Using Laravel and Pusher Channels

When building web applications, it is not uncommon to find some sort of in-app notification system that will notify you instantly when someone carries out an action related to you or your account. On Facebook, you will be notified when someone likes your status, or when someone comments on your profile. We will replicate this feature by creating a web notifications system using Laravel and Pusher. To follow this tutorial, you need to have PHP and Laravel installed on your machine. What we would be building After this tutorial we would demonstrate how we can have a small web application show notifications using Laravel and Pusher. It would be similar to how websites like Facebook show notifications. Here is a preview of what we would be building: Setting up your Pusher application Create...
8 Secrets of the Perfect Link
CSS Tricks, Web Tricks

8 Secrets of the Perfect Link

A few weeks ago a frustrated face appeared around the corner of my desk. “Sorry mate, you don’t do any printing do you?” “Well yeah, sometimes,” I said. I have a dedicated desk in a co-working space, we share a printer, and it was this shared printer that was frustrating the face in question: “I’ve been trying for hours to get this bloody thing printed, I’m absolutely desperate, I can’t find the right driver anywhere…” “I think you just log into the dashboard and download it,” I said. “I think that’s what I did, hold on let me try,” I said, firing up the office dashboard. “You go to printer instructions…” “Yep, I did that.” “…and then you click…” “Oh God!” he wailed. “It’s a link isn’t it.” Here are the instructions that he’d been struggling with: An intelligen...
Converting Images To WebP
CSS Tricks, Web Tricks

Converting Images To WebP

To use WebP, you’ll first need to convert your existing images to the format. This can be done in a myriad of ways, from something as simple as exporting from your preferred design program, to cloud services, to the official cwebp encoder, and even in Node.js-based build systems. Here, we’ll cover all avenues. Sketch Sketch is able to export any resource in a design document to WebP natively. To export an image to WebP, select a resource on the canvas, open the Export panel on the right hand side, and choose “WEBP” in the format dropdown. The resource export panel in Sketch, with the WebP format chosen in the format dropdown. (Large preview) After you make your selection, click the Export Bitmap… button. The resulting dialog will predictably ask where you want the image to be exported ...
Web Tricks

Text Editing Tips And Tricks Roundup

Text Editing Tips And Tricks RoundupText Editing Tips And Tricks Roundup Rachel Andrew 2018-07-23T13:30:35+02:00 2018-07-23T16:18:07+00:00 We asked the Smashing Community for their favorite text editing tricks, shortcuts, and features that save them time. Here’s a roundup of what we’ve found quite useful along with a couple of other suggestions you may find handy. Favourite Keyboard Shortcuts Many of you have favorite keyboard shortcuts. Some of these will be editor or operating system specific, although in many cases you’ll be able to find a similar shortcut with the tools you are using. I’ve rounded up a few from the community below. Ste Grainer shared a t...
20 Freshest Web Designs, July 2018
Web Tricks

20 Freshest Web Designs, July 2018

Welcome to our roundup of the best websites launched (or significantly updated) this month. July is a strange time to launch a site with the Summer slowdown in full effect, but these intrepid entrepreneurs have done so. We’ve got examples of great ecommerce, a couple of agency sites that we couldn’t resist, and lots of incredible art direction. This month sees a big trend in compass navigation (a link in every corner of the page), and parallax is definitely still a big deal. Whether it’s inspired by the World Cup, or Le Tour, there’s a subtle gallic feel to a lot of sites this month…savourer! Drift Drift is a creative agency with some chops. Rejecting the minimalism that seemingly every other agency opts for, they’ve put together a charmingly animated, hand-made site. Not too functional, ...
Popular Design News of the Week: July 16, 2018 – July 22, 2018
Web Tricks

Popular Design News of the Week: July 16, 2018 – July 22, 2018

Every week users submit a lot of interesting stuff on our sister site Webdesigner News, highlighting great content from around the web that can be of interest to web designers.  The best way to keep track of all the great stories and news being posted is simply to check out the Webdesigner News site, however, in case you missed some here’s a quick and useful compilation of the most popular designer news that we curated from the past week. Note that this is only a very small selection of the links that were posted, so don’t miss out and subscribe to our newsletter and follow the site daily for all the news. Google Material Design: Updates, Improvements, and New Tools   CSS: A New Kind of JavaScript   The Importance of Brand Consistency   A Look at Chrome’s New Tab Design   Wheel   Dar...
Webfonts And Performance: SmashingConf Videos
Web Tricks

Webfonts And Performance: SmashingConf Videos

Webfonts And Performance: SmashingConf VideosWebfonts And Performance: SmashingConf Videos The Smashing Editorial 2018-07-20T14:35:35+02:00 2018-07-20T15:29:44+00:00 Webfonts are difficult to get right. An often overlooked and disruptive piece of web performance, webfonts can slow down your site and leave your visitors confused and agitated. No one wants agitated visitors. Webfonts Are ▢▢▢ Rocket Science Recorded at our special web performance themed SmashingConf in London, Zach Leatherman demystifies webfonts in order that we can avoid font-related performance issues. He takes us through a detailed guide to best practices when using webfonts, so you can use ...
Brainstorming the Wiki
Web Tricks

Brainstorming the Wiki

Before the blog took off, before Tumblr became the face of fandom, but around a year after Geocities launched as a platform for Justin Timberlake fan sites, there was The Wiki. We looked upon The Wiki, and we saw its potential as a platform for crowdsourcing knowledge, collaborating, and educating. We saw that it was good. Then Wikipedia was founded at some point, and the rest is history. I love well-maintained wikis to a fault. Wikis have been a large part of my continuing education in web design, random trivia, and the minutiae of video game mechanics for a long time, now. Anyone who learns stuff on the Internet owes a lot, directly or indirectly, to wikis and their less-community-oriented cousin The Knowledge Base. Even though many of the publicly available wiki software options are da...
Web Tricks

​DDoS Protection Mastery Starts Here

We're very excited to announce the launch of the online DDoS Protection Bootcamp. Built for IT security and network ops professionals, this one-of-a-kind online training portal offers an unprecedented selection of free courses and challenging quizzes that test and improve your DDoS protection skills. Jointly prepared by Imperva Incapsula and DDoS testing firm NimbusDDoS, the DDoS Protection Bootcamp leverages the domain expertise of both companies to offer in-depth technical training in DDoS protection. Until now, you literally had to work for a security company to have access to this level of knowledge. Unlike other training sites, the DDoS Protection Bootcamp is uniquely designed to combine rich educational content with a fun online quiz-based format that lets you measure your knowledge ...
Animating SVG Files With SVGator
Web Tricks

Animating SVG Files With SVGator

Animating SVG Files With SVGatorAnimating SVG Files With SVGator The Smashing Editorial 2018-07-19T14:00:00+02:00 2018-07-19T14:53:54+00:00 (This article is kindly sponsored by SVGator.) Animated SVG files have become very popular. They are entirely scalable (because they are vectors), small and 100% code-based, which allows for so many transformations and tweaks. This, however, comes at a price: the steep learning curve for complete beginners. SVGator pledges to solve this problem, making it really easy for anyone to make simple animations using a familiar interface. It’s a web-based animation app that lets you import, animate and export SVG animations, and i...
How to Tackle a Redesign
Web Tricks

How to Tackle a Redesign

Stepping into a website that’s already well-established isn’t always easy. For starters, you have to be careful about not stepping on anyone’s toes (the client’s or even the previous designer’s) when providing feedback or suggestions on a new direction for the site. Secondly, there’s much more at stake with a redesign. Not only could a wrong turn hurt an established brand’s identity, but there’s also the disruption to SEO to consider. That said, redesign projects can be incredibly rewarding. With from-scratch designs, there’s really no baseline to compare your work against. With a redesigned website, you can look back at the performance of the last iteration and compare it against what you’ve been able to accomplish. If you’re intrigued by the prospect of tackling a redesign project, but ...
Web Tricks

Getting Started with Component Transitions in Vue

When we build applications, we aim to make them easy on the eye. We want our users to have a smooth experience using it, and to feel our application flowing from one point to another, rather than just jump between screens. If we switch components without transitions, we see a sharp change every time a new component is called up. This is not ideal and can result in our users having a poor experience with our application. In this tutorial, we will look at how to improve the flow of our application using component transitions in Vue. Prerequisites Vue CLI 3 for installing Vue Knowledge of JavaScript Knowledge of Vue.js Setup Our Application To begin, we will create a Vue application. Run the following command: $ vue create component-transitions $ cd component-transitions Once we are done cre...