close

Вход

Забыли?

вход по аккаунту

?

Flash & Flex. 2011.02

код для вставкиСкачать
FFDM 2011.02
4
Editor’s Note
02/2012 (20)
Project Management
Many of you have your own smaller or bigger company. Many projects that fail do so because of poor project management strategy. Why? There are a number of different ways to manage a project involving different types of individuals and their skill sets and personalities. What to do? There is no right answer but you can read the article on page 16. Troy Hipolito describes that project management is really one of the main elements that can make or break a project. His article is based on his own experiences in actually managing technical projects. Read and make a reasonable judgment based on your particular situation. In this issue, you learn more on Android. We have two special articles based on well-
known book chapters. Start reading from page 30 about Android in Action. Please go to page 42 to see this month column by Huw Collingbourne. Huw shows you how to create a text-based adventure game. You can learn how to create a game Map as an array and how link Room objects without a Map. And ... please go to page 46 to read the next part article written by Marc Pires on Test Driven Development. I would like to mention that we opened the new section called the Best Products 2011. In tthis issue we reviewed Camtasia:mac apps. I hope that you read our short tool presentation and send me some of your ideas what tools you would like to ind in the next issues. Just email me at ewa.dudzic@ffdmag.com. Generally, in this section you will ind the reviews of the well-known and useful tools.
Please read check the next page for other articles published in the February Issue. As always we have a few good articles for you. I hope you will ind them useful and practical. I thank the Beta Testers and Proofreaders for their excellent work and dedication to help make this magazine even better. Special thanks to all authors that help me create each issue. Please keep up the great work and send in your articles, tutorials and product reviews, questions, ideas or advises. Enjoy reading!
Ewa Dudzic & FFD team
Editor in Chief: Ewa Dudzic ewa.dudzic@ffdmag.com
Proofreaders: Betsy Irvine, Patrick French, James Deagle
DTP Team: Ireneusz Pogroszewski ireneusz.pogroszewski@software.com.pl
Art Director: Ireneusz Pogroszewski ireneusz.pogroszewski@software.com.pl
Senior Consultant/Publisher: Paweł Marciniak
Flex/ActionScript 101 Section Editor: Marc Pires marcpiresrj@gmail.com
iPhone Development Section Editor: Ryan D’Agostino
ActionScript in Action Section Editor: Huw Collingbourne
Games Section Editor: Chris Hughes
Contributing Editors: Pedro de La Rocque, Ali Raza, Csomák Gábor
Publisher: Software Press Sp. z o.o. SK
ul. Bokserska 1 02-682 Warszawa Poland Worldwide Publishing Software Press Sp. z o.o. SK
is looking for partners from all over the World.
If you are interested in cooperating with us,
please contact us by e-mail: cooperation@software.com.pl
Whilst every effort has been made to ensure the high quality of the magazine, the editors make no warranty, express or implied, concerning the results of content usage.
All trade marks presented in the magazine were used only for informative purposes.
FFD magazine is available on iPad thanks to MONOGRAM Interactive, s.r.o.
All rights to trade marks presented in the magazine are reserved by the companies which own them.
Thanks to the most active and helping beta testers:
Russell TangChoon, Lee Graham, Jassa Amir Lang, Ed Werzyn, Yann Smith-Kielland, Justus, Csomák Gábor, Kevin Martin, Charles Wong, Ali Raza, Almog Koren, Izcoatl Armando Estanol Fuentes, Lionel Low, Michael J. Iriarte, Paula R. Mould, Rosarin Adulseranee, Sidney de Koning
To create graphs and diagrams we used program by company.
The editors use automatic DTP system Mathematical formulas created by Design Science MathType™
ATTENTION!
Distributing current or past issues of this magazine – without permission of the publisher – is harmful activity and will result in judicial liability.
DISCLAIMER!
The techniques described in our articles may only be used in private, local networks. The edi
-
tors hold no responsibility for misuse of the presented techniques or consequent data loss.
5
02/2012 (20)
Tip of the issue
source: Adobe Developer Connection
Lip-syncing automatically with SmartMouth in Flash Professional: Leverage the SmartMouth and FrameSync extensions to automate the process of lip-syncing characters in Flash animations. Influxis www.influxis.com
..........................................1, 2, 3
flashgamelicense.com
www.flashgamelicense.com
............................... 1
SapphireSteel Software
www.sapphiresteel.com ....................................
7
Flash&Math
www.flashandmath.com
.................................... 11
AnDevCon
www.andevcon.com .......................................... 13
AFComponents
www.afcomponents.com ...................................
15
PlugrMan www.plugrman.com
........................................... 21
MonoGram CoverPage ™ www.monograminteractive.com .......................
55
FITC
www.fitc.com
...................................................... 56
Sponsors of the Issue
Special Report
08 How to Successfully Market Mobile Apps
BY CARSTEN FRIEN InBrief
10 News
BY CSOMÁK GÁBOR
Tools
14 Camtasia:mac BY LIONEL LOW Project Management
16 Managing Projects More Efficiently
BY TROY HIPOLITO
CONTENTS
Android in Action
30 Android Development With The Intent
BY W. FRANK ABLESON, ROBI SEN, AND CHRIS KING
34 The Many Faces Of Android Emulator
BY W. FRANK ABLESON, ROBI SEN, AND CHRIS KING
41 Interview With Frank Ableson
BY FFD TEAM
ActionScript in Action
42 Adventures In ActionScript
BY HUW COLLINGBOURNE Flex/ActionScript 101
46 Test Driven Development Or How Not To Be Trapped In A Nightmare. Part 2
BY MARC PIRES
Flash Based Tools
48 A Quick Look at Demo Builder 8
BY ALI RAZA
JSON & ActionScript
50 EXPERIENCING JSON WITH FLASH AS 3.0
BY SACHIN PATIL
Interview
52 Interview With FATC Main Organizer Elad Elrom BY FFD TEAM
54 An Interview With John Xie
BY FFD TEAM
We are preparing article on Rich Internet Application usage at embedded systems for FFD 2011. (Industry automation, production controls, factory controller). TEST SET UP STARTS FROM HERE:
Scenario: UI at automation systems generally consist of machine knobs, led lights and devices. But is this true of fault! What is the value of the RIA system at industry automation, production control, manufacturing execution system (MES)? We’re looking for reference applications and project on this area. We’re specifically interested of browser based UIs (html, css, javascript / html 5? ) vs. Flash&Flex UIs used at manufacturing execution systems.
Do such as use cases, UIs and applications exist. Have you or your company has done some work on this area ? If so, pls let us know, so we could continue our discussion and talk you more on preparing the article. This is what specifically motivates our article:
What is the value of the RIA User Interface in large industrial system? Is there good reference cases somewhere, eg. in the area of robotics, games, which could be used as a starting point for the article and possibly for future RIA based application development for heavy industry.
You may contact with your information FFD mag at ewa.dudzic@ffdmag.com 02/2011 (20)
8
02/2011 (20)
9
T
he forecasts for the global revenues in app stores reveal that the mobile app economy has been taken out of its niche long since. The 10 billion iPhone apps have been sold/downloaded by now. More than 300,000 iPhone apps, 200,000 Android apps and many more apps on the other platforms are competing against each other for that popular spot on the download and dashboard list. The immense diversity of all existing apps make it a top priority to maximize the visibility of your own app. This, however, has become more and more difficult due to the ever-increasing number of new apps which are being pushed into the market.
The goal of a successful market entry is therefore to establish the highest possible ranking within the respective app store platforms, such as Apple, Android, etc. Nowadays, the app ranking can be considered as the new combined SEO/SEM for mobile applications. To successfully market a mobile app idea we have compiled five tips for putting that goal into action.
Concept and Target Group Before any mobile application can be marketed, it has to convey a great idea. The users have to benefit from this app in such a way that they want to stick to it for an extended period of time. When developing and introducing an app one has to define first the main goal of the app, its main target group and which app store category it might fit best.
How To Successfully Market Mobile Apps
02/2011 (20)
8
02/2011 (20)
9
Platform Choice The app market is not any longer dominated by the Apple app store. In fact, Android just passed Apple when it comes to overall device usage. And other platforms have also established a significant user base, such as Nokia’s Ovi store, the BlackBerry app world and Microsoft’s marketplace. Not only the social-demographic factors may differ from platform to platform, but also the demands towards new apps on those platforms. Such as Android which is also known for its quite extensive amount of free apps available.
Pricing With the number of free alternatives exploding, paid apps are becoming increasingly unpopular. The less they cost the higher the chances to maximize downloads. It has been proven over time that significant revenues can not be generated by putting a price tag on the app. This will keep away most potential users and will limit the number of downloads significantly. Rather one should consider and plan to integrate mobile ads, which are becoming more and more accepted by users in return for free content.
Advertising
The more precise an app has been conceptualized the more efficient it can be advertised lateron. Mobile Advertising offers the possibility to exactly target the future user, based for example on device, platform, content channel, time frame, demographics and current location. This way scattering loss can be reduced, ad banners can be delivered efficiently and high conversion rates are achieved. A good app store ranking is the basis to make the app known to the target group, since most smartphone users check the app charts once a week on an average. One of the most efficient and at the same time secure options to reach a top ranking is offered, for example, by the madvertise katAPPult
. By investing an ad volume of about 10,000 Euro the ad network guarantees a top 25 position in the respective app category. Smaller budgets, though, can also have major effects. Every app download which is generated, and thus paid for, via mobile ads one can add four free
downloads thanks to the better ranking. This exponential growth in return maximizes the revenue possibilities of in app advertising. Communication
PR and Social Media may not be missing on the list of tools for a successful app market entry. The target group should be contacted through established, traditional communication channels which are activated by press releases, a corporate website, blog, newsletter, etc. But also, engaging in recommendation networks such as facebook and twitter is becoming increasingly important and efficient.
CARSTEN FRIEN
Carsten Frien is co-founder and CEO of madvertise Mobile Advertising GmbH (www.madvertise.de). Founded in 2008, together with Pan Katsukis, Martin Karlsch, Thomas Hille and Team Europe Ventures the madvertise Mobile Advertising GmbH is the leading network for mobile banner ads in the German-speaking markets. Their mission is to make a fast, ecient, and transparent connection between advertisers and mobile publishers. By accessing their comprehensive mobile-
only quality ad network, advertisers have the capabilities to carefully target their audience. On the other side, mobile site owners and mobile application developers, by joining their network, have the best resources to monetize their content. 1
0
IN BRIEF
02/2011 (20)
Samsung and Adobe Team Up To Bring Air to Smart TVs
At the 2011 International CES Show in Las Vegas, Adobe officially announced Samsung’s new Smart TV line which will be the first TV line to feature Adobe Air 2.5.
To further include Adobe in their future, Samsung is also planning to launch a unique applications store, which will allow developers to create applications and programs for the new Smart TVs. The applications will be developed using Adobe Creative Suite 5.
Furthermore it has been established that all available applications will use Adobe Air, which opens a wide selection of possibilities considering how many Adobe developers there are on the market today (over three million developers according to Samsung).
In addition to Adobe Air, Samsung has also decided to integrate Adobe Flash 10.1 on the new Smart TV line. This will allow users to experience what Samsung claims to be a more complete internet browsing experience
.
As Samsung has already supported Adobe Air for their latest smartphones, it means that developers who have already created mobile apps for smaller devices will be able to easily adapt and port further releases to the larger-sized screens. Samsung also feels that the added support and functionality serves to further strengthen the proper development needs, thus eliminating the need for developers to sacrifice the inclusion of important features and options.
Samsung has designed the Smart TV line with product and software developers in mind, with integrated support for Javascript, XML, Adobe Air and of course Adobe Flash. They have also designed a unique (single batch) Software Developer Kit (or SDK) that is cross-
compatible with all related Samsung HDTVs, Blu-Ray Players and Blu-Ray Home Theater Systems.
For users who are not aware, the Samsung Smart TV series is the most recent line of Samsung HDTVs. The Smart TV line includes integrated support for specific web-based apps such as social networking options, gaming hubs, free online video, TV streaming and various other formats and genres. The Smart TV also provides full web browsing support to allow users to frequent both the internet and online mobile media from the comfort of their couch.
The Smart TVs are currently available for purchase but the new support features will be added in an upcoming firmware release for older models, and will be automatically integrated in newer models.
We certainly praise Samsung for their open support of Adobe products and software. How do you feel about the new additions and features? Is there something you would like to see added to the list of Smart TV product features? Do you currently own a Smart TV and have an opinion to express? We have created a forum thread just for this topic! Please join the forum and the discussion here: http://www.thetechlabs.com/forum/topic/samsung-
and-adobe-team-up-to-bring-air-to-smart-tvs/
source: Flash Platform and ActionScript Tutorials
Alternative Flash Auto-Updater Updates Flash Player in the Background, No Adobe Download Manager Required
It’s a windows-only tool that updates Windows. Like many apps, Flash updates itself fairly often with new security patches, but updating is kind of a pain. Alternative Flash Player Auto-Updater does it all in the background, without your involvement, so Flash actually stays up to date and secure. More at http://
lifehacker.com/5732878/alternative-flash-auto+updater-
updates-flash-in-the-background-no-adobe-download-
manager-required
source: Lifehacker iAd Producer Arrived – new weapon against lash
Adobe’s new application is clearly against Flash, and gives the chance to create same quality advertisements in HTML5. According to Apple, with iAd Producer, you can easily impress users.
source: beszeljukMac.com
1
2
IN BRIEF
02/2011 (20)
Flash gives supercomputer a face
Joshua Davis and Branden Hall were asked to create the visual identity
or Avatar
for IBM’s supercomputer Watson. On February 14th, 15th, and 16th 2011, Watson will play Jeopardy against two former Grand Champions. Joshua and Branden were asked to created the face
for this supercomputer using Flash and their own HYPE Framework.
The competition will be taped today but yesterday was one of the rehearsals. En-gadget has avideo of that rehearsal: http://
www.engadget.com/20
11/01/13/ibms-watson-
supercomputer-destroys-
all-humans-in-jeopardy-
pract/
The supercomputer was ahead with $4,400, Ken had $3,400, and Brad had $1,200. source: Serge Jespers
Flash Platform at CES 2011
The world’s largest consumer tech show, with 2500 exhibitors unveiling next generation
consumer electronics is under way, and there’s some great news about new devices, apps, chips and services from Open Screen Project partners and others.
•
Motorola made news about upcoming devices:
•
With Verizon, they unveiled the Motorola XOOM – the irst device on Google’s Android 3.0 Honeycomb OS designed from the ground up for tablets. Coming Q2 2011. They also announced the DROID Bionic 4G, a new, fast, Android smartphone. Both with support for Flash Player 10.1.
•
With T-Mobile, Motorola announced Motorola CLIQ 2™ with MOTOBLUR™, a 3.7-inch touch screen smartphone with a slide-out keypad. Powered by Android 2.2 and Flash Player 10.1. Available in late January.
•
With AT&T, they launched the Motorola ATRIX 4G, which runs a full Mozilla Firefox 3.6 browser and supports Flash Player 10.1. Available Q1 2011
•
NVIDIA announced the arrival of NVIDIA® Tegra™ 2 chips that will power superphones
. Adobe CEO Shantanu Narayen was on stage with NVIDIA CEO Jen-Hsun Huang discussing the new developments and the importance of Flash support on devices. Watch a demo of a new LG Optimus 2X superphone on CNET: http://cnettv.cnet.com/nvidia-super-phone/
9742-1_53-50098258.html
•
AMD announced the Fusion family of APUs with low battery consumption, improved graphics and video performance on notebooks and netbooks. AMD Fusion APUs will compliment the upcoming release of Flash Player 10.2, which will include a new video hardware acceleration model that enables dramatically enhanced video playback performance. Sigma Designs, a leading provider of SoC solutions for delivering home entertainment, announced support for AIR for TV and Flash Player running in an Espial browser for TVs. STMicroelectronics, a leader in chips for set-top boxes and digital TVs, introduced out-of-the box content protection for premium Interactive TV video using Adobe Flash Access. Flash Access is integrated with AIR for TV for a content protection solution with support of a broad range of business models, including electronic sell-through, pay-
per-view, subscriptions or rentals, just to name a few. Support for Adobe AIR for TV with Flash Access on STMicroelectronics chipsets allows device manufacturers and content providers to rely on a secure, lexible and scalable solution for content distribution and monetization across many devices.
source: Adobe Flash Platform Blog szerző: Matt Rozen
Google Chrome OS Has Some Serious Flash Issues
Google Chrome OS was released to the public right alongside Google’s CR-48 notebook. However according to system testers and notebook owners the combination of the operating system on Intel Atom-
powered machines has difficulty running Flash-based websites and web videos. This means users have experienced less than par performance levels on many of the most popular websites out there.
Google is blatantly aware of the issue and is working with Adobe to fix the problem.
According to Adobe, Flash Player 10.1 support remains a work in progress. Video performance in particular is the primary area for improvement and we are actively working with the engineers at Google to address this.
Some of the most popular websites running Adobe Flash include Hulu, YouTube, HBO, CNN, and many more. This is very discerning news for average consumers.
source: Flash Platform and ActionScript Tutorials szerző: Briley
News selected by Gábor Csomák
�
�� �����
�������
�������������������������������
������������������
������������������������������������
����������������
���������������������������������
��������
��������������������
� ����� �����������������
����������������������������
���������������
�
����
� �������������
������
���������������������������
� ������������������������
���������������������
� ����������������������������
�������������������
��������
���������������������������
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����������������
��������������������
�����������������������������
��������������
�
���������������������������������������������
� �����������������������������������������
� ���������������������������������������
� �������������������������������������������
� ������������������������
� ����������������������������������������
� ������������������������������������
� ������������������������������
� ����������������������������������
� ����������������������������������
������������������������
� ����������������������������������������
� ������������������������������������������
� �����������������������������������
�������������������������������
� ����������������������������������������
����������������
������������
�������������������������������������
�������������������������������������������
������������
��������������������������������������
02/2011 (20)
1
4
THE BEST PRODUCT 2011
S
even years is a long time in garnering great experience to build a screen recording software. In 2009, TechSmith decided to bring this wealth of experience from Windows to OS X, and Camtasia:
mac is born (Camtasia from here on).
When you launch Camtasia, it presents a very simple yet highly customisable screen recording tool. You can choose from various presets of screen estate to capture your recording, or even create custom regions should none of the preset suit your needs. If your mac comes with a built-in iSight or have a camera connected, you may choose to also capture a video of yourself at the same time.
Options for recording audio comes from either the built-in microphone or any external microphone, and also the System Audio. Activating the recording of System Audio will prompt the installation of a system extension called SoundFlower. After installation, you will be able to capture audio from the system together with the screen recording.
After you are done with the screen recording, a quick keyboard shortcut will end the recording session, and Camtasia automatically launches the editing tool for post-production work. The editing interface likens most video editing softwares, so you should feel right at home if you have prior experience. Even if you donŐt, it is really easy to pick up.
The Media Bin on the top left stores all Camtasia recordings, and other videos, sounds, and images that are imported into a project. There is also a media library that contains text and other commonly used shapes that you might be interested to use in your project.
To help enhance your recording, Camtasia comes loaded with video effects to help ease the objectsŐ coming in and going out of the canvas. Special filters like Drop Shadow and Reflection may also be added to help increase visibility of objects. Finally, customisable actions like zoom and focus will really help in bringing desired attention to your objects. In the audio department, clicking and noise reduction filters, amongst others, can also help you deliver clearer audio to your audience. You may optionally add in a separate Caption channel to either mirror the audio for the hearing impaired, or add description and keyboard shortcuts so that your audience know exactly what you are doing.
There is a lot more about Camtasia that meets the eye, and it definitely helps that TechSmith has prepared a substantial collection of tutorials available online to teach you how to maximise the use of Camtasia. Using the 30-days trial in tandem with the online tutorials will give you a great access of the software.
With video sharing being so prevalent nowadays, even a layman can think of some use for Camtasia. From creating videos to document oneŐs life, game replays, software tutorials to highly professional training materials, Camtasia aims to deliver. Try it for yourself first hand at http://www.techsmith.com/camtasia/.
Camtasia:mac
LIONEL LOW
T
h
e
B
e
s
t
P
r
o
d
u
c
t
2
0
1
1
02/2011 (20)
1
6
PROJECT MANAGEMENT
Managing Projects with Basecamp
02/2011 (20)
1
7
O
ver the years I have found out that there are a number of different ways to manage a project involving different types of individuals and their skill sets and personalities. And I have also found out that project management is really one of the main elements that can make or break a project. Unfortunately, many of those involved in project management do so very poorly. In any case, I wanted to provide an article based on my experiences in actually managing technical projects. Along the way, I will include a little about communication, documentation, methods of management, people personalities, their roles, and a few software choices. Of course, although I may have my particular suggestions on how to do things, it is up to you to take the information and make a reasonable judgment based on your particular situation. Soooo do it! (see Figure 1).
Defining the Project Manager’s Role
Defining the Project Manager’s role is not an easy task. I mean, it’s not like, Hey you, you are the Project Manager so manage the project!
Yah – well. Actually, a Project Manager’s role may mean different things to different organizations. Project Management may sometimes involve both a Project Manager and a Project Coordinator
. (I personally do not believe in Project Coordinators as they are not thinkers and just pass things around.) In any case, as far as this article is concerned, the Project Manager is designed for smaller agencies as larger ones separate the functions even further. The Project Coordinator
This position is not really suited for detailed technical work. They are great for lots of different industries but not for what we do. Project Coordinators check on schedules and get files and then pass them along to whoever needs them. Project Coordinators often do not truly grasp what they are passing around nor have the ability to fully understand if the deadlines are even Managing Projects More Efficiently
ISO Interactive makes small and large-scale social games and multi-
player virtual worlds. Really neat stuff as it takes into account artists, developers, plus a plethora of technologies (including lots of Adobe Flash and Flex). On a 1-year project they could typically have a very skilled team of 4 to 7 individuals working as a synchronized unit. •
De�ning the project manager’s role
•
Project management tools
•
Basecamp project management software overview
•
Setting up Projects
•
Separating Client from Team
•
Organizing task groups
•
Creating Milestones
•
Creating To-do Lists and Items
•
About time management
•
Communicating and centralizing messages
•
About Writeboards
•
Setting up approvals and review content
•
About change orders
A look at techniques and tools to successfully manage your Flash/Flex project
02/2011 (20)
1
6
PROJECT MANAGEMENT
Managing Projects with Basecamp
02/2011 (20)
1
7
to make changes so it becomes reasonable. If not you are setting yourself up for failure. It should also be mentioned that with the SOW there is usually a separate Contractor’s Agreement
. While the Contractor’s Agreement does not deal much with aspects of project management, it is extremely important as it provides the ground rules
for the project. In short, you typically need both the SOW (tells the work that is going to be done) and the Contractor’s Agreement (which provides the legal rules both the client and your company need to follow). Contractor’s Agreements are important in that they usually include information on payment terms, additional feels, software rights/licenses, law governing body (different states, etc., have different laws), warranties, protection against poaching employees, ownerships, arbitration, and so on (see Figure 1). Identifying the right people for the project Ideally, you would want to have the ability to work with a team you select and trust, and having the right people for your project reduces personality conflicts and issues which ultimately will have an effect on the outcome of your project. Unfortunately, you may often be stuck working with whomever you have in that particular company. Technical expertise relates to both programmers and designers. You may have a programmer (or a designer) that has 15 years of experience yet lacks the know-how to solve issues. On the other hand, it may be possible that someone with just a few years of experience can run circles around others with more experience. So problem solving and thinking out-
of-the-box
is usually important in today’s interactive firms as long as they can follow instructions. No prima donnas please!
Personalities are also as important as technical expertise. Matching the right personality to the right possible. They just work blindly towards a goal with no concept of fixing things before they happen or making intelligent decisions that benefit the project or the client. It is just guesswork based on what other members of the team may be telling them. (Can I say, SCARY?) The truth is that most Project Managers are in fact Project Coordinators
. And most projects do not get done on time. I would say that typically about 80% of projects do not meet their deadlines and that cuts into profit. The Project Manager
The role of the Project Manager could be simply defined as doing whatever it takes to get the project done on time, on budget, and with a high level of quality
. In order to accomplish this, however, a Project Manager should possess a clear understanding of the project and the technologies involved – at least to a certain level. In addition, it is beneficial that the Project Manager have actual work experience in the field or fields. In my case, I was a graphic designer before I became a programmer. So I am a little of an odd case but it offers a unique view when making sure the artist and the developer streamline assets for the project. Regardless, experience in the field allows the Project Manager to flag
certain potential problem issues before they happen, as well as taking into account routine things that tend to absorb lots of time (i.e., testing, approvals, preparing and so on).
We may expand on these roles in later articles but for now these are a few tasks that tend to be on my Project Manager’s plate:
Understanding the scope/plans of the project
Project plans come in many names. I tend to write them myself for the first draft in the form of a SOW (
Statement of Work
). For us, the SOW for projects such as the Phase I Virtual World Social Game (normally about 9 to 14 months of work) is about 50 to 100 pages long. The SOW presents the project timelines, technology, and platform in a story form so the client can understand (clients sometimes may not be technically-savvy) and agree with what is involved in order to approve the project. The SOW can be amended or expanded upon in separate documents in order to incorporate further details about the project. For example, you may want to create separate GDDs (
Game Development Documents
) or other documents which explain the database structure, or how an avatar is going to be built, or how a software/tool that will be used to manage a certain system, and so on. As such, one needs to understand (and if possible contribute to) the SOW and know what can be done, or Figure 1. Statement of Work Sample
02/2011 (20)
1
8
PROJECT MANAGEMENT
Managing Projects with Basecamp
02/2011 (20)
1
9
job is part of the deal. For example, some individuals just do not work well in groups larger then 3. These may be very advanced and talented individuals but they are used to just doing things their way. These types of individuals may be best only for certain projects. Use the method of managing that works best for that organization
There are lots of different managing methods which can be used. For gaming with small groups fewer than 14 in number I tend to use our own flavor of the SCRUM method. I know how long things generally take. I take into account things like, how long would it take for me to do this task, internal testing and checking, internal rounds of approvals and changes, client rounds of changes, posting to different environments, additional testing and post edits, etc. I place all these tasks in the timeline and have the developer or designer commit to it. That way they have to really think about it and we go through the exercise with the things we have to do to. This allows for time adjustments and understanding there other project schedules. Once they agree, then they are committed to getting the specific tasks done in the time provided. You need your team to commit and if they cannot then work with some one else. Whenever possible, we also have sprints
or periods of time that last for a week or two. That means a few major check-in points, but for the most part, these still allow the people to work. Regarding sprints
please note, however, that if someone is constantly interrupted then nothing will ever get done. The bulk of the work happens in the middle, not at the beginning or end of a sprint. If possible, please leave people alone to get their work done. Keep meetings short and scheduled so people will know how to arrange their days ahead of time.
One exception is the daily SCRUM meetings. If you can it would not hurt to have the 5-minute morning meeting to review three points: •
What did I do yesterday
•
What am I doing today
•
What may be preventing me from doing my job
However, when the 5 minutes are up, stop the meeting and get back to work
. If there is something important to be discussed with an individual team member have a discussion separately from the group so you are not interfering with other peoples’ time.
Communicating properly with people
This includes people that work for you, people who you work for, your equals and clients. Now some people may say. Oh, he is a manager, but we just kind-of work together
. I do not play that game (well I do play games, but not that game
). Sorry, the first thing I do is know my place in the organization
.
Let people know clearly what needs to be done and what is expected of them. Be nice about it but do not be a push-over, if you know what I mean.
Communicating clearly with the client regarding their deadlines for approvals and reviews is just as important as communicating clearly with your own team. Make it clear to your client that you are trying to do your best to make their project a success. You realize the client has a business to operate and you may not be #1 on their list to talk to. Point out to your client that a simple check-in once a week for approvals and edits may be something they can be able to actually do. Overview of Project Management Tools
The following sections address project management software, 3rd party tools, and techniques that allow for a cohesive system that can manage and expand Figure 2. Basecamp - website
Figure 3. Beanstalk - SVN website
02/2011 (20)
1
8
PROJECT MANAGEMENT
Managing Projects with Basecamp
02/2011 (20)
1
9
to account for all project aspects from origination to completion. Some systems or parts of systems track people, others track project activities but in the end a project management system helps centralize communication, files, and approvals.
One of the main components is the project management software
. There are as many different kinds of project management software as there are different needs. There are free, open source solutions, purchased software solutions, and there are also more affordable web hosted solutions. I will now provide a synopsis of various tools for project management that allow for direct client interaction:
Basecamp Basecamp is a web-based solution that helps organize projects, track time expenditures, centralizes information, and communicates with clients, vendors and internal teams. Having said that, please note that Basecamp is not all things to all people
. Depending on project types and management styles other applications may need to be used instead of, or in conjunction with, Basecamp (see Figure 2). Google Calendar When you need to actually see what people are planning to do on a day-to-day basis and to track important dates, an online calendar like Google Calendar works well for this purpose. It helps at a glance to see what people are doing right now and allows you to compare task completion and timelines on various parts of a project in Basecamp to prevent potential issues. The main purpose of Google Calendar is to allow you to see who is in, who is out, meetings, major dates, and what members of your team are working on any particular day. It allows anyone on the project to take a quick glance and pull a snap shot of what everyone is working on that day.
Dropbox & SVN
Oftentimes, there is a major need to store project-
related files. Dropbox is ideal for such a purpose. Right now we are using Dropbox as a central repository (although my preference is an SVN solution). Beanstalk is a good online solution for an easy SVN as it can be tied to Basecamp
(see Figure 3). Done.Done. Many projects need to have a bug-tracking component. It is often a requirement of the project. Basecamp can be used as such, however, it really does not allow easily formatted, true bug tracking capabilities. After all you need to fix stuff if you want to get paid. Although a client may report a bug or issue on Basecamp it is important to group it and take care of it so it is documented and does not bite you in the butt
later. One simple online tool is called Done.Done
. It is simple and powerful enough to use all standard bug tracking features. And all client info can be imported it there as well. Done.Done helps track issues in the following ways: It gives you priority levels, status changes, build releases, good search features, emails, and handles screen captures (see Figure 4). Sometimes a client wants to see some sort of approval record. There are several ways to do this. In this document I discuss two different ways to accomplish this. First way – Public Site
When the client requires public and non-password areas for other parties outside of Basecamp then an external approval site is required. The approval site should allow all dates, links and approval status to be shown on a single page. That single page should then link out to other areas as needed. It is sort of a mini website just for approvals. It is manually developed Figure 4. Done.Done - issue tracking software website
Figure 5. Sample of approval site
02/2011 (20)
2
0
PROJECT MANAGEMENT
in HTML but after you set it up, it is not to big of a deal to add to it. However, one disadvantage of not having it password protected is that the information could leak out in the middle of the project (see Figure 5). Second way – Semi Private Site
When possible, the preferred way to do this is to use the Basecamp Writeboards (a feature of Basecamp
). It would be set up in a similar way as the approval site, however, Writeboards have reference messages on Basecamp that have images attached to them or external links as needed. This allows all content (with the exception of external links/components) to be within the system and password protected. Writeboards are a little like online documents. Highrise is an online contact manager and reminder software. It acts as a central place for large lists of contacts, which can be tagged in groups and tracked. Highrise also sends you tasks so you can follow up. For example, if I need to send a separate email to follow up on a client for a possible project, Highrise also sends a copy to the system to centralize the message and you can also post notes. Highrise is really nice as you can hook up to Basecamp and swap between each other with the click of a single button (see Figure 6). Another important communication tool to reduce unimportant emails and allow instant communications of small direct messages is Skype
. Many developers use Skype as a standard tool because it has the ability to see which developers are online and can even video-
chat instantly. The quality is very good and Skype now has features to do group video chat meetings as needed. There are also other chat tools/instant messengers that can be used if preferred (see Figure 7). Project Management Software Choices
Management systems vary in their suitability to meet our needs. Some project management software tends to be overkill and others just not enough. It depends on the standards needed and how we, as a company, want to deal with the clients as a whole. For example, there is the older standard of development where all documents are developed first and then the actual development begins. This approach is not really ideal for modern development, as project and client needs may change during the life of the project. Technology itself is constantly growing and changing. So a better approach is to be flexible (within limits) and be able to change direction at certain and regular checkpoints. There are many different types of project management software products. To name a few, there are Microsoft Project, Rally Dev, 5PM and others, but for the purposes of this document I will outline Basecamp as the primary solution (see Figure 8). Basecamp Project Management Software Overview
A company called 37Signals created Basecamp as well as several other products, one of which is a very popular programming platform called Ruby on Rails (although I mostly deal with open source as well as Figure 6. Highrise - contact manager software website
Figure 8. Other project management online software
Figure 7. Skype - instant messenger and video conferencing software
02/2011 (20)
2
2
PROJECT MANAGEMENT
the Microsoft stuff). Basecamp was created to allow a more simple approach to managing projects. It acts as a central place for time tracking, messaging thread with emails capabilities, tasks, files exchange and many other features that help organize things. One of the most important features to mention is that clients can participate and have direct feedback in the approval process. It is what I call client-friendly
. A happy client is a paying client!
Basecamp also has the ability to integrate in some forms with several other different types of software. The integrated software can perform various functions that might be needed in certain project environments. The following information will not only review features, but also touch on how we should use them. This is to help not only manage projects, but also to be more aware and efficient in getting things done correctly (see Figure 9). The above image shows the primary tabs for Basecamp
. The tabs represent sections of functionality and are briefly described below: Overview Tab
The Overview page shows recent activities such as files that are uploaded, items that are late, which people are on the project, and so on. We actually use it to post important information such as URLs that will be important. These are normally things like Client approval site/
section, Development site, Staging site and other notes. You can add notes to the Overview section from the Project Settings
link. Messages Tab
The Messages page is sort of the centralized area for all the emails on the project. Most people will respond via their email client, however, it very important to have a record and start messages from here. You know there is always that developer that says, I never got the email, duh. I have no idea what you are talking about
. Well they can go on Basecamp and find it and do what needs to be done. Also, when first creating messages, it is good to place them in a category. That way, things like requests or approvals can be grouped together. That is real important. When a client says, I never approved that
– then you just point to the email that was approved and then work it out from there. To-Dos Tab
To-Dos are individual tasks in small groups that can be assigned to anyone in the group including clients and/
or vendors. These tasks can be grouped by individual the tasks are assigned to
or by subject
and also can, if needed, be associated with the Milestones
. To-Dos can be generated as part of the project plan (better for smaller projects), or added as needed or in combination of larger projects. If you know the tasks that need to be done then is good to list them. Also you can keep track of time on individual tasks if needed. However, realize that too many lists at one time can possible overwhelm the team or client. In addition, large lists will be changed. Milestones Tab
These are the major overarching groups of deadlines for a project. A Milestone can have many individual ToDos associated with them. We prefer to get paid by the month as long as things are approved. However, many agencies only get paid on completed Milestones. That is cool for some, but we prefer the monthly, as the client tends to change the scope in development. That may delay Milestones if approved and we do not like getting penalized for doing additional approved work.
Writeboards Tab
The Writeboards are way cool
. It is like a simple online word document. Perfect to post information others will have to share and edit. Not good for very long documents, though, or for documents that have to be formatted in a certain way. While Writeboards will not replace long MS Word documents, however, it is very useful. A few ways we use Writeboards include: Instructional information for how to access things and what is where. These are things like each server login (most projects have at least 3 servers), SVN stuff, other tools to be accessed, organization items and stuff like that. Often large projects will have a lot of things and you need a place to keep it all centralized. Another typical use for Writeboards is the approval history, where in one page it will show all the approvals and/or changes on a project. You can add links to Figure 9. Project overview
Managing Projects with Basecamp
02/2011 (20)
2
3
different sections of Basecamp and also to external items for full functional demos. The client can go to that one page and really see that you have done a lot of work according to what they have agreed on. This is so important because often the client only sees the end result and does not realize what happens in order to get to that point. That history gives a validation to the money that is being paid to finish the project. Time Tab
The Time tab is really pretty simple. If you have an item on your To-Dos, you may charge time to it in the same section, and if you have other tasks not on the To-Dos you can add it in the Time section. It allows you to add by date, by person, and by description. Often tracking time is important for billing and for providing descriptions of what was done. If you are using time sheets, it would be good to do it daily or as you finished a task. It is just a pain to go back a week because you forgot. Files Tab
Much of the time people will simply attach a file to a message. However, the Files tab allows you to keep different versions of the files and notes, as well as the ability to group them in categories. Files sent are normally things like word documents, zip files, JPG/
PNG, and not active web or heavy graphical files. For the most part you should use SVN for that. The only exception is when a client needs a file. You then zip it up and post it on Basecamp
.
Setting up Projects
The person setting up the project needs to have administrative privileges. The Project Administrator can then assign others to be administrators by going to the All People tab and then selecting the administrator list
link or set projects up themselves (see Figure 10). At this point, you may want to create new companies/
clients and individuals in the same section. You will be attaching them to the individual projects after you set them up completely. Just note that once you attach a client to a project, they will have access to all public information within that particular project. So, for anything that is not a private message the client may not get an alert (unless they are attached to the event), but they can see it on Basecamp once logged in. After you know you have privileges, select the Dashboard tab
>
Create a new project button. It then brings you to where you need to add a project name
>select Just our company option>click the Create project button. There you have it – your first empty project! You can now add the companies/clients after you fill in some of the project details (see Figure 11). Separating Client from Team
If you feel that your team is really good at what they do (but sort of socially retarded
) you may want to create two projects. In other words if you think they may call the client an idiot via email, have a potty mouth, or take direction directly from the client without your explicate permission, then separate them. You are the project manager and you should be the main conduit with the client. Often clients tend to subconsciously go directly to the source and try to get work for free. They may just assume that if someone says yes
they will not be charged. Even worse, many clients will try to poach your employees to cut out you and your company. It has happened to us several times. So put it in your contracts. This is usually a good idea to put it in the Contractor’s Agreement
, which goes in conjunction with the SOW
. Figure 10. People and permissions
Figure 11. Create a new project
02/2011 (20)
2
4
PROJECT MANAGEMENT
In this particular case the project could be designed for the client and another for the teams (internal and vendors). Managing In managing, the key is to organize information in an easy-to-use format. For example, a project may involve a number of different groups such as our internal group, an external vendor, and the client. Each of these will take part in the project in various ways. So with projects larger than, say a month, we have to break all the tasks down into more tangible and group-
able events without being too cumbersome. We start with the big overarching sections of development. Structural Task Organization These big sections are called Milestones
. Milestones are very large groups that cover a number of smaller groups. More specifically, Milestones are the due dates of these large groups. It allows us to see the big picture
of a project. Milestones can have smaller groups each involving a set of tasks. In Basecamp these smaller groups are called To-do lists
. Within the To-do lists are individual tasks called To-do items
. You can have numerous lists associated with the larger Milestones
. So it goes from large, to smaller, more tangible groups, to individual tasks. All can (if needed) associate with each other within the hierarchy we just described. On any fairly large project there are things like documentation, art style, image gathering, and other logistics. Milestones like most things can be named. We could possibly group these different, but related events, into a Milestone called Pre-production
. Another Milestone that could be reached is developing the primary functionality. Maybe we can call this Shell Development for creating the functions to read and write without all the finished graphics. Another could be Base Art Production – that is, all the art beyond just the established styles. Please note that the names I am using are just examples. It is the use of the system that is the important thing
. So name it what it needs to be. Within the Milestones mentioned, an artist might have a task such as a web design. Web design would be an example of a To-do list
. That web design To-do list would normally be separated into several smaller tasks or Items.
It is important to realize on larger projects that you do not want to lay out every item. I would lay out all the foreseeable Milestones and only add To-Do lists and items in smaller parts as needed. I do not project To-do’s and items too far in advance. At the very most I prefer to keep it down to around one month increments. If you are doing sprints then it is usually one or two weeks at a time. It is hard to estimate timelines as technical things and additional requirements will come up and have to be accommodated somehow within a project. Just realize the dates will change, so sometimes it is best to just avoid long lists that may not be able to be done in the time you have due to unforeseen technical issues, testing, and the human factor. The trick is to reasonably estimate within a 10% margin the entire project. So you should know the Milestones take that in account and then create the To-
Do’s
to support the goals of the Milestones
. The first image provided shows a Milestone and associated To-Do’s
. The second image on the lower right shows the individual To-Do’s for one of the lists (see Figure 12).
Creating Milestones
Within your project click the Milestones
tab then select the Add a new Milestone
button on the right as shown in the image. A screen will display with the due date/calendar on the left and Title entry text field, a Who’s responsible?
drop Figure 12. To Do List and tasks overview
Figure 13. Creating Milestones
Managing Projects with Basecamp
02/2011 (20)
2
5
down and a create this milestone button
. Now, when filling this out, I normally take an educated guess
on the due date. The Milestone due-date will actually change as soon as I know the due-dates of the To-do Lists associated with them. I then title it appropriately and select the Project Manager in charge as the responsible party (see Figure 13).
Now you have a milestone that looks something like the image provided. When you role your mouse over the Milestone you will notice a few icons. Going from left to right, the first icon you see is a little trashcan
. This will delete the Milestone
. Next is the edit button to adjust the date, description and whom it is assigned to. Next you see a check box
. This check box is designed so you can check it off when the Milestone is completed. Last but not least, is a little comment icon. This allows any notes that need to be made for the entire milestone. These notes are separated from the messages posted on the Messages Tab and is designed to be attached directly to the milestone. Just like normal messages, you can email others on the project when a note is created as needed. When creating all these sets of information please try to keep the groupings in some logical and chronological order. But, most of the time, the To-do’s actually overlap so use the end date if some of the dates are similar. Creating To-do lists and Items
Now when you are creating the different To-do lists you do not want to forget attaching them to the correct Milestone (if the list is associated with one). So we start the process by going to the project at hand and clicking the To-Dos tab
. Then select the New to-do list
button. A page comes up where you can add the name of the To-do list
, check the Private check box
to keep it private (only our team can see it) or not to allow everyone to see it. After that, there is a description about it. This is usually one sentence or a paragraph if info as needed. Then you can associate it to a Milestone (see Figure 14). Just note that sometimes you may have some additional tasks that are not really attached to anything. That is OK. You just have to keep in mind to organize things in a logical order. Once you have a To-Do list it automatically opens up to show you the first item to fill out. Items are the individual tasks of the To-do lists (see Figure 15). Once you fill the description out you can assign it to a particular person or group. If you assign it to a person you can also notify that individual via email when the Item
is created and when it is due. The date can expand to a mini calendar to select a completion date for the task. Figure 14. Creating To Do Lists
Figure 16. Task options
Figure 15. Individual tasks in the To Do Lists
Figure 17. Additional task options
02/2011 (20)
2
6
PROJECT MANAGEMENT
One thing I tend to do is to color code the text with HTML code to allow different groups to easily see who is responsible for what tasks (see Figure 16). When you click the Add this item button your item
is added and it allows you to add additional items
immediately (see Figure 17). Now when you start on working off the items
you can check them off as applicable when they are completed. Also notice that if you move your mouse over the Item
you will once again see a trashcan icon
(that deletes the item), an edit link that naturally allows you to edit the content and attributes, as well as a two-sided arrow icon and a comment icon
. The two-sided arrow icon will allow you to drag the To-Do Item up and down between the same or even other To-do lists
. The comment icon acts as a message that can be emailed to any individual on the list. However, that message is associated only with that Item and cannot be found in the normal message area. There is no limit for the number of Items
you can add to a To-do list and there is no limit on how many To-do lists
you can have. However, it is always better to project in smaller parts as many of the lists will change to complete your end goal. Projecting further than 2 months for To-do lists and items may be a waste of time as you will have to reassign them later anyway. Time Management
Managing your own time helps the company bill the hours that pay the salaries. It is also a detailed record of what it took to complete a project. This means we get a more realistic understanding of how long something takes so we can charge accordingly. It also answers many questions of all the real things that had to happen to get a project completed and helps our process become more streamlined for the next similar project.
In Basecamp there are two different ways to add time. The preferred way, when possible, is to add time based on the items
you have. Once you have created Items
in a To-do list you can charge time by clicking on the clock icon
. This will open a few options to add time and description. You can even post to previous dates if you forgot. Once you’ve added time, the clock turns green (see Figure 18). When time is added in this fashion and you review time with the Time tab
, you will also notice that that particular time has a unique TO-DO
icon and a link that goes back to the individual item (see Figure 19). The second way of adding time is using the Time tab
. That is usually for time related to things that are not tasks or an item
. These are things like meetings and project management. Once in a while, you may just have a task that did not make it as an item
for the To-do list(s)
. So that would be an exception. We have to apply charges to the correct job or the information is a bit meaningless. When adding time, add it in increments of half-hours (example: .5). No need to keep track of every minute, just round it up. If you have a meeting for 45 minutes and it involves 2 different clients or job numbers on the same client, just put .5 hours on each job. It will work out. At the end of the day you can review all the time on all the jobs you worked on that day by going to the Dashboard link and then going to the Time tab
. If you want to see your time, just click on the Create a report
link and select the dates to view and show yourself. If it does not add up to the correct amount of hours, you know you can add what you need in the individual project (see Figure 20). Communicating Basecamp has a number of different ways of communicating between individuals and groups. In Figure 18. Adding time in the task
Figure 20. Creating time reports
Figure 19. Time sheet options
Managing Projects with Basecamp
02/2011 (20)
2
7
addition, there are other tools outside of Basecamp such as Google Calendar
, Instant Messenger and others. As far as Basecamp is concerned we will cover the messaging features, Chat
, file uploading and Writeboards
.
The messaging features are very useful as it is a central place to store, organize and send out communications. There are two main ways of posting threaded messages:
Comments Feature
The first is posting comments on the Items on the To-Do’s
. These messages are called comments because they stay with the individual tasks and not found in the normal messages. The main reason for even having this ability to separate from the regular message feature on the Message tab is to add a specific comment for a specific item in progress. So it is kind of semi-private and limited in features as it is not shown or searchable with the regular messages. An individual would have to be selected to receive a message and other people would have to select on the actual message for that particular item in the To-
do list
. It is good to keep those things away for the regular threads.
a d v e r t i s e m e n t
Messages Feature
The second and more common way, is using the Messaging tab
. One of the goals of managing a project is to centralize communication. By posting a message on Basecamp you can place a category on it, make it private for the internal team (if needed), attach files, and select who gets notified. Once you send it out, all the recipients can respond by regular email or by logging in Basecamp
. Basecamp keeps all threads grouped together. This is great for getting approvals or discussing any topic that can be categorized. So if everyone lost all their email or switched their computer, they would have all the conversations centralized online. Many times there is a miscommunication as emails get lost or one person on the team did not copy another. So by having a central point of conversations people can go back even if they did not receive the message in an email. For the most part everyone should try to use Basecamp to distribute any message that relates to an individual project. Some very small things that no one needs to see or track may be an exception and can be done by email or instant messenger. Another important thing is to separate messages into easy understand groups. So even though a client has several jobs, each 02/2011 (20)
2
8
PROJECT MANAGEMENT
message should pertain to the relevant job. Do not bundle messages about different jobs on one message even if the work is similar. Adding a category is also important to organize groups of messages. It is typical for a project manager to go back and add categories as needed and also review messages to assign categories for messages that do not have them. It is best to make things easy to find (see Figure 21).
The default categories are: Additional categories that are typically added are:
•
Announcements
•
Assets
•
Code
•
Copywriting
•
Design
•
Miscellaneous
•
Requests
•
Transcripts
•
Approvals
•
Status Check
•
Passwords & Links
•
Request Schedules
•
Request Files
•
Change Order
Files Feature
To access the files feature, just go to any existing project and select the Files tab
. The files feature allows you to upload files directly to Basecamp
. It is very similar to the Message feature. If you upload a file through the Message feature it also shows up under files. The main difference is that it just simplifies the process when you want to send a file to a group of members with a description. My preference is to use the message to post files.
Once you have uploaded a file (whether you uploaded in the message or file tab) you have additional options. You can also send multiple versions of the same file (it keeps all the versions). You can also have categories like what you have in the messages. If you are using the Writeboards you may want to create an image category called Writeboards
so when you Figure 22. Uploading and managing �le
Figure 21. Message category options
upload images you can place it in a Writeboard for visual information. The file feature is great for Word Documents and Zip files that just have to be passed around. Another great thing if an approval site is not needed is to post comps for approval. The Writeboards can be used as a list of links for approval history (linking to the message or files see Figure 22). Writeboards
Writeboards are very useful for a number of reasons. Although you may have a large Statement of Work (SOW) to go to as the primary bible and documents to upload, you will also likely have a number of other documents that will constantly change. Having an online document allows everyone to see the most current version and make changes online. You can even see all the different revisions and who made what changes. The standard email notification options on many of the features also apply here. So you can make a change, save it as a new version or post it as a minor change. There is also a neat formatting guide that allows you to add images, links headers and basic things like that. One main feature of interest is creating a Writeboard that is a history of approvals. If the client does not need an external site then using the messaging system to post comps and the Writeboard to keep a history of approvals is a great thing. All the items that are needed can then be located within one project management software. So I would suggest using the Writeboard as a document storage place when possible. Approvals and Review Content
Messages are also directly used for posting threads for reviewing content and approving items. Even though the clients are not very direct with their replies it is better to request feedback in a way you can approve and move forward. It is in the nature of the client not to commit for things like approvals. So when a project status needs to be reviewed or approved there should be an attempt to have a review site or link. In the meeting for review, Managing Projects with Basecamp
02/2011 (20)
2
9
it is explained about the items completed and then a request is sent by posting please post back the words APPROVED, APPROVED with changes (post the changes) or NOT APPROVED (post information)
. Most of the time, the client ignores this and gives a very vague feedback. It is up to the Project Manager to reply to the client’s feedback and request for the client to clarify. If the client’s reply seems clear, the Project Manager states that we believe that this item is APPROVED (or whatever the status is) and asks the client if they agree. Later the client will understand the need for more direct answers to move the project forward. Whether it is a review or an approval it should always be posted under the Approval category, as they are essentially the same thing. Comments have to be placed with one of the three answers. And it is OK to have APPROVED with changes as that is what is expected on the review process. Change Orders
During the approval process, or during meetings, the client may ask for things that are out of scope or in agreement of the project. Normally change requests happen (if client requests it) after a sprint
. Approvals may be weekly and sprints could possibly be every two weeks. One reason not to project too far into the future is that the client may request a change that requires altering the project milestones, To-do’s and so on. So every several weeks you allow the client to shift the direction if really needed. The shifts are requested by the client and approved through a change order
. A client creates a change order by simply posting a message with that category assigned to it. We tend to have a 10% flex rule. If the additional work or combination of additional work is within 10% of the project we just make sure the change orders are approved. If it goes beyond that then adjustments of payment and time schedule have to be accommodated for. Normally a client is not able to post change order requests until a certain period of time. Normally we have 2 weeks sprints (periods of time). Where work is assigned for those weeks and no change can happen until that time and goals are completed. Sprints can be On the ‘Net
1.
ISO Interactive – Virtual World and Social Game Creators: http://www.isointeractive.com
2.
Basecamp – Project Management Software: http://basecamphq.com/
3.
5pm – Project Management Software: http://www.5pmweb.com 4.
RallyDev – Project Management Software: http://www.rallydev.com
5.
Highrise – Contacts and Leads: http://highrisehq.com/
6.
Google Calendar: http://calendar.google.com
7.
Skype – Video calling, Call phones, Instant Messaging:
http://www.skype.com
8.
Beanstalk – Version control for software development:
http://beanstalkapp.com/
9.
Dropbox – File storing and sharing: http://www.dropbox.com 10.
Done.Done. – Bug tracking software: http://www.getdonedone.com/
TROY HIPOLITO
Hello everyone, my name is Troy Hipolito. I work with a number of companies helping them manage large campaigns, web sites, and online game development. One of those companies which I am very fond of is a game company called ISO Interactive or ISO (Sounds like “eyesooo”). You can take a peek at the site at: http://www.isointeractive.com. Please feel free to also email me directly at: troy@isointeractive.com. longer or shorter depending on company policy however they require regular units of time. For example it could be weekly, every two weeks, or monthly. The preference is every two weeks without interruption. Conclusion
I hope this article gives you the basics to help get projects done a little more efficiently and with more peace of mind. Having a sense of control and being able to confidently get things done and report positively to the client definitely makes your life easier. I like easy (Freudian slip).
There are of course more advanced tools but we have chosen Basecamp and related online applications because they are flexible enough for the projects we are working with, while easy enough for clients to respond to. All things are centralized and documented automatically in one place. And if the client responds, then you have a direction you can move towards to make it closer to finishing the goals of the job. If anyone is interested in the work we have done please take a gander at our site http://www.isointeractive.com as we have at least some of our public projects posted there. Mostly, we deal with social games for web and networks (such as Facebook
) from the range of 10k to several million.
Thank you and we look forward to publish more how-
to
specific project articles in the future. Please feel free to also email me directly at: troy@isointeractive.com
.
02/2010 (20)
3
0
ANDROID IN ACTION
Android Development with the Intent
02/2010 (20)
3
1
A
ndroid is a software environment built for mobile devices. It’s not a hardware platform. Android includes a kernel– based Linux OS, a rich UI, end-user applications, code libraries, application frameworks, multimedia support, among other things. And, yes, even telephone functionality is included! Whereas components of the underlying OS are written in C or C++, user applications are built for Android in Java. Even the built-in applications are written in Java.
One feature of the Android platform is that there’s no difference between the built-in applications and applications created with the SDK. This means that powerful applications can be written to tap into the resources available on the device. Figure 1 demonstrates the relationship between Android and the hardware on which it runs. The most notable feature of Android may be that it’s open source; missing elements can and will be provided by the global developer community. Android’s Linux kernel–based OS doesn’t come with a sophisticated shell environment, but because the platform is open, shells can be written and installed on a device. Likewise, multimedia codecs can be supplied by third-party developers and don’t need to rely on Google or anyone else to provide new functionality. That’s the power of an open source platform brought to the mobile market.
Android Development with the Intent
Android in Action, Second Edition
By W. Frank Ableson, Robi Sen, and Chris King
For Source Code, Sample Chapters, the Author Forum and other resources, go to
http://www.manning.com/ableson2/
Figure 1. Android is software only. Leveraging its Linux kernel to interface with the hardware , you can expect Android to run on many diferent devices from multiple cell phone manufacturers. Applications are written in Java
����������������
����������
�
����������������
�
������������
���������������
��������������
�������
������������
Excerpted from
In this article, based on Chapter 1 of Android in Action, Second Edition, the authors define the concept of Intent, a declaration of need in Android, which is made up of a number of pieces of information describing the desired action or service.
02/2010 (20)
3
0
ANDROID IN ACTION
Android Development with the Intent
02/2010 (20)
3
1
The power of Android’s application framework lies in the way it brings a web mindset to mobile applications. This doesn’t mean the platform has only a powerful browser and is limited to clever JavaScript and server-side resources but rather it comes from how the Android platform works and how users interact with the mobile device. The power of the Internet is that everything is just a click away. Those clicks are known as s uniform resource locators
(URLs), or alternatively, uniform resource identifiers
(URIs). The use of effective URIs permits easy and quick access to the information users need and want every day. Send me the link
says it all. Beyond being an effective way to get access to data, why is this URI topic important, and what does it have to do with Intents
? The answer is nontechnical but crucial: the way a mobile user navigates on the platform is critical to its commercial success. Platforms that replicate the desktop experience on a mobile device are acceptable to only a small percentage of hardcore power users. Deep menus, multiple taps, and clicks are generally not well received in the mobile market. The mobile application, more than in any other market, demands intuitive ease of use. Whereas a consumer may purchase a device based on cool features enumerated in the marketing materials, instruction manuals are almost never touched. A UI’s usability is highly correlated with its market penetration. UIs are also a reflection of the platform’s data access model, so if the navigation and data models are clean and intuitive, the UI will follow suit.
Let’s introduce the concept of Intents and IntentFilters
, Android’s innovative navigation and triggering mechanism. Intents and IntentFilters bring the click on it
paradigm to the core of mobile application use (and deve lopment) (and deve for the Android platform:
•
An Intent aration of need.
•
An IntentFilter is a declaration of capability and interest in offeriance to those in need.
•
An IntentFilter may be generic or specific with respect to which Intents it offers to service.
•
An Intent is made up of a number of pieces of information describing the desired action or service. Let’s examine the requested action and, generically, the data that accompanies the requested action.
The action attribute of an Intent is typically a verb; for example VIEW
, PICK
, or EDIT
. A number of built-in Intent actions are defined as members of the Intent class. Application developers can create new actions as tion employs the following Intent action:
android.content.Intent.ACTION_VIEW
The mobile market is a rapidly changing landscape, with many players who have diverging goals. Consider the often-at-odds relationship among mobile operators, mobile device manufacturers, and software vendors. Mobile operators want to lock down their networks, controlling and metering traffic. Device manufacturers want to differentiate themselves with features, reliability, and price points. Software vendors want unfettered access to the OS in order to deliver cutting-edge applications. Layer onto that a demanding user base, both consumer and corporate, that has become addicted to the free phone
and operators who reward churn but not customer loyalty. The mobile market becomes not only a confusing array of choices but also a dangerous fiscal exercise for the participants, such as the cell phone retailer who sees the underbelly of the industry and just wants to stay alive in an endless sea of change. What users come to expect from a mobile phone has evolved rapidl. Figure 2 provides a glimpse of the way we view mobile technology and how it has matured in a few short years.
PLATFORM VERSUS DEVICE
The term platform refers to Android itself – the software – including all of the binaries, code libraries, and tool chains. The Android emulators available in the SDK are simply components of the Android platform.
Let’s jump into the fray of Android development to focus on an important component of the Android platform. We’ll look at the foundational information about why Intents are important, and then describe how Intents work.
With all of that as a backdrop, creating a successful mobile platform is clearly a nontrivial task involving numerous players. Android is an ambitious undertaking, even for Google, a company of seemingly boundless resources and moxie – and they’re getting the job done. Within the span of two years, Android has seen four major software releases and the release of multiple handsets across most major mobile carriers in the global market.
Android’s good Intent-ions
An important and recurring theme of Android development is the Intent
. An Intent in Android describes what you want to do. This may look like, I want to look up a contact record,
or, Please launch this web site
, or Show the order confirmation screen
. Intents are important because they not only facilitate navigation in an innovative was, as discussed next, but they also represent the most important aspect of Android coding. Understand the Intent and understand Android.
02/2010 (20)
3
2
ANDROID IN ACTION
Android Development with the Intent
02/2010 (20)
3
3
The data component of an Intent is expressed in the form of a URI and can be virtually any piece of information, such as a contact record, a web site location, or a reference to a media clip. Table 1 lists some URI examples.
The IntentFilter defines the relationship between the Intent and the application. IntentFilters can be specific to the data portion of the Intent
, the action portion, or both. IntentFilters also contain a field known as a category. The categor helps classify the action. For example, the category named CATEGORY_LAUNCHER instructs Android that the Activity containing this IntentFilter should be visible in the main application launcher or home screen.
When an Intent is dispatched, the system evaluates the available Activitys
, Services
, and registered BroadcastReceivers (more on these next) and dispatches the Intent to the most appropriate recipient. Figure 2 depicts this relationship among Intents
, IntentFilters
, and BroadcastReceivers
.
IntentFilters are often defined in an application’s AndroidManifest.xml file with the <intent-filter>
tag. The AndroidManfest.xml file is essentially an application descriptor file. A common task on a mobile device is looking up a specific contact record for the purpose of initiating a call, sending an SMS (
Short Message Service
), or looking up a snail-mail address when you’re standing in line at the neighborhood pack-and-
ship store. A user may desire to view a specific piece of information, say a contact record for user 1234. In this case, the action is ACTION_VIEW and the data is a specific contact record identifier. This is accomplished by creating an Intent with the action set to ACTION_
VIEW and a URI that represents the specific person of interest. Here’s an example of the URI for use with the android.content.Intent
. ACTION_VIEW action: content://contacts/people/1234 Here’s an example of the URI for obtaining a list of all contacts: content://contacts/people Here’s a snippet of code demonstrating the PICK
ing of a contact record: Intent pickIntent = new Intent(Intent.ACTION_PICK,Uri.parse
(„content://contacts/people”)); startActivity(pickIntent); This Intent is evaluated and passed to the most appropriate handler. In this case, the recipient would Figure 2. Intents are distributed to Android applications, which register themselves by way of the IntentFilter, typically in the AndroidManifest.xml �le
������������������������
��������������������������
�
��������������������������
�����������������������
�����������������������������������������
�
�����������������������������������������
�
�������������������������������������������������������
�
����������������������
��
���������������������������������
��
���������������������
�����������������������������������������������������
�
�����������������������������������������
�
�����������������������
���������
�������������������������
��������������������
����������������������
Table 1. Commonly employed URIs in Android
Type of information
URI data
Contact lookup
content://contacts/people
Map lookup/search
Geo:0,0?q=23+Route+206+Sta
nhope+NJ
Browser launch to a speci�c website
http://www.google.com/
02/2010 (20)
3
2
ANDROID IN ACTION
Android Development with the Intent
02/2010 (20)
3
3
likely be a built-in Activity named com.google.andro
id.phone.Dialer
. But the best recipient of this Intent may be an Activity contained in the same custom Android application (the one you build), a built-in application as in this case, or a third-party application on the device. Applications can leverage existing functionality in other applications by creating and dispatching an Intent that requests existing code to handle the Intent rather than writing code from scratch. One of the great benefits of employing Intents in this manner is that it leads to the same UIs being used frequently, creating familiarity for the user. This is particularly important for mobile platforms where the user is often neither tech-savvy nor interested in learning multiple ways to accomplish the same task, such as looking up a contact on the phone
. The Intents we’ve discussed thus far are known as implicit Intents
, which rely on the IntentFilter and the Android environment to dispatch the Intent to the appropriate recipient. There are also explicit Intents
, where we can specify the exact class we desire to handle the Intent
. This is helpful when we know exactly which Activity we want to handle the Intent and don’t want to leave anything up to chance in terms of what code is executed. To create an explicit Intent, use the overloaded Intent constructor, which takes a class as an argument, as shown here: public void onClick(View v) { try { startActivityForResult(new Intent(v.getContext(),Refr
eshJobs.class),0); } catch (Exception e) {
. . . } } These examples show how an Android application creates an Intent and asks for it to be handled. Similarly, an Android application can be deployed with an IntentFilter
, indicating that it responds to Intents already created on the system, thereby publishing new functionality for the platform. This facet alone should bring joy to independent software vendors (ISVs) who’ve made a living by offering better contact managers and to-do list management software titles for other mobile platforms. Intent resolution, or dispatching
, takes place at runtime, as opposed to when the application is compiled, so specific Intent
-
handling features can be added to a device, which may provide an upgraded or more desirable set of functionality than the original shipping software. This runtime dispatching is also referred to as late binding
. Thus far, this discussion of Intents has focused on the variety of Intents that cause UI elements to be displayed. There are also Intents that are more event-
driven than task-oriented, as our earlier contact record example described. For example, the Intent class is also used to notify applications that a text message has arrived. The power and the complexity of Intents It’s not hard to imagine that an absolutely unique user experience is possible with Android because of the variety of Activitys with specific IntentFilters installed on any given device. It’s architecturally feasible to upgrade various aspects of an Android installation to provide sophisticated functionality and customization. Though this may be a desirable characteristic for the user, it can be troublesome for someone providing tech support, who has to navigate a number of components and applications to troubleshoot a problem. Because of this potential for added complexity, this approach of ad hoc system patching to upgrade specific functionality should be entertained cautiously and with your eyes wide open to the potential pitfalls associated with this approach. Summary This article introduced the Android platform and the Android SDK’s Intent class. The Intent is what makes Android tick. It’s responsible for how events flow and which code handles them, and it provides a mechanism for delivering specific functionality to the platform, enabling third-party developers to deliver innovative solutions and products for Android. 02/2010 (20)
3
4
ANDROID IN ACTION
The many faces of Android emulator
02/2010 (20)
3
5
I
n this article, we’re going to show you how to set up the Android emulator environment for application testing. It’s important to become comfortable with working in an emulated environment when doing any serious mobile software development. There are many good reasons to have a quality emulator available for development and testing. One simple reason is that having multiple real devices with requisite data plans is an expensive proposition. A single device alone may be hundreds of dollars. Android continues to gain momentum and is finding its way to multiple carriers with numerous devices and increasingly sophisticated capabilities. Having one of every device is impractical for all but the development shops with the largest of budgets. For the rest of us, a device or two and the Android emulator will have to suffice. Let’s focus on the strengths of emulator-based mobile development.
The Android emulator exposed
Though the best test of an application is running it on the hardware for which it was designed, an emulator often makes the job of the developer much easier and helps you, the developer, deliver a better product. Working in an emulated environment permits a more rapid compile, run, and debug iterative cycle than is typically available hen testing on a real hardware device. Installing an application to a real Android device doesn’t take much longer han installing the application on a running instance of an emulator. But it’s much easier to clean the file system of an emulator than performing the same maintenance operation on a real device. The emulated environment also permits you to test applications against an array of device form factors, screen resolutions, and network peed characteristics. When you add in the capability of scripting commands to/from the emulator, it becomes an ption worthy of investigation.
Beyond being a faster tool than working with a real device for iterative and regressive testing, the emulator tool must consider physical characteristics of a device, primarily the screen dimensions, input devices, and network connectivity. Fortunately for us, the Android SDK provides some healthy options.
Skins
Not all mobile devices are equally equipped, so it’s important to be able to accommodate and test varying device characteristics in an emulated environment. The Android SDK comes with an emulator with distinct skins. The skins represent different hardware layouts as well as portrait and landscape orientations. Figure 1 shows two emulator views: one in portrait with a hidden The Many Faces Of Android Emulator
Android in Action, Second Edition
By W. Frank Ableson, Robi Sen, and Chris King
For Source Code, Sample Chapters, the Author Forum and other resources, go to
http://www.manning.com/ableson2/
Excerpted from
In this article, based on Chapter 2 of Android in Action, Second Edition, the authors discuss the Android emulator, an SDK component used for testing and exercising code.
02/2010 (20)
3
4
ANDROID IN ACTION
The many faces of Android emulator
02/2010 (20)
3
5
Network speed
Network speed simulation is a key element of mobile software development. This feature is helpful because the actual user experience will vary during real-
world use, and it’s important that mobile applications degrade gracefully in the absence of a reliable network connection. The Android emulator provides for a rich set of emulation tools for testing various network conditions and speeds. Table 1 lists the available network speed and latency conditions available in the Android emulator.
The higher-speed network environment found in the Android emulator is welcome when testing core features of our applications. This is because functional test cases are often run hundreds or even thousands of times before releasing a product. If we had to compile the application, sync the application to the device, and run our application over a wireless data network, the testing time would add up quickly, reducing the number of tests performed in a given amount of time and elevating the associated costs. Worse yet, the challenges of mobile data connectivity testing may entice us to minimize application testing in the first place! Considering that most software development timeframes are aggressive, every moment counts, so a quality emulator environment is valuable for rapid and cost-effective mobile application development activities. Also, it’s important to consider that there may be usage charges for voice and data consumption on a mobile communications plan. Imagine paying by the kilobyte for every downloaded data packet when testing a new streaming audio player!
Emulator versus simulator
You may hear the words emulator and simulator thrown about interchangeably. While they have a similar purpose – testing applications without the requirement of real hardware – those words should be used with care. A simulator tool works by creating a testing environment that behaves as close to 100 percent in the same manner as the real environment, but it’s QWERTY keypad, the other in landscape mode with a visible keyboard. The skins found with your SDK may vary from those shown here.
When defining a new instance of the Android emulator, or Android Virtual Device, there are a number of attributes that can be customized, including:
•
Android platform version
•
SD card capacity
•
Screen resolution specifics
Exercising your application on each of these available combinations is an important step in preparing an application for release to a broader audience, such as on the Android Market. Imagine creating an application that requires a high screen resolution. How does your application perform on a screen with lower screen resolution? Are images cut off? Can users still navigate to user interface controls? These are big topics in mobile development today.
Not only is it important to understand and accommodate how the device looks, it’s important to understand what connectivity options a device can offer. Have you ever tested a mobile application in an area where there’s excellent data coverage only to find out that the location where the application is deployed in the field often has only marginal data service? Ever notice that wireless stores always seem to have perfect coverage much better than your home or office?
The ability to test this condition in the confines of our development environment gives a real advantage to the application developer. Fortunately, the Android emulator permits this kind of testing, as shown next.
Figure 1. The Android SDK includes multiple emulator skins for testing a variety of device con�gurations
Table 1. The Android emulator supports a variety of network speed options
Network speed
Network latency
Full speed (use the development environment’s full Internet connection)
None – no latency introduced
GSM
GPRS
HSCSD
EDGE
GPRS UMTS
EDGE
UMTS
HSPDA
02/2010 (20)
3
6
ANDROID IN ACTION
The many faces of Android emulator
02/2010 (20)
3
7
just an approximation of the real platform. This doesn’t mean that the code targeted for a simulator will run on a real device, because it’s compatible only at the source-
code level. Simulator code is often written to be run as a software program running on a desktop computer with Windows DLLs or Linux libraries that mimic the application programming interfaces (APIs) available on the real device. In the build environment, you typically select the CPU type for a target, and that’s often x86/
Simulator. In an emulated environment, the target of our projects is compatible at the binary level. The code we write works on an emulator as well as the real device. Of course, some aspects of the environment differ in terms of how certain functions are implemented on an emulator. For example, a network connection on an emulator will run through your development machine’s network interface card, whereas the network connection on a real phone runs over the wireless connection such as a GPRS, EDGE, or EVDO network. Emulators are preferred because they more reliably prepare us for running our code on real devices. Fortunately, the environment available to Android developers is an emulator, not a simulator.
The Android SDK contains a command-line program named, appropriately, emulator, which runs the Android emulator. There are many command-line switches available in the Android emulator, permitting us to customize the emulator’s environment: how it looks and behaves. Some of these options are exposed Listing 1. Main.xml contains UI elements
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
LinearLayout
xmlns
:
android
=
"http://schemas.android.com/apk/res/android"
android
:
orientation
=
"vertical"
android
:
layout_width
=
"ill_parent"
android
:
layout_height
=
"ill_parent"
>
<
TextView
android
:
layout_width
=
"ill_parent"
android
:
layout_height
=
"wrap_content"
android
:
text
=
"Chapter 2 Android Tip Calculator"
#
1
/>
<
EditText
#
2
android
:
id
=
"@+id/mealprice"
#
3
android
:
layout_width
=
"ill_parent"
android
:
layout_height
=
"wrap_content"
android
:
autoText
=
"true"
/>
<
Button
#
4
android
:
id
=
"@+id/calculate"
android
:
layout_width
=
"wrap_content"
android
:
layout_height
=
"wrap_content"
android
:
text
=
"Calculate Tip"
/>
<
TextView
#
5
android
:
id
=
"@+id/answer"
android
:
layout_width
=
"ill_parent"
android
:
layout_height
=
"wrap_content"
android
:
text
=
""
/>
</
LinearLayout
>
#
1
Static
TextView
#
2
EditText
deinition
#
3
Assign
an
ID
#
4
Button
deinition
, including
ID
#
5
TextView
with
an
ID
02/2010 (20)
3
6
ANDROID IN ACTION
The many faces of Android emulator
02/2010 (20)
3
7
in the Eclipse IDE via the ADT plug-in. The majority of our focus is on employing the Android emulator from Eclipse, but you’re encouraged to examine the command-line options available in the emulator because they’ll undoubtedly be of value as you progress to building more complex Android applications, your application testing requirements grow, and you enlist other developers/testers to exercise your application.
Speaking of applications, let’s set up one – a very handy tip calculator!
Android sample application code
Our goal with the Android tip calculator is to permit our user to enter the price of a meal, then tap a button to calculate the total cost of the meal, tip included. To accomplish this, we need to modify two Listing 2. ChapterTwo.java implements the tip calculator logic
package
com
.
manning
.
unlockingandroid
; #
1
import
com
.
manning
.
unlockingandroid
.
R
;
import
android
.
app
.
Activity
; #
2
import
java
.
text
.
NumberFormat
;
import
android
.
util
.
Log
;
// some imports omitted
public
class
ChapterTwo
extends
Activity
{
public
static
inal
String
tag
= "Chapter2"
;
@
Override
public
void
onCreate
(
Bundle
icicle
)
{
super
.
onCreate
(
icicle
);
setContentView
(
R
.
layout
.
main
);
inal
EditText
mealpriceield
=
(
EditText
)
indViewById
(
R
.
id
.
mealpr
ice
);
#
3
inal
TextView
answerield
=
(
TextView
)
indViewById
(
R
.
id
.
answ
er
);
inal
Button
button
= (
Button
)
indViewById
(
R
.
id
.
calculate
);
button
.
setOnClickListener
(
new
Button
.
OnClickListener
()
{
#
4
public
void
onClick
(
View
v
)
{
Try
{
//Perform action on click
Log
.
i
(
tag
,
"onClick invoked."
);
#
5
// grab the meal price from the UI
String
mealprice
=
mealpriceield
.
getText
().
toString
(
);
#
6
Log
.
i
(
tag
,
"mealprice is ["
+ mealprice
+ "]"
);
String
answer
= ""
;
// check to see if the meal price includes a "$"
if
(
mealprice
.
indexOf
(
"$"
)
== -
1
)
{
mealprice
= "$"
+ mealprice
;
}
loat
fmp
= 0.0
F
;
// get currency formatter
NumberFormat
nf
=
java
.
text
.
NumberFormat
.
getCurrency
Instance
();
// grab the input meal price
fmp
= nf
.
parse
(
mealprice
).
loatVal
ue
();
// let's give a nice tip -> 20%
fmp
*= 1.2
;
Log
.
i
(
tag
,
"Total Meal Price (unformatted) is ["
+ fmp
+ "]"
);
// format our result
answer
= "Full Price, Including 20% Tip: "
+ nf
.
format
(
fmp
);
// display the answer
answerield
.
setText
(
answer
);
#
7
Log
.
i
(
tag
,
"onClick complete."
);
}
catch
(
java
.
text
.
ParseException
pe
)
{
#
8
Log
.
i
(
tag
,
"Parse exception caught"
);
answerield
.
setText
(
"Failed to parse amount?"
);
}
catch
(
Exception
e
)
{
Log
.
e
(
tag
,
"Failed to Calculate Tip:"
+ e
.
getMessage
());
e
.
printStackTrace
();
answerield
.
setText
(
e
.
getMessage
(
));
}
}
});
}
}
#
1
Package
name
#
2
Required
imports
#
3
Reference
EditText
for
mealprice
#
4
Set
up
onClick
Listener
#
5
Log
entry
#
6
Get
meal
price
#
7
Display
full
price
, including
tip
#
8
Catch
parse
error
02/2010 (20)
3
8
ANDROID IN ACTION
filesChapterTwo.java and the UI layout file, main.xml
. Let’s start with the UI changes by adding a few new elements to the primary View, as shown in Listing 1.
The layout for this application is straightforward. The overall layout is a vertical, linear layout with only four elements. That just means that all of the user interface controls, or widgets
, are going to be in a vertical arrangement. There are a number of different layouts available for Android user interface design.
When we save the file main.xml, it’s processed by the ADT plug-in, compiling the resources and generating an updated R.java file. Try it for yourself. Modify one of the id values in the main.xml file, save the file, and then open R.java to have a look at the constants generated there. Remember not to modify the R.java file directly, because all of your changes will be lost! If you conduct this experiment, be sure to change the values back as they’re listed here to make sure the rest of the project will compile as-is. Provided we haven’t introduced any syntactical errors into our main.xml file, our UI file is complete.
NOTE
This example is simple, so we jumped right into the XML file to define the user interface elements, but the Android Developer Tools also contain an increasingly sophisticated GUI layout tool. With each release of the ADT, these tools have become more and more usable early versions were, well, early.
Double-clicking on the main.xml file launches the layout in a graphical form. At the bottom of the file we can switch between the layout view and the xml view. Figure 2 shows the layout tool.
It’s time to turn our attention to the file ChapterTwo.java to implement the desired tip calculator functionality. ChapterTwo.java is shown in Listing 2. Note that we omitted some imports for brevity. You can download the complete source code from the Manning web site at http://manning.com/ableson
.
You’ll notice that as soon as we save our source files, the Eclipse IDE compiles the project in the background. If there are any errors, they’re listed in the Problems view of the Java perspective as well as marked in the left margin with a small red x to draw our attention to them.
Assuming there are no errors in the source files, our classes and UI files will compile properly. But what needs to happen before our project can be run and tested in the Android emulator?
Packaging the application
At this point, our application has compiled and is ready to be run on the device. Let’s look more deeply Figure 2. Using the GUI layout tool provided in the ADT to de�ne the user interface elements of our application
Figure 3. The Android application �le format is pzip-compatible
Figure 4. The installed Android packages listed in the AVD and SDK Manager Once
Figure 5. Creating a new AVD includes de�ning characteristics such as SD card storage capacity and screen resolution
The many faces of Android emulator
02/2010 (20)
3
9
at what happens after the compilation step. We don’t need to perform these steps because the ADTs handle these steps for us, but it’s helpful to understand what’s happening behind the scenes.
Recall that despite the compile-time reliance upon Java, Android applications don’t run in a Java virtual machine. Instead, the Android SDK employs the Dalvik virtual machine. This means that Java bytecodes created by the Eclipse compiler must be converted to the .dex file format for use in the Android runtime. The Android SDK has tools to perform these steps, but thankfully the ADT takes care of all of this for us transparently.
The Android SDK contains tools that convert the project files into a file ready to run on the Android emulator. Figure 2 depicts the generalized flow of source files in the Android build process. If you recall from our earlier discussion of Android SDK tools, the tool used at design time is aapt. Application resource XML files are processed by aapt, with the R.java file created as a result – remember that we need to refer to the R
class for user-interface identifiers when connecting our code to the UI. Java source files are first compiled to class files by our Java environment, typically Eclipse and the JDT. Once compiled, they’re then converted to .dex files to be ready for use with Android’s Dalvik virtual machine. Surprisingly, the project’s XML files are converted to a binary representation, not text as you might expect. But the files retain their .xml extension on the device.
The converted XML files, a compiled form of the non-
layout resources including the Drawables and Values
, and the .dex file (classes.dex) are packaged by the aapt tool into a file with a naming structure of projectname.apk
. The resulting file can be read with a pkzip-compatible reader, such as WinRAR or WinZip, or the Java archiver, jar. Figure 3 show the sample application in WinRAR.
At this point, our sample application has compiled successfully. We now want to run our application in the Android emulator.
Setting up emulator environment
Setting up our emulator environment can be broken down into two logical steps. The first is to create an instance of the Android Virtual Device via the AVD Manager, and the second step is to define a run configuration in Eclipse, which permits us to run our application in a specific AVD instance. Let’s start with the AVD Manager.
Managing Android Virtual Devices
Starting with version 1.6 of the Android SDK, developers have a greater degree of control over the emulated Android environment than in previous releases. The SDK and AVD Manager permit developers to download the specific platforms of interest. For example, we might be targeting devices Figure 7. Creating a new launch con�guration for testing our Android application
Figure 8. Select the Android Application run template
Figure 9. Setting up the Android emulator launch con�guration
Figure 6. Available Android Virtual Devices de�ned. You can set up as many diferent AVD instances as your requirements demand
02/2010 (20)
4
0
ANDROID IN ACTION
running version 1.5 and 2.0 of the Android platform, but we may want to add to that list as new versions become available. Figure 4 shows the SDK and AVD Manager with a few packages installed.
Once we have the desired Android platforms installed, we can define instances of the Android Virtual Device. To do this we select which platform we want to run on, select the device characteristics, and then create the AVD as shown in Figure 5.
At this point, our AVD is created and available for starting independently as well as being used as the target of a run configuration. Figure 6 shows a representative list of available AVDs on a single development machine.
NOTE
For each release of the Android platform, there are two versions: one with Google APIs and one without. In Figure 4 notice that the first entry, named 201, has a target of Android 2.0.1. The second entry, 201Google, has a target of Google APIs (Google Inc.). The Google version is used when you want to include application functionality such as Google Maps. Now that we have the platforms downloaded and the AVD(s) defined, it’s time to wire these things together so we can test and debug our application!
Setting up emulator run con�gurations
Our approach is to create a new Android emulator profile so we can easily reuse our test environment settings. Our starting place is the Open Run Dialog menu in the Eclipse IDE, as shown in Figure 7. As new releases of Eclipse become available, these screen shots may vary slightly from your personal development environment.
We want to create a new launch configuration, as shown in Figure 6. To begin this process, highlight the Android Application entry in the list to the left, and click the New Launch Configuration button, circled in Figure 8.
We now want to give our launch configuration a name that we can readily recognize. We’re going to have quite a few of these launch configurations on the menu, so make the name something unique and easy to identify. The sample is titled Android Tip Calculator, as shown in figure 9. There are three tabs with options to configure, the first allowing you to select the project and the first Activity in the project to launch.
The next tab permits you to select the desired AVD and network characteristics, as shown in Figure 10. Additionally, command-line parameters may be passed to the emulator. You might want to do this to wipe the device’s persistent storage prior to running your application.
The third tab permits us to put this configuration on the Favorites menu in the Eclipse IDE for easy access, as shown in Figure 11. We can select Run and/or Debug. Let’s make both selections, since it makes for easier launching when we want to test or debug the application.
Now that we’ve both defined our AVD and created a run configuration in Eclipse, the next step to take would be to begin testing our application within the Android emulator environment. See our book (http://
www.manning.com/ableson2/
) for more information.
Summary
We discussed the Android emulator, an SDK component used for testing and exercising code, and some of its fundamental permutations and characteristics. We set up the emulator environment to prepare for running an application. Employing the Android emulator is a good practice because of the benefits of using emulation for testing and validating mobile software applications in a consistent and cost-
effective manner.
Figure 10. Selecting the desired Android Virtual Device
Figure 11. Adding this launch con�guration to the toolbar menu
02/2010 (20)
4
1
Interview with Frank Ableson, one of the Android in Action authors
Could you tell our readers about yourself and your background? I run a business (
http://navitend.com
) in northern New Jersey with two main offerings. The first is Managed Services for IT infrastructure aimed at the SMB space. We serve our clients by providing guidance for their IT related investments and then once those investments have been made, we manage their networks. The other offering is web and mobile software consulting and development.
How did you start and how has it evolved to where you are today? My mobile related work began about 15 years ago with batch and wireless Telxon and Symbol terminals for inventory control related applications. I have been working with modern
mobile devices since the Palm III days right on through the latest smartphones available today.
Please tell the readers more on your technical interests.
I have always been intrigued with the computer/real world interfaces so the area of embedded computing and practical wireless applications are of interest.
Could you tell more about your actual projects? Over the years some notable projects include early on-
device appstore
work for Handango (Palm OS), time entry collection for mobile professionals (Blackberry, iPhone/iPad, soon to be Nokia & Android), robotic control (Android), network monitoring (Android) among others. Android and Mobile. Why they work well together?
Both Android and Mobile are maturing at a torrid pace – so they are perfect together as enhancements to the operating system (Android) sparks new ideas for mobile applications and solutions. As the envelope is pushed for what can be imagined for mobile applications, the manufacturers for all major smartphones (HTC, Apple, Motorola, etc.) innovate new features that in turn ignite new applications and attract developers. They are propelling one another forward.
You are one of the author of Android in Action, 2E. Could you tell more about your latest book? Android in Action is the update to Unlocking Android. The book is geared to both beginners and advanced programmers alike. If you have never picked up Android programming before, you will find value in the book as it contains some fairly significant content around getting the reader acclimated to where Android fits in the mobile scene and how it operates. The second section of the book is a generous look at the core activities related to developing for Android: basic SDK stuff you just need to know including: UI, databases, files, network, alarms, location, media, etc.. The third section contains a couple of chapters on deeper-diving applications – how they are architected, constructed and tested. The final section of the book represents brand new material over the first edition – what I like to call the maturing platform. This section includes topics of Bluetooth & Sensors, mobile web development, desktop widgets, localizing applications and integrating with social media address books.
What are your plans for the future? My current plans are to grow our consulting practice here at navitend and continue to write on mobile topics of interest. In addition to the Android books, I am the mobile editor for Linux Magazine and also contribute to other online and print publications.
Could you let us know what will take place in the Mobile world? If I could do that proficiently I would be making my living in the stock market, not with a compiler. I think we will continue to see innovation on the mobile devices and some increasingly blurred lines between phones & tablets and tablets & laptops. Content is king and owning content and audience will be the ingredients for recurring revenue.
Interview with Frank Ableson, one of the Android in Action authors
02/2011 (20)
4
2
ACTIONSCRIPT IN ACTION
Adventures In ActionScript
02/2011 (20)
4
3
T
his month we are going retro. Let me take you to a time way before the advent of PlayStation and XBox, when Assassin’s Creed and World Of Warcraft hadn’t even been dreamt of. We’re going back to the late 1970s and early ‘80s when most computers didn’t even have graphics, let alone multimedia! This was the era of black screens and glowing green text. But even though there were no graphics, there were games – some very good ones too! These were games such as Colossal Castle and Zork. They were called adventure games or interactive fiction
and they allowed the player to travel around hugely complex worlds, collecting treasures, fighting monsters, breaking into houses or wandering into dark corners and getting eaten by grues...
And it was all done in text. Each location was described in text. Each command was written in text: Take the ring
the game-player would write; and the game might respond, Which ring do you mean – the golden ring or the emerald ring?
There was a certain Adventures In ActionScript
This month Huw Collingbourne goes back to the ‘80s to show how to bring adventure games up to date.
What you will learn…
•
How to create a text-based adventure game •
How to create a game Map as an array
•
How link Room objects without a Map
What you should know…
•
The fundamentals of Object Orientation in ActionScript
•
Basic data structures and object references
•
Some knowledge of Flex would be useful
Figure 1. This month we create a very simple exploring game that lets the player move from room to room by clicking four direction buttons
Figure 2. Our �rst version of the game puts the Rooms into Map which is a simple array. Here I am using the Amethyst debugger to explore the Map. As you can see the exists of each Room are just non-descriptive numbers
02/2011 (20)
4
2
ACTIONSCRIPT IN ACTION
Adventures In ActionScript
02/2011 (20)
4
3
Each of these four variables would be an integer giving an index into the array (the map
) of Rooms. A simplified definition of a Room class that could be used in this way is shown in Listing 1.
So, if we were to use this technique we might create a Map array of three Rooms: Map[0]=Cave
, Map[1]=TreasureRoom
and Map[2]=TrollRoom
. The Cave object, at index 0, might have its variable W=1
showing that it adjoins the TreasureRoom in the Western direction at index 1 of the Map array. And so on. I’ve created a simple game (
Adventure0
) using a Map array which you can download from the web site listed at the end of the article. An array such as this works fine but it is not very descriptive. When you look the definition of each room object all you see are sets of variables to which integers magic to those games which, to my mind, is missing from modern games. Just books, they sucked the reader or player into imaginary worlds in a way that graphical games simply don’t. From the programmer’s point of view, writing an adventure posed all kinds of technical challenges: how to parse the user input into meaningful commands; how to create a data-structure capable of representing a map
of linked locations and move the player around on that map; how to populate locations with objects and permit the player to take those objects or drop them in new locations; how to save and restore the game state – and so on.
It turns out that ActionScript is a great language for writing text adventures. Don’t be fooled into thinking that it’s just a scripting language for Flash graphics. On the contrary, it is a deeply object oriented language that can provide everything we need to create complex object hierarchies, design a user interface and save and restore game data. Even if you have no particular interest in adventure games, you will find that this series will explore aspects of ActionScript coding that can be applied to many other types of application – everything from advanced string-handling to the nitty-gritty details of ByteArrays. So, without more ado, let’s begin the adventure...
Maps By Numbers
This month I want to write a very simple program to illustrate one way in which we can create a map of linked locations. There are many possible ways of doing this. The simplest way – and one that has been used in countless thousands of games – is to create a sequential array of Room objects. Each Room object might contain four variables, N, S, W and E to store the number of the adjacent Room at each of four compass directions. Figure 3. In the second version of the game, there is no map. Each Room has another Room object in each direction. The Amethyst debugger shows that you can navigate inde�nitely around this network of linked rooms
Listing 1. Room for use in an array-based Map
// Simpliied Room class deinition from Adventure0 project
public
class
Room
{
// private vars...
private
var
_name
:
String
;
private
var
_n
:
int
;
private
var
_s
:
int
;
private
var
_w
:
int
;
private
var
_e
:
int
;
// constructor
public
function
Room
(
)
{
_name
= "A Room"
;;
_n
= null
;
_s
= null
;
_w
= null
;
_e
= null
;
}
// initialize public
function
init
(
aName
:
String
, aN
:
int
, aS
:
int
, aW
:
int
, aE
:
int
)
{
_name
= aName
;
_n
= aN
;
_s
= aS
;
_w
= aW
;
_e
= aE
;
}
// The full class also has accessor functions,
// n, s, w, e here to get and set private vars
// See code archive for full class deinition
}
02/2011 (20)
4
4
ACTIONSCRIPT IN ACTION
Adventures In ActionScript
02/2011 (20)
4
5
are assigned. Even in my very simple adventure game, which has just six Rooms, it is quite hard to see which exits lead to which room objects. The example below, showing the Cave Room illustrates this point while Listing 2 shows how difficult it is to make sense of an entire map
of rooms initialized using integers to represent the exits:
Cave.init( „Cave”, -1, 3, 1, 5 );
In a big adventure you could easily have hundreds of Room objects a Room might be initialised with very large array indexes like this: Cave.init( „Cave”, 20, 234, 125, 57 )
. The only way to figure out which room each integer represents would be to count along the items in the Map array to the specific index. In ActionScript we can do much better than that. In fact, we can create Rooms whose exits are defined by name, rather than number, like this: Cave.init( „Cave”, NoExit, CrystalDome, TreasureRoom, DragonsLair );
Room Service
In ActionScript, when you refer to an object using a variable name, you actually have a direct reference to the object itself. That means that we can completely bypass any need for an index of objects such as an array. If one Room object wants to indicate another Room object in is N, S, W or E directions, it can be initialized using the variable name of an object. This is the approach I’ve taken in the Adventure1 project. The source code of this project is, once again, available from the download site listed at the end of this article.
Take a look at Listing 3. Each of the direction
variables in the new version of the Room class is defined to be a Room rather than an int. In order to link a network of Rooms together I must first create empty Room objects and then, once all Rooms have been created, I ‘wire them up’ by assigning other Room objects to each exit in the init()
function. I can’t do this assignment in the constructor since not all the objects will be created at this time. For example, Cave is the first Room I create. Its S direction references the CrystalDome object. But the CrystalDome object hasn’t been created yet so I can’t yet refer to it. My solution to this problem is to create all Room objects with null assigned to their internal Room variables and only then assign the actual Rooms to those variables in the init()
function. By the time init()
executes, all the Room objects exist so there is no problem.
Moving around from one Room to another is easy. In my sample code, I’ve created a simple user interface Listing 2. Creating Rooms and adding them to a Map array
// Map initialization from Adventure0 project
private
var
NoExit
: int
= -
1
;
private
var
Cave
: Room
= new
Room
(
);
private
var
TreasureRoom
: Room
= new
Room
(
);
private
var
TrollRoom
: Room
= new
Room
(
);
private
var
CrystalDome
: Room
= new
Room
(
);
private
var
SmallHouse
: Room
= new
Room
(
);
private
var
DragonsLair
: Room
= new
Room
(
);
private
var
Map
: Array
= [];
private
var
here
: int
;
private
function
init
(
)
: void
{
// Init Rooms, name: N, S, W, E
// The 4 ints show the Map index of adjoining rooms
// As you can see, it is not easy to see which Room
// object is referenced by each int!
Cave
.
init
(
"Cave"
,-
1
,
3
,
1
,
5
);
TreasureRoom
.
init
(
"Treasure Room"
, -
1
,
2
,-
1
,
0
);
TrollRoom
.
init
(
"Troll Room"
,
1
,-
1
,-
1
,
3
);
CrystalDome
.
init
(
"Crystal Dome"
,
0
,-
1
,
2
,
4
);
SmallHouse
.
init
(
"Small House"
,-
1
,-
1
,
3
,-
1
);
DragonsLair
.
init
(
"Dragon's Lair"
,-
1
,-
1
,
0
,-
1
);
Map
= [
Cave
,
TreasureRoom
,
TrollRoom
,
CrystalDome
,
Small
House
,
DragonsLair
];
here
= 0
;
}
Listing 3. Room for use in map of linked objects
// Simpliied Room class deinition from Adventure1 project
public
class
Room
{
private
var
_name
:
String
;
private
var
_n
:
Room
;
private
var
_s
:
Room
;
private
var
_w
:
Room
;
private
var
_e
:
Room
;
public
function
Room
(
)
{
}
public
function
init
(
aName
:
String
, aN
:
Room
, aS
:
Room
, aW
:
Room
, aE
:
Room
)
{
_name
= aName
;
_n
= aN
;
_s
= aS
;
_w
= aW
;
_e
= aE
;
}
}
02/2011 (20)
4
4
ACTIONSCRIPT IN ACTION
Adventures In ActionScript
02/2011 (20)
4
5
HUW COLLINGBOURNE
Huw Collingbourne is Director of Technology at SapphireSteel Software. Over more than 20 years, he has programmed in languages ranging from Ruby to C# and has been a technical columnist for computer magazines such as PC Pro and PC Plus. He is the software lead of the Amethyst Designer, the Flex user interface design environment of the Amethyst IDE for Visual Studio. SapphireSteel Software: http://
www.sapphiresteel.com/
with four buttons – one for each direction. When a button is clicked it passes a character, such as [
s
] to my moveTo() function. This function looks for a reference to a Room object returned by the current Room (
here
) object’s s
accessor method. It assigns this Room to the local Room variable, newroom
:
newroom = here.s;
For example, if the current Room is Cave, the Room object returned by its s
accessor will be CrystalDome. The moveTo()
function now assigns CrystalDome to the here
variable which stores the player’s current position. And on screen, a message tells the player that he or she has moved into the Crystal Dome. If there is no room in the specified direction (that is, if null is assigned to the direction variable) then the player is not moved and a No Exit
message is shown. See Listing 5. There are, of course, many other ways in which you could create and link together a map of Rooms and we’ll consider the pros and cons of these approaches next month when I shall turn my attention to saving and restoring games to and from disk.
Listing 4. Creating Rooms whose exits reference other Room objects
// Room initialization from Adventure1 project
// create empty Room objects
private
var
NoExit
:
Room
= null
;
private
var
Cave
:
Room
= new
Room
(
);
private
var
TreasureRoom
:
Room
= new
Room
(
);
private
var
TrollRoom
:
Room
= new
Room
(
);
private
var
CrystalDome
:
Room
= new
Room
(
);
private
var
SmallHouse
:
Room
= new
Room
(
);
private
var
DragonsLair
:
Room
= new
Room
(
);
// then wire them together
private
function
init
(
)
:
void
{
// N, S, W, E
// This time you can immediately see the object
// to which each exit leads!
Cave
.
init
(
"Cave"
,
NoExit
,
CrystalDome
,
TreasureRoom
,
Dr
agonsLair
);
TreasureRoom
.
init
(
"Treasure Room"
,
NoExit
,
TrollRoom
,
N
oExit
,
Cave
);
TrollRoom
.
init
(
"Troll Room"
,
TreasureRoom
,
NoExit
,
NoEx
it
,
CrystalDome
);
CrystalDome
.
init
(
"Crystal Dome"
,
Cave
,
NoExit
,
TrollRoo
m
,
SmallHouse
);
SmallHouse
.
init
(
"Small House"
,
NoExit
,
NoExit
,
CrystalD
ome
,
NoExit
);
DragonsLair
.
init
(
"Dragon's Lair"
,
NoExit
,
NoExit
,
Cav
e
,
NoExit
);
here
= Cave
;
}
Listing 5. Moving from one linked Room to another
// Here aDir might be the char "s". If there a Room is assigned
// to the s variable of the current Room (here) then that Room
// becomes the new current Room (here)
private
function
moveTo
(
aDir
:
String
)
:
void
{
var
newroom
:
Room
;
switch
(
aDir
.
toLowerCase
(
)
)
{
case
"n"
:
newroom
= here
.
n
;
break
;
case
"s"
:
newroom
= here
.
s
;
break
;
case
"w"
:
newroom
= here
.
w
;
break
;
case
"e"
:
newroom
= here
.
e
;
break
;
}
if
(
newroom
== NoExit
)
{
ta
.
text
+= "No Exit in that direction!\n"
;
}
else
{
here
= newroom
;
ta
.
text
+= "You have moved into the "
+ here
.
name
+ "\n"
;
}
}
Get The Source Code
The archive containing all the source code for this game is available for download from the SapphireSteel Software site at: http://www.sapphiresteel.com/tutorials/amethyst-tutorials/
actionscript-programming/article/adventure-game.
02/2011 (20)
4
6
FLEX/ACTIONSCRIPT 101
02/2011 (20)
Enter FlexUnit
FlexUnit is a unit testing framework for Flex and ActionScript 3.0 applications and libraries, the version i’m using here is 0.9 found at http://opensource.adobe.com/
wiki/display/flexunit/FlexUnit
. At www.flexunit.org you can find the latest version of the framework.
Updating our Application Structure
So first download FlexUnit framework from the Adobe site unzip it and copy the FlexUnit.swc to the libs folder of the application. You can put it inside other foler too, just remember to add the .swc file accessing the project Properties
->
Flex Builder Path
->
Library Path (Figure 1). Then in the src folder i will create a couple of folders. Inside the logic folder will be creating another folder called tests
(Figure 2).
Test Driven Development
Last article we saw what’s TDD and how i can improve code quality, now it’s time to use it. Let’s take the example from my States in Action article and update its structure to being using tests during development.
What you will learn…
•
Use FlexUnit to unit test your code
What you should know…
•
Basic knowledge of ActionScript
•
Basic knowledge of OO Programming
Figure 1. Application Library Path
Figure 2. Updated app structure
Figure 3. Creating the Test Runner
or “How not to be trapped in a nightmare” Part 2
02/2011 (20)
4
6
FLEX/ACTIONSCRIPT 101
02/2011 (20)
Inside this folder will place my TestSuite later on. And i will create another folder called unitTests where i will place my tests classes.
Setting up the Test Runner
Now it’s time to set up the test runner where we can see our test results. To accomplish this, create another MXML Application (
TestRunner.mxml
) inside the source folder (Figure 3 and Figure 4). Open this file and add a new namespace in it called flexui pointing to flexunit.flexui.*
and then add a creationComplete event your init our Test Suite: <mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” xmlns:lexui=”lexunit.lexui.*” layout=”absolute” creationComplete=”initUnitTests()”>
Then include my test suite file where we set up our tests. We will see this file soon. After that, we add the TestRunnerBase
, this is part of the FlexUnit framework and is where we can see all results for our tests (Figure 5).
<mx:Script source=”logic/tests/test.as”/>
<lexui:TestRunnerBase id=”testsConsole” width=”100%” height=”100%”/>
Final Statement
Well that’s it for now guys, next article, we’ll be writing our tests and then the classes to be tested. Questions regarding this article will be welcome and appreciated. Figure 4. Creating the Test Runner application
Figure 5. TestRunner ready for using
MARC PIRES
Marc Pires is a RIA Developer at RGSistemas. Contact information:
@MarcPires (Twitter)
IChat: marcpiresrj@aim.com
www.rgweb.com.br
02/2011 (20)
4
8
FLASH BASED TOOLS
D
emo lets you create stunning presentations, demonstrations and video tutorials with its easy to use and really simple user interface. In this quick step by step tutorial, we‘ll learn how to setup Demo Builder 8 to create video tutorials.
•
Run demo builder 8
•
From the start-up screen, select record the screen option. Make sure that you have selected both Full Motion Recording
and Record voice-over narrations
options with 780x560 – Web
as your resolution. This setting will allow us to create a web-optimized version of the tutorial that will capture each and every move of our flash or flex based instructions. You can also drag and drop the recording area via its title bar. If you are not happy with current resolution, either resize the recording area by dragging the red-edges or try Fit To
and choose the settings accordingly.
Now you are ready to record your tutorial. Hit the Record
button.
Demo builder will count down from 3 and then start recording the screen. Bottom right will show the elapsed time. You can either pause the recording to take a break or end recording. You can also end the recording by clicking on its system tray icon.
A Quick Look at Demo Builder 8
Demo Builder is a powerful Flash-based tool that allows you to create eye-catching and professionally-looking interactive presentations that do not require any programming skills.
What you will learn…
•
how to setup Demo Builder 8 to create video tutorials
What you should know…
•
Flash or Flex based information
A Quick Look at Demo Builder 8
Where to go from there Visit the demo builder 8 website, follow tutorials or study its user guide. This is all you need to master this easy to use software.
If you have not changed default preferences, you should see Personalize wizard. This wizard lets you personalize your recording. There are some really good options to play with, I leave them on you to explore. We’ll go with default options and hit the Execute button. Demo Builder would create three scenes Intro, Scene 1 that will have your actual recording and End scene. Save the project at this time.
You are pretty much done. Now you can edit or enhance your tutorial by adding baloons, notes and effects such as 3d transformations, zoom pan etc. Use the timeline to to show or hide elements on the screen. If you are a flash user, this thing is your old friend.
When you are happy with the result, export the video in your prefered format. If you are exporting a flash video, dont forget to check out options like player control, localizaztion, protection etc.
a d v e r t i s e m e n t
ALI RAZA
Adobe Certi�ed Instructor, Sun Certi�ed Java Programmer, Zend Certi�ed Engineer
www.manofspirit.com
02/2011 (20)
5
0
JSON & ACTIONSCRIPT
Experiencing JSON with Flash AS 3.0
02/2011 (20)
5
1
What is JSON
JSON is JavaScript Object Notation a light weight data exchange format based on JavaScript Language.
It is a simple text format which is language independent and easy to use for many languages as ASP, PHP, ActionScript, C ,C++, Java, Ruby, Pearl and many more…
Structure of JSON
Objects: Objects begin with opening curly braces {
and end with closing curly braces }
.
Ex. {Object}
Object members: Object Members consist of strings and values, separated by a colon (
:
). Members are separated by commas.
Ex.
{
“Name”:”Chinu”,
“Contact”:1234567890
}
Arrays: Arrays begin with [
braces and end with ]
braces and contain values which are separated by commas. Value can be a string, a number, an object, an array, or Boolean value or null.
Strings: Strings are surrounded by double quotes. A simple example of JSON: {
„Employee”: {
„Name”:”Chinu”,
„Eid”:151,
„Designation”:”Developer”,
„Address”:
{
„City”:”Pune”,
„Country”: “India”,
„Pin”: 100100
},
„WorkArea”:[“Design” , ”Development” , ”Testing”]
}
}
Here,
Employee is a top-level object; all other data is a member of that object. Name, Eid and Designation are all simple members of Employee Object having number and string data. Address is a nested object, having members as City, Country, Pin. WorkArea is also simple member of Employee which is an array, containing String values. Comparing with xml
As compared to XML, JSON is very easy to use and read/write for humans and machines as it contain less Experiencing JSON with Flash AS 3.0
JSON (JavaScript Object Notation pronounced) is a lightweight text-
based open standard. It was designed for human-readable data interchange. It is language-independent, with parsers available for most programming languages, coming from the JavaScript for representing simple data structures and associative arrays. The JSON format is used for serializing and transmitting structured data over a network connection. It is used as an alternative to XML.
What you will learn…
•
Structure of JSON
•
JSON with ActionScript
•
XML and JSON
What you should know…
•
The ActionScript basics
•
The JSON basics
02/2011 (20)
5
0
JSON & ACTIONSCRIPT
Experiencing JSON with Flash AS 3.0
02/2011 (20)
5
1
Here is simple example as,
Here is my ActionScript Code as,
import com.adobe.serialization.JSON.JSON;
var urlldr:URLLoader=new URLLoader();
urlldr.load(new URLRequest(‘sample.txt’));
urlldr.addEventListener(Event.COMPLETE,JSONload);
function JSONload(e:Event):void
{
var JSONData:Array = JSON.decode(e.target.data);
for(var i=0;i< JSONData.length;i++)
trace(JSONData [i].number);
}
I write JSON data in a simple text ile.
Here is data,
[ {„name”:”Sachin”, „number”:”12345”}, {„name”:”Vidya”, „number”:”67890”}]
Once I loaded the simple.txt ile, I now have data in that ile. Then I decode all the text to JSON format. Here the data is validated. Then all JSON data is collected in an Array for later use. You can encode any JSON object as a String.
var myString:String = JSON.encode( myValue );
Another beneit is that you can compare two JSON objects directly, as seen in the function below:
function compareObj (obj1:Object, obj2:Object): Boolean {
try {
var value1: String = JSON.encode(obj1);
var value2: String = JSON.encode(obj2);
}
catch (e:JSONParseError) {
trace(‘Error : ‘+ e.text);
return false;
}
return (value1 === value2);
}
Nice na!!!
Lets Spread JSON.
grammar/syntax. JSON does not use [CDATA[]]
feature to represent html data.
XML is a document oriented Markup Language so it is better used as a document exchange format. JSON is a data oriented language so it is better used as a data exchange format. XML is adopted by industry as it is more widely known than JSON. There are lot of advantages of JSON over XML regarding Data types supports, memory management, browser security, faster execution, data serialization/ deserialization etc.
Many web services (like Google, yahoo, flickr etc) use JSON instead of XML.
JSON ex.
{
“Employee”:{
“Name”:”Chinu”,
“Eid”:101,
“Add”:{
“City”:”Pune”,
“Country”:”India”
}
}
}
Same JSON Ex. In simple XML format is represented as,
<?xml version=”1.0” ?>
<EmpDetails>
< Employee >
<Name>Chinu</Name>
<Eid>101</Eid>
<Add>
<City>Pune</City>
<Country>India</Country>
</Add>
</ Employee >
</ EmpDetails >
JSON with ActionScript
JSON is very useful in flash projects. As per my experience, I use it in php where I used to create dynamic XML. But while loading thousands of images, I have to wait for some time to parse and traverse the XML for my Flash Design Tool.
On the ‘Net
•
http://www.JSONlint.com/ – JSON validator
•
http://www.JSON.org/
– JSON home
•
https://github.com/mikechambers/as3corelib/
– JSON library for ActionScript SACHIN PATIL
My name is Sachin Patil. By profession I am a Flash developer. In this article we will see about JSON. Sachin Patil is a Flash developer (Flash Action Script Developer) with good technical background.
02/2011 (20)
5
2
INTERVIEW
Interview With FATC Main Organizer Elad Elrom
02/2011 (20)
5
3
Could you tell our readers what is your conference about? What is your mission?
Flash and the City 2011 is a four-day technology conference, beginning June 9 with a day of workshops, to June 12, 2011. The venue will be Helen Mills located at 137-
139 West 26th Street, New York, NY. Many conferences are set in exotic places, only to lock people in conference rooms all day so they are never able to experience the amazing location they have traveled to. Flash and The City is community centric with its main goals to learn as well as create networking opportunities for attendees and allows for the advancement of technology and community as one. What made this event truly unique was the fact that the speaker lineup was community-driven. The Flash and the City speakers were leaders in their respective fields, featuring the most influential writers, architects, and user experience designers in the world. The list consisted of over 40 of the most widely sought after speakers and writers in the Flash, Flex, LiveCycle, ColdFusion, and Mobile development worlds. Many of them have shaped the technology, tools, and industries we work in today. This much talent simply cannot be found together at any other conference.
For people who are not familiar with Flash And The City, can you tell us a little bit about it?
Flash and the City is a weeklong conference that showcases the most knowledgeable flash experts in the world in the greatest city in the world. By combining the hottest stars in the flash world in the most interesting venues in New York City, FATC completely sold out its first year. In addition, Flash and the City 2011 will be part of Internet Week NY (
http://internetweekny.com
), a very popular and highly marketed festival that attracts citywide attention.
The event includes a 3-day marathon conference focusing on a variety of technologies, plus an all-
day workshop that is held one day prior to the actual conference. The workshop will cover Flash, Flex, and mobile, among other topics.
This year the conference will be segmented to include more topics that encompass a vast majority of technologies directly impacting web and mobile, not simply limited to Flash. More specifically, the conference has a single theme for each of the three days. The three themes of the day are
UX/UI, mobile, and HTML5.
Of course, we will keep the same successful format from last year, meaning we will have 3 tracks per day: technology, inspirational, and city. The technology track will cover pure development and focus a bit more on Flash, Flex, mobile, and web/app development. The inspirational track will focus on the theme of the day (UX/UI, mobile, HTML5) and helping people transition into one of these areas. Whether they are beginners or experts, the inspirational theme tracks will have sessions for whatever attendees are interested in. Finally, the city track will keep the same format as last year, taking participants around to explore the city. This year, however, the city track will have the added bonus of getting attendees involved with citywide events of Internet Interview with FATC Main Organizer Elad Elrom
02/2011 (20)
5
2
INTERVIEW
Interview With FATC Main Organizer Elad Elrom
02/2011 (20)
5
3
Week NY. By combining invaluable sessions delivered by the most knowledgeable speakers in our community with this unique platform of social events, we are giving attendees a great chance to not only to learn and be inspired in an enjoyable and fun environment but also to network with the people they are following on Twitter and other social networks, whose blogs and books they are reading, and whose code from which they are learning.
How did FATC start and how has it evolved to where it is today?
Over the last few years I have noticed that there have been very few, if any, large Flash and/or other technology related conferences in New York City. For the last couple of years Adobe MAX has been held in California, and there has been a real void for many professionals in New York City who would like to have a conference that allows them to be part of the Flash community. Many of the current conferences are so geared towards learning that they simply fail to take advantage of the tremendous networking opportunities. Flash and the City’s goal is to redefine conferences in the same way we that we are bringing about change in our Flash community, by bringing together A-list talent with professionals in New York and attendees from around the world.
As the second year of Flash and the City approaches, will be leveraging this opportunity to better position ourselves in the community and establish what is sure to be a long-standing tradition of excellence and a well-
known, branded technology conference.
In keeping with the community’s core values, FATC will continue to strive towards bringing a worldwide audience to this yearly event and expose them to the tremendous leaps our technology has taken as well as allow for the continued networking of the shakers and movers of the event.
Who should attend to the conference?
The event fits professionals interested of learning more about Flash, Flex, and mobile, among other topics. With that said, the event will not be entirely technology centric. Part FATC’s mission is to combine technology and design and along with that, to inspire its attendees. Therefore, FATC will also become a showcase for new and current technologies. In addition, FATC will collaborate with its sponsors and vendors to ensure their messages and products are transmitted to every person attending the conference. The technology track will cover pure development and focus a bit more on Flash, Flex, mobile, and web/app development. The inspirational track will focus on the theme of the day (UX/UI, mobile, HTML5) and helping people transition into one of these areas. Whether they are beginners or experts, the inspirational theme tracks will have sessions for whatever attendees are interested in. Finally, the city track will keep the same format as last year, taking participants around to explore the city. This year, however, the city track will have the added bonus of getting attendees involved with citywide events of Internet Week NY. This year the conference will be segmented to include more topics that encompass a vast majority of technologies directly impacting web and mobile, not simply limited to Flash. More specifically, the conference has a single theme for each of the three days. The three themes of the day are
UX/UI, mobile, and HTML5.
Who will be speaking at the FATC conference?
Flash and the City is designed to bring professionals together to talk about the web’s latest technologies including but not limited to Flash, Flex, AIR, ColdFusion, mobile, UX/UI, HTML5, and JavaScript. We aim to combine these with other technologies such as hardware, mobile development, and other interesting projects.
To achieve this, we assembled approximately 40 exciting speakers from around the world. They are leaders in their respective fields and well known in our community. Never before has such a collection of talented individuals, who have literally shaped the Flash, Flex, ColdFusion, Mobile, HTML5, JS, and UX design industries, been assembled under one roof. Speakers includes: Ryan Stewart, Serge Jespers, Keith Peters, Chris Allen, Lee Brimelow, Joel hooks, Michaël Chaize, Paul Trani, Garth Braithwaite, Demian Borba, Carl Sorvino, Rich Shupe, Kevin Schmidt, Adam Lehman, Stacey Mulcahy, Phillip Kerman, Jonnie Hallman, Justin Mclean, Charlie Schulze, David Isbitski, Jesse Freeman, Ted Patrick, Todd Anderson, Ben Stucki, Jobe Makar, Rob Bateman, Richard Olsson, Brian Connatser, Peter Elst, Yakov Fain, Jeff Tapper, Doug Winnie, James Pearce, Bartek Drozdz, Robert Reinhardt, Elad Elrom, Kevin Suttle, Brian Rinaldi, Jose Antonio Marquez Russo, Lisa Marie, Shashank Tiwari, David Hassoun and Paul Taylor.
What kind of criteria do you use to select the topics for the conference agenda?
It wasn’t easy to select speakers. We were honored to receive hundred of requests from potential speakers this year and it was difficult to select speakers since we received more submissions from qualified speakers than we have sessions. As a rule of thumb we looked at the content that we would be interested in hearing and selected speakers that we would like to hear ourselves.
However, that’s not all. To select speakers for Flash And The City we also taken into account parameters such as the speaker’s community contribution and involvement in projects that have made an impact in technology. Additionally, we took into account speaker’s experience as presenter and how known are they in our industry and ability to draw crowed. 02/2011 (20)
5
4
INTERVIEW
Could you tell us more about Minus? Why and When?
We saw a lack of methods to share simply online and quickly and from there Minus was launched in mid-
October of 2010. Our goal is to create a simple and minimal sharing platform that enables users to share anywhere and anything they want. We started with photo sharing and as of January 1st 2011 we have also enabled drag-n-drop file sharing. Our plan is to soon support reading and playing of Documents, Music, Videos in the galleries on top of Images.
What was the first idea about min.us and how did it come?
Carl and I met in September of 2010 and from there we brainstormed ideas to start and work on together. We wanted to create a simple online web application initially with a short name, and hence we got the name Min.us or Minus. From there on we eventually decided to start working on Minus as an online sharing platform that focuses on simplicity.
What were the most difficult challenges you encountered?
We were overwhelmed by the sudden increase in traffic and users initially as we did not expect it, however we were able to handle that in a timely manner and scale up through Amazon Cloud services utilizing EC2 and S3 and along with setting up our distribution through NetDNA CDN services.
What kind of technologies you use?
On the server side, min.us is deployed on Amazon’s EC2 compute cloud. We use the Elastic Block Service to store our database for high availability, the S3 service to store image files with fault tolerance and elasticity.
Software-wise, our code is written in Python and built on a Django, MySql, Memcached, and Ubuntu stack.
How did u get the developers interest to share stuff in your website?
We were very transparent with Minus since day one to communicate and update our users on what’s going on and what we’re doing. Many users heard about us through friends and family, and it really grew from there.
What are the further plans about min.us?
We plan to continue to improve Minus, add new features based on our user feedback and really continue to focus on simplicity and user interface. We are also going to soon introduce Minus desktop applications for Windows, Mac and Linux Ubuntu along with Mobile applications.
Interview with John Xie
Документ
Категория
Информатика
Просмотров
1 284
Размер файла
7 273 Кб
Теги
flash, flex, adobe
1/--страниц
Пожаловаться на содержимое документа