sct 308 report

29
INDUSTRIAL ATTACHMENT REPORT SCT 308: INDUSTRIAL ATTACHMENT 2011 Wallace M. Gaturu J17S/8712/2008 9/18/2011

Upload: wallace-mureithi

Post on 21-Feb-2015

114 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Sct 308 Report

INDUSTRIAL ATTACHMENT REPORTSCT 308: INDUSTRIAL ATTACHMENT

2011

Wallace M. GaturuJ17S/8712/2008

9/18/2011

Page 2: Sct 308 Report

KENYATTA UNIVERSITY

SCHOOL: ENGINEERING AND TECHNOLOGY

DEPARTMENT: COMPUTING AND INFORMATION TECHNOLOGY

UNIT CODE: SCT 308

UNIT NAME: INDUSTRIAL ATTACHMENT

NAME: WALLACE M. GATURU

REG. NO. : J17S /8712 /2008

TASK: INDUSTRIAL ATTACHMENT REPORT

DATE OF SUBMISSION: FRIDAY, SEPTEMBER 23 , 2011

Page 3: Sct 308 Report

Table of ContentsACKNOWLEDGEMENTS..................................................................................................................................................... i

ABSTRACT......................................................................................................................................................................... ii

LIST OF ABBREVIATIONS.................................................................................................................................................. iii

INTRODUCTION................................................................................................................................................................1

TECHNICAL.......................................................................................................................................................................3

Mobile Application Development Training...................................................................................................................3

J2ME.........................................................................................................................................................................5

SMS...........................................................................................................................................................................5

Android.....................................................................................................................................................................6

Group Project...........................................................................................................................................................8

School of Public Health, University of Nairobi..............................................................................................................9

Lessons Learnt................................................................................................................................................................12

Mobile Application Training.......................................................................................................................................12

School of Public Health, University of Nairobi............................................................................................................13

Challenges Faced............................................................................................................................................................14

CONCLUSIONS................................................................................................................................................................15

RECOMMENDATIONS.....................................................................................................................................................15

Appendices........................................................................................................................................................................ I

REFERENCES..................................................................................................................................................................... II

Page 4: Sct 308 Report

iii

ACKNOWLEDGEMENTSI w i sh t o t hank t he Depa r tmen t o f Compu t ing and In fo rma t ion Techno logy , Kenya t t a Un ive r s i t y , f o r ava i l i ng t he oppo r tun i t y t o a cqu i r e p r ac t i c a l i ndus t r i a l expe r i ence . I wou ld a l so l i ke t o t hank my academic supe rv i so r , Mr . S t ephen Wa i thaka , f o r h i s v i t a l gu idance and f eedback on my p rog re s s .

I w i sh t o t hank t he Depa r tmen t o f Compu t ing and In fo rma t ion Techno logy fo r f a c i l i t a t i ng t he Goog le /KU mob i l e app l i c a t i on deve lopmen t t r a i n ing i n May- June 2011 . I t was an eye -open ing pe r i od t ha t o f f e r ed v i t a l sk i l l s t o u se even i n t he f i na l yea r p ro j ec t . I t hank t he Schoo l o f Pub l i c Hea l t h , Co l l ege o f Hea l t h Sc i ences , Un ive r s i t y o f Na i rob i f o r t he chance t o unde r t ake my indus t r i a l a t t a chmen t w i th t hem, and my hos t supe rv i so r , Mr . E ra s tu s N je ru , f o r h i s da i l y gu idance .

Page 5: Sct 308 Report

iii

ABSTRACT

My indus t r i a l a t t a chmen t was he ld i n two l oca t i ons : Kenya t t a Un ive r s i t y , whe re I unde r took t r a i n ing i n mob i l e app l i c a t i on deve lopmen t , co - sponso red by Kenya t t a Un ive r s i t y and Goog le . Th i s t r a i n ing t ook e igh t weeks ; and t he Schoo l o f Pub l i c Hea l t h , Un ive r s i t y o f Na i rob i . Th i s pa r t t ook fou r weeks .

Th i s r epo r t f i r s t de sc r i be s t he mob i l e t r a i n ing , and t hen t he pe r i od spen t i n t he Un ive r s i t y o f Na i rob i .

Page 6: Sct 308 Report

iii

LIST OF ABBREVIATIONS

ADB – Andro id Debug Br idge : i t i s a componen t o f t he Andro id SDK tha t a l l ows a phys i ca l dev i ce t o be connec t ed t o t he PC by USB fo r debugg ing pu rpose s .

GUI /UI – Graph i ca l Use r I n t e r f ace : i t i s t he a e s the t i c appea rance o f t he app l i c a t i on a s s een by t he u se r .

J2ME – J ava 2 Mic ro Ed i t i on : i t i s t he l anguage u sed t o code app l i c a t i ons fo r s t anda rd f ea tu r e mob i l e phones .

J2SE – J ava 2 S t anda rd Ed i t i on : i t i s a l anguage u sed t o code p rog rams fo r t he de sk top .

JDK – J ava Deve lopmen t K i t : i t i s a co l l e c t i on o f so f twa re packages t ha t p rov ide t he env i ronmen t needed t o p rog ram in J ava and a l l o f i t s va r i an t s , i nc lud ing J2ME and Andro id .

LWUIT – L igh t We igh t Use r I n t e r f ace Too lk i t : i t i s a l i b r a ry con t a in ing UI e l emen t s t ha t a r e i nco rpo ra t ed t o an app l i c a t i on i n o rde r t o make i t a e s the t i c a l l y appea l i ng .

MNP – Mob i l e Ne twork P rov ide r : t h i s r e f e r s t o t he mob i l e s e rv i ce p rov ide r s e . g . Sa f a r i com.

RHoK – Random Hacks o f K indnes s : t h i s i s a cod ing compe t i t i on he ld tw ice annua l l y , t ha t s eeks t o p rov ide so f twa re so lu t i ons t o m i t i ga t e aga in s t na tu r a l d i s a s t e r s .

