Hour 23. Distributing Applications

After you write a program, test it, and debug it, you must get your program into the hands of those who will use it. If you are developing software for Windows, Mac, Linux/UNIX, mobile devices, or just deploying web applications, you’ll have different processes and procedures for doing so from both a technical and commercial perspective.

This hour introduces you to some of the issues associated with software distribution. You want to be sure that your users have an easy time installing or accessing the programs you write. In addition, those programs have to work after they are installed.

The highlights of this hour include

Image Learning why installation issues can be complex

Image Using build tools to simplify the creation of installation routines

Image Understanding why compiling the application is so critical to proper installation

Image Using version control

Image Distributing open-source software

Issues Surrounding Software Distribution

One of the easier aspects of software distribution is finding an outlet to sell the product. More computer-related online stores are open than ever before, and even discount stores and warehouse chains carry some commercial software products, since software has become a staple item in the daily lives of many people. All the time, software companies are looking for new titles to distribute and new programmers to write the code, and the business of computers today gives you many avenues in which to market your product.

Of course, you don’t have to charge money for your software program. You could distribute freeware or shareware software via download links on your own website or on websites that aggregate such software for distribution rather than sale. Freeware is typically closed-source software that is distributed without a cost to the consumer, while shareware is also typically closed-source software distributed without a cost to the consumer, but is available only for a trial period or other limited basis. Additionally, you could also distribute open-source software, which may or may not be free (it typically is) but definitely provides all the source code so that it can be modified by the consumer.

Just because you wrote a program that works on your computer with your software settings certainly does not mean that the program will work on others’ computers. For happy users, you must make sure that the program installs on the user’s computer and that the program will run after it’s installed. You may choose to provide cross-platform versions of software, only provide software for one operating system such as Windows or Mac, or some other option in between.

Application Compilation and Packaging

The process for compiling and packing applications for distribution depends entirely on the target installation platform. That is to say, compiling applications for Windows requires one set of tools, while compiling applications for Mac, Linux, mobile devices, or web applications require completely different tools. Additionally, the language that you develop in will require different tools for different platforms; that is to say, if you develop Java applications to distribute to Windows users, you will use a different set of tools than if you are developing Ruby applications to deploy to a web server. Because each combination provides a range of options, this section will describe the process in an abstract way.

All the resource files (source code, libraries, graphics, and so on) for your application will be maintained in a project or code repository with version control applied to it (you’ll learn more about version control later in this hour). In addition to developing the source code that makes up the core of the program you are developing, you will likely also include an installation script that controls the full installation process initiated by the user (if it is a distributed application) or you (if you are deploying to a web server, for example).

In many instances of distributing applications, you will be distributing the compiled version of the source code; compiled code means you are creating a single executable file that, when run, extracts and installs individual files. Using Windows as an example, you probably have run into setup files with an .exe file extension—these are compiled executable files. In these files, all the related Windows application modules and forms work together to form this executable file.


Note

A compiled application is more secure than a distributed-source project. If you distribute the source code (the project and its related files), anyone with skills in the language can modify your work (which might be what you want in an open-source project, but not in a closed-source project). However, most people won’t be able to do anything with the source code, and therefore, a compiled file is not only secure, but it is also necessary so that all can use your application.



Caution

Before you finish compiling your application for distribution, make sure that you’ve debugged the application as much as is feasible to eliminate as many bugs as possible.


Once you have a compiled a project for your platform of choice (or all the platforms), you can begin the manufacturing process if you wish to distribute it on CD-ROM, or you can place it online for sale or free distribution through one of the many software “stores” such as download.com.

Mobile Application Distribution

The process for distributing mobile applications is slightly different than for desktop applications, as typically software distribution goes through the specific store for the mobile operating system. For example, if you develop an application for iOS, that application is distributed through the Apple’s App Store; if you develop an Android application, it is distributed through Google Play. The same concept holds true for developers of BlackBerry and Windows Phone applications, which go through BlackBerry World and Windows Phone Store, respectively, and the list goes on.

