Wednesday, January 31, 2018

Code a Measuring App With ARKit

Katrine Mehl

Awesome crumpled paper animation as you scroll the One Pager of Katrine Mehl who is fittingly a communication strategist;)

Full Review | Direct Link


by Rob Hope @robhope via One Page Love

#192: PWAs in iOS 11.3

Mobile Dev Weekly January 31, 2018   #192
Brian Rinaldi recommends
PWAs Are Coming to iOS 11.3: Cupertino, We Have A Problem — Multi-platform PWAs are now possible, but right now iOS support comes with some caveats.
Maximiliano Firtman
Chris Brandrick recommends
Mobile Web Apps Finally Becoming An Alternative to Native Apps “web apps are finally becoming an alternative to native applications, and that’s something to be excited about”
Corbin Davenport
Sponsored
Multimodel Flexibility with EDB Postgres — Learn how the unique capabilities of EDB Postgres helps inMobi serve more than 26 billion ad impressions per month worldwide.
EnterpriseDB

Brian Rinaldi recommends
Progressive Web Apps Are Here. What’s The Big Deal? — PWAs are mobile-friendly sites that can do many things native apps can do, and they’re coming to Firefox for Android.
The Firefox Frontier
Holly Schinsky recommends
The Increasing Nature of Frontend Complexity — The rise in frontend complexity stems from the confluence of three mega-trends coming together to create a perfect storm.
Kevin Ball
Peter Cooper recommends
Swift Project Launches Swift Forums — Develop for iOS using Apple’s Swift? There are now open forums being monitored by the Swift team.
Swift Forums
Mobile Web
Brian Rinaldi recommends
What's New in Safari 11.1 — Introduces Service Worker support, the Payment Request API, web inspector changes and various security fixes.
Apple
Peter Cooper recommends
Swiper: Modern Mobile Touch Slider — A touch slider aimed at mobile use with hardware accelerated transitions. Demos here.
Vladimir Kharlampidi
Holly Schinsky recommends
Building A Progressive Web App with Stencil: An Introduction to Stencil — Using Ionic’s web component compiler Stencil to create a PWA.
Josh Morony
Peter Cooper recommends
wasap.js: Start A WhatsApp Chat From Your Site
Conversabit
Hybrid Apps
Holly Schinsky recommends
PhoneGap 8.0.0 Now on PhoneGap Build, iOS upgraded to XCode 9.2 — PhoneGap 8.0.0 is now available on PhoneGap Build with support for Cordova Android 7.0.0 and XCode 9.2.
Ryan Willoughby
Holly Schinsky recommends
Migrating from Framework7 v1 to v2: A How To
Vladimir Kharlampidi
Holly Schinsky recommends
Using Ionic 4 Components in Your Vue.js Apps — Interested in using Ionic components, but want to stick to Vue.js? Well it’s now possible, thanks to Stencil.
Paul Halliday
Native Development
Holly Schinsky recommends
Mobile Application Architecture: React Native with Redux — A white paper on architecting mobile apps with React Native and Redux, including a look at Redux’s high-level components and key goals.
Ajit Singh Bhurgy
Peter Cooper recommends
The Complete List of iOS & Android 2018 Conferences
Bugfender
Brian Rinaldi recommends
How to Code a Navigation Drawer for an Android App
Chike Mgbemena
Chris Brandrick recommends
Web and Mobile Code Sharing with Angular and NativeScript — This hour-long webinar explains how you can leverage Angular and NativeScript to streamline your dev process, bringing your web and mobile code under the same roof.
NativeScript
Holly Schinsky recommends
React Native Pros and Cons — This article takes a look at the advantages of React Native, why it’s so popular, and some potential drawbacks you might want to consider.
Jim Karg


by via Mobile Dev Weekly

How People are Hacking the Wireless Networks - #infographic

We need internet connection wherever we go. WiFi networks are quite vulnerable to security lapses. 90% of data breaches were preventable. According to research, more than 90% of data breaches in the first half of 2014 were possible to prevent if businesses reconsidered their cyber strategy.

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

Exception Handling in Laravel

In this article, we're going to explore one of the most important and least discussed features of the Laravel web framework—exception handling. Laravel comes with a built-in exception handler that allows you to report and render exceptions easily and in a friendly manner.

In the first half of the article, we'll explore the default settings provided by the exception handler. In fact, we'll go through the default Handler class in the first place to understand how Laravel handles exceptions.

In the second half of the article, we'll go ahead and see how you could create a custom exception handler that allows you to catch custom exceptions.

Setting Up the Prerequisites

