DEVELOPING M2M APPLICATIONS
WITH MANGO
great
Béla Juhász
Bachelor’s Thesis
December 2009
Degree Programme in Information Technology
School of Technology
联系方式英文怎么说
CONTENTS
1 OBJECTIVE OF THE PROJECT (5)
2 MANGO M2M SERVER APPLICATION (6)
2.1 Main concepts in Mango (7)
2.2 Installation (11)
2.3 Compilation (11)
2.4 Software components ud (13)
3 SPRING WEB MVC (14)
3.1 The MVC architecture (14)
3.2 Request processing in Spring MVC (15)
3.3 Handler mappings (18)dade
3.4 Controllers (18)
3.5 Views (22)
3.6 Ajax with DWR (23)
3.7 Analysis of a request (24)
4 DATABASE STRUCTURE IN MANGO (30)
4.1 Tables visualized (30)
4.2 Data access layer (31)
liberty media5 AN EXAMPLE MODIFICATION (35)
5.1 The task (35)
5.2 Implementation (36)
6 CONCLUSION (39)
REFERENCES (40)
FIGURES
dancer
FIGURE 1. Graphical reprentations of nsors
FIGURE 2. An example DataSource with DataPoints
FIGURE 3. Details and actual values of a data point
FIGURE 4. Watch list
FIGURE 5. Graphical view
FIGURE 6. The mobile version of the watch list shown in Figure 4
FIGURE 7. The request processing workflow in Spring Web MVC
FIGURE 8. The most important tables in Mango
FIGURE 9. The details of an HTTP Retriever DataSource
own
FIGURE 10. An HTTP Image DataSource and its DataPoint
FIGURE 11. The clickable rendered imageeven
TERMINOLOGY
Machine to Machine
Machine to Machine (often abbreviated as M2M) refers to data communications between machines. The term also means the complexity of nsors which produce data, the communications channel which connects the nsors to a rver computer
欺负的读音and a software running on the rver, having the task to analy and report the collected data. Sometimes the same software is capable of intervening into the process. (Machine to Machine 2009.)
危险的英文
Open source software
Open source software is a computer software where the source code is provided under a software licen that meets the Open Source Definition or it is in the public domain. Open source software the
refore can be edited, modified and then redistributed freely, given certain conditions are met (e.g. not placing the software under a more restrictive licen, providing the licen with the software, etc.) (Open Source Initiative 2009.)
Mango
The open-source Mango software is one – although a crucial – element of a whole
M2M system. Its role is to gather and process data, prent this raw data in a way which is comprehensible to a human operator who can, in turn, nd commands and thus control the process: Mango is an “open source alternative for Machine-to-Machine (M2M) software [...]. Mango is browr-bad, Ajax-enabled M2M software that enables urs to access and control electronic nsors, devices, and machines over multiple protocols simultaneously.” (Mango, open source M2M 2009.)
MVC
MVC is the acronym for the Model–View–Controller (MVC) architectural pattern ud in software engineering. The purpo of this pattern is to simplify the implementation of applications that need to
zax
act on ur requests and manipulate and display data. The model is the data to be prented to the ur. The view part is in charge of rendering the model in a suitable manner. And lastly, the controller is responsible for processing and acting on ur requests. It loads and prepares the model, choos the appropriate view and finally pass the model to the chon view for rendering. (Machacek, Vukotic, Chakraborty & Ditt 2008, 611.)
Spring's Web MVC framework
Spring is an open source framework, created by Rod Johnson. It was created to address the complexity of enterpri application development. With a more technical description one could describe it as a lightweight dependency injection and aspect-oriented container and framework. For a more in-depth analys of Spring, refer to Walls 2008. The Spring framework is made up of veral well-defined modules built on top of the core container. Such modules are for example the ORM integration module, JMX module, JDBC abstraction and the DAO module. The Spring Web MVC framework is just one of the modules, implementing the MVC architectural pattern. (Ladd, Donald 2006, 7.)
Direct Web Remoting
“DWR, which is short for Direct Web Remoting, is a Java-bad Ajax framework that lets you access virtually any rver-side Java object through JavaScript. DWR abstracts XMLHttpRequest away so that invoking methods on a rver-side Java object is as simple as invoking methods on a client-side JavaScript object.” (Walls 2008, 650.) DWR dynamically converts the rver-side Java objects into JavaScript ones that implement the same interface as the original Java objects. The JavaScript libraries are also responsible for nding XMLHttpRequest s from the browr to the rver and dynamically updating the web page with the data nt back.
Dojo JavaScript toolkit
Dojo is an open source JavaScript framework that simplifies Ajax programming. It is a collection of JavaScript components to assist building JavaScript applications.