ThreadPro v2.0 - 多线程调度基础类库(200分)

  • 主题发起人 主题发起人 99koo
  • 开始时间 开始时间
9

99koo

Unregistered / Unconfirmed
GUEST, unregistred user!
一。什么是 ThreadPro ?
ThreadPro 是本人开发的一套用于多线程编程的 Delphi 基础类库,基于 Delphi 的 TThread 封装了更实用,更结构化的 TThreadTask 线程类。并且写了一个 TThreadPool, 它是 TThreadTask 的管理类,其中运用了面向对象的方法,使用了继承和多态,实现了一个可设置并发任务数的线程池。继承这些基类你可以编写任意自定义的基于这种模型的应用,让你的程序具有强大而安全的多线程处理能力。本人还额外封装了一个 THTTPtask 类,该类是基于 INDY9 的 IDHTTP 进一步封装而成,并使用了一个第3方的压缩处理库,使 THTTPtask 如同浏览器那样,完全支持 GZIP,令你编写强大的 HTTP 多线程应用变的得心应手。
二。2.0 版本较之前有什么不同 ?
1。取消了TThreadTask中不安全的强行终止线程的成员方法,改用切断事件关联的方式。
2。修正了TThreadPool中的内存泄漏问题。
3。加强和优化了THTTPtask的成员方法。
4。新增了线程池的“瞬死”运行模式(主要用于穷举破解)
5。增加了线程池终止状态进度条成员,更准确的跟踪线程运行状态
6。完善了DEMO程序,令你能更快速的上手。
更多请自行查看新版源码...
三。如何安装 ThreadPro ?
ThreadPro v2.0 只是 library 而不是 component ,因此不需要安装也无法被安装,使用时请将解压后的 lvkzlib 和 threadtask 目录添加到您IDE的 Tools-> Environment Options-> Library 的 Library Path 中即可,您也可以直接将相关文件拷贝到您的工程中。
四。你是否提供技术支持? 我能在商业项目中使用该类库吗?
使用本类库需要你具备一定的面向对象的编程能力,对于初学者,可能比较难以理解。请仔细看DEMO中的注释。抱歉本人不提供相关的技术支持服务。请不要加本人的QQ咨询相关问题!但您可以在本站发表评论或留言,本人将尽量为您解答。 ThreadPro 是完全开源的,您可以在商业项目中免费使用本类库,没有任何限制。如果您能优化并修正其中的不足之处,请记得发一份修改后的版本给我,谢谢您的支持。
您可以随时从下面的链接下载到最新版本的 ThreadPro
http://www.flying99koo.com/ThreadPro.rar
ThreadPro v2.0 - Multithreading the Delphi way
http://www.flying99koo.com
 
雷锋级的牛人.
一定要顶.
先下一份慢慢看.
谢谢.
 
用过了,正在学习源码,很棒
谢谢
 
下载了,不懂。帮顶。接分。哈密瓜。
 
20楼散分
 
帮顶,线程池好技术啊
 
抢位。拿分。LUCKY快来看
 
自己顶一下
 
顶,好东西
 
呵呵,我要学习学习啦
 
好样的。
 
类封装不理想。。。
HTTPtask干嘛要放到ThreadPool里
如果只想用ThreadPool和ThreadTask
现在就算不用HTTPtask功能,还得引用一堆垃圾文件
注释少得可怜。。。
人家想用你这个东东,还得完整的去分析结构才知道怎么用
DEMO 的三个例子又不分开为三个工程
搞得不知那些代码是哪一个例子里的
 
Project Information
For this project, there are 2 objects need to be designed: Employee and Department. The data is saved into MySQL database server.
There are two roles – admin(can list/add/update/delete employees) and user(can only list the employees).
To simplify the project, the following is the persisted object definition:
Employee:
id (long)
employeeId (String)
name (String)
department (Department)
description (String)

Department:
id (long)
name (String)
description (String)
Initial Department Information:
HR
IT
Marketing
R&D(Research and Development)
Business Rules:
An employee must belong to one and only one department
A department may have many employees
EmployeeId is used to identify employee, it's unique in the system and cannot be empty. EmployeeId looks like T00001. Even if one employee is deleted, the employeeId cannot use again.
Employee names are unique in one department
Employee name can not be empty, and the max length of employee name is limited to 20 characters.
HR department can only have 5 employees at most
Advanced Features:
Display user picture in the page, and store it in database.
Support full text search.
Support web services.
Design a common data grid to display all the list information.
Fancy Features:
Support asynchronize submition. All pages are partial refresh. (AJAX)
Datagrid that can support edit directly.
Advanced search engine design.

General End User Features
This section describes the general features that end users would be able todo
.
Each user has a privilege level associated with him/her. User login authen
tication will bedo
ne in database server as level 1 and level 2 requirement.[Refer to section “Duration for different technologies used in the project“ for details.]
Using a browser, a user logon/logoff – as the role of either “admin” or “user”.
After logon, the “admin” can
Create Employee information
Update Employee information
Delete Employee information
List Employee information
View Employee detail information
Search Employee
Search Department
After logon, the “user” can
List Employee information
Search Employee
View Employee detail information
Detailed Description of Each Web Page
1.List Employee Information
This feature is available for both “admin” and “user” role. List all employees by default. However, the user should be able to select one department from the dropdown list which he wants to list the employee in this department. There will be “All” in the “department” dropdown list to list all the employees.
List 10 employees for each page
Employee Id, Employee Name, Department Name
click "Employee Name"/"Employee Id"
of an employee in the grid, the page will forward to show employee detail page.
each row have a link "Delete"
to delete this employee information.
each row have a link "Edit"
to edit the employee information.[See "Edit Employee Information"
description]
Sortable: by "Employee Id", "Employee Name"
or "Department Name", desc and asc.
Pagenation:
Click "Next"
to see the next page, this feature is enabled only when there are employees in next page
Click "Previous"
to see the previous page, this feature is enabled only when there are employees in previous page.
Click "First"
to see the first page.
Click "
end"
to see the last page.
Automatically list the employee when changing the department from the dropdown list in the top of the page.
Provides "Create Employee"
link for the user to enter the create employee page [see "Create Employee Information"
description]
2. Create Employee Information
After the admin click the "Create Employee"
link from the list page, this page will display.
Page elements
textbox for "Employee ID"
textbox for "Employee Name"
dropdown for "Department"
If create successfully, the page will forward to "List Employee Information"
Page.
If create failed, the page will stay in the "Create Employee Information"
with the original information that user input, and display the error message in the top of the page.
Provide the "Cancel"
link to back to the "List Employee Information"
Page.
Validation on employee information is to bedo
ne in this page.

