Last Saturday, I had the opportunity to go to an amusement park to have some much needed fun that I should have had on my birthday – not much of a big deal quite honestly. Luckily, I live less than four miles away from the very popular Worlds of Fun located in Kansas City. This was my second trip there with the main difference being that I had a ticket that allowed me to go to the water park as well. After having a lot of fun (no pun intended) – which was overshadowed by the sickening wait times, I headed to the other side of the park to enjoy some rides. That is where I met this guy.
Simple Factory Design Pattern is one of the many design patterns – best practices on how to solve common problems. Design Patterns were made popular by the Gang of Four (GoF) – Ralph Johnson, John Vlissides, Richard Helm, and Erich Gamma in their book Design Patterns: Elements of Reusable Object-Oriented Software. In this post, I will show you how to use the Simple Factory Design Pattern.
Simple Factory Design Pattern In Java – Example Code
In order to use simple factory design pattern, you need at least the following classes:
- Either an Inteface or an Abstract Class
NetworkOnMainThreadException is a pretty popular exception among those new to android development. This exception is mainly thrown whenever an application attempts to make a networking operation (like an API call or Http request) on its main thread. The other aspect of this exception is that it is only thrown by applications targeting the Honeycomb SDK or higher. That means that anything below that will allow you to make network operations or requests in your main thread without causing the popular “YourAppName has stopped working …force close or wait” message. In this post, I will show you how to solve this problem once and for all.
Laravel Framework is a popular PHP framework that is taking the web development community by storm. Heck, I never thought I would ever use PHP until I started using Laravel. So what made me give it a shot? I will make this short; we had to take over a laravel project from another guy at work! After a couple of months of using it, I was so impressed that I started using it on my major project that I initially wanted to write in Python. Yeah, so you can take me up on that because it is pretty damn cool. Anyway, in this post, I will just touch on a few things to prepare for further posts where we will create a simple web application using the awesome Laravel framework.
Access modifiers in Java helps us choose what to share with the world and what to keep to ourselves; you know, like your secrets. Perhaps you use them everyday; you know everything you need. Perhaps you are still unsure what they really mean. It does not hurt to refresh your mind because you really can’t know enough. That is why am going to lay everything about access modifiers in java on the table. Dissect them with examples and make it known to all in a simple way. Let us get started.
Let’s learn how to setup virtual host in apache (on Ubuntu) – most of what am going to show you will apply to other versions of Ubuntu below 14.*. and so if you need to configure your own local virtual host on Ubuntu, you can simply follow this tutorial. I will make this as simple as possible; after all, permissions and configurations can really screw your Ubuntu installation faster than you can blink – especially when you are not an Ubuntu expert. Let us do it.
How To Setup Virtual Host In Apache – Simple Steps
- Step 1 : Create Your Folders
Let’s learn how to create custom dialog in android and while we are at it, let us also do simple validation of the data the user entered before clicking the OK button! What is an alert dialog in android? It is a small window that asks a user to make a decision or enter more information in an app. You have probably seen a lot of them if you have used android apps in your smartphone. Anyway, the reason why I am showing you how to create custom dialog is because sometimes you may wish to have a different looking dialog box than what comes with your sdk and more importantly, you may wish to validate the data – without using your own custom dialog, it can be tricky …but not anymore! Let us take a look!
Welcome to: how to communicate between fragments and activities in your android applications. If you have not done so already, please check out my previous post on dynamic layout design using weights and fragments that I wrote yesterday! In the above linked post, I briefly talk about how to solve the problem of dealing with different device sizes by letting the android system adjust accordingly! In today’s post, we are going to take a quick look at how fragments can communicate back to the activity – basically how they can call back and forth to pass information when needed. Also, if you ever use fragments, you should always avoid trying to let fragments communicate with one another – it is a bad idea (will explain this later).
Let’s learn how to use android fragments and weights in this post – which is part of a series am doing! If you have done anything in android development, you must have certainly run into a situation where you have to deal with different size devices and trust me, it is a piece of work. Just getting all the images to look right is a pain if you don’t have the right tools. With that being said, today I would like to share with you some of the tips I have learned over the months that I have been doing android development. Let us get to it!
What is the secret of happiness and life? Is it having the coolest friends in the world? Is it living in a beautiful home or focusing on being healthy? You probably know that there is more to it than what I just listed above.
Sometimes I ask myself endless questions like; why do I get up and drive to work everyday? Why do I get so annoyed by careless drivers every time they cut me in traffic? Why do I feel like I don’t make enough money? Why am I driving an old Honda when everyone else on the right, left, front and behind me on the highway seems to be driving brand new cars? Here is the thing, I don’t feel like that anymore and I have discovered the secret to happiness and I am going to share with you today!