While it is not required that developers distribute applications through the respective stores, users expect to find new and updated applications for their devices in the stores for those devices, so it is in the developer’s best interest to participate in the platform-specific programs. Each of these developer programs (one for iOS, one for Android, and so on) typically charge an annual fee for participation and provide access to additional documentation and development toolkits that are not otherwise available to the public. Each store also maintains guidelines for inclusion and reviews submissions to ensure that applications are not full of viruses or (in some cases) potentially objectionable content.

Distributing Open-Source Software

You might decide that you want to create and distribute applications under one of several different open-source licenses. These licenses allow for the entire source code, and not just a compiled executable file, to be shared under specific terms, including terms that limit reuse and what is to be done with modifications to the software. Open-source software is often free to consumers, but some developers will sell additional versions (such as customized compiled binaries) or support contracts to consumers in lieu of specifically charging money for the software itself.

One of the most important factors when distributing open-source software is determining which license to use. Some developers are concerned primarily with maintaining ownership in the case of patents, others want to ensure that any external modifications in the source code are shared with others, and some developers are not concerned with either (or any) of these issues. There are at least 10 different variations of open-source licenses in use today; you can learn more about licenses and how to choose one at the informative website choosealicense.com.

Using Version Control

During the course of your development, you will likely use version control to maintain your source code and other application resources. Although there are several different version control systems available for use—some free and open source and some proprietary—two of the most popular systems are Subversion (http://subversion.apache.org) and Git (http://git-scm.com). If you have a web hosting service that enables you to install Subversion, you can create your own repository and use a Subversion client to connect to it.

But an increasingly popular tool is Git, which is a decentralized approach to version control and also offers numerous tools and hosting options for users who want to get started with a repository but don’t necessarily want/need/understand all the extra installation and maintenance overhead that goes with it. One such hosting option for Git repositories is GitHub (http://github.org), which allows users to create accounts and store and maintain as many code repositories for free as they would like (as long as they are open source), while also providing paid solutions for users who would like to maintain private code repositories.

Git and GitHub come highly recommended for users new to version control because of their relative ease of use and free, cross-platform tools for use. The GitHub Help site would be a great place to start: http://help.github.com/. An added benefit of the already-free GitHub account is the ability to use Gist (http://gist.github.com), which is a way to share code snippets (or whole pages) with others, while these snippets themselves are git repositories and thus versioned and forkable in their own right. GitHub repositories, including Gists, are both excellent ways to get started with version control of your work.

Summary

This hour’s lesson provided a high-level overview of the process that developers go through to bundle and distribute applications to end users. You were also introduced to the nuances of mobile application distribution, as well as considerations for distributing your source code under an open-source license.

Q&A

Q. Using version control seems like a lot of overhead for a simple set of scripts I want to distribute for free. Do I have to use it?

A. No one requires developers to use version control or other backup systems, but it’s a rare person who hasn’t experienced some data loss or computer crash. Within a corporate environment, the loss of any work such that it would need to be recreated from scratch is equivalent to spending money twice, hence, the guidelines for maintaining work in a version control system.

Workshop

The quiz questions are provided for your further understanding.

Quiz

1. What is freeware?

2. What is the difference between freeware and shareware?

3. Why are compiled programs more secure than distributing the source code?

4. What is an installation script?

5. What filename extension do compiled Windows programs use?

6. Where do users of mobile devices primarily look for software applications to install?

7. What is one of the most important decisions to make when distributing open-source software?

8. What are two popular version control systems?

9. True or false: If you create an installation package for Windows users, Linux users can also double-click that .exe file and install your program.

10. True or false: You can bypass all stores, avoid manufacturing CD-ROMs and printed manuals, and simply put an executable installation file on your website for people to download for free.

Answers

1. Freeware is closed-source software that is distributed without a cost to the consumer.

2. Shareware is typically available only on a limited basis (for example, 30 days).

3. If you distribute the source code, anyone with skills in the language can modify your work. This works for an open-source project, but could have terrible financial consequences if your product is supposed to be closed-source.

4. A script that controls the full installation process necessary for the user.

5. An .exe extension.

6. In the operating system-specific store for their device, such as the App Store for iOS and Google Play for Android.

7. Which of the many open-source licenses to choose for your work.

8. Subversion and Git.

9. False.

10. True. There’s nothing stopping you from doing this, but would a user trust you? For all they know, your file contains a horrible virus, so you would have marketing barriers to overcome before you began to earn revenue.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.239.226