Before we go ahead and dive into the Handler class straight away, let's have a look at a couple of important configuration parameters related to exceptions.

Go ahead and open the config/app.php file. Let's have a close look at the following snippet.

As the name suggests, if it's set to TRUE, it'll help you to debug errors that are generated by an application. The default value of this variable is set to a value of the APP_DEBUG environment variable in the .env file.

In the development environment, you should set it to TRUE so that you can easily trace errors and fix them. On the other hand, you want to switch it off in the production environment, and it'll display a generic error page in that case.

In addition to displaying errors, Laravel allows you to log errors in the log file. Let's have a quick look at the options available for logging. Again, let's switch to the config/app.php file and have a close look at the following snippet.

As Laravel uses the Monolog PHP library for logging, you should set the above options in the context of that library.

The default log file is located at storage/logs/laravel.log, and it's sufficient in most cases. On the other hand, the APP_LOG_LEVEL is set to a value that indicates the severity of errors that'll be logged.

So that was a basic introduction to the configuration options available for exceptions and logging.

Next, let's have a look at the default Handler class that comes with the default Laravel application. Go ahead and open the app/Exceptions/Handler.php file.

There are two important functions that the handler class is responsible for—reporting and rendering all errors.

Let's have a close look at the report method.

The report method is used to log errors to the log file. At the same time, it's also important to note the dontReport property, which lists all types of exceptions that shouldn't be logged.

Next, let's bring in the render method.

If the report method is used to log or report errors, the render method is used to render errors on a screen. In fact, this method handles what will be displayed to users when the exception occurs.

The render method also allows you to customize a response for different types of exceptions, as we'll see in the next section.

Finally, the unauthenticated method handles the AuthenticationException exception that allows you to decide what will be displayed to users in case they're unauthenticated to access a page they are looking for.

Custom Exception Class

In this section, we'll create a custom exception class that handles exceptions of the CustomException type. The idea behind creating custom exception classes is to easily manage custom exceptions and render custom responses at the same time.

Go ahead and create a file app/Exceptions/CustomException.php with the following contents.

The important thing to note here is that the CustomException class must extend the core Exception class. For demonstration purposes, we'll only discuss the render method, but of course you could also customize the report method.

As you can see, we're redirecting users to the errors.custom error page in our case. In that way, you can implement custom error pages for specific types of exceptions.

Of course, we need to create an associated view file at resources/views/errors/custom.blade.php.

That's a pretty simple view file that displays an error message, but of course you could design it the way you want it to be.

We also need to make changes in the render method of the app/Exceptions/Handler.php file so that our custom exception class can be invoked. Let's replace the render method with the following contents in the app/Exceptions/Handler.php file.

As you can see, we are checking the type of an exception in the render method in the first place. If the type of an exception is \App\Exceptions\CustomException, we call the render method of that class.

So everything is in place now. Next, let's go ahead and create a controller file at app/Http/Controllers/ExceptionController.php so we can test our custom exception class.

Of course, you need to add an associated route in the routes/web.php as shown in the following snippet.

And with that in place, you can run the http://your-laravel-site.com/exception/index URL to see if it works as expected. It should display the errors.custom view as per our configuration.

So that's how you are supposed to handle custom exceptions in Laravel. And that brings us to the end of this article—I hope you've enjoyed it!

Conclusion

Today, we went through the exception handling feature in Laravel. At the beginning of the article, we explored the basic configuration provided by Laravel in order to render and report exceptions. Further, we had a brief look at the default exception handler class.

In the second half of the article, we prepared a custom exception handler class that demonstrated how you could handle custom exceptions in your application.

For those of you who are either just getting started with Laravel or looking to expand your knowledge, site, or application with extensions, we have a variety of things you can study in Envato Market.

I would love to hear from you in the form of queries and suggestions!


by Sajal Soni via Envato Tuts+ Code

Cryptocurrency Adverts Barred From Getting Posted On Facebook

According to a Facebook blog post, nobody is now allowed to promote or advertise cryptocurrencies – including Bitcoin and Initial Coin Offerings (ICOs) – on Facebook. The social platform has discouraged all crypto endorsements on Facebook in an attempt to inhibit all those people who are...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Zubair Ahmed via Digital Information World

You Are Likely Going To See Local News In Your Facebook Feed

In a recent revelation, Facebook has decided to prioritize the local news in the social platform’s newsfeed. As a result, you are probably going to see more news from your local newspapers and the surroundings. At the outset, these changes are limited to United States; however, Facebook intends to...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Zubair Ahmed via Digital Information World