Sunday, September 22, 2013

5. Installing and Configuring

When people think of Adobe Flash, they usually say something like "Isn't that dead?"
For better or worse, Adobe has kept the name Flash to describe two completely different technologies, Adobe Flash Player and Adobe Flash Development products. The first is a consumer product and the later are professional products. So it makes sense that most people do not even know that the professional products even exists; and therefore most people do not know the power they have.

Flash player is not dead! In fact, it now has the abilities of the most advanced 3D gaming systems. It does not try to complete with HTML either. If you want to build a website, use HTML. If you want to build a high end application that runs on EVERYTHING, use Flash. 

You might be asking: What does Flash have to do with Apache Flex? 

As I explained in an earlier blog, Apache Flex's engine is nothing without a development environment. Since Adobe originally built Apache Flex, Adobe has made it so that you can also compile your application directly from Adobe Flash Professional, a design and animation product. Therefore, you can build a simple development environment with simple design and animation using Flash Professional. But, to build high end applications, DO NOT use Flash Professional as your code editor.

The diagram below outlines the Flash Development environments using three code editors that can generate mobile, tablet and websites (in the form of an HTML file and a "swf").

Compiling using Flash Professional, Flash Builder and Flash Develop 

Technically, the Flash Compiler is currently known as the "Falcon" compiler. A new product called Falcoln JS, under development will allow users to generate HTML / JavaScript from the same Flash development environments.
MXML and Actionscript are the languages that you can use to code your application.  In addition, Apache flex also supports Java, C++, C# and Objective C languages too. 

You are now ready to choose your development environment. If you wish, you can download a code editor from the links I provided in the previous post. Or, you can simply follow along and see how easy it is as I continue. 

Adobe Flash Builder

Most of my examples will be using Flash Builder. I will include project files and examples using Flash Develop in future blog posts. If you choose to use Flash Builder, you can follow along as I explain each step.

Once you install your application, you can create a new project using the File \ New menu (in Flash Builder).

 


























As you can see, you can create many different projects. If you are building a simple application that you want to work on all mobile and tablets, choose Flex Mobile Project. If you want a simple application for a websites, choose Flex Project. If you are building a high end application, you will actually be building many projects to support your entire application. For now, lets start with a Mobile Project.

If you use Flash Develop, you would create a new project using the Project menu. As you can see, it has many of the same choices. 

Flash Develop - New Project Dialog












Once you create a project, name it and save it, you will see the following buttons on the top menu (in Flash Builder). 





These buttons compile and run your application on your connected device or through a simulator on your computer. The buttons from left to right are Debug, Run, Profile. You will use Debug most of the time. To see the application run at the speed that it will when it is finished, choose Run. To test the memory and performance of the application, choose the Profile button.

When you are finished writing your application, choose the Export Release Build from the Project menu.

If you choose Debug with a Mobile project, can choose from many configured mobile devices as you can see below. You can also add new ones as they are released. This is not the full list of supported devices, just the ones I have configured to be tested.



Which language do I choose?

Do you already know HTML? if so, you already know the basics of MXML. If not, I will explain everything in later posts.

If you need the performance that is required to deliver a high end 3D game with lots of graphics, you will need to choose Actionscript with NO MXML. If this is not the case, you can choose MXML with Actionscript.

If you are building a high end application, you will need to separate the application into multiple projects. Each one can be have their own language and are independent of the others.

Here is an example of project files needed for a high end multi-platform application with Apache Flex.
  1. Data Model Project: Written with Actionscript.
  2. Test Suites Project: Written with Actionscript.
  3. Mobile Application View and Controllers: Written with MXML and Actionscript.
  4. Web Application View and Controllers: Written with MXML and Actionscript.
The information in your application is managed by the Data Model Project that generates a library file that the other projects use. The Test Suites Project runs automated tests against the library file. The last two projects are responsible for the logic to run and display on the specific platforms. If an advanced technique is required, it can be written for the specific device using C++, Java and Objective-C then included with one of the last two projects.

In my next blog I will discuss the topic of backing up data using a version control system and data repository, one of the most important aspects of development. 

 PREVIOUS -- NEXT

Friday, September 20, 2013

4. Creating Apps

Most of the time it takes to build an application is in the setup.
Imagine if you had a computer sitting in the corner with an application environment already installed and ready to develop your application. It has specifically been designed and configured to compile your application. When you click on the magic button, it does exactly that! Wouldn't that be easy?

Well, there are many different types of applications. So, there are different types of development environments. If someone actually configured a computer as I described above, it would probably generate similar applications. What's the point of that? Games! Games! Games! That's right, and there is an application development environment that is designed to generate games. Most games generally act the same. So, a company called Unity Technologies, created a "turn-key" solution for building games. It is a high end, packaged solution with a high end price tag, see Unity3D.