SMS – Sho r t Message Se rv i ce : t h i s i s a s e rv i ce o f f e r ed by MNPs t ha t a l l ows u se r s t o s end sho r t messages t o e ach o the r ( 160 cha rac t e r s e ach ) a t l ow cos t .

SDK - So f twa re Deve lopmen t K i t : S imi l a r t o t he JDK, t h i s i s a co l l e c t i on o f so f twa re fo r a g iven p rog ramming l anguage t ha t c r ea t e s t he env i ronmen t fo r deve lopmen t o f app l i c a t i ons i n t ha t l anguage .

USSD – Uns t ruc tu r ed Supp l emen ta ry Se rv i ce Da t a : t h i s i s a s e rv i ce u sed by GSM phones t o commun ica t e w i th t he MNP’s sy s t ems . A message cons i s t s o f 182 a lphanumer i c cha rac t e r s .

ADT – t h i s i s a p lug in fo r Ec l i p se IDE tha t adds t he c apab i l i t i e s f o r cod ing , debugg ing and t e s t i ng Andro id app l i c a t i ons w i th in t he IDE .

Page 7: Sct 308 Report

iii

STK – S IM Too lKi t : t h i s i s a s e t o f menus t ha t a r e i nc luded i n t he s im ca rd so ld by an MNP, such a s t he Sa fa r i com o r M-Pesa menu i n t he Sa fa r i com S IM ca rd .

Page 8: Sct 308 Report

II

INTRODUCTIONGoog le Kenya i s a subs id i a ry o f Goog l e Inc , o f Moun ta in V iew , CA, USA, an In t e rne t and so f twa re deve lopmen t company t ha t was founded i n Sep t embe r 1998 , and whose In i t i a l Pub l i c Of f e r was he ld i n Augus t 2004 . The company was co -founded by La r ry Page and Se rgey Br in , who a t t he t ime we re PhD s tuden t s a t S t an fo rd Un ive r s i t y . The company’ s execu t i ve cha i rman i s E r i c Schmid t .

Bes ide t he company’ s f l ag sh ip s ea r ch eng ine , i t h a s a r ange o f p roduc t s r ang ing f rom In t e rne t ema i l (Gma i l ) , v i deo sha r i ng (YouTube ) , ven tu r e s i n l oca t i on aware app l i c a t i ons , unde r t he Goog l e Maps f l ag , and many o the r s . The company’ s r ap id g rowth s i nce i nco rpo ra t i on ha s t r i gge red a cha in o f mob i l e p roduc t s a s we l l , w i t h t he company l e ad ing i n t he deve lopmen t o f t he Andro id smar tphone ope ra t i ng sy s t em. Goog l e Kenya pa r t ne r ed w i th Kenya t t a Un ive r s i t y t o p rov ide t r a i n ing fo r t h i rd yea r Compu te r Sc i ence s t uden t s i n mob i l e app l i c a t i on deve lopmen t and dep loymen t .

The ob j ec t i ve s o f t he t r a i n ing we re t o :

Deve lop t e chn i ca l p rog ramming sk i l l s i n J2ME, t he l anguage u sed by s t anda rd f ea tu r e phones (non - smar tphones ) .

Deve lop t e chn i ca l p rog ramming sk i l l s i n t he Andro id p rog ramming l anguage , enab l i ng He t o deve lop app l i c a t i ons fo r smar tphones powered by t he Andro id ope ra t i ng sy s t em.

Web des ign sk i l l s and web t e chno log i e s t o supp l emen t t he mob i l e app l i c a t i on deve lopmen t .

The t r a i n ing was he ld a t t he Compu te r Lab i n t he Depa r tmen t o f Compu t ing and In fo rma t ion Techno logy bu i l d ing i n Kenya t t a Un ive r s i t y , f o r a pe r i od o f 8 weeks , be tween May and June 2011 .

The Schoo l o f Pub l i c Hea l t h , Un ive r s i t y o f Na i rob i i s l oca t ed i n t he Co l l ege o f Hea l t h Sc i ences c ampus , a complex w i th in Kenya t t a Na t i ona l Hosp i t a l . I t was e s t ab l i shed i n Sep t embe r 2010 and o f f i c i a l l y l aunched i n Feb rua ry 2011 . I t i s t he r e su l t o f t he t r ans fo rma t ion o f t he Depa r tmen t o f Communi ty Hea l t h , wh i ch ha s t r a i ned 250 pub l i c hea l t h p ro fe s s iona l s f o r ove r 25 yea r s . I t a l so o f f e r s cou r se s i n Pub l i c Hea l t h fo r Bache lo r o f Med ic ine and Bache lo r o f Su rge ry (MB.chB) .

He was a t t a ched i n t he In fo rma t ion Techno logy o f f i c e i n t he Schoo l . The ob j ec t i ve s o f t he a t t a chmen t we re a s f o l l ows :

Page 9: Sct 308 Report

II

To e s t ab l i sh and ma in t a in t he ne twork and In t e rne t connec t i on fo r t he s t a f f o f f i c e s .

To ma in t a in t he Compu te r Lab t ha t s e rve s Hes o f t he Schoo l .

To upda t e and ma in t a in t he Schoo l ’ s webs i t e and pos t pe r t i nen t i n fo rma t ion fo r pub l i c consumpt ion .

To o f f e r t he Schoo l s t a f f and s t uden t s ICT suppo r t and so lve p rob l ems w i th t he s ame .

Page 10: Sct 308 Report

II

TECHNICAL

Mobile Application Development TrainingThe t r a i n ing s t a r t ed w i th l e a rn ing t o s e t up t he deve lopmen t env i ronmen t fo r cod ing i n t he J ava p rog ramming l anguage fo r de sk top app l i c a t i ons . Th i s i nc ludes i n s t a l l i ng t he J ava Deve lopmen t K i t , Ec l i p se IDE , wh ich was t he p r ima ry deve lopmen t env i ronmen t fo r J ava and Andro id , i n s t a l l i ng o f Ne tbeans IDE wh ich was e s sen t i a l f o r cod ing i n ( J2ME) . Ne tbeans IDE i s p r e f e r r ed fo r J2ME because i t i nc ludes a dev i ce emu la to r f o r t e s t i ng code s t r a i gh t ou t o f t he box .

