web人力资源信息系统开发日志②
第二阶段开发(2017年4月28日—5月20日):
开发内容:①项目框架设计、目录树形结构、数据库设计②编写Web Apps安装程序,检测运行环境、创建数据源及数据库用户信息并生成PDO配置文件(接口常量、抽象方法、数组、函数)、导入系统原始数据表③封装项目应用类库lib包括初始化系统配置类,初始化自动加载PDO数据库操作类静态单例模式或工厂模式、上传导入文件类、前端UI框架分页类、图片上传类等④首页main.php与admin初始化、默认包含搜索路径设定及自定义错误处理函数配置文件、单一入口文件index.php的相关机制⑤首页与内页、导航菜单功能模块细分及其运行机制
开发思路:按《人事工资查询系统》规划布局和先后开发顺序,从数据库设计开始,系统初始化、封装类、静态单例模式实例化运用为主线,用面向对象开发机制优化代码,以整体框架UI界面友好大气、功能模块稳定可靠、动感炫酷、直观简捷、上手容易、操作方便的开发思路来完成全部开发任务
方法技巧:①欲速则不达。不要急于求成,先不忙着开发项目框架,在着手开发每个功能模块之前先学习相关知识,用W3CSchool手册指导实验单个功能模块源代码,功能测试通过后再深度二次开发集成项目功能模块。磨刀不误砍柴工。边开发边学习“充电”才是王道②注重黑白盒测试。新编写的源代码或收集的资料必须先进行“黑盒测试”,功能可行并达到预期目的,再集成大的功能模块,过程之中不断进行“白盒测试”及时查找bug并快速干掉,确保系统安全稳定可靠运行。总之,对于准备在开发平台集成的源代码或模块,必须是拿准了、掌握了,确保性能稳定可靠,再优化精简,才整合集成项目有机组成部分③游离态法则管理功能模块。在学习平台中调试的待集成功能模块必须用文件夹单独存放其文件或子目录,便于结构化编程在开发平台中集成各个相对独立的功能模块。
启发体会:①规范命名规则。中文等特殊字符非ASCII(American Standard Code for Information Interchange,美国信息交换标准代码),不能直接用来作文件名、目录名、字段名、关键字等等,否则,开发过程中会因这些常识性小问题而犯大错,给系统调试带来莫名其妙的一连串问题而降低开发效率②业术有专攻,充分利用现成资源。后台开发学习专注PHP操作MySQL方面的内容要多些,不要为前端UI设计耗费太多精力和时间,“拿来主义”盛行的当下,直接学习运用TA人的好东东,只要不影响系统整体框架风格,就不必要重复造轮子,博采众长也算是最佳整合资源的好办法,这为系统开发大大节约时间,提高整体开发效率,降低开发成本③配置错误处理。在入口文件引用composer安装的第三方出错捕获处理程序whoops,给用户提供友好交互界面④直接使用Medoo数据库框架或基于原生PDO数据库抽象层二次封装操作MySQL应用类,必须从封装Pdo_MySQL类开始就养成熟练掌握PDO相关语法及操作方法。如今开发的PHP Web Apps必须跟上HTML5+CSS3+PHP7的新潮流,这肯定会对直接使用原有稳定运行的MySQLi封装类这些早期源代码资源带来不小冲击,也浪费原有系统资源要重新编写基于Pdo_MySQL引擎代码,但应运而生的PHP7新潮流开发,既然起步晚就要起点高,更何况基于PDO开发的新系统起码能在PHP5.4及其以上环境下稳定运行,不增加ISP运行成本,也不影响公司正常投入使用⑤活学活用清晰稳定的静态方法。从安装自动生成自定义常量或前端静态页面显示,相对后台交互式动态处理而言,静态方法通常是工具,静态的常量服务于抽象的变量,常量因为不知道作用谁,所以需要传递一个“作用于谁”的参数,对方无论是一个数组,还是一个对象(里面有多个属性和方法也是具有相对静态功能),然后传递处理函数,才知道了是谁在调用,也就不需要传递了,完成静态任务⑥坚持模块化、结构化编程或函数式编程法则。但凡项目功能模块既稳定可靠易维护,又清晰可读又可爱,就必须力求一个封装类完成一个逻辑操作任务,一个函数只干一件事,一个模块只完成一项业务任务,模块化开发的最大特色就是让各功能模块守本分尽其责,分工不分家,共同展现项目个性化特点,实现既定目标。学以致用,精进极致。高效开发,轻松编程。
Felicia
2019年7月23日 下午9:26
What’s Taking place i’m new to this, I stumbled upon this I have discovered It absolutely helpful and it has helped me out loads.
I’m hoping to contribute & assist other users like its helped me.
Good job.
Candace
2019年7月23日 上午8:00
Hello! I’m at work browsing your blog from my new iphone 4!
Just wanted to say I love reading your blog and look forward to all your posts!
Keep up the great work!
Epifania
2019年7月22日 上午10:44
Magnificent beat ! I would like to apprentice even as you amend your web site, how can i subscribe for a blog
site? The account aided me a appropriate deal. I had been a little
bit acquainted of this your broadcast provided brilliant clear idea
Jeanette
2019年7月21日 下午7:21
Your style is very unique compared to other people I have read stuff from.
Thank you for posting when you’ve got the opportunity, Guess I’ll just bookmark this web site.
Shantae
2019年7月21日 下午3:12
Hmm it seems like your blog ate my first comment (it was extremely long) so I guess I’ll
just sum it up what I had written and say, I’m thoroughly enjoying your blog.
I too am an aspiring blog writer but I’m still new to everything.
Do you have any helpful hints for rookie blog writers?
I’d genuinely appreciate it.
Jewell
2019年7月21日 下午2:29
Today, I went to the beachfront with my kids.
I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put the shell to
her ear and screamed. There was a hermit crab inside and it
pinched her ear. She never wants to go back! LoL I know this is entirely off topic but I had
to tell someone!
Vickie
2019年7月20日 上午6:28
Hmm it appears like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying
your blog. I too am an aspiring blog blogger
but I’m still new to the whole thing. Do you have any suggestions
for newbie blog writers? I’d definitely appreciate
it.
Esther
2019年7月18日 下午6:04
Hi there, this weekend is nice in support of me, because this time i am reading this wonderful educational
article here at my house.
Bettie
2019年7月18日 下午3:46
Hi, every time i used to check weblog posts here early in the morning, because
i love to learn more and more.
Augusta
2019年7月17日 上午2:17
Hello, I enjoy reading through your post. I
like to write a little comment to support you.
Gustavo
2019年7月16日 下午1:50
all the time i used to read smaller content which also
clear their motive, and that is also happening with this post which
I am reading at this time.
Toney
2019年7月11日 下午11:57
I savour, cause I discovered exactly what I used to be looking for.
You’ve ended my 4 day lengthy hunt! God Bless you man. Have a great day.
Bye
Lea
2019年7月11日 下午4:33
If some one wants expert view regarding blogging and site-building
then i advise him/her to visit this weblog, Keep up the fastidious work.
Lloyd
2019年7月11日 上午3:38
It is actually a great and useful piece of information.
I am happy that you just shared this useful information with us.
Please keep us up to date like this. Thank you for sharing.
Malinda
2019年7月5日 上午9:03
I constantly spent my half an hour to read this web site’s content
all the time along with a mug of coffee.
Christin
2019年6月28日 下午10:03
It’s in reality a nice and useful piece of information. I’m glad that you
simply shared this helpful information with us. Please stay us informed like
this. Thank you for sharing.