Stockeye 项目重新设计指引

将原先在软件中不可分割的包按功能、使用方式的思路重新设计,
可做成以第三方库为基准的组件有:股票的报价、股票的预警、股票的资产状况;股票的资讯;股票的图表库(基础K线图);股票的聊天库;
可高度组件化、不可分割的组件有:股票的数据库设计及实现;股票的定制查询库;

库的设计

1、关于股票报价、股票的预警、股票的资产状况

  • 核心对象举例
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
StockPriceObjList stockPriceObjList = StockPriceObjList.getInstance();
stockPriceObjList.init();
stockPriceObjList.addStock();
stockPriceObjList.addStockArray();
StockPriceObj obj = stockPriceObjList.get(0);
class StockPriceObj {
String sName;
String sCode;
boolean hasSettedAlert
int alertPrice;
long alertVolume;
int curPrice;
long curVolume;
}

more >>

学习 play! 框架(Part One)

Creating a new application

1
2
3
$ activator new my-first-app play-java
or
$ activator new # prompt

The standard application layout

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
app -> Application sources
└ assets -> Compiled asset sources
└ stylesheets -> Typically LESS CSS sources
└ javascripts -> Typically CoffeeScript sources
└ controllers -> Application controllers
└ Application.java
└ models -> Application business layer
└ views -> Templates
└ index.scala.html
└ main.scala.html
└ utils -> add your own packages here
build.sbt -> Application build script
conf -> Configurations files and other non-compiled resources (on classpath)
└ application.conf -> Main configuration file
└ routes -> Routes definition
public -> Public assets
└ stylesheets -> CSS files
└ javascripts -> Javascript files
└ images -> Image files
project -> sbt configuration files
└ build.properties -> Marker for sbt project
└ plugins.sbt -> sbt plugins including the declaration for Play itself
lib -> Unmanaged libraries dependencies
logs -> Standard logs folder
└ application.log -> Default log file
target -> Generated stuff
└ scala-2.10.0
└ cache
└ classes -> Compiled class files
└ classes_managed -> Managed class files (templates, ...)
└ resource_managed -> Managed resources (less, ...)
└ src_managed -> Generated sources (templates, ...)
test -> source folder for unit or functional tests
ApplicationTest.java
IntegrationTest.java

more >>