Developing Peer-to-Peer (P2P) applications became increasingly important in software development. Nowadays, a large number of organizations from many different sectors and sizes depend more and more on collaboration between actors (individuals, groups, communities, etc.) to perform their tasks. These P2P applications usually have a recursive behavior that many modeling approaches cannot describe and analyze (e.g., finite-state approaches). Another challenging issue in P2P application development is the tight coupling between application specification and the underlying P2P technologies and protocols. This forces software developers to make tedious efforts in finding and understanding detailed knowledge about P2P low level concerns. Moreover, this tight coupling constraints applications to run in a changeless runtime environment. Consequently, choosing (for example) another protocol at runtime to meet a new requirement becomes very difficult. Besides these previous issues, P2P applications are usually specified with a weak ability to delegate computing activities between peers, and especially focus on data sharing and storage. Thus, it is not able to take full advantages of the computing power of the underlying P2P network. In this thesis, we present an approach that combines component- and service-oriented development with well-understood methods and techniques from the field of Attribute Grammars and Data-Flow Analysis (commonly used in compiler construction) in order to offer greater ease in the specification, analysis and deployment of applications in P2P architecture. This approach embodies: i) A formal language called DDF (Data-Dependency Formalism) to specify applications and construct their Data-Dependency Graphs (DDGs). A DDG has been defined to be an abstract representation of applications. ii) An analysis method that uses DDG to infer and compute various properties, including some properties that model checkers cannot compute if the system presents a recursive behavior. iii) A component-based service middleware called SON (Shared-data Overlay Network) to develop and execute applications within a P2P architecture without the stress of dealing with P2P low level complexity. Thanks to SON's automatic code generation.