La t e r He wro t e a s amp le app l i c a t i on i n J ava 2 S t anda rd Ed i t i on ( J2SE) t o ou tpu t t he message “He l l o Wor ld” t o t he s c r een . Th i s was a r e f r e she r cou r se t o make su re He unde r s tood t he ba s i c syn t ax o f t he J ava p rog ramming l anguage . He a l so wro t e a s imp le Ca l cu l a to r p rog ram and t e s t ed i t succe s s fu l l y . More worked ou t example s we re r ev i ewed so a s t o unde r s t and t he i r l og i c and f i nd r eusab l e code . He d id a s e r i e s o f a s s i gnmen t s i nvo lv ing wr i t i ng code fo r a J ava b rowse r and add re s s book wh ich we re t hen submi t t ed and r ev i ewed t oge the r a s a c l a s s .

He was i n t roduced t o MySQL, XAMPP and connec t i on o f app l i c a t i ons t o a web s e rve r and da t abase . MySQL i s an open sou rce Da t abase Managemen t Sys t em, t ha t i s e a sy t o l e a rn , u se and i t i s t o t a l l y f r e e t o u se . Secu r i t y p r e f e r ences o f MySQL da t abase s a r e e a sy t o s e t up and t he r e a r e coun t l e s s l e a rn ing r e sou rce s fo r i t on t he In t e rne t . I t i s u sab l e on Windows , L inux and Mac sys t ems .

XAMPP i s a co l l e c t i on o f t h r ee so f twa re packages :

Apache , an ea sy t o u se web s e rve r t ha t c an be run on t he l oca l mach ine , and suppo r t s s eve ra l s e rv i ce s such a s MySQL, Pe r l , PHP , a ma i l s e rve r (Mercu ry Ma i l ) , an FTP se rve r (F i l eZ i l l a FTP C l i en t ) and many o the r s .

MySQL, an open sou rce da t abase managemen t sy s t em a s de sc r i bed above .

PHP, a s c r i p t i ng l anguage t ha t i s u sed a s t he midd l eware be tween t he web s e rve r (Apache ) and t he da t abase . I t hand l e s t he u se r i npu t and pa t ches t hem ove r t o Apache , wh ich i n t u rn r e l ays t he r eques t t o MySQL. The da t abase r e tu rn s a r e sponse t o t he web s e rve r , wh i ch pa r se s i t t h rough PHP and s ends i t back t o t he u se r .

These t h r ee componen t s a r e e s sen t i a l i n s e t t i ng up a t e s t i ng env i ronmen t fo r any app l i c a t i on t ha t makes r eques t s t o a da t abase . They can be i n s t a l l ed s epa ra t e ly bu t t ha t i s a complex , t ime – consuming p roce s s t ha t i s p rone t o e r ro r s . The re fo re , XAMPP bund l e s t he t h r ee t oge the r t o s imp l i fy i n s t a l l a t i on and l e t t he deve lope r

Page 11: Sct 308 Report

II

focus on cod ing h i s sy s t em. The fo l l owing d i ag ram spec i f i e s t h i s work ing r e l a t i onsh ip :

F igu re 1 : Re l a t i onsh ip be tween Apache , PHP and MySQL

He l ea rn t abou t J ava c l a s se s , me thods , ab s t r ac t i on and i nhe r i t ance :

A c l a s s i s a co l l e c t i on o f ob j ec t s t ha t a r e r e l a t ed and pe r fo rm s imi l a r f unc t i ons . These ob j ec t s i nc lude me thods and t he da t a t ha t t he se me thods man ipu l a t e .

A me thod i s a s e t o f i n s t ruc t i ons t ha t pe r fo rms a spec i f i c t a sk . P rog ramming i n J ava i nvo lve s wr i t i ng a s e r i e s o f me thods t o pe r fo rm the ob j ec t i ve s o f t he sy s t em.

Abs t r ac t i on i n J ava i s t he p r ac t i c e o f h id ing t he i nne r work ings o f t he sy s t em in o rde r t o l e t t he deve lope r focus on t he h ighe r l eve l f unc t i ona l i t y o f h i s sy s t em. Fo r example , t he deve lope r does no t need t o know abou t t he man ipu l a t i on o f b i t s t ha t occu r s when he i n s t ruc t s t he mach ine t o add two number s ; t he sy s t em does t ha t and g ive s h im the r e su l t .

RELATIONAL DATABASE - MYSQL

RELATIONAL DATABASE - MYSQL

MIDDLEWARE –

PHP

MIDDLEWARE –

PHP

WEB SERVER –

APACHE

WEB SERVER –

APACHE

WEB BROWSER – MOZILLA FIREFOX, GOOGLE CHROME

WEB BROWSER – MOZILLA FIREFOX, GOOGLE CHROME

Page 12: Sct 308 Report

II

Inhe r i t ance i s t he c apab i l i t y o f J ava p rog rams t o t ake on t he behav iou r o f i nbu i l t me thods and add more o f i t s own . A me thod can i nhe r i t a l l o f t he i nbu i l t f unc t i ona l i t y , o r pa r t o f i t , and can ove r r i de t he i nbu i l t me thod .

A l l t he se f e a tu r e s make t he J ava l anguage one o f t he mos t popu l a r i n mode rn so f twa re p ro j ec t s . He s t a r t ed t he deve lopmen t o f a s amp le bank managemen t sy s t em tha t ha s d i f f e r en t k inds o f a ccoun t s : cu r r en t , s av ings and much func t i ona l i t y e . g . ATM wi thd rawa l s and ove rd ra f t s . Th i s a s s i gnmen t was r ev i ewed a s a c l a s s and c l a r i f i c a t i ons made t oge the r .

J2ME

