29
Mobile developer is Software developer

Mobile developer is Software developer

Embed Size (px)

DESCRIPTION

My slides from IT Brunch about mobile software development

Citation preview

Page 1: Mobile developer is Software developer

Mobile developer is Software developer

Page 2: Mobile developer is Software developer

Company

eBuddy

• 2003, Chat and XMS• AIM, Facebook, GTalk, ICQ, MSN and

Yahoo• iOS, Android, BB, Symbian, J2ME, WP,

Web• 30 million monthly unique users• 26 different nationalities• We are hiring

Page 3: Mobile developer is Software developer

Projects Setup

• Maven or Eclipse• Checkout• Import • (Easy tune) • Profit!

Import

Page 4: Mobile developer is Software developer

Build Automation

• Ant, antenna, bb-ant-tools• Maven• Proguard• Release auto checks

Page 5: Mobile developer is Software developer

Build Automation Concepts

• Checkout• Run • Profit

Page 6: Mobile developer is Software developer

Ant Hints

Don’t change script behavior based on property value:

<if> <equals arg1="${is-building-nna}" arg2="true"/> <then> <unjar src="${napi.lib}" dest="tmp/classes"/> </then> </if>

Much better:<target name="normal build" />

<target name="nna build" />

Page 7: Mobile developer is Software developer

Maven Hints

Page 8: Mobile developer is Software developer

Dependencies

• Artifactory, Ivy• SDKs

Page 9: Mobile developer is Software developer

Open Source

• Fork• Fix• Pull request

Page 10: Mobile developer is Software developer

Source Control Hints

• Trunk, release and spike branches

• Commit frequently, commit smart

• Behavior commit comments

Page 11: Mobile developer is Software developer

Continuous Integration

• TeamCity• 9 agents – Linux, Windows,

Mac• Trunk, Beta and Release• Pin to deploy in TC

Page 12: Mobile developer is Software developer

One of the Best Mobile Team Member

• BE developer is part of mobile team+ High quality standrards

+ Another process vision

+ Person, who can handle BE questions, changes

- He will get bored soon

Page 13: Mobile developer is Software developer

Code

• Clean, Testable code• Sonar for project health• No preprocessor• No pre-optimization• Activities are only windows

from your app for user interaction

Page 14: Mobile developer is Software developer

Code Review and Pair Programming

• Pair programming• Code review• Design sessions

Page 15: Mobile developer is Software developer

Unit Tests

Page 16: Mobile developer is Software developer

@Test public void showWelcomeMessageWhenReceivedPushDestination() {

chatPushControl.registrationSuccess("id");

verify(control).showWelcomeMessageIfNecessary(); }

@Test public void sendDestinationAndUpdateAccountWhenGetPushRegistration() {

final String id = "id";

chatPushControl.registrationSuccess(id);

verifySendPushSettingsAction(id, PushTimeout.LONG.getValue()); verify(masterAccount).setPushDest(id);

}

Page 17: Mobile developer is Software developer

@RunWith(RobolectricTestRunner.class) public class ChatActivityTest { @Before public void setUp() { activity = new ChatActivity(); activity.onCreate(null);

sendImageButton = (ImageButton) activity.findViewById(R.id.chatinput_send_image); }

@Test public void removeAttachmentButtonForXMS() throws Exception { Contact contact = new Contact(IMAccountFactory.stringToAccount(“XMS"), "userid"); when(chatControl.getCurrentChatContact()).thenReturn(contact); activity.onResume(); assertEquals("Send image button should be invisible", View.GONE, sendImageButton.getVisibility()); } }

Page 18: Mobile developer is Software developer

Unit Tests Principes

• Quick feedback• Robolectric,

microemulator• Emulator/simulator

tests

Page 19: Mobile developer is Software developer

Dependency Injection

• Separate creation and usage

• RoboGuice, Dagger

Page 20: Mobile developer is Software developer

RoboGuice Exampleimport javax.inject.Inject;

@ContentView(R.layout.startup)public class StartupActivity extends SigninActivity implements OnClickListener {

@Inject private Control control; @Inject private FlurryLogger flurry;

@Override protected void onStart() { super.onStart(); flurry.onStartSession(this); flurry.onEvent(EventType.ACT_STARTUP)

}}

Page 21: Mobile developer is Software developer

Acceptance Tests

• Automate regression• Sikuli, Robotium• Monkey runner

Page 22: Mobile developer is Software developer

#### StartGroupConversation###

#note: contacts should be received alphabeticallydef StartGroupConversation(contacts):

hitMenuItem("start_group_item.png"); for x in contacts:

scrollDown(x); type(Key.F9);

hitMenuItem("start_group_conversation.png"); wait("group_created.png", 30);

##### enter an item in the menu (INSERT)def hitMenuItem(image):

type(Key.INSERT); scrollDown(image); type(Key.F9);

Page 23: Mobile developer is Software developer

Analytics

• Flurry, Google analytics• Bugsense• DataWareHouse

Page 24: Mobile developer is Software developer

Feedback

• Eat your own dog food• UX testing• Zendesk

Page 25: Mobile developer is Software developer

Spikes

• Clear outcome• Timeboxed• Presentable

Page 26: Mobile developer is Software developer

Personal Projects

• 2 personal projects• One sprint duration• Presented on company

meeting

Page 27: Mobile developer is Software developer

Conclusion

Page 28: Mobile developer is Software developer

Keywords

• maven, ant, gradle, bb-ant-tools, proguard, antenna• junit, testng, fest assert, mockito, jmockit, powermock

robolectric, microemulator, robotium, j2meunit, sikuli, monkeyrunner

• roboguice, androidannotations, daggermicrolog, jarrut, lwuit, advanced bb ui, guava, otto,  actionbarsherlock, viepageindicator, disklrucache

• jenkins, teamcity, bamboo, sonar, moose• intellij idea, eclipse, eclipse code formatter plugin

Page 29: Mobile developer is Software developer

Trivia

• How many nationalities are in eBuddy?• What is the name of framework that we are using for

testing Android on desktop?• What is the duration of typical personal project in the

company?

@jack_martynov

[email protected]