iii
INTERNATIONAL UNDERGRADUATE PROGRAM BINA NUSANTARA UNIVERSITY
Major Computer Science Bachelor of Computer Science Thesis
Even Semester 2007
IMPLEMENTATION OF MOBILE JABBER-CLIENT CHAT APPLICATION:USING J2ME PLATFORM
Sylvia W (0700676623) Abstract
The objective of this thesis is to implement mobile client instant messaging application as an alternative communication means at PT AdIns. This application is created using J2ME platform and employs XMPP (Extensible Messaging and Presence Protocol) as the protocol. With the proposed system design, author aims to improve the communication ways in PT AdIns so that it can run more efficient and at low cost.
The method author used is by first getting the requirement specification from the company, continued by performing analysis, designing the conceptual design for the application then implement ing and testing the application.
As the result, this application is able to perform basic function of instant messaging like sending message, reading message, adding contact, accepting or refusing subscription request and see contact’s status. Additional features like editing user profile, viewing contact’s profile, sound effect, offline message, group ability, and connecting to other IM server: Msn and Yahoo are added to enhance the functionality.
In conclusion, by applying this mobile chat application the company will able to improve security, mobility, scalability and collaborative works among the employees. Security is achieved through the use of private IM server and client where mobility is accomplished through the implementation in mobile device. Since the application can connect to MSN and Yahoo server, the scalability of company’s communication is improved. Moreover, the collaborative work can be performed because the application unites all the employees at PT AdIns and allows them to chat with several people at the same time.
Keyword
iv PREFACE
This research-based project serves as an academic finale for undergraduate students of Bina Nusantara International University. This thesis is presented as an academic project based paper as the performance of significant and acceptable research and scholarly work, for obtaining Bachelor degree at Computer Science program, Education Level Strata-1.
The author would like to express her gratitude to everyone who has assisted in the completion of this thesis. First and foremost, the author would like to express her deepest thanks to the Almighty, who has blessed her with the strength and protection to complete this thesis on time.
The author also would like to thank to the following people for their support and contribution in the development of this thesis:
• Mr. Prof. Dr. Gerardus Polla, M.App.Sc, the Rector of Bina Nusantara University
• Mr. Firdaus Alams jah, Ph.D., the Executive Director of Joseph Wibowo Center
• Mr. Minaldi Loeis, M.Sc., MM.,MBA, the Program Director of Bina Nusantara
International
• Mr. Ir. Tri A. Budiono, MIT., the Head of School of Computer Science Binus
International and author’s thesis supervisor, for his guidance and assistance.
• Mr Raymondus Kosala, Ph. D., as author’s thesis supervisor, for his guidance and
v
• All personal in team MAX of PT. AdIns, who had helped author through the progress
of this thesis
• Author’s families and friends who have support and helped us during the thesis.
• Author’s peers, who have provided her with suggestions, ideas, comments, critiques
and never-ending support.
• Any other parties that have helped author, in a significant manner or not, in the
comple tion of this thesis.
The author is aware of the various imperfections of this paper presentation. Subsequently, the author would like to welcome any critiques and suggestion which will contribute any development of this thesis in the future. Lastly, the author really hopes that this thesis will be beneficial in communication development in Indonesia.
Jakarta, 20 July 2007
vi
TABLE OF CONTENT
TITLE PAGE...I CERTIFICATION OF APPROVAL...II ABSTRACT...III PREFACE...IV TABLE OF CONTENT...VI LIST OF TABLES...X LIST OF FIGURE...XI
CHAPTER 1...1
INTRODUCTION ...1
1.1 Background ...1
1.2 Scope...3
1.3 Assumptions...4
1.4 Purpose...5
1.5 Structure ...5
CHAPTER 2...7
THEORETICAL BACKGROUND...7
2.1 Mobile Instant Messaging...7
2.2 Internet ...8
2.2.1 Internet Structure... 9
2.2.2 Internet Provider ... 9
2.2.3 Internet Service ... 10
2.2.4 Language on Internet ... 11
2.2.5 Internet Access ... 11
2.2.6 GPRS ... 12
2.3 Technology...14
2.3.1 Wildfire ... 14
2.3.2 XMPP... 14
2.3.2.1 RFC (Request for Commands)... 16
2.3.2.1.1 RFC 3920 ... 16
2.3.2.1.2 RFC 3921 ... 18
2.3.2.2 XML... 18
2.3.2.3 Jabber ... 19
2.3.2.3.1 Jabber Architecture ... 21
2.3.2.3.2 How Jabber Works... 22
2.3.3 Java ... 23
2.3.3.1 Java Platform... 24
2.3.3.2 Feature of Java ... 25
2.3.4 J2ME ... 26
2.3.4.1 J2ME Architecture ... 27
2.3.4.2 Configuration... 28
2.3.4.2.1 CDC ... 28
vii
2.3.4.2.2.1 Target device characteristic ... 29
2.3.4.2.2.2 Security Model... 30
2.3.4.2.2.3 Application Management ... 31
2.3.4.2.2.4 Language differences ... 31
2.3.4.2.2.5 KVM ... 32
2.3.4.2.2.6 Included class libraries... 34
2.3.4.3 Profile... 34
2.3.4.4 MIDP ... 35
2.3.4.4.1 MIDlet (MIDP Application) ... 40
2.3.4.4.1.1 MIDlet States ... 41
2.3.4.4.1.2 MIDlet Lifecycle... 43
2.3.4.4.2 MIDlet Suites ... 44
2.3.4.4.2.1 JAD ... 45
2.3.4.4.2.2 JAR ... 45
2.3.5 Symbian OS ... 45
2.3.6 S60 Platform ... 47
2.3.7 Connection... 47
2.3.7.1 Thread ... 48
2.3.7.2 Stream ... 49
2.3.7.3 Socket (TCP/IP) connection ... 50
2.3.7.4 Datagram connection ... 52
2.3.7.5 HTTP connection... 52
2.4 Waterfall Model Methodology...53
2.5 Modeling Tools ...54
2.5.1 Data Flow Diagram... 55
2.5.2 Use Case Diagram... 55
2.5.3 Use Case Narrative ... 56
2.5.4 Activity Diagram... 57
CHAPTER 3...59
PROBLEM ANALYSIS ...59
3.1 Organizational Structure ...59
3.2 Company History...60
3.3 Analysis of Current Situation...61
3.4 Existing Problems ...63
3.5 Alternative Solution...64
CHAPTER 4...70
DESIGN OF THE PROPOSED SYSTEM ...70
4.1 Proposed System Design...70
4.1.1 Create New Login Profile ... 71
4.1.2 Edit Existing Login Profile ... 72
4.1.3 Delete Existing Login Profile ... 72
4.1.4 Sign In... 73
4.1.5 Send Message ... 74
4.1.6 Receive Message... 75
4.1.7 Send Offline Message ... 75
viii
4.1.9 Choose Emoticon... 76
4.1.10 Change Status ... 76
4.1.11 Add Contact ... 77
4.1.12 Accept Subscription Request ... 78
4.1.13 Refuse Subscription Request ... 78
4.1.14 Search Contact ... 78
4.1.15 Remove Contact ... 79
4.1.16 Edit User Profile... 80
4.1.17 View Contact’s Profile... 80
4.1.18 Create Group ... 80
4.1.19 Change Contact’s Group ... 81
4.1.20 Connect to MSN or Yahoo! Server... 81
4.1.21 Disconnect from MSN or Yahoo! Server ... 82
4.1.22 Turn On / Off Sound ... 82
4.1.23 Sign Out ... 83
4.2 Use Case...83
4.2.1 Use Case Diagram... 83
4.2.2 Use Case Narrative ... 85
4.3 Data Flow Diagram...108
4.3.1 Context Data Flow Diagram ... 109
4.3.2 Detailed Data Flow Diagram ... 110
4.4 Activity Diagram...122
4.4.1 Create New Login Profile Activity Diagram... 123
4.4.2 Edit Existing Login Profile Activity Diagram... 124
4.4.3 Delete Existing Login Profile Activity Diagram ... 125
4.4.4 Sign In Activity Diagram... 126
4.4.5 Send Message Activity Diagram ... 127
4.4.6 Receive Message Activity Diagram... 128
4.4.7 Send Offline Message Activity Diagram... 129
4.4.8 Receive Offline Message Activity Diagram... 130
4.4.9 Choose Emoticon Activity Diagram... 131
4.4.10 Change Status Activity Diagram ... 131
4.4.11 Add Contact Activity Diagram ... 132
4.4.12 Accept Subscription Request Activity Diagram... 133
4.4.13 Refuse Subscription Request Activity Diagram ... 134
4.4.14 Search Contact Activity Diagram ... 134
4.4.15 Remove Contact Activity Diagram... 135
4.4.16 Edit User Profile Activity Diagram ... 136
4.4.17 View Contact’s Profile Activity Diagram... 137
4.4.18 Create Group Activity Diagram... 138
4.4.19 Change Contact’s Group Activity Diagram... 139
4.4.20 Connect to Other IM Server Activity Diagram... 140
4.4.21 Disconnect From Other Server Activity Diagram ... 141
4.4.22 Turn On/ Off Sound Activity Diagram... 142
4.4.23 Sign out Activity Diagram... 142
ix
4.5.1 Input Design... 143
4.5.1.1 Main Menu Form ... 143
4.2.1.2 Sign In Form ... 144
4.2.1.3 Login Profile Form ... 145
4.2.1.4 Contact List Form ... 146
4.2.1.5 Chat Form ... 147
4.2.1.5 My Status Form... 148
4.2.1.6 Add Contact Form... 149
4.2.1.7 Request Approval Form... 150
4.2.1.8 Search Contact Form... 150
4.2.1.9 Remove Contact Form ... 151
4.2.1.10 Edit User Profile Form... 152
4.2.1.11 View Contact’s Profile Form... 153
4.2.1.12 Group Form... 153
4.2.1.1 Other IM Server Form ... 155
4.5.2 Output Design ... 155
4.5.3 Form Navigation Diagram ... 157
4.6 Implementation of XMPP RFC for Client-Server Connection...158
CHAPTER 5...165
IMPLEMENTATION AND TESTING ...165
5.1 System Specification...165
5.2 Operational Procedures...166
5.3 Screen shots...167
5.4 Test Case ...198
CHAPTER 6...231
DISCUSSION ...231
6.1 Results ...231
6.1.1 Instant Messaging Support Collaborative Works ... 232
6.1.2 Other Connection... 234
6.2 Consideration in Designing the System...234
6.2.1 Structured Approach Consideration... 234
6.2.2 Group Issues... 236
6.3 Challenges in Creating Chat Application ...237
6.4 Experiment ...239
6.5 Questionnaire ...240
6.6 Comparison to IM+ ...251
6.6.1 Comparison based on Functionalities ... 251
6.6.2 Comparison based on Graphical User Interface (GUI)... 253
6.6.3 General Conclusion of the Comparison ……… 259
CHAPTER 7...260
CONCLUSION AND RECOMMENDATION...260
7.1 Conclusion ...260
7.2 Recommendation ...261
REFERENCES...263
x
LIST OF TABLES
Table 2.1 MIDP Hardware Requirement ... 36
Table 2.2 Software Environment ... 36
Table 2.3 MIDP 2.0 Specification ... 39
Table 3.1 Price of CDMA and GSM providers ... 64
Table 3.2 Price of GPRS for GSM provider ... 66
xi
LIST OF FIGURE
Figure 2.1 Internet Structure ... 9
Figure 2.2 Jabber Architecture... 21
Figure 2.3 How Jabber Works ... 23
Figure 2.4 Java code goes through two stages: compilation and interpretation ... 24
Figure 2.5 The different editions of Java suit different hardware platform... 26
Figure 2.6 General Architecture... 27
Figure 2.7 The Java sandbox... 31
Figure 2.8 MIDlet life cycle... 44
Figure 2.9 MIDlet suites ... 44
Figure 2.10 Structure of Symbian OS... 46
Figure 2.11 Connection... 48
Figure 2.12 TCP/IP Concept ... 51
Figure 2.13 Waterfall Model... 54
Figure 3.1 Organizational Structure... 59
Figure 3.2 Benefits of real-time connectivity ... 67
Figure 3.3 Contact’s Status Enhance Cooperation ... 68
Figure 4.1 Chat Application Use Case Model Diagram ... 84
Figure 4.2 Create New Login Profile Use Case Narrative ... 86
Figure 4.3 Edit Existing Login Profile Use Case Narrative ... 87
Figure 4.4Delete Existing Login Profile Use Case Narrative ... 88
Figure 4.5 Sign in Use Case Narrative ... 89
Figure 4.6 Send Message Use Case Narrative ... 90
Figure 4.7 Receive Message Use Case Narrative ... 91
Figure 4.8 Send Offline Message Use Case Narrative ... 93
Figure 4.9 Receive Offline Message Use Case Narrative... 93
Figure 4.10 Choose Emoticon Use Case Narrative ... 94
Figure 4.11 Change Status Use Case Narrative ... 95
Figure 4.12 Add Contact Use Case Narrative... 97
Figure 4.13 Accept Subscription Request Use Case Narrative ... 97
Figure 4.14 Refuse Subscription Request Use Case Narrative ... 98
Figure 4.15 Search Contact Use Case Narrative... 99
Figure 4.16 Remove Contact Use Case Narrative ... 100
Figure 4.17 Edit User Profile Use Case Narrative ... 101
Figure 4.18 View Contact’s Profile Use Case Narrative ... 102
Figure 4.19 Create New Group Use Case Narrative ... 103
Figure 4.20 Change Contact’s Group Use Case Narrative ... 104
Figure 4.21 Connect to MSN or Yahoo! Server Use Case Narrative ... 106
Figure 4.22 Disconnect from MSN or Yahoo! Server Use Case Narrative ... 107
Figure 4.23 Turn On/ Off Sound Use Case Narrative ... 107
Figure 4.24 Sign out Use Case Narrative ... 108
Figure 4.25 Context Data Flow Diagram... 109
xii
Figure 4.27 DFD Level 1: Create New Login Profile ... 111
Figure 4.28 DFD Level 1: Edit Existing Login Profile ... 111
Figure 4.29 DFD Level 1: Delete Existing Login Profile... 112
Figure 4.30 DFD Level 1: Sign In ... 113
Figure 4.31 DFD Level 1: Send Message ... 114
Figure 4.32 DFD Level 1: Receive Message ... 114
Figure 4.33 DFD Level 1: Send Offline Message ... 115
Figure 4.34 DFD Level 1: Read Offline Message ... 115
Figure 4.35 DFD Level 1: Choose Emoticon ... 116
Figure 4.36 DFD Level 1: Add Contact... 116
Figure 4.37 DFD Level 1: Accept Subscription Request ... 117
Figure 4.38 DF D Level 1: Refuse Subscription Request... 117
Figure 4.39 DFD Level 1: Search Contact... 118
Figure 4.40 DFD Level 1: Remove Contact ... 118
Figure 4.41 DFD Level 1: Edit User Profile ... 119
Figure 4.42 DFD Level 1: View Contact’s Profile ... 119
Figure 4.43 DFD Level 1: Change Contact’s Group ... 120
Figure 4.44 DFD Level 1: Create Group ... 120
Figure 4.45 DFD Level 1: Connect to MSN or Yahoo! Server ... 121
Figure 4.46 DFD Level 1: Disconnect from MSN or Yahoo! Server... 121
Figure 4.47 DFD Level 1: Turn On / Off Sound ... 122
Figure 4.48 DFD Level 1: Sign Out ... 122
Figure 4.49 Activity Diagram: Create New Login Profile ... 123
Figure 4.50 Activity Diagram: Edit Existing Login Profile ... 124
Figure 4.51 Activity Diagram: Delete Existing Login Profile... 125
Figure 4.52 Activity Diagram: Sign in ... 126
Figure 4.53 Activity Diagram: Send Message ... 127
Figure 4.54 Activity Diagram: Receive Message ... 128
Figure 4.55 Activity Diagram: Send Offline Message ... 129
Figure 4.56 Activity Diagram: Receive Offline Message ... 130
Figure 4.57 Activity Diagram: Choose Emoticon ... 131
Figure 4.58 Activity Diagram: Change Status ... 131
Figure 4.59 Activity Diagram : Add Contact... 132
Figure 4.60 Activity Diagram: Accept Subscription Request ... 133
Figure 4.61 Activity Diagram: Refuse Subscription Request... 134
Figure 4.62 Activity Diagram: Search Contact... 134
Figure 4.63 Activity Diagram: Remove Contact ... 135
Figure 4.64 Activity Diagram: Edit User Profile ... 136
Figure 4.65 Activity Diagram: View Contact’s Profile ... 137
Figure 4.66 Activity Diagram: Create Group ... 138
Figure 4.67 Activity Diagram: Change Contact’s Group ... 139
Figure 4.68 Activity Diagram: Connect to MSN or Yahoo! Server ... 140
Figure 4.69 Activity Diagram: Disconnect to MSN or Yahoo! Server ... 141
Figure 4.70 Activity Diagram: Turn On / Off Sound ... 142
Figure 4.71 Activity Diagram: Sign out ... 142
xiii
Figure 4.73 UI Design fo r Sign In Form... 144
Figure 4.74 UI Design for Login Profile Form... 145
Figure 4.75 UI Design for Contact List Form... 146
Figure 4.76 UI Design for Chat Form... 147
Figure 4.77 UI Design for Change Status Form ... 148
Figure 4.78 UI Design for Add Contact Form... 149
Figure 4.79 UI Design for Request Approval Form ... 150
Figure 4.80 UI Design for Search Contact Form... 150
Figure 4.81 UI Design for Remove Contact Form ... 151
Figure 4.82 UI Design for Edit User Profile Form ... 152
Figure 4.83 UI Design for View Contact’s Profile Form ... 153
Figure 4.84 UI Design for Group Form... 153
Figure 4.85 UI Design for Create New Group Form... 154
Figure 4.86 UI Design for Other IM Server Form... 155
Figure 4.87 Output Design... 156
Figure 4.88 Form Navigation Diagram... 157
Figure 5.1 Screen Shot: Main Menu Form and About Form... 167
Figure 5.2 Screen Shot: Sign In Form and Login Profile Form... 168
Figure 5.3 Screen Shot: If Login Profile Saved is more than 5 ... 168
Figure 5.4 Screen Shot: Create New Login Profile ... 169
Figure 5.5 Screen shot: Errors in Creating Login Profile ... 170
Figure 5.6 Screen Shot: Success creating login profile ... 170
Figure 5.7 Screen Shot: Edit Existing Login Profile Form... 171
Figure 5.8 Screen Shot: Process of Editing Login Profile ... 171
Figure 5.9 Screen Shot: Success Deleting Login Profile ... 172
Figure 5.10 Screen Shot: Connect to the System... 173
Figure 5.11 Screen Shot: Error Connect to the System ... 173
Figure 5.12 Screen Shot: Contact List Form ... 174
Figure 5.13 Screen Shot: Change Status to Away... 174
Figure 5.14 Screen Shot: Alert of Wrong Contact’s Account Format... 175
Figure 5.15 Screen Shot: Add New Contact... 176
Figure 5.16 Screen Shot: Alert of Misplacing Contact ... 176
Figure 5.17 Screen Shot: Search Contact with empty keyword or “*” keyword ... 177
Figure 5.18 Screen Shot: Search Contact with “sa” as the keyword ... 177
Figure 5.19 Screen Shot: Add Contact from Search Contact Form... 178
Figure 5.20 Screen Shot: Remove Contact ... 179
Figure 5.21 Screen Shot: Alert for Choosing besides Jabber Contact... 179
Figure 5.22 Screen Shot: Choosing Group Command (for Jabber Contact) ... 180
Figure 5.23 Screen Shot: Changing Satyo’s Group from Friend to Max ... 181
Figure 5.24 Screen Shot: Create New Group”Partner” ... 181
Figure 5.25 Screen Shot: Alert for Invalid Group name and No Contact is checked ... 182
Figure 5.26 Screen Shot: Error Alert in the Process of Connecting to Other IM Server 183 Figure 5.27 Screen Shot: Connect to MSN server... 183
Figure 5.28 Screen Shot: MSN contacts has been added to contact list ... 184
Figure 5.29 Screen Shot: Connect to Yahoo Server ... 184
xiv
Figure 5.31 Screen Shot: Disconnect Command is un-allowed ... 185
Figure 5.32 Screen Shot: Disconnect from MSN ... 186
Figure 5.33 Screen Shot: Accepting Subscription Request ... 187
Figure 5.34 Screen Shot: Refusing Subscription Request ... 187
Figure 5.35 Screen Shot: Error Generated for Mismatch Group ... 188
Figure 5.36 Screen Shot: Adding Yahoo Contact... 188
Figure 5.37 Screen Shot: Subscription Request is delivered to Contact... 189
Figure 5.38 Screen Shot: User and contact may see each other status ... 189
Figure 5.39 Screen Shot: Edit My Profile... 190
Figure 5.40 Screen Shot: View Profile of UserMax1 ... 190
Figure 5.41 Screen Shot: Usermax2 sends message to usermax1 ... 191
Figure 5.42 Screen Shot: Usermax1 receive the message then reply ... 191
Figure 5.43 Screen Shot: Message is delivered to Usermax2 ... 192
Figure 5.44 Screen Shot: Usermax1 has gone offline... 192
Figure 5.45 Screen Shot: Chat with Yahoo contact... 193
Figure 5.46 Screen Shot: Choose Emoticon from Emoticon Table ... 194
Figure 5.47 Screen Shot: Go Directly to Usermax1 ... 194
Figure 5.48 Screen Shot: Closing Chat Window ... 195
Figure 5.49 Screen Shot: Leave Offline Message ... 195
Figure 5.50 Screen Shot: Receive Offline Message ... 196
Figure 5.51 Screen Shot: Sign Out from Server ... 196
Figure 5.52 Screen Shot: User Status Has Changed to Offline ... 197
Figure 6.1 Jabber Architecture... 236
Figure 6.2 Chat Box using Custom Item Component ... 237
Figure 6.3 Employee’s preferred communication mean at the office... 242
Figure 6.4 Employee’s Preferred Communication Device Outside of the Office ... 243
Figure 6.5 Other Instant Messenger Application that Employee Ever Use ... 244
Figure 6.6 Graphical User Interface of My Chat Application ... 245
Figure 6.7 Times needed to use this Client Chat Application ... 245
Figure 6.8 Limitation of 400 characters for each message sent... 246
Figure 6.9 The availability of 24 different emoticon images... 247
Figure 6.10 The most important and most useful of additional feature ... 247
Figure 6.11 Client chat application helps employees in doing their jobs ... 248
Figure 6.12 Chat Application Improves Collaboration Work ... 249
Figure 6.13 Mobile Chat Application as an Alternative Communication Means ... 250
Figure 6.14 Comparison of Functionality... 253
Figure 6.15 IM+ Login Form... 253
Figure 6.16 Jabber Client Chat Application Login Form ... 253
Figure 6.17 IM+ Contact List ... 255
Figure 6.18 Jabber Client Chat Application Contact List ... 255
Figure 6.19 IM + Dialog Window ... 256
Figure 6.20 Jabber Client Chat Application Chat Form ... 256
Figure 6.21 IM+ and Jabber Client Chat Application Emoticon Table ... 257
Figure 6.22 IM+ and Jabber Client Chat Application Status GUI... 257
Figure 6.23 IM+ and Jabber-Client Chat Application Contact Profile ... 258