He was i n t roduced t o J2ME, a l anguage u sed t o code app l i c a t i ons fo r s t anda rd f ea tu r e mob i l e phones . He wro t e a s imp le app l i c a t i on t o d i sp l ay t yped t ex t i n a t ex tbox . He was i n t roduced t o (LWUIT) , a l i b r a ry con t a in ing t oo l s f o r de s ign ing t he u se r i n t e r f ace o f an app l i c a t i on , e . g . t ex tboxes , bu t t ons , f o rms , r ad io boxes , t hemes and many o the r s .

He deve loped a Ca l cu l a to r s amp le app l i c a t i on i n J2ME and i n s t a l l ed t he . j a r f i l e i n a compa t i b l e mob i l e phone . Lea rn t abou t t he bene f i t s o f debugg ing an app l i c a t i on on t he so f twa re dev i ce emu la to r a s we l l a s on an ac tua l dev i ce .

He was i n t roduced t o t he concep t o f connec t i ng t he app l i c a t i on t o a da t abase so a s t o enab l e t he pos t i ng and r e t r i eva l o f i n fo rma t ion . The two ma in me thods u sed t o a ch i eve t h i s f o r mob i l e app l i c a t i ons a r e PHP and HTTP Se rv l e t s . The l e a rne r a cqu i r ed t he ba s i c concep t s o f t he PHP l anguage and how to u se i t t o pos t u se r i npu t t o t he MySQL da t abase and r e t r i eve t h i s i n fo rma t ion a s needed .

He wro t e more example s o f app l i c a t i ons t o demons t r a t e connec t i on t o a da t abase u s ing t he HTTP GET and POST me thods . O the r s amp le app l i c a t i ons wr i t t en and r ev i ewed i nc luded a Reco rd S to r e demons t r a t i on . A l o t o f t ime was spen t on t h i s s ec t i on a s i t p roved mos t i n s t rumen ta l i n so f twa re p ro j ec t s .

SMS

He was i n t roduced t o SMS app l i c a t i ons . Fo r c l a s s p r ac t i c e , an a l r e ady s e t up A iTI SMS se rve r was u sed t o deve lop a s amp le sy s t em tha t r e ce ived SMS f rom mob i l e phones and r ep l i ed w i th t he s ame con t en t . A cus tomiza t i on a l l ows t he sy s t em to r ep ly w i th a p r e se t message o r r e t r i eve some i n fo rma t ion f rom a da t abase t o r ep ly t o t he SMS sende r .

Fo r p r ac t i c e , He s e t up a da t abase o f f amous quo t e s by known speake r s . The SMS se rve r was t hen s e t up . When a u se r s en t t he name o f a speake r , f o r example “Mande l a” t o t he s e rve r number , a r andom quo t e by Ne l son Mande l a , t he fo rmer p r e s iden t o f Sou th Af r i c a , was r e t r i eved f rom the da t abase and s en t back t o t he

Page 13: Sct 308 Report

II

u se r . The po t en t i a l app l i c a t i ons fo r t h i s t e chno logy a r e l im i t l e s s f rom t e l ev i s i on op in ion po l l s t o subsc r i p t i on s e rv i ce s .

He s t ud i ed USSD sys t ems . These a r e s imp le app l i c a t i ons t ha t enab l e a mob i l e phone u se r t o s end t ex t -ba sed que r i e s t o t he i r s e rv i ce p rov ide r o r t h i rd pa r t i e s e . g . a i r t ime ba l ance enqu i r i e s . USSD deve lopmen t r equ i r e s t he cons t an t co l l abo ra t i on o f t he MNP, t he r e fo re cou ld no t be p r ac t i s ed i n c l a s s . Howeve r , t he app l i c a t i ons o f USSD a re l im i t l e s s f rom mob i l e bank ing t o t i cke t r e se rva t i on sy s t ems .

Fo r an a s s ignmen t , He was expec t ed t o wr i t e a s amp le SMS app l i c a t i on fo r que ry ing s t uden t s ’ examina t i on r e su l t s f r om a da t abase , whe re He wou ld s end an SMS wi th t he i r r eg i s t r a t i on number , s emes t e r and academic yea r t o a s e t numbe r and t hey wou ld r ece ive a r ep ly l i s t i ng t he cou r se s t aken t ha t s emes t e r and t he g r ade aga in s t e ach . Th i s work was a l so r ev i ewed t oge the r i n c l a s s be fo re mov ing on t o t he nex t s ec t i on .

Android

He l ea rn t t o p r epa re t he Andro id SDK and o the r componen t s r equ i r ed fo r Andro id deve lopmen t e . g . t he Ec l i p se IDE and t he Ec l i p se ADT p lug in . The p lug in adds Andro id cod ing , debugg ing and t e s t i ng capab i l i t i e s t o t he Ec l i p se IDE . A l so r equ i r ed i s t he s e tup o f an Andro id dev i ce emu la to r t ha t comes a s pa r t o f t he SDK. La t e r He wro t e a s imp le app l i c a t i on t o ou tpu t t he message “He l l o Wor ld” on t he emu la to r .

He was i n t roduced t o UI de s ign i n Andro id and some o f t he many t oo l s ava i l ab l e fo r t he s ame , Andro id XML, s t r i ngs and t he Andro id Man i f e s t f i l e . The UI i n Andro id can be ha rd coded i n J ava , bu t i n p roduc t i on code , i t i s spec i f i ed i n XML, so t ha t t he l ayou t o r e l emen t s o f i t c an be a l t e r ed w i thou t t he i nconven i ence o f a l t e r i ng t he J ava code . S t r i ngs a r e u sed t o hand l e a l l t he t ex t i n an app l i c a t i on , such a s t ex t f i e l d s , app l i c a t i on t i t l e and so on . The mos t impor t an t f i l e i n an app l i c a t i on i s t he Andro id Man i f e s t , wh i ch l i s t s :

Act iv i t i e s : t he se a r e t he s c r eens i n t he app l i c a t i on . They mus t a l l be spec i f i ed i n t he Man i f e s t f i l e .

In t en t s : t he se a r e t he func t i ons o f t he app l i c a t i on t ha t a l l ow nav iga t i on among t he ac t i v i t i e s .