3.Edit Employee Information
After the admin click employee name in the list page, this page will display.
Automatically display the employee information to the edit form
The user can update employee name information.
The user can be moved to another department.
If updating successfully, the page will forward to "List Employee Information"
Page.
If updating failed, the page will stay in the "Edit Employee Information"
with the original information that user input, and display the error message in the top of the page.
Provide the "Cancel"
link to back to the "List Employee Information"
Page.
Validation on employee information is to bedo
ne in this page.
Check for concurrent update of employee information by more than one user logged on as Admin.
4.Delete Employee Information
After the admin click "Delete"
link in the row of the list page.
It will popup a confirm window for the user to confirm the operation.
”ok“ to delete this employee information.
”Cancel"
to return the page.
if deleting successfully, referesh the list page.
if deleting failed, display the list page with an error message.
5. View Employee detail Information
After the admin click the "View detail"
link from the list page, this page will display.
Page elements
Employee Id
Employee Name
Department
Description
Photo (*Advanced feature)

Project Deliverables
The project is considered complete when the following deliverables have been fulfilled.
Project Plan
List of tasks to be completed each day
Functional Specification
Code Complete
Well commented/documented code
JavaDoc style comments for each method
Internationalization (I18N)
Automated Unit Test Plan and Execution of Test Plan
QA Questionnaire
QA Test Plan and Execution of Test Plan
Software deliverable
Release build
Release notes
Feature Complete Checklist
List of bugs (closed and open)
Bug Report (use the template found in Engineering Handbook)
Required Design Choices
Struts MVC - http://struts.apache.org/
Version 1.2.9
JSPs, Tags, Actions, ActionForms, Validation
Internationalization(I18N) is required - String literals that can be localized later (visible labels, error messages, informational messages, etc.) must be in Java resource bundle.
Hibernate OR mapping – http://www.hibernate.org
version: 2.1
Entity Bean Vs. Hibernate
Hibernate in JBoss
[Optional] Xdoclet - http://xdoclet.sourceforge.net/xdoclet/index.html
version: 1.2.3
To generate hibernate mapping file, EJB interface.
Logging
Log4J - http://jakarta.apache.org/log4j/docs/index.html
Unit Test
Junit 3.8.1
Automated Testing
HttpUnit 1.6.
JDK 5.0 Update 7 http://java.sun.com/j2se/1.5.0/download.jsp
Jboss 4.0.1 http://labs.jboss.com/portal/jbossas/download
MySQL 5.0.22 http://dev.mysql.com/downloads/mysql/5.0.html
ANT 1.5.4 http://ant.apache.org/

Advanced Design Choices
Performance testing
JUnitPerf – http://www.clarkware.com/software/junitperf-1.9.1.zip version 1.9
Load balancing
Apache HTTP Server - http://httpd.apache.org/, Version 2.2
Appache plugging module - mod_jk http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/, Version 1.2.15

J2EE Patterns - http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html
Duration for different technologies used in the project
The project can use different technologies to implement the same functionalities.
Level
1
2
3
Duration
3 weeks
4 weeks
5 weeks
Technologies to be used

JSP/Servlet/Java Bean
Log4j
Junit
HttpUnit

QA
Struts
Session BeanHibertnate/Entity Bean
Log4j
Junit
HttpUnit
Ant
Delegate Pattern
Service Locator Pattern
Two of the Advanced Features
QA

Struts
Session Bean
Hibertnate/Entity Bean
Log4j
Junit
HttpUnit
Ant
Delegate Pattern
Service Locator Pattern


Two of the Advanced FeaturesTwo of the Fancy Features
QA
Tips and Hints
Be sure to read Engineering Handbook for the Functional Specification template, Bug Report template, Unit Test Plan template, and QA Test Plan template, and definition of Software Release Build and Release Notes, I18N, and Feature Complete.
Simplify the project by choosing default configurations of the 3rd party technologies as much as possible.
For deploying WAR file for JSPs and Servlets, simplify it by deploying it in the default directory, e.g., C:/jboss/server/default/deploy
If you have good idea about the page flow, design and have more fancy idea want to add in, please discuss with your trainer. Please be active!
You can get significant benefit from a good idea!
QA Questionnaire
What kind of QA testing have you participated in?
Please defined what is that mean todo
a “functional testing”? What is the first thing you typicallydo
before you start testing?
What are the components of a test plan?
What's a 'test case'? Provide an example.
What is black box/white box testing?
What should bedo
ne after a bug is found?
What are the differences between load and stress testing?
Give an example of most interesting bug that you found in the past.
Have you everdo
ne any automation for QA?? Please explain what kind of automation and what tools were used.
What is verification? Validation?
Whatdo
youdo
if the application has functionality that wasn't specified in the requirements?
 
后退
顶部