技术部流程草稿

前言

  • JAVA开发团队,一些必要的基本知识和开发工具、环境、步骤的约定
  • 版本0.1,维护人:Jason,Email: [email protected]
  • 会不断更新,所有人都可以提出有益的建议、贡献内容,目标是打造一个简洁、快速、灵敏的团队工作流程

核心流程

  • 确认业务需求(谁,要做什么)、阶段目标和工期,结果是一句话,时间30分钟,定义为Envision阶段
  • 需求细化整理,需求方确认,结果是线稿图,必要的关键文案,时间半天,定位为Conception阶段
  • 产品Axure细化为产品Demo html演示,产品与需求方、开发负责人三方确认,定稿Demo,时间:不连续的3个工作日,定位为Logical Design阶段
  • 并行进行系统要建立在哪里,架构,数据来源,频率,请求特征,访问方式、验证等,准备线稿图,两个不连续工作日,定义为Physical Design阶段
  • 确定业务场景的业务流程和数据要求、接口名称、参数和返回数据,两个不连续工作日,定义为Develping阶段
  • Jira根据业务场景,设计测试场景、测试用例,准备伪数据、真实数据,开发实时跟踪bug,修复,定义为Testing阶段
  • 所有文档,都使用md撰写,作为项目的一部分,在git项目的根目录建立doc目录,存放,同步更新
  • 形成部署文档、维护和配置文档,根据文档,进行部署,成为Deploying阶段

系统开发约定

接口和验证

  • 接口方式是以后的工作方式,方便系统分拆、分布和异构之间的通信,目前是REST+json
  • OAUTH2方式验证

产品工作模式

  • Axure+md文档

前端工作模式

  • Sublime,git pull project,html,放置在web目录下,请求和写入同域名下的数据(java服务)
  • 和后台是REST通信,请求方式get,post均可,后台兼容,对于企业内部系统,设置域名限制即可,考虑更多安全,可以改造为OAUTH2
  • 基本的建议:sea.js,bootstrap,angular,bckkbone,这些需要技术部讨论,实践,选择,可以有多套针对不同应用的方案
  • 一段典型的前端代码:
我的代码

后端工作模式

典型开发

  • Idea+git,spring+mybatis,新增一个业务场景的开发步骤
  • 0.分为三个包,分别写对应代码,biz,dal,web
  • 1.dal:确认涉及的表,确认是否model和映射xml,dao,没有则手工建立或者使用mybatis-generator-core-1.3.2.jar
  • 2.biz:添加了对应service,完成基础的业务动作,例如
@Service
    public class CustomerService extends BaseServiceImpl {

      @Autowired
      private CustomerDao customerDao;

      public List
  
    getAllCustomer() {
        return super.getAll(customerDao);
      }
  
  • web:添加对应的控制器,控制业务流程,调用不同biz的service,对外暴露访问的uri,例如
@Controller
@RequestMapping(value = "/customer")
public class CustomerController {

  @Autowired
  private CustomerService customerService;

  @Autowired
  private ContactsService contactsService;

  @Autowired
  private UserInfoService userInfoService;

  @Autowired
  private CommunicationLogService communicationLogService;

  @InitBinder("customer")
  public void initBinder(WebDataBinder binder) {
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
    dateFormat.setLenient(false);
    binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
  }

  @RequestMapping(value = "")
  public String list(Model model, @PageableDefault(page = 1, value = 20, sort = "id",
    direction = Direction.DESC) Pageable pageable, ServletRequest request) {

    Map
  
    searchParams = new HashMap
   
    ();
    Page
    
      page = customerService.getPageCustomer(pageable, searchParams);

    List
     
       customerList = page.getContent();
    List
      
        contactIds = Lists.newArrayList();
    List
       
         userIds = Lists.newArrayList(); List
        
          ids = Lists.newArrayList(); for (Customer customer : customerList) { if (customer.getId() != null && !ids.contains(customer.getId())) { ids.add(customer.getId()); } if (customer.getContactsId() != null && !contactIds .contains(customer.getContactsId().longValue())) { contactIds.add(customer.getContactsId().longValue()); } if (customer.getCreator() != null && !userIds.contains(customer.getCreator())) { userIds.add(customer.getCreator()); } if (customer.getUserIdService() != null && !userIds .contains(customer.getUserIdService().longValue())) { userIds.add(customer.getUserIdService().longValue()); } } List
         
           contactsList = contactsService.getByIds(contactIds); return "customer/customerList"; } @RequestMapping(value = "/create") public String create(ModelMap model) { //省市区 model.addAttribute("customer", new Customer()); return "customer/customerForm"; } 
         
        
       
      
     
    
   
  

测试和部署

  • todo

测试和反馈

  • 基于JIRA

你可能感兴趣的:(开发流程)