Pe rmi s s ions : app l i c a t i ons make u se o f dev i ce ha rdware capab i l i t i e s such a s l oca t i on awarenes s , c amera acce s s , FM rad io and o the r s . The app l i c a t i on ha s t o be a l l owed pe rmi s s ion t o u se t he se r e sou rce s . These pe rmi s s ions a r e spec i f i ed i n t he Andro id Man i f e s t f i l e .

Page 14: Sct 308 Report

II

Mos t Fo rce C lose e r ro r s i n Andro id deve lopmen t a r e c aused by e r ro r s i n XML, e spec i a l l y t he Man i f e s t f i l e .

He s t ud i ed Andro id c l a s se s and me thods . Andro id l og i c i s coded i n a s l i gh t l y mod i f i ed fo rm o f J ava , wh ich makes i t ve ry ea sy t o l e a rn i f t he l e a rne r ha s a backg round i n J ava . I nbu i l t Andro id me thods can a l so be i nhe r i t ed , ove r r i dden and r eused , ano the r s im i l a r i t y t o J ava . GUI c r ea t i on i n Andro id i s done i n XML, a s men t i oned be fo re , and t he r e a r e numerous t h i rd pa r t y t oo l s on t he In t e rne t t o s imp l i fy i t . Fo r an a s s ignmen t , He was supposed t o de s ign t he GUI fo r a s t uden t r eg i s t r a t i on ac t i v i t y u s ing a t oo l c a l l ed Dro idDraw. The gene ra t ed XML code can t hen be expo r t ed t o t he XML f i l e s i n t he app l i c a t i on so t ha t t he l og i c c an be added .

He l e a rn t t o connec t t he Andro id app l i c a t i on t o a MySQL da t abase u s ing H t tpPos t , t o enab l e pos t i ng t o and r e t r i ev ing i n fo rma t ion . As w i th J2ME deve lopmen t , i t i s impor t an t t o t e s t t he app l i c a t i on on t he emu la to r a s we l l a s on an ac tua l dev i ce . The re fo re t he deve lope r needs t o up load h i s da t abase and PHP sc r i p t s t o an on l i ne hos t i ng s e rv i ce and spec i fy t h i s URL in t he app l i c a t i on i n p l ace o f t he l oca l s e rve r u sed by t he so f twa re emu la to r . He a l so l e a rn t how to u se t he ADB to t e s t app l i c a t i ons on an ac tua l dev i ce .

He was i nvo lved i n RHoK 3 , a cod ing compe t i t i on sponso red by t he Kenya Red Cros s t o deve lop so f twa re sy s t ems t ha t wou ld he lp i n m i t i ga t i ng t he e f f ec t s o f na tu r a l d i s a s t e r s . He ’ s t e am emerged t h i rd p l ace among s i x t een t e ams f rom a l l ove r t he coun t ry w i th an app l i c a t i on ca l l ed T race r . T race r i s mean t t o he lp l oca t e d i sp l aced peop l e fo l l owing d i s a s t e r s such a s f l oods .

He a l so l e a rn t t he ba s i c s o f web de s ign and Con t en t Managemen t Sys t ems . Fo r p r ac t i c e , He l e a rn t t o s e t up t he WordPre s s CMS on t he l oca l s e rve r , and u sed t h i s i n s t a l l a t i on t o l e a rn abou t pos t i ng a r t i c l e s , add ing modu le s and t hemes , p lug in s fo r s ecu r i t y and ana ly t i c s , and u s ing J avaSc r ip t f o r f o rm va l i da t i on . As a pe r sona l p ro j ec t , He ha s been expe r imen t i ng w i th more advanced f ea tu r e s o f WordPre s s and i n s t a l l i ng o the r CMS packages such a s Joomla .

Page 15: Sct 308 Report

II

Group Project

As pa r t o f t he t r a i n ing , l e a rne r s we re supposed t o spend t h r ee weeks deve lop ing a sy s t em on any f i e l d o f t he i r cho i ce , i n g roups o f t h r ee , wh ich wou ld be p r e sen t ed on g r adua t i on day . He ’ s g roup deve loped M-Hous ing , a sy s t em to he lp ea se t he ha s s l e o f s ea r ch ing fo r and s ecu r ing an apa r tmen t . I t was deve loped fo r J2ME and Andro id , u s ing a MySQL da t abase i n a XAMPP env i ronmen t . The re was a webs i t e f o r p rov id ing fu r t he r i n fo rma t ion , he lp pages and a f e edback fo rm .

The sy s t em was p r e sen t ed be fo re t he j udges bu t d id no t w in any o f t he t op t h r ee spo t s . Howeve r , improvemen t and add ing o f new f ea tu r e s i s s t i l l ongo ing .

Page 16: Sct 308 Report

II

School of Public Health, University of NairobiHe s t a r t ed r e s to r a t i on o f t he compu te r l ab . The mach ine s we re b lown o f dus t and t hen he u sed d r i ve backups t o c l e an and r e s to r e a l l t he ha rd d r i ve s . The backups con t a ined a sy s t em image o f a c l e an i n s t a l l a t i on , wh ich i s f r e e o f v i ru se s and a l l unneces sa ry i n fo rma t ion . As a p r ecau t i on , a l l l ab u se r s we re a sked t o backup any impor t an t da t a t ha t t hey migh t have l e f t i n t he l ab compu te r s .

Af t e r r e s t o r a t i on , He upda t ed t he an t i v i ru s so f twa re a s we l l a s t he Windows ope ra t i ng sy s t em on eve ry compu te r . Add i t i ona l compu te r s we re p rocu red f rom s to r age , con f igu red and added t o t he l ab t o e a se t he s t r a i n on r e sou rce s .

He a l so r e so lved a f ew mino r i s sue s w i th t he ne twork connec t i ons i n t he l ab . The Un ive r s i t y had r ecen t l y upg raded t o a DHCP se rve r , and compu te r s wh ich s t i l l spec i f i ed an IP add re s s manua l l y we re hav ing t r oub l e a cce s s ing t he In t e rne t and ne twork r e sou rce s . Th i s was succe s s fu l l y r e so lved by s e t t i ng t hem to acqu i r e an IP add re s s au toma t i ca l l y .

