技術部流程草稿

前言

  • JAVA開發團隊,一些必要的基本知識和開發工具、環境、步驟的約定
  • 版本0.1,維護人:Jason,Email: huifeng.jiao@tqmall.com
  • 會不斷更新,全部人均可以提出有益的建議、貢獻內容,目標是打造一個簡潔、快速、靈敏的團隊工做流程

核心流程

  • 確認業務需求(誰,要作什麼)、階段目標和工期,結果是一句話,時間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
相關文章
相關標籤/搜索