Pages

Saturday, October 24, 2015

PHP e-commerce

Welcome to building a PHP e-commerce framework! During the course of this book we are going to build a flexible e-commerce framework using PHP, which can be extended and modified for the purposes of any e-commerce site. In this chapter, you will learn: The business logic behind e-commerce Why (and when) you should use your own system over an existing product The benefits of a "framework" About existing e-commerce sites and products e-commerce: Who, what, where, why? e-commerce, or electronic commerce, is the sale and purchase of goods or services through electronic means. In our case, this electronic means is the Internet. There are so many different applications of e-commerce on the Internet, including: Online shops selling products, such as Amazon, or the online counterparts to Brick 'N Mortar stores Online auctions, such as eBay Online services/web services such as BaseCamp, or subscription-based websites An overview of e-commerce e-commerce is an incredibly popular way of doing business, so let's look at who is using e-commerce and what they are using it for. • • • • • • •
PHP e-commerce

eBay According to eBay's website, there are approximately 84 million active users of eBay, with users trading more than $1,900 worth of goods each second. That means 84 million of us are using eBay to buy and sell goods, either as a business sustaining a regular turnover, or to try and make a little extra cash by selling unwanted or unneeded things knocking about the house. eBay is a social e-commerce site, operating as an online auction house, whereby they don't actually sell anything themselves, but instead allow their community of users to not only buy but also sell through their site. This not only illustrates the popularity of e-commerce, but also that there is money to be made in providing a stage for low (and high) volume online purchases. Amazon With revenue of over $19 billion in 2008, Amazon is one of the most popular  e-commerce sites on the Internet. Research in early 2009 indicated that it was  the favorite retailer for both video and music in the UK. Brick 'N Mortar stores Large, established Brick 'N Mortar stores such as Wal-Mart, Tesco, and Borders use online shops to sell the products they generally keep in store. With the likes of Wal-Mart and Tesco, customers often book a delivery timeslot for their groceries to be delivered. They also offer more than what is available in store, which they can easily bolt on for the convenience of their customers. With online retail, sellers are not confined to what they can stock on the shelves, but what they can store in their distribution warehouses. Smaller, niche-based Brick 'N Mortar stores use online selling as a way to  target their products to a wider audience, without the limitation of their  existing physical presence. Service-based companies Companies such as 37signals are setting up online applications (such as Project Management tool, BaseCamp) with monthly subscription models. Other examples of such sites include large file distribution websites (allowing you to "e-mail" large files using a third-party website) and premium features on certain websites, for example Get Satisfaction. 

Find all your apps and discover new ones

Google Play has over 1.3 million apps to choose from so you can find all your favorites and discover new ones. For apps where you’re a subscriber, like Netflix, you can simply transfer your service over to Android for free. Just download the same app from Google Play and sign in to your app.

Creating an Android Project

An Android project contains all the files that comprise the source code for your Android app.
This lesson shows how to create a new project either using Android Studio or using the SDK tools from a command line.
Note: You should already have the Android SDK installed, and if you're using Android Studio, you should also haveAndroid Studio installed. If you don't have these, follow the guide to Installing the Android SDK before you start this lesson.

Create a Project with Android Studio


  1. In Android Studio, create a new project:
    • If you don't have a project opened, in the Welcome screen, click New Project.
    • If you have a project opened, from the File menu, select New Project.
  2. Figure 1. Configuring a new project in Android Studio.
  3. Under Configure your new project, fill in the fields as shown in figure 1 and click Next.
    It will probably be easier to follow these lessons if you use the same values as shown.
    • Application Name is the app name that appears to users. For this project, use "My First App."
    • Company domain provides a qualifier that will be appended to the package name; Android Studio will remember this qualifier for each new project you create.
    • Package name is the fully qualified name for the project (following the same rules as those for naming packages in the Java programming language). Your package name must be unique across all packages installed on the Android system. You can Edit this value independently from the application name or the company domain.

Building Your First App

Welcome to Android application development!
This class teaches you how to build your first Android app. You’ll learn how to create an Android project and run a debuggable version of the app. You'll also learn some fundamentals of Android app design, including how to build a simple user interface and handle user input.

Set Up Your Environment


Before you start this class, be sure you have your development environment set up. You need to:
  1. Download Android Studio.
  2. Download the latest SDK tools and platforms using the SDK Manager.
Note: Although most of this training class expects that you're using Android Studio, some procedures include alternative instructions for using the SDK tools from the command line instead.
This class uses a tutorial format to create a small Android app that teaches you some fundamental concepts about Android development, so it's important that you follow each step.

History of Computers

The computer was born not for entertainment or email but out of a need to solve a serious number-crunching crisis. By 1880, the U.S. population had grown so large that it took more than seven years to tabulate the U.S. Census results. The government sought a faster way to get the job done, giving rise to punch-card based computers that took up entire rooms.
Today, we carry more computing power on our smartphones than was available in these early models. The following brief history of computing is a timeline of how computers evolved from their humble beginnings to the machines of today that surf the Internet, play games and stream multimedia in addition to crunching numbers.
1801: In France, Joseph Marie Jacquard invents a loom that uses punched wooden cards to automatically weave fabric designs. Early computers would use similar punch cards.

Advanced Unity Particles Tutorial


This tutorial covers the more advanced ways to use the Unity particle systems. It lasts for just under 30 minutes and demonstrates how to use particles as triggers, as bullets, as water, as gas, and as a flickering lamp flame. In addition, it covers how to control the forces and behaviors of particles using scripting. Now with improved sound quality, larger text size, and updated projects!
Includes:
  • Five Examples (Star Wind, Lamp Cave, Particle Cannon, Fluid Effects, Particle Trigger)
  • Seven Scripts
  • Nine Models
  • Ten Particle Effects
  • One Sound
  • Eight Textures

PHP - Predefined Variables

PHP provides a large number of predefined variables to any script which it runs. PHP provides an additional set of predefined arrays containing variables from the web server the environment, and user input. These new arrays are called superglobals −
All the following variables are automatically available in every scope.

PHP Superglobals

VariableDescription
$GLOBALSContains a reference to every variable which is currently available within the global scope of the script. The keys of this array are the names of the global variables.
$_SERVERThis is an array containing information such as headers, paths, and script locations. The entries in this array are created by the web server. There is no guarantee that every web server will provide any of these. See next section for a complete list of all the SERVER variables.
$_GETAn associative array of variables passed to the current script via the HTTP GET method.
$_POSTAn associative array of variables passed to the current script via the HTTP POST method.