The ma in t enance o f t he l ab was a da i l y rou t i ne , w i th e a r l y morn ing checks t o make su re t ha t no cab l e s had been ma l i c i ous ly unp lugged o r any ha rdware mi s s ing . Warn ing messages we re p l aced i n t he l ab when a f ew ne twork connec t i on cab l e s wen t m i s s ing , and t he l ab u se r s wou ld l e ave keyboa rds and mouse unp lugged and p rone t o damage . I t was dec ided t ha t no pe r sona l compu te r s wou ld be a l l owed i n to t he l ab , so a s t o m in imize ca se s o f t he ne twork cab l e s be ing unp lugged f rom l ab compu te r s t o connec t pe r sona l mach ine s . I t was a l so dec ided t ha t i f a u se r was t o be caugh t l e av ing w i th a p i ece o f l ab equ ipmen t , he wou ld be immed ia t e ly banned f rom the l ab and d i s c ip l i na ry measu re s t aken aga in s t h im/he r .

He a l so r e so lved a f ew ha rdware and ne twork i s sue s i n t he s t a f f o f f i c e s . Some o f t he s t a f f we re g iven new compu te r s , whe re t he i r cu r r en t ones we re cons ide red o ld o r o the rwi se unab l e t o de l i ve r t he i r ob j ec t i ve s .

Some o f t he s t a f f we re f a c ing d i s rup t i ons i n ne twork connec t i ons . An i nves t i ga t i on r evea l ed t ha t t he ne twork cab l e s f rom the i r o f f i c e s t o t he w i r i ng c lo se t we re worn away , some o f t hem the v i c t ims o f r oden t a t t a cks . Reques t s f o r r ep l acemen t had been p l aced w i th t he Un ive r s i t y managemen t , bu t a s a t empora ry r ep r i eve , two Wi re l e s s Acces s Po in t s we re s e t up t o s e rve t hem.

He l e a rn t t o s e t up a L inksys Wi re l e s s Acces s Po in t and Wi re l e s s Rou t e r . He a l so s t ud i ed t he componen t s o f a w i r i ng c lo se t and i t s f unc t i ona l i t y . The Schoo l w i r i ng c lo se t con t a ined :

Page 17: Sct 308 Report

II

a f i b r e op t i c i n t e r f ace t ha t connec t ed t he Schoo l t o t he i n s t i t u t i on ’ s co re sw i t ch .

An acce s s sw i t ch t o connec t t he s t a f f o f f i c e s t o t he ne twork .

A pa t ch pane l t ha t connec t s some o f t he o lde r connec t i ons , i nc lud ing t he compu te r l ab .

A d i s t r i bu t i on sw i t ch t ha t connec t s t he a cce s s connec t i ons t o t he backbone ne twork . The f i gu re s be low r ep re sen t a w i r i ng c lo se t and pa t ch pane l s .

F igu re 2 : A wi r i ng c lo se t F igu re 3 : Pa t ch pane l s

He was gu ided i n t he ma in t enance o f t he w i r i ng c lo se t , l abe l i ng connec t i ons fo r f u tu r e r e f e r ence and ea se o f t r oub l e shoo t i ng .

He a l so conduc t ed an exe rc i s e t o backup a l l impor t an t documen t s and da t a fo r t he s t a f f , and b r i e f l y i n s t ruc t ed t hem on how to pe r fo rm a fu l l sy s t em backup fo r f u tu r e r e f e r ence , and i n c a se one had a p rob l em whose so lu t i on wou ld r equ i r e t he c l e an ing o f ha rd d r i ve s , such a s an unexpec t ed v i ru s a t t a ck .

He was a s s igned t he t a sk o f upda t i ng t he Schoo l ’ s webs i t e . One o f t he f i r s t du t i e s i n t h i s r ega rd was t o pos t t he abs t r ac t s o f f o rmer s t uden t s ’ Mas t e r o f Pub l i c Hea l t h t he se s on l i ne . Th i s wou ld he lp marke t t he Schoo l . Th i s work i nvo lved pho tocopy ing t he i nd iv idua l ab s t r ac t s , s c ann ing t hem in a s t ex t , ed i t i ng any s cann ing e r ro r s and f i na l l y pos t i ng . He was g iven u se r c r eden t i a l s t o t he webs i t e i n o rde r t o a ccompl i sh t h i s du ty .

The abs t r ac t s we re succe s s fu l l y pos t ed and a r e cu r r en t l y on t he webs i t e . O the r t a sks i nc luded :

Page 18: Sct 308 Report

II

Giv ing t he s i t e a new look and f ee l .

Opt imiz ing nav iga t i on a round t he s i t e .

Adding new p romot iona l and i n fo rma t iona l ma t e r i a l .

Modi fy ing o f modu le s con t a in ing con t ac t i n fo rma t ion , add ing new modu le s and r emov ing some o f t he o ld i r r e l evan t ones .

Page 19: Sct 308 Report

II

Lessons Learnt

Mobile Application TrainingI a l so d i s cove red t ha t i t i s ve ry ea sy t o f i nd he lp on t he In t e rne t f o r a cod ing p rob l em. Numerous code example s ex i s t and by be ing a member o f code r epos i t o r i e s such a s G i thub , one ha s a cce s s t o a l l t he se and more . The re a r e a l so numerous v ideo and t ex t t u to r i a l s on any t e chno logy such t ha t de lv ing i n to a new sk i l l i s e a sy and f a s t t o l e a rn . The re a r e t u to r i a l s f o r J ava , web de s ign u s ing F l a sh , Dreamweave r w idge t s , g r aph i c de s ign u s ing Pho toShop and many more .

I l e a rn t cod ing i n J2ME and i t s compa r i son w i th J2SE . I l e a rn t a good b i t o f PHP , J avaSc r ip t and JQue ry fo r web deve lopmen t . J avaSc r ip t i s u sed t o run va l i da t i on checks t ha t do no t r equ i r e r emo te s e rve r a cce s s . I t i s t he r e fo re i n t e rp r e t ed by t he web b rowse r , f o r example t o check i f a l l f i e l d s have been f i l l ed i n a f o rm .

