Code Monkey home page Code Monkey logo

hitren's Introduction

HITRen

##0. 基础

  • 客户端请求数据的方法,利用url来请求相应的servlet,同时需要传递相应的参数,所需参数在以下条目中悉数介绍
  • servlet命名规范:每个servlet对应的java文件的文件名去掉结尾处的servlet即可,如登录需要请求LoginServlet,该servlet的名称为Login
  • 参数命名:单词为复数形式的都是数组,如gnames,数组中元素的数据类型以该单词的单数形式为准,如uids,则每个元素都是uid的类型;所有id都是int型,seq也为int型,其他无特别说明的就是字符串
  • 返回值:每个servlet都是返回一个json数据
    • 字段SUCbool型,表示操作成功与否
    • INFO字符串,表示附加说明,具体每个servlet都不同
    • DATA,json格式,表示实际返回的数据

##1. 用户简单逻辑

##2. 好友关系逻辑

##3. 社交功能逻辑


##项目构成

  • 配置文件:
    • 路径: WEB-INF/conf
    • memcache.conf: memcached的配置文件,内容是部署的服务器ip和端口
    • openfire.conf: openfire服务器的配置文件,包含了服务器的基本信息,详见文件内容
    • cn.edu.hit.constant: 各种常量,主要是mongodb中的字段名
    • cn.edu.hit.dao: 和底层数据操作有关的类,包括mongodb的操作和memcached的操作
    • cn.edu.hit.kit: 工具类,包括文件路径的获取,时间的获取以及log
    • cn.edu.hit.logic: 逻辑代码,处理服务器中的各种逻辑
    • cn.edu.hit.model: 数据模型,用来表示数据
    • cn.edu.hit.openfire: 操作openfire的函数,包括在openfire中新建用户,发送推送消息等
    • cn.edu.hit.servlet.messagelogic: 社交功能中关于状态的servlet
    • cn.edu.hit.servlet.relationshiplogic: 社交模块中的好友关系处理servlet
    • cn.edu.hit.servlet.usersimplelogic: 用户登录、注册、信息修改等等

hitren's People

Contributors

cen5bin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.