If you can afford Unity3D and you are building a game, it is a very good solution. But, if you do not have thousands of dollars to spend, this might not be an option.
Design your development environment based on your app
If you are not building a game or do not want to pay the Unity high end price tag then you need to take the time to setup your own development environment with Apache Flex.

Imagine having a great car engine without a car body. Well, that is what Apache Flex is. It is a great engine to create multi-platform apps. But like a car, it needs a "body" to work. If you look inside the car, you will see a bunch of buttons and knobs to control the engine and stuff. Well, the body for a compiler is similar and is called a "code editor".

There are two popular Apache Flex code editors; one is free and one is not. Both include everything you need to compile multi-platform applications.

Flash Developwww.flashdevelop.org
Pro: Free and easy setup.
Con: No easy iPhone, Android, or Blackberry output.

Flash Builderwww.adobe.com
Pro: Easy setup. 
Con: $699 or $50 a month for all Adobe products.

Flash builder is the easiest to get up and running fast. 

There are also other code editors in addition to the two listed above, including Flash Professional. 

A development environment requires many things including a code editor, a server, MVC libraries, release build scripts, online repository and automated test projects. 

Keep tuned.. In my future blogs, I will go over the details of installing, configuring and compiling apps using both development environments. 


PREVIOUS  --   NEXT


Monday, September 16, 2013

3. Compiler

In my last post, I proposed to you the possibility that I could magically tell you the one compiler that would answer all of your prayers and make everything as easy as a single button click.

I have bad news and a confession to make... I cannot predict the future!

That's right! If I could, I might tell you that Apple, Microsoft and Blackberry will die within a decade and Android will dominate the entire landscape. If that was true, choose an Android compiler and you are ready to go. But, I am in now way presuming or predicting that!

The Good News.

Even though I cannot predict the future, I can make an educated guess. And I predict that one of the four compilers I mentioned above have a high likelihood of being around in a decade. So, I want to choose a compiler that exists today that supports all 4 devices. I also want that compiler to be fee and easy to use! Well, I have the answer for you. It's called Apache Flex!

What is Apache Flex?
Adobe, the makers of Photoshop, introduced a compiler called Adobe Flex many years ago. Eventually, Adobe donated Adobe Flex to Apache. See flex.apache.org
 
What is Apache?
Apache is a non-profit foundation formed to build open source software, which is free to use and distribute. See apache.org.
Using Apache Flex, you can compile directly to Apple iOS, Android, Windows, MAC OSX and Blackberry operating systems, all for FREE!
There are many great compilers on the market. But there is no compiler that support all of these devices. If you are trying to reach as many customers as possible, you should choose Apache Flex! Plus, they are now supporting the new 2014 interactive televisions sets!

Click here to see hundreds of examples of Apache Flex and Adobe Flash Apps.

My next blog will begin the detail of setting up and programming using Apache Flex.

PREVIOUS   --  NEXT

Saturday, September 14, 2013

2. Applications - An introduction

The term "Application" is used for desktop apps, downloaded apps and even some advanced HTML websites are referred to "Applications"

Most HTML websites are written in and run from a bunch of text files, created using simple English characters. So, if you know how to type in English, you can create HTML websites quite easily.

"Real" applications run through a process called "compiling", which translates the same "English characters" into a bunch of "Machine Code". 

Its important to note here that when I use the term "English characters", I am referring to the characters you can type in on your keyboard. In reality, the "English characters" that you type is in the form of something called a "computer language". A computer language is just a bunch of "English characters" written in a specific format as I will explain later. From now on, I will refer to the "English characters" as a computer language.

What's Machine Code? 
Well, when you compile a file that was written using a computer language, the new file it generates is the format of "Machine Code". And, since machine code is written in the language that the computer understands, it runs really fast; Much faster than HTML! Machine code cannot be read by humans, only computers.

How difficult is it to compile into Machine Code? 
It's as simple as clicking on a single button. 
"Real Applications are compiled"
If you are building a small website or a project that you expect to have little traffic and usage, then it is not worth the time to learn how to create "Real Applications". In this case, you are better off building your project using HTML or a site builder like blogger.com, sites.google.com for simple sites. You can also learn HTML or hire someone that knows HTML. Nowadays, almost everyone knows someone that knows HTML. 

An important point to make is that there are many different computers, and many of them support different types of Machine code. For example, a Macintosh compiled product will not work in a Windows system because it does not support the same machine code. The same is true between an Apple iPhone and an Android Phone, they do not speak the same machine code. This means that you need to compile into multiple Machine Codes.