JQue ry i s one o f a numbe r o f t oo l s u sed t o c r ea t e v i sua l l y appea l i ng web s i t e s . The re a r e l o t s o f JQue ry l i b r a r i e s t ha t c r ea t e an ima t ion i n webs i t e s , a l l ow the upda t i ng o f pa r t s o f a page w i thou t upda t i ng t he en t i r e page , c r ea t e soc i a l med i a add - in s t o a webs i t e , such a s sha r i ng a page on Facebook and Twi t t e r . A l l t he se a r e ava i l ab l e on t he In t e rne t f o r f r e e , and t hey can be cus tomized t o spec i f i c c l i en t needs . My pe r sona l p ro j ec t i s t o l e a rn AJAX, ano the r o f t he se t e chno log i e s u sed t o add more i n t e r ac t i v i t y t o a web page .

I a l so l e a rn t abou t t he po t en t i a l app l i c a t i ons o f SMS and USSD sys t ems . Te l ev i s i on op in ion po l l s a r e s imp ly SMS sys t ems w i th a s e t sho r t numbe r t o s end a message l i ke “YES” o r “NO” . The sy s t em then runs s t a t i s t i c s on da t a r e ce ived t o g ive t he pe r cen t age o f r e sponden t s who gave a g iven r e sponse . FM rad io s t a t i ons a l so u se t hem to r e ce ive u se r op in ions . A g iven r ad io s t a t i on w i l l have t he s ame se rve r f o r a r ange o f d i f f e r en t SMS se rv i ce s , t he r e fo re r equ i r e t he r e sponden t t o beg in h i s SMS wi th a spec i f i c ph ra se , f o r example “NEWS” , fo l l owed by h i s commen t , so t ha t t he messages c an be rou t ed app rop r i a t e l y .

O the r app l i c a t i ons cou ld i nc lude SMS vo t i ng , whe re , f o r example , a u se r cou ld s end a message t o a g iven number con t a in ing h i s ID number , cons t i t uency , t he pos t he i s vo t i ng fo r ( e . g . P r e s iden t ) and t he p r e se t code fo r t he c and ida t e he i s vo t i ng fo r . USSD sys t ems a l so have a r ange o f u se s f rom mob i l e paymen t , e . g . M-Pesa i n Tanzan i a . I t i s u se fu l t o no t e t ha t M-Pesa i n Kenya i s no t a USSD se rv i ce , r a t he r i t i s o f f e r ed a s an STK menu . O the r u se s i nc lude :

mobi l e bank ing : mos t commerc i a l banks i n Kenya have a USSD se rv i ce t ha t a cus tomer can u se t o make s imp le t r ansac t i ons e . g . check ing t he i r bank ba l ance , buy ing a i r t ime d i r ec t l y f rom the i r bank accoun t and so on .

Page 20: Sct 308 Report

II

MNPs use USSD fo r p r epa id cus tomer s t o enab l e t hem check t he i r a i r t ime ba l ance , t op up t he i r a i r t ime , sha r e a i r t ime w i th o the r cus tomer s and so on .

