pageSwitch is a javascript library to create page switch effects. It supports 121 switching animations.
by via jQuery-Plugins.net RSS Feed
"Mr Branding" is a blog based on RSS for everything related to website branding and website design, it collects its posts from many sites in order to facilitate the updating to the latest technology.
To suggest any source, please contact me: Taha.baba@consultant.com
pageSwitch is a javascript library to create page switch effects. It supports 121 switching animations.
The days are moving fast, and modern people will choose an online schedule app rather than a bunch of sticky notes to organize their life. Online apps can be used on a smart-phone or laptop. And there's no need to synchronize data between devices. If you want to create your own scheduler but don't know where to start from, have no fear. This article's aim is to help you with your decision.
Why create your own scheduler instead of using the existing ones? Well, here are some use cases:
[author_more]
We'll take a look at three different types of JavaScript schedulers:
Before getting started, let's define what characteristics are valuable for us:
Well, let's start now.
You should get the full library package to use this scheduler. Alternatively, custom download allows you to choose the modules you want, but you need to have a commercial license to use it. To get the 30-day trial, you need to register by filling a web form or via your social network account. By the way, there's also a free open-source version of Kendo UI available. It is called Kendo UI Core, and you can check the details on this GitHub page. But, unfortunately, the scheduler is not one of its parts.
After you extract the library, you can create a basic scheduler. First, include the required files:
<link rel="stylesheet" href="styles/kendo.common.min.css" />
<link rel="stylesheet" href="styles/kendo.default.min.css" />
<script src="js/jquery.min.js"></script>
<script src="js/kendo.all.min.js"></script>
Notice that you should include jQuery before the Kendo UI JavaScript files.
The next step is to define the styles. Besides the styling the <html> and <body> tags, you should define the proper style for the scheduler's container to make it look good in full-screen mode.
html, body{
margin:0;
padding:0;
height: 100%;
}
#scheduler {
border-width: 0;
height: 100%;
}
Now you can use the constructor to initialize the scheduler:
<div id="scheduler"></div>
$("#scheduler").kendoScheduler({
// The current date of the scheduler
date: new Date(),
views: [
"day",
{ type: "week", selected: true },
"month"
]
});
The views property allows you to enable the Day, Week and Month views and choose the initially selected one.
This code will create a basic scheduler that is shown below:
A double-click will open the new event creation window.
Created events are draggable, so you can rearrange them if you need. Another handy feature is a mini calendar that is helpful for navigation through the schedule.
The Show business hours/Show full day toggle button will help to filter your work time events from the regular ones. You can find it at the bottom of the scheduler:
The scheduler is intuitive and has all the basic functions you may need. You can create an event and move it through the calendar grid. Additional features such as Mini calendar and Show business hours button are rather handy.
That's all that we can get by default, so let's move along.
Continue reading %A Comparison of JavaScript Calendars and Schedulers%
What are the buttons, text, dropdowns, etc. that can be seen when playing a game? All of that is part of what is called the User Interface (UI). Most games have some sort of UI which makes it easier for players to switch between levels and activate certain controls (such as pausing the game or restarting a level). In a previous article describing how to create Dodger in Unity, we created a small button to refresh the game if a player lost.
In this tutorial, we are going to take that to the next level, and allow users to pause or restart the game and switch between different scenes. We will also be taking a look at how to show certain UI elements only at certain times - such as when the game is paused or when the player dies/loses.
Most games contain a pause menu, a game over screen, and a main menu. Since these are some of the few elements that are required for a “finished” game, we will insert all three into our Dodger clone. In addition, we will also create an instructions screen so that players will be able to learn the controls they can use before they start playing the game.
The completed game can be played at itch.io.
A pause screen has a common set of controls that players are able to use to restart a level, move back to the main menu, or un-pause the game. Pause screens should only be visible when the game is paused. In Unity we are, in general, able to differentiate between a paused and un-paused game by using Time.timescale. If the time scale is zero, the game is paused. If it’s greater than zero, the game is un-paused (we’ll discuss this later). Let’s get started!
Continue reading %Adding Pause, Main Menu and Game over Screens in Unity%
There are several ways to create a mobile application. You want to know what the best way is? It depends. What technologies do you have experience with? What platforms are you targeting? How much time do you want to spend building your application?
The mobile space went through a revolution after the introduction of the iPhone in 2007. In 2008, Apple introduced the native SDK (Software Development Kit), which only added more fuel to this revolution. Fast-forward to today, there are millions of mobile applications, dozens of platforms, and countless frameworks, platforms, and tools to create mobile applications.
How do you decide what is right for you? Answering that question is the focus of this article. I discuss the types of mobile applications you find in the wild, the advantages of native and hybrid applications, and I list some of the more popular platforms.
Mobile applications can be broken down into three broad categories:
Each of these types has its pros and cons. If you were to ask me which type best fits your needs then my answer would be "It depends." To justify my answer, I first need to tell you about each application type. Let's start with web applications.
You may already be familiar with web applications. A web application is nothing more than a website, acting and behaving as an application. Before the introduction of the iOS SDK in 2008, web applications were the only option for developers wanting to create applications for the original iPhone.
Web applications have a number of distinct advantages, the most important one being development time. Because a web application is a website, it is built once and accessible on every platform that runs a web browser. For some companies, this is a very appealing solution since native development, which we discuss in a moment, can be costly and time consuming. You could say that web applications are by definition cross-platform.
Another important advantage is the learning curve for developing web applications. To develop a web application, you rely on web technologies that you may already have experience with, such as HTML, CSS, and JavaScript. If you do, then you will be up and running in no time.
Great. No downsides? There are a few downsides. The two most important drawbacks are performance and access to device capabilities. If you are planning to develop a game, then a web application isn't your best option. It is possible, but performance won't be stellar. Websites, and web applications, have limited access to the capabilities of the device, such as the camera, location services, etc. This has significantly improved over the years, but it isn't up to par with native applications.
If you want to limit the development and maintenance costs of your mobile application and performance isn't the most important aspect, then a web application is certainly worth considering.
If you want to understand what web applications are about and how to get started, then this tutorial is a good place to start with, for example, Laravel:
Hybrid applications were and still are incredibly popular. They combine some of the best things of both worlds, that is, web and native. The technologies used to create hybrid applications are identical to the ones used to create web applications, HTML, CSS, and JavaScript. The reason is obvious if you understand how hybrid applications work.
A hybrid application is a web application that runs in a web view of a native application. Put differently, a hybrid application uses a native application as its container to make it look as a native application. This means that, to the user, a hybrid application looks and feels native ... more or less. The user can download it from the platform's mobile store and the application icon appears on their home screen.
Any downsides? Because hybrid applications rely on web technologies and run in a web view, hybrid applications suffer from most of the same problems web applications do. Performance is not up to par with native applications. This is improving, though, every year performance gets better and better. It is impressive how JavaScript performance has improved during the past decade.
The most popular solution for developing hybrid applications is Apache Cordova, Cordova for short. When Adobe acquired PhoneGap a few years ago, they open sourced most of the code base and Cordova was born. PhoneGap still exists and is Cordova's commercial cousin.
To speed up development, developers often use Cordova in combination with other frameworks, such as Ionic and Onsen UI.
To learn more about hybrid applications, I recommend checking out some of the tutorials we have published on Cordova:
Choosing for native development is choosing for performance and reliability. Why does native development scare off so many developers? Let's take the iOS platform as an example. If you want to build a native iOS application, you need to learn a new language, Objective-C or Swift. You also need to become familiar with Xcode, Apple's IDE (Integrated Development Environment). A native application generally takes longer to build simply because you are working closer to the metal so to speak. Objective-C and JavaScript are two very different languages.
What do you get in return? Performance is probably the most compelling advantage of native applications. Native applications feel snappy and, especially for games, they can take full advantage of the resources of the device and operating system. Every feature and capability of the device that is exposed through the SDK's APIs is accessible to the developer. This is another key advantage native has over hybrid and web.
There are a number of hybrid approaches that make native application development accessible to more developers. The solution is simple, write code in the language of your choice and compile it to a native application. The most popular solutions at the time of writing are Xamarin and React Native.
Xamarin lets developers write native applications for iOS, Android, and Windows Phone using C#. The Xamarin tools leverage the Mono open source project. React Native has its roots at Facebook and enables developers to write native applications using JavaScript.
Envato Tuts+ covers a broad range of platforms, including iOS, Android, Xamarin, and React Native. Take a look at these tutorials to become familiar with them:
What is the best solution? Native? Or hybrid? Or a web application? There is no one answer. It depends on several factors. If you are a developer, then the answer is less complicated. What technologies are you already familiar with? Do you want to focus on one platform or create applications for multiple platforms?
It is becoming a true challenge to stay on top of iOS, Android, and Windows Phone. Some developers write native applications for multiple platforms, but it is challenging and I don't recommend it. The mobile space evolves at a rapid pace and it is almost impossible to know every platform inside out. If you choose for native development, then that should be your goal, become very, very familiar with the platform you're targeting. That should be your goal as a native developer.
This is one of the reasons many developers choose a hybrid solution. If you are a seasoned web developer, then you will be up and running in no time. Apache Cordova, in combination with Ionic or Onsen UI, can speed up development significantly.
Web applications are certainly something to keep in mind. They are a different category, though. By creating a web application, you have no intention of having an application in any of the mobile stores. Many companies chose this path several years ago. Nowadays, if the budget and resources are available, native and hybrid approaches are more popular.
I'd like to end this article by asking you some questions to help you decide what approach may work best for you.
Native is your best option. You may also want to look into Unity if you plan to develop a game.
No? Then you should consider the native route. If cross-platform support is vital, then a hybrid native or hybrid web approach is your best bet. Take a look at Xamarin or React Native if performance and device capabilities are equally important.
If your goal is to become a mobile developer, then my suggestion would be to choose a native approach. This is very personal, though. I am an iOS developer and I wouldn't want it any other way. By focusing on one platform (iOS, tvOS, watchOS, and OS X), I have the time to become very familiar with the platform. This is an important aspect of mobile development if you want to create compelling applications and a great user experience.
If you have a background in web development, then native is still an option. However, if you want to get something out the door quickly, then hybrid or web is the fastest solution.
If you were expecting a clear-cut answer, then I may have disappointed you. If you haven't made up your mind yet, then I suggest to give some of the options I listed a try. Play around with Cordova or take a quick course about Swift and see how you like it. Don't take the easiest or quickest path to your goal. Make sure you also enjoy the journey because that's where the fun is.
If you already know what approach is the best for you, then you may want to speed up the development of your next application with some of these iOS and Android templates. Check them out on Envato Market:
The general definition of defensive programming (as seen in Part 1, an overview piece on Defensive Programming in PHP) being used here is thus:
Defensive programming, simply put, is programming with the intent to anticipate likely failure points. The goal is to circumvent those likely problems before they occur.
This definition is a wide one. Many people argue against defensive programming, but this is often because of the types of methods they have seen espoused by some as defensive programming. Defensive programming should not be viewed as a way to avoid test driven development or as a way to simply compensate for failures and move on.
“Fail Fast” should not be seen as a counter to defensive programming. It all falls under the same umbrella. What are these methods, if not ways to anticipate that your program may fail, and either prevent those, or else ways in which to handle those failures appropriately?
Simply put, failing fast and loudly means that when an error occurs, it will do so as early as possible, and alert whomever it should alert, as opposed to silently continuing on in an error state that may cause more issues. Here is an excellent article on fail-fast style development. The premise of fail-fast methodology is to fail when acquiring input that might later compromise the program (or, more generally, to enter a failure state as soon as any problems could possibly be detected, rather than allowing bad data to travel and a program to run un-checked, or worse, bad data to be stored somewhere). This is most useful when dealing with user input, or dealing with input that is arriving from outside the script, module, or even out of your system via an API. An example of where this could be employed would be a check for invalid values or data types passed into functions.
Continue reading %More Tips for Defensive Programming in PHP%