How do I know which code will work on which machine?
The operating system on the device defines the Machine Code support. So, a device running Apple's iOS will not work on a Windows 8. It will also will not work on a Macintosh which has a completely different operating system.

OK, what compiler should I use?
Since there are many devices and many languages, there are many compilers to choose from. I will simplify the choices for you.

If you want to compile to one device, use the compiler that is designed to compile to that operating system. This is usually supplied by the manufacturer of the device. For example, if you want to compile only to the Apple iOS devices, use Apple's "Xcode" compiler. 

So, I need to write the application many times for each device?
If you want to compile to every device that exists, that answer is yes. But, there are some compilers that actually compile machine code for multiple devices with the same language. For example, iOS and Macintosh OSX both use Apple's XCode compiler. But, they do not support Android. 

Professional Vs Consumer

It is important to differentiate the product you want to build before you decide which compiler to use. If it is a professional product that will be distributed to a very targeted market, then you can choose to support a limited number of devices. In this case, choose the compiler that meets the specific devices you want to support. 

However, if you are focusing your product on the consumer market then you need to take a different approach. 

First lets go over some data...

Today, 70% of the consumer market is on tablets and mobile devices. And there is every indication that this will increase.

There is about 8 Billion people on the planet. Out of that 8 billion, 5 billion have a cell phone. Out of that 5 billion, 2 billion have smart phones and the rest have older "dumb" phones that cannot run applications. Over the next few years, Apple and other manufacturers are working hard to sell lower cost "smart phones" to replace their older "dump" phones. There are about 2 Billion people that will probably never buy a cell phone. 
That means that 6 out of the 8 billion people on the planet will have a device on them that will be capable of running your app!
Now the major question...

What compiler will allow me to target the 6 Billion consumers?

The answer in the next Blog...

PREVIOUS - NEXT


Friday, September 13, 2013

1. Languages and end results

Languages and end results

What’s the point of learning a computer language? This is usually to get a job or build something you are passionate about.

I started in computer languages with simple scripts called batch files. For most of you, this will sound foreign. For everyone else, you know a batch file is a file that “does a bunch of things on the computer, in order when you run it”. Funny thing is that all computer languages do this. The only difference is that more advances languages do it on more than one computer. But it is still the same basic concept: “doing a bunch of things, in order”.

As everyone knows, computers get faster every year. Therefore, the tasks can be run faster every year. So fast that you can automate or simulate things that human beings can’t do, especially that fast.

Computers are everywhere! You can now wear them on your wrist and on your eyes to add to everything else we use them for in work and life. And each new phone or tablet is much faster than anything we have seen before. This creates a need for talented, high-end software engineers in the workplace to keep up with the advancements in computers.

If you want a job or build something that has never been built before, it is in your grasp to learn high end programming and make your passion a reality.

As I stated earlier, I started with writing batch files. Then, I learned internet technologies called html and css. Eventually, I realized that I needed to learn something called “object oriented software in order to build applications like video games, high end security data software and animation production software. Then, I learned that I needed to learn something called MVC in order to organize complex applications.

It was a very long and exhausting journey. Eventually I create simplified explanations of each step which I will explain along the way.

Html vs Applications

The websites you visit every day are most likely built using some sort of html language.

The applications you download from iTunes, Google Play and get at your local Best Buy store or local software retail store, was not necessarily built using html.

HTML is the web standard for websites. But, there is no standard language for building applications.

If you want to build websites, use html or something that supports html. This blog will not cover html development.

Applications allow users to charge for content, protect code and take advantage of mobile hardware features on the device, like location, camera and microphone. Many of these features are also available in HTML. But, the tight integration with hardware along with the advancements in tools has made building cross platform applications easier and can retain more value to the end user than HTML sites, if done correctly.

Most applications use some HTML. Applications are much more difficult to build than an HMTL site, as I will teach you. Applications usually take 2 to 5 times longer to build than an HTML site. They are usually investments in time and money that most people and small companies do not want to take on because of the scale of it. 
I will simplify the entire process of building applications on many platforms.

Let’s get started

Let’s get right into it.

Learning a computer language is similar to learning a new spoken language. I speak English. So, I already know how complex the English language is. To translate that to another language sounds daunting. It seems like I need to learn thousands of words, rules, exceptions, etc. And, to learn multiple languages sounds like a lifetime of work.

The bad news is that computer languages are also very complex. Each one also has many “words, rules, exceptions”. WOW! That also sounds like a lifetime of work!

The good news, is that I can simplify the learning into four categories.
There are four major terms to remember about all languages.