A USSD message beg in s w i th an a s t e r i sk (* ) , a s e r i e s o f numbe r s r ep re sen t i ng a code o r command , op t i ona l l y o the r a s t e r i sk s t o s epa ra t e g roups o f commands , and ends w i th a ha sh symbo l (# ) . A s i gn i f i c an t f e a tu r e o f USSD deve lopmen t i s t ha t i t r equ i r e s cons t an t co l l abo ra t i on w i th t he MNP, r i gh t f r om the beg inn ing o f t he deve lopmen t . Th i s i s because USSD se s s ions open a d i r ec t connec t i on w i th t he MNP compu te r s ; t he r e fo re t he r e i s no o the r way t o debug t he app l i c a t i on .

Th i s con t r a s t s w i th SMS sys t ems , wh ich can s imu la t e an SMS se rve r u s ing a USB modem and i t s phone number . The deve lope r c an bu i l d h i s app l i c a t i on , debug and t e s t i t , and t hen app roach t he MNP fo r co l l abo ra t i on i n t he dep loymen t phase . I t i s u se fu l t o no t e t ha t no t a l l USB modems can be u sed w i th SMS se rve r s .

I l e a rn t t ha t app l i c a t i on t e s t i ng i s a ve ry impor t an t pa r t o f deve lopmen t . A mob i l e app l i c a t i on can be t e s t ed on t he so f twa re emu la to r , bu t i t i s a l so nece s sa ry t o t e s t i t on d i f f e r en t phys i ca l dev i ce s , a s d i f f e r en t dev i ce s have d i f f e r en t c apab i l i t i e s . One o f t he mos t s i gn i f i c an t o f t he se d i f f e r ences i s max imum . j a r f i l e s i z e . Some phones can suppo r t up to 1 MB, wh i l e o the r s suppo r t a l ower va lue . The re fo re an app l i c a t i on shou ld be t e s t ed on a l l o f t he se dev i ce s .

The Nok ia Deve lope r s i t e ha s a f e a tu r e c a l l ed Remote Dev i ce Acces s (RDA) t ha t s imu la t e s phones w i th d i f f e r en t c apab i l i t i e s , a l l owing t he deve lope r t o t e s t r emo te ly .

I l e a rn t t he impor t ance o f t e amwork i n a g roup p ro j ec t . A p ro j ec t i nvo lve s d iv i s i on o f du t i e s and i t i s impor t an t t ha t e ach member succe s s fu l l y comple t e h i s du ty . I t i s a l so impor t an t t o have r ev i ews and p rog re s s mee t i ngs , and t o a s s i s t g roup member s whe re t hey migh t be expe r i enc ing d i f f i cu l t i e s .

School of Public Health, University of NairobiIn an o f f i c e env i ronmen t , i t i s impor t an t t o keep backup images o f compu te r s , wh i ch r ep re sen t an i dea l s t a t e , such t ha t i f t he sy s t em shou ld be a t t a cked by a v i ru s , f o r example , a l l t ha t i s needed i s t o r e s t o r e i t f r om th i s backup , e a s i l y and w i l l no t consume much t ime . Use r s shou ld a l so backup t he i r impor t an t documen t s f rom t ime t o t ime t o m in imize on t he i r l o s s i n c a se o f any even tua l i t y .

I l e a rn t how to con f igu re Wi re l e s s Acces s Po in t s and Wi re l e s s Rou t e r s . The WAP i s connec t ed t o a PC v i a a conso l e c ab l e . A v i r t ua l i n t e r f ace t o t he WAP i s c r ea t ed and a s s igned an IP add re s s and mask . The WAP i s t hen connec t ed t o t he ne twork sw i t ch . The PC , connec t ed t o t he sw i t ch by cab l e , i s u sed t o a cce s s t he web

Page 21: Sct 308 Report

II

con f igu ra t i on GUI o f t he WAP v i a t he IP add re s s a s s i gned ea r l i e r . Th rough t h i s s c r een , t he WAP can be con f igu red a s fo l l ows :

I t c an be a s s igned a Se rv i ce Se t ID (SSID) . Th i s i s t he i den t i t y o f t he w i r e l e s s ne twork a s w i l l be s een by u se r s .

Secu r i t y op t i ons c an be s e t , f o r example WEP o r WPA enc ryp t i on and t he i r pa s skeys , among many o the r s e t t i ngs . Be low a r e s amp le f i gu re s o f a r ou t e r and i t s con f igu ra t i on i n t e r f ace .

F igu re 4 : Wi re l e s s Rou t e r F igu re 5 : Conf igu ra t i on GUI

I l e a rn t how to dea l w i th compu te r u se r s and c l i en t s . The re a r e many k inds o f u se r s , some o f who do no t unde r s t and t e chno logy and i t i s impor t an t t o exp l a in wha t you i n t end t o do acco rd ing t o you r aud i ence ’ s l eve l o f unde r s t and ing o f t e chno logy .

Challenges FacedSome o f t he cha l l enges f a ced ove r t he a t t a chmen t pe r i od i nc lude :

Cer t a in web s i t e s b locked . V ideo sha r i ng s i t e s a r e b locked w i th in t he Kenya t t a Un ive r s i t y ne twork , wh ich den i ed me acce s s t o po t en t i a l l y he lp fu l v ideo t u to r i a l s o f deve lopmen t t e chn iques and t e chno log i e s . I dea l t w i th t h i s by acce s s ing t he se r e sou rce s f rom a cybe r c a f é ou t s i de o f t he i n s t i t u t i on .

Lack o f p rope r equ ipmen t fo r i den t i fy ing connec t i on po in t s be tween o f f i c e s and t he acce s s sw i t ch a t t he Un ive r s i t y o f Na i rob i . Th i s was ove rcome by manua l l y t e s t i ng t he po in t s un t i l a connec t i on was e s t ab l i shed .

Page 22: Sct 308 Report

II

CONCLUSIONSMy Indus t r i a l A t t a chmen t was h igh ly succe s s fu l a s I ga ined va luab l e expe r i ence i n mob i l e app l i c a t i on t r a i n ing t ha t i s a l r e ady p rov ing t o be an advan t age a t j ob i n t e rv i ews . I t ha s a l so g iven me t he con f idence needed t o f a ce t he f i na l yea r p ro j ec t a s I i n t end t o deve lop a ma rke t ab l e , va luab l e mob i l e app l i c a t i on .

I t ha s a l so g iven me sk i l l s i n LAN managemen t and ma in t enance t ha t w i l l a l so be va luab l e i n my ca r ee r . I have ga ined knowledge i n work ing a s pa r t o f a t e am and a l so hand l i ng c l i en t expec t a t i ons . I have ga ined va luab l e commun ica t i on sk i l l s t ha t c an on ly be ga ined i n t he f i e l d , r a t he r t han a c l a s s room.

RECOMMENDATIONSI wou ld r ecommend fo r Kenya t t a Un ive r s i t y t o ho ld t he mob i l e app l i c a t i on t r a i n ing annua l l y so t ha t a l l c l a s se s c an ga in t he se ma rke t ab l e sk i l l s . I wou ld a l so r e commend t o t he un ive r s i t y managemen t t o p rov ide a compu te r l ab fo r s t uden t s who a r e unde r t ak ing t he i r p ro j ec t s t o come and acce s s r e sou rce s on t he In t e rne t , t ha t wou ld be open a t a l l t imes . I r e commend t ha t some o f t he r e s t r i c t i ons on In t e rne t a cce s s r emoved so t ha t such s t uden t s c an acce s s va luab l e v ideo and f i l e sha r i ng r e sou rce s .

Page 23: Sct 308 Report

II

Appendices1 . The l ogbook o f a c t i v i t i e s c a r r i ed ou t t h rough t he a t t a chmen t pe r i od i s

a t t a ched t o t h i s r epo r t .

Page 24: Sct 308 Report

II

REFERENCES1 . Graml i ch , N . 2008 : AndBook : Andro id Programming

h t t p : / / andbook . anddev .o rg

Acces sed on May 20 , 2011

2 . Goog le – Wik iped i a , t he On l ine Encyc loped i a

h t t p : / / en .w ik iped i a .o rg /w ik i / goog l e

Acces sed on Sep t embe r 17 , 2011

3 . USSD – Wik iped i a , t he On l ine Encyc loped i a

h t t p : / / en .w ik iped i a .o rg /w ik i / u s sd

Acces sed on Sep t embe r 17 , 2011

4 . Gordon , M. 2009 : MIT AIT I Mob i l e App l i ca t i on Deve lopmen t i n Java . A ITI , 2009

5 . G i thub , t he On l ine Code Repos i t o ry

h t t p : / / g i t hub . com

Acces sed on Augus t 23 , 2011

6 . JQue ry

h t t p : / / j que ry .o rg

Acces sed on June 2 , 2011

7 . Goog le Images fo r t he images i n t h i s r epo r t