问题 问答题

阅读以下关于网上交易系统的叙述,回答问题。
某电子商务公司进行机构重组后,业务规模和用户规模不断扩大,现有的在线销售系统已经无法满足公司的发展要求。公司决策层对现有系统的不足进行了认真分析,决定提高现有系统客户端访问速度,增强客户端的动态交互能力,并提高整个系统代码的模块化和重用性,最终完成网上交易系统的改造与升级。在对该系统的升级方案进行设计和讨论时,公司的系统分析师王工提出采用开发浏览器插件的方式提高客户端访问速度并增强访问体验,通过重写服务端代码提高系统的模块化和重用性。另外一位系统分析师李工则提出采用Ajax技术提高客户端性能,采用.JavaSciipt技术进一步增强客户端的动态交互能力,并在服务端采用JavaScript技术提高系统代码的模块化和重用性。公司的分析师和架构师对这两种思路进行讨论与评估,最终采纳了李工的方法。

请从系统的客户端开发和服务端开发两个方面说明为何没有采用王工提出的方法。

答案

参考答案:从客户端开发方面来看,由于现有浏览器都定义了符合自身要求、互不兼容的插件开发标准与运行形态,王工提出的“浏览器插件的增强方式”需要针对不同浏览器开发对应的插件,这样存在重复开发的问题且工作量巨大;另一方面,客户端功能增强插件必须下载并安装到浏览器上,对客户端要求较高且不方便。李工提出的“基于Ajax的客户端增强方式”只要求浏览器支持JavaScript,这一要求目前所有的浏览器都能够直接满足;另一方面,而Ajax技术则基于所有浏览器都支持的标准技术体系,不存在重复开发和互不兼容的问题。
从服务端开发方面来看,王工提出的“重写服务端代码”的方式虽然可能解决服务端模块化和重用性的要求,但是开发的风险和代价太大,在进行企业应用系统升级时一般不考虑完全重写,特别是服务端代码完全重写的方案。另一方面,李工提出的“在服务端采用JavaScript技术”能够与采用Ajax技术的客户端进行无缝集成,并且能够利用JavaScript与现有系统功能模块的互操作技术,采用JavaScript实现系统现有业务功能模块的动态组合和调用,增强系统功能模块的重用性。
综合上述两个方面,可以看出应该采用李工的解决方案。

解析:本问题考查的是Web应用系统的分析与设计,主要考查JavaScript在Web应用系统中的作用。
本问题考查Web应用系统升级时的方案选择问题。根据题干描述,系统升级的目的是提高现有系统客户端访问速度,增强客户端访问体验,并提高整个系统代码的模块化和重用性。因此需要根据问题描述,从客户端开发和服务端开发两个方面,结合三个升级目标进行全面论述。
从客户端开发方面来看,在线交易系统是一个典型的B/S系统,采用浏览器插件的客户端增强方法与基于Ajax技术的客户端增强方法相比,存在两个明显的缺陷:第一,客户端功能增强插件必须下载并安装到浏览器上,对客户端要求较高且不方便;而采用Ajax技术对客户端进行增强时只要求浏览器支持JavaScript,这一要求目前所有的浏览器都能够直接满足。第二,现有浏览器都定义了符合自身要求、互不兼容的插件开发标准与运行形态,采用浏览器插件的增强方式需要针对不同浏览器开发对应的插件,这样存在重复开发的问题且工作量巨大。而Ajax技术则基于所有浏览器都支持的标准技术体系,不存在重复开发和互不兼容的问题。
从服务端开发方面来看,王工提出的“重写服务端代码”的方式虽然可能解决服务端模块化和重用性的要求,但是开发的风险和代价太大,在进行企业应用系统升级时一般不考虑完全重写,特别是服务端代码完全重写的方案。另一方面,李工提出的“服务端JavaScript技术”能够与采用Ajax技术的客户端进行无缝集成,并且能够利用JavaScript与现有系统功能模块的互操作技术,采用JavaScript实现系统现有业务功能模块的动态组合和调用,增强系统功能模块的重用性。
综合上述两个方面,可以看出应该采用李工的解决方案。

综合
阅读理解

阅读理解

     Age plays a major part in people who are infected with cold, ie, in people who suffer from cold

infection.A study done by University of Michigan, has shown information that seems to be true for

the general population.Babies are the most cold infected group, generally more than six colds in their

first year.Boys have more colds than girls up to the age of three.After three, girls are easier to get

infected with cold than boys, and teenage girls get three colds a year to boys' two.The general cold

infections continue to get less into adults.Elderly people who are in good health have as few as one

or two colds every year.One interesting thing is found among people in their twenties, especially

women, who show a rise in cold infection, because people in this age group are most likely to have

young children.

      The study has also found that economy plays an important role as well.With more and more

income, the frequency at which colds are reported in the family is getting lower and lower.Families

with the lowest income usually sufferabout a third ally forces people to live in rooms more crowded

than rooms owned by richer people, and the crowding usually leads to more chances for the cold

virus to travel from person to person.Low income may also have an effect on our diet.Many scientists

believe that a poorer diet usually leads into more possibilities of cold infection.

1. Which of the age groups has the highest frequency of cold infection?

A. Small babies.  

B. Teenage boys.

C. Adult women. 

D. Elderly people.

2. The purpose of writing this passage is to________.

A. give the readers some tips to avoid cold infection

B. show a carefullmade study on cold infection

C. report the major reasons leading to cold infection

D. describe all the possible dangers of cold infection

3. How does economy play an important role in cold infection?

A. Families with lower income suffer less from cold infection.

B. People who have lower income enjoy living in crowded rooms.

C. Rich families can have better nutrition and never get infected.

D. People with higher income have fewer chances of infection.

4. From the passage we can infer that________.

A. age is the only important factor that connects with colds

B. families with the highest income will more easily get infected

C. people have lower frequency of infection as they grow older

D. a better diet may help people to fight against cold infection