1.    Location
2.    Variables
3.    Functions
4.    Objects

That’s it! Everything you learn falls into these four categories, no matter what language you learn. So, instead of thinking about languages as being thousands of stuff to learn. Think of it as putting everything you learn into four easy to understand categories.

How is this easier? Well, a car also has thousands of parts. But, thinking of them as major components (body, drive train, engine, and cooling system, electric) makes it easier to understand. It’s easy to understand that a broken electrical system it will not change the body of the car. In software, if you start by learning these four fundamental aspects it much easier to learn any high end language because every language you learn has the same for elements (like every car has a body, engine, etc.).

Location

In the real world, we call this the same thing, a place where you put things. In the computer, it is pretty obvious but sometimes overlooked. Your file remains at the same location until you move the data of the file or delete the file and clean the garbage. When you put down a note in the real word, you can physically see where you place it. But in the computer, every file has a location that might not be obvious human beings. In fact every file has a specific address (unique number on the computer) where the file is stored.

The computer has two major places to store data, the drive and the memory. All data is stored on the hard drive. When you turn on the computer, it loads the files it needs to run the computer into memory. The interface is displayed by the files that were loaded into memory. When you load an application, it is loaded from the hard drive into memory and takes up the same amount of space in memory as it did on the hard drive.

A location can also be called a path, address or namespace. A location can also be physical or related to another. For example you can put down the shirt on the bed (physical). Or you can put down the shirt next to the bed” (related to another). Location is very important!

Variables

If you do not like math, you might think “Oh no, a math term”. You do not need to know match to understand variables, as I will now demonstrate.

If you have an empty box, and label the box “kitchen stuff”. You now have an empty storage container to hold some stuff that you labeled “kitchen stuff”. What do you want to call that? Well how about an empty box? What happens if you have 20 boxes and each one is labeled differently? Now, what do you want to call one of the boxes? Well, you could call it “the empty box labeled kitchen stuff”. In the real world that all makes sense. But the computer is always doing this… creating an empty box to store stuff. The “box” could be on the hard drive, on in memory. The “box” is always labeled like “kitchen stuff” and as I said earlier, it has a physical location. Unlike the real world, the box can start very small and grow as you put things into it. That’s pretty cool! What do you want to call that? Well, let’s call it a variable! It makes sense, since its size and contents can change at any time!

Functions

Remember I told you that the computer fundamentally is a device that does a bunch of things, really fast. If I want to make a list of things for the computer to do, I would write it down somehow, right? If you went shopping you write down a single list. If you were to write down the instructions to build a battleship, it would be many, many lists and very complex. So, how do I simplify the lists of things to do? How about “boxing them up”, kind of like the definition of a variable above. But, with lists of things to do, instead of a bunch of files. OK, let’s box all actions into lists and call them Functions! Eventually, you will have hundreds or thousands of functions. But, just like the box of kitchen stuff, you don’t need to know the contents of a faction called login, you only have to know that it does a bunch of stuff to login.

A functions can be also called a method.

Objects

An object is a combination of functions and variables at a specific location. If you read the previous descriptions, that should make perfect sense. The term object is usually referred to something that was loaded into memory. I am simplifying the description to make it easier to understand. Objects are also referred to as classes. Since an object has a location, the object in your applications can have relationships between them including parent / child relationships which I will explain later.

PREVIOUS - NEXT


W69EM58PEFWX  

Wednesday, September 11, 2013

First Post - An Introduction




John’s Software Learning Academy Blog

A place to learn how to write multi-platform, high end software applications from start to finish.

Introduction

Hi, my name is John Molinari. I am a software engineer and own a software company building cross platform applications. I spent years learning many different software languages. I have learned that every one of my clients have their unique requirements. I also have many years’ experience explaining and simplifying complex concepts. I am creating this information site to help clarify the confusing technology coding landscape. The purpose is explain my approach towards building multi-platform applications, from start to finish.

If you are a beginner, the multitude of technologies and languages can be confusing. What language should you learn first? How hard is it to learn? Can I learn if I am not great at math? It sounds too hard, can anyone learn to do it? If you want to eventually be an advanced programmer, which technologies should you learn and in what order?

These are good questions to ask. I can tell you that I am not great at math and I never planned to become an advanced programmer. I actually think of myself as a creative person. So, programming was not my goal when I was young. But, after years of learning, through my creative passion to build applications, I have become an advanced programmer.

Keep tuned for updates to this blog. If you have any questions for suggestions, please add comment below. 

Thanks,

John Molinari
Sonoma Data Solutions, LLC
Santa Rosa, CA

CONTINUE TO NEXT


W69EM58PEFWX