文档库 最新最全的文档下载
当前位置:文档库 › Overview of Some Patterns for Architecting and Managing Composite Web Services

Overview of Some Patterns for Architecting and Managing Composite Web Services

Overview of Some Patterns for Architecting and Managing Composite Web Services
Overview of Some Patterns for Architecting and Managing Composite Web Services

Overview of Some Patterns for Architecting and Managing Composite Web Services

B.BENATALLAH

School of Computer Science and Engineering,UNSW,Sydney NSW2052,Australia M.DUMAS

Centre for IT Innovation,QUT,Brisbane QLD4001,Australia

M.-C.FAUVET

School of Computer Science and Engineering,UNSW,Sydney NSW2052,Australia F.A.RABHI

School of Information Systems,UNSW,Sydney NSW2052,Australia

and

QUAN Z.SHENG

School of Computer Science and Engineering,UNSW,Sydney NSW2052,Australia

1.INTRODUCTION

Web Services are loosely coupled Internet-accessible software entities delivering functionalities provided by business applications and processes.Examples of Web services include Internet banking,search engines,auctioning sites,supply chain management,etc.The emergence of technologies and standards supporting the development of Web services,such as J2EE,.Net,SOAP,UDDI,and ebXML (see[https://www.wendangku.net/doc/1217127388.html,])has unleashed a wave of opportunities for enterprises to form alliances by composing their services in order to provide“one-stop shops”for their customers[Casati and Shan2001].However,there is still a need for principles,

10·Benatallah et al.

methodologies,and design techniques to architecture and manage composite Web services based on these emerging technologies.

This paper takes the viewpoint that an important step in this direction is the emergence of relevant patterns at various levels of granularity(i.e.analysis,archi-tecture and design patterns,as well as idioms).Accordingly,the paper identi?es a collection of prospective patterns addressing various activities in the life cycle of a composite Web services(Section2).The paper then overviews some of these patterns(Sections3,4,5,6),and discusses ongoing and future work(Section7).

2.PATTERNS FOR ARCHITECTING AND MANAGING COMPOSITE SERVICES The life cycle of activities related to composite services is illustrated in Figure1. Brie?y stated,these activities are:

—Wrapping native services:ensuring that a native/proprietary service(e.g.legacy application)can be invoked by other Web services regardless of its underlying data model,message format and interaction protocol.

—Service advertisement/discovery:generating service descriptions and publishing these descriptions in registries for subsequent discovery.

—Setting outsourcing agreements:negotiating,establishing,and enforcing contrac-tual obligations between partner services.

—Assembling composite services:identifying services to realise a given composition, specifying their interactions at a high level of abstraction,and deriving external descriptions and service level agreements for the resulting composite services.—Executing composite services:enacting composite service speci?cations w.r.t exe-cution models satisfying certain practical constraints(e.g.e?ciency,availability).—Monitoring composite service executions:supervising composite service execu-tions(e.g.,logging service invocations,state changes,and message exchanges)in order to detect contract violations,measure performance,and predict exceptions.—Evolving services:adapting composite services to accommodate organisational changes,to take advantage of new technological opportunities,or to take into account feedback from monitoring.

https://www.wendangku.net/doc/1217127388.html,posite Service Life Cycle

ACM SIGecom Exchanges,Vol.3,No.3,August2002.

Patterns for Composite Web Services ·11

Several technologies have been developed to support the various activities of the service composition life cycle.The problem is that (mostly for historical reasons)these technologies tend to provide overlapping features.In addition,they require intimate knowledge of several low-level features associated with the supporting infrastructure (e.g.operating systems,networks,and programming languages).As the infrastructure is modi?ed or upgraded,software maintenance becomes an issue.We believe that the analysis and design activities related to service composition should be ?rst conducted at a high level of abstraction,primarily addressing the business requirements,and design issues at the architectural level.In accordance with standard software engineering practice,lower level design issues and the choice of adequate technology should be treated separately (at the implementation stage).Accordingly,we propose seven analysis/design patterns corresponding to the above activities:Service Wrapper ,Composite Service Speci?cation ,Service Discovery ,Service Negotiation ,Composite Service Execution ,Service Monitoring and Service Evolution .Due to the emerging nature of the topic,these patterns are in early stages of development and validation,and should rather be called proto-patterns .Composite Service Elementary Service Wrapper Flow Spec.Control and Data Pattern Service Composition Service

Wrapper

Pattern Discovery Service Discovery Pattern Service Service Component Contract Association Class

Association

Specialisation

Class

Pattern

Native Service Composite Scheduler Service Tracer Service Trace Analyzer 111has 1*accessed through wraps 11derived from 1binds to 1Negotiation Service Pattern produces *

Legend:

11***makes query c o m p o s e d o f invokes Service Execution Pattern

1invokes **1reports to 11feeds *

1Service Monitoring Pattern Fig.2.Patterns for Composing Services

The structural elements brought in by these patterns and the dependencies be-tween them are summarised by the UML [Booch et al.1999]class diagram depicted in Figure 21.Each pattern comes with a range of implementation strategies that ground it to the underlying technology while explaining the trade-o?s involved and

12·Benatallah et al.

the possible optimisations.In this paper,we overview the?rst four patterns only.

A detailed description of all the patterns are given in[Benatallah et al.2002,?rst].

3.SERVICE WRAPPER PATTERN

Description.Interoperation with both internal and external Web services is cen-tral because composite Web services are built on top of heterogeneous and otherwise independent Web services.What is needed is to abstract and to hide the hetero-geneity of proprietary Web services built on top of(e.g.)CORBA,J2EE,.Net. Solution.The purpose of the Service Wrapper Pattern(SWP)is to separate a pre-exiting service speci?cation(e.g.,service’s interface)from its implementation (e.g.,a standalone program,an ERP application,or a work?ow).A service wrapper may be composed of a:

—communication manager:Web services may use di?erent communication proto-cols(e.g.,HTML/HTTP,SOAP/HTTP,Java RMI,CORBA IIOP,and DCOM). The communication manager should support the translation of messages between heterogeneous communication protocols,for example through systematic trans-lation to and from a common protocol(e.g.,SOAP).

—security manager:Web services may need to cross corporate?rewall and security systems in order to access partners’services.The purpose of this module is to handle security issues including single mutual authentication corporate wide,?ne grain authentication,and access auditing and authorisation,communication integrity,con?dentiality,and non-repudiation.

—content manager:It is likely that Web services use disparate information formats and semantics.For example,if an internal application uses xCBL to represent business documents,and this application needs to interact with an external ser-vice which expects documents in cXML[Bussler2001],the conversion between these two formats should be handled by the content manager.—conversation manager:is concerned with the conversational interactions(i.e, joint business process)among Web services.For instance,a given service may require a login procedure to be performed prior to any access to the service’s functionalities,while another service with similar capabilities,may provide access to some functionalities of the service without password veri?cation,and only require a full login procedure for accessing other functionalities. Implementation aspects.The issues of security and communication can be han-dled using established or emerging protocols(e.g.,HTTP-S,SAML).The issue of handling document format heterogeneity at the syntactical level can be addressed to some extent by existing content-management technologies(e.g.XML-based on-tologies such as cXML and xCBL).However,the issue of interoperability in the presence of semantic heterogeneity is still an open problem[Brodie2000].

While B2B standards de?ning conversational protocols are emerging(e.g.,Roset-taNet’s PIPs),the issue of mapping a conversation in a given protocol into an “equivalent”conversation in another protocol still needs to be addressed on a case by case basis.Application integration solutions(e.g.,TibcoSoftware’s TIB/Active Enterprise Suite,CrossWorlds)provide abstract interfaces,remote operation in-vocations,connectors for back-end systems,etc.[Brodie2000].By doing so,they ACM SIGecom Exchanges,Vol.3,No.3,August2002.

Patterns for Composite Web Services·13 provide the connection and coordination of data and operations among applications. Some frameworks(e.g.eCO)use XML-based messages in documents to describe the interactions that make up the B2B processes[Dogac and Cingil2001]. [Sayal et al.2002]describe an approach to extend existing work?ow technology in order to handle both document format and conversational protocol heterogeneity in B2B interactions.Speci?cally,given a structured description of a B2B protocol standard(e.g.,a description of a RosettaNet PIP in XMI),a process template is generated which encodes the sequencing of activities that is required in order to handle a conversation in that standard.At runtime,this work?ow interacts with external service providers through a conversation manager,which handles the conversion of internal work?ow variables into external documents.

4.SERVICE DISCOVERY PATTERN

Description.The space from which users can locate Web services may be large and highly dynamic.In particular,on-the-?y B2B integration is better supported by establishing online catalogues for Web services.These catalogues should provide capabilities for brokering and dynamic collaboration.Instead of statically binding Web services to each other,catalogues should allow to dynamically discover new Web services with the right set of features and bind them at run time.Selecting a partner should consider the available Web services,characteristics,organisational policies and resources that are needed to accomplish the integrated Web service. Solution.The purpose of Service Discovery Pattern(SDP)is to facilitate the automatic discovery of services.Given that services are described using software-interpretable information(i.e,using meta-data or ontology languages),this facility provides means(e.g.,service discovery engine)to locate services based on con-straints over their meta-data.

Implementation aspects.A number of industry e?orts to de?ne standards that provide common building blocks for Web service discovery and integration emerged recently including UDDI(Universal Description,Discovery,and Integra-tion),WSDL(Web Services Description Language),and ebXML(see for exam-ple[Casati et al.2000]).UDDI provides an XML-based registry for advertising businesses and services.The advertisement and discovery of services and busi-nesses in UDDI exploit keywords categorisation.An advertisement of a business includes name,key information,categorisation,and o?ered services.An adver-tisement of a service includes name,key information,categorisation,and multiple bindings.WSDL is an XML-based language for describing the content and capa-bilities of Web services.Services can be de?ned using abstract terms.Bindings between abstract descriptions and concrete implementations(e.g,speci?c data for-mats and protocols)can also be de?ned.ebXML has similar features to UDDI. However,ebXML focuses on business processes from a work?ow perspective.Other approaches to service advertisement and discovery include IETF’s Service Location Protocol and Sun Microsystem’s JINI.

In any case,it is essential to consider that services are characterised by numerous functional and non-functional parameters[O’Sullivan et al.2002].Hence,search interfaces over service registries should be able to handle complex criteria.

ACM SIGecom Exchanges,Vol.3,No.3,August2002.

14·Benatallah et al.

5.SERVICE NEGOTIATION PATTERN

Description.A service has a number of interrelated parameters.A prospective consumer and a provider need to set up the values of these parameters through a mutual agreement i.e.,a service contract.This agreement is the result of a tradeo?between the possibly con?icting constraints and preferences of each party.The parties are generally reluctant to disclose these preferences to each other. Solution.The purpose of the Service Negotiation Pattern(SNP)is to abstract contracts for a given service into contract templates to avoid building contracts from scratch.A contract template is a function which generates a contract given a set of contract parameter values,which capture the variable part of a class of contracts. The negotiation between a prospective consumer and a provider can be manual, semi-automated,or fully automated.In general,the degree to which a negotiation can be automated depends on the nature of the negotiable parameters.If the number of parameters is?xed and their values are numerical,a high degree of automation can be attained[Jennings et al.2000].In the extreme case,when only one parameter is variable,and the domain of this parameter can be modelled as a set of numbers(e.g.,the price),the negotiation can be reduced to an online auction. If new parameters can be introduced during the course of a negotiation,or if the domain of the parameters are not known in advance,then the negotiation must involve human actors.Still,even if human actors carry out the actual negotiation, their interactions and their decision-making can be facilitated by software tools. Implementation aspects.In the general case,the e?ective representation and negotiation of contracts for service integration and provisioning remains an open issue.Currently,service integration platforms such as Microsoft’s BizTalk and Extricity’s Alliance,do not address the negotiation of service contracts.On the other hand,negotiation tools such as Attricom and Ozro Negotiate,which provide basic support for online negotiations,do not take into account the speci?cities of service contracts.

https://www.wendangku.net/doc/1217127388.html,POSITE SERVICE SPECIFICATION PATTERN

Description.The fast integration of business processes is an essential requirement for organisations to adapt their business practices to the dynamic nature of the Web. Business partners may need to form permanent(long term)or temporary(short term)relationships.In the former type of relationship,components are known in advance and alliances are statically de?ned.The purpose of the Composite Service Speci?cation(CSS)Pattern is to facilitate this type of relationship.The latter form of partnership does not assume an a priori trading relationship among partners and will be the subject of another pattern(Service Discovery Pattern).

Solution.We distinguish between elementary and composite services.An el-ementary service is a pre-existing service whose execution is entirely under the responsibility of the service wrapper pattern.A composite service is recursively de?ned as an aggregation among other services whether composite or elementary, which are referred to as component services.The purpose of the CSS Pattern is to specify the interactions among the components of a composition service without re-ferring to any implementation or execution model.The speci?cation of interactions ACM SIGecom Exchanges,Vol.3,No.3,August2002.

Patterns for Composite Web Services·15 among services must include descriptions about both control-?ow and data-?ow. The control-?ow establishes the order in which the component services should be invoked,the timing constraints,the signals that may interrupt or cancel their exe-cution,etc.The data-?ow captures the?ow of data between component services.

Implementation aspects.A natural way of describing the control-?ow and data ?ow of composite services,is to use an existing process-modelling language.The Work?ow Management Coalition(WfMC)has de?ned a set of glossaries and no-tations that encompass many of the concepts and constructs provided by existing work?ow speci?cation languages.Unfortunately,these e?orts have had a very lim-ited impact.To add to the lack of uniformity,most of the existing work?ow speci-?cation languages,including the one de?ned by the WfMC,lack formal semantics, making it di?cult to compare their capabilities and expressiveness in order to make an objective choice between them[Muth et al.1998].More recently,industry initia-tives such as WSFL and XLANG are emerging as promising alternatives to specify the control and data-?ow dependencies between the components of composite ser-vices(e.g.,the composite service’s choreography).

Cross-organisational work?ows[Yang and Papazoglou2000]focus on the automa-tion of business processes that interconnect and manage communication among dis-parate systems.In this approach,the description of the composite service can be de?ned collaboratively among partners.

Component-based frameworks[Dogac1998;Brodie2000]support the connec-tion and coordination of data and operations among services.The description of a composite service is worked out and agreed to o?ine.After that,the global de-scription of a composite service is spread through the implementation code of every component.Thus the composition of services in this approach is mainly ad-hoc. In document-based approaches such as EDI and XML-based frameworks[Dogac and Cingil2001;Yang and Papazoglou2000;Casati et al.2000],the interactions among the components of a composite service are speci?ed by the shared document de?nitions.The components are interconnected in terms of agreed upon documents. Interactions between components may be carried out according to a speci?c B2B standard(e.g.,EDI,OBI,RosettaNet,cXML)or bilateral agreements.

7.CONCLUSIONS AND DIRECTIONS

Web service composition is a promising area of research and development.From a research point of view,the key issues that need to be investigated relate to the facilitation of Web service composition in large,autonomous,heterogeneous,and dynamic environments.For B2B E-commerce to really take o?,there is a need for e?ective and e?cient means to search,abstract,compose,analyse,execute,and evolve Web services in appropriate time-frames.

In this paper,we provided an overview of several proto-patterns for architecting and managing composite Web services.These proto-patterns aggregate results from previous e?orts in the area of Web service composition,into guidelines for address-ing design issues related to the various activities in the life cycle of a composite service.This contribution is a starting point towards a pattern-oriented service composition methodology.The solutions provided by the proto-patterns need to be validated through the implementation of supporting tools and the development of

ACM SIGecom Exchanges,Vol.3,No.3,August2002.

16·Benatallah et al.

case studies,and re?ned according to the feedback obtained from this validation. As a step further in this direction,our ongoing work in the context of the SELF-SERV project[Benatallah et al.2002,second]aims at providing high-level mod-elling constructs and supporting tools to search,compose,execute,monitor,and evolve Web services.SELF-SERV provides a framework in which services can be declaratively composed and the resulting composite services can be executed in a peer-to-peer way within a dynamic environment.One of the main objectives of the project is to devise novel integration techniques that allow fast development of new services from existing ones.Appropriate information discovery techniques will be used to e?ciently locate and exploit services in a dynamic and constantly growing environment.Advanced service management techniques will monitor services,dy-namically adapt their components,and relationships,and bring them to mutually acceptable states.These techniques will also support peer-to-peer collaborative service execution.

REFERENCES

Benatallah,B.,Dumas,M.,F auvet,M.-C.,and Rabhi,F.2002.Towards patterns of web services composition.In Patterns and Skeletons for Parallel and Distributed Programming,

F.Rabhi and S.Gorlatch,Eds.Springer Verlag,London,UK.

Benatallah,B.,Dumas,M.,Sheng,Q.,and Ngu,A.2002.Declarative Composition and Peer-to-Peer Provisioning of Dynamic Web Services.In Proc.of the International IEEE Conference on Data Engineering.San Jose CA,USA.

Booch,G.,Jacobson,I.,and Rumbaugh,J.1999.The Uni?ed Modeling Language user guide.

Addison-Wesley.

Brodie,M.2000.The B2B E-commerce Revolution:Convergence,Chaos,and Holistic Com-puting.In in Information System Engineering:State of the Art and Research Themes,S.

Brinkkemper,E.Lindencrona,and Solvberg(eds.).London.

Bussler,C.2001.B2B protocol standards and their role in semantic B2B integration engines.

Bulletin of the Technical Committee on Data Engineering24,1.

Casati,F.,Georgakopoulos,D.,and Shan,M.,Eds.2000.Proceedings of the2nd VLDB Workshop on Technologies for E-Services.Springer Verlag,Rome,Italy.

Casati,F.and Shan,M.-C.2001.Dynamic and adaptive composition of https://www.wendangku.net/doc/1217127388.html,rmation Systems26,3(May),143–162.

Dogac,A.,Ed.1998.ACM SIGMOD Record:Special Issue on Electronic Commerce.ACM SIGMOD RECORD.ACM.27(4).

Dogac,A.and Cingil,I.2001.A Survey and Comparison of Business-to-Business E-Commerce Frameworks.ACM SIGecom Exchanges2,2(June),14–25.

Jennings,N.,Norman,T.,F aratin,P.,O’Brien,P.,and Odgers,B.2000.Autonomous agents for business process management.Journal of Applied Arti?cial Intelligence14,2,145–189. Muth,P.,Wodtke,D.,Weissenfels,J.,h,A.D.,and Weikum,G.1998.From centralized work?ow speci?cation to distributed work?ow execution.Journal of Intelligent Information Systems10,2(March).

O’Sullivan,J.,Edmond,D.,and ter Hofstede,A.2002.What’s in a Service.Distributed and Parallel Databases12,2–3(September),117–133.

Sayal,M.,Casati,F.,Dayal,U.,and Shan,M.2002.Integrating work?ow management systems with Business-to-Business interaction standards.In Proc.of the International Conference on Data Engineering(ICDE).IEEE Press,San Jose CA,USA.

https://www.wendangku.net/doc/1217127388.html,.The Web Services Community Portal.https://www.wendangku.net/doc/1217127388.html,. Yang,J.and Papazoglou,M.2000.Interoperation support for electronic business.

CACM43(6),39–47.

ACM SIGecom Exchanges,Vol.3,No.3,August2002.

some和any的用法与练习题

some和 any 的用法及练习题( 一) 一、用法: some意思为:一些。可用来修饰可数名词和不可数名词,常常用于肯定句 . any 意思为:任何一些。它可以修饰可数名词和不可数名词,当修饰可数名词 时要用复数形式。常用于否定句和疑问句。 注意: 1、在表示请求和邀请时,some也可以用在疑问句中。 2、表示“任何”或“任何一个”时,也可以用在肯定句中。 3、和后没有名词时,用作代词,也可用作副词。 二、练习题: 1.There are ()newspapers on the table. 2.Is there ( )bread on the plate. 3.Are there () boats on the river? 4.---Do you have () brothers ?---Yes ,I have two brothers. 5.---Is there () tea in the cup? --- Yes,there is () tea in it ,but there isn’t milk. 6.I want to ask you() questions. 7.My little boy wants ()water to drink. 8.There are () tables in the room ,but there aren’t ( )chairs. 9.Would you like () milk? 10.Will you give me () paper? 复合不定代词的用法及练习 一.定义: 由 some,any,no,every 加上 -body,-one,-thing,-where构成的不定代词,叫做复合不定代词 . 二. 分类: 1.指人:含 -body 或 -one 的复合不定代词指人 . 2.含-thing 的复合不定代词指物。 3.含-where 的复合不定代词指地点。 三:复合不定代词: somebody =someone某人 something 某物,某事,某东西 somewhere在某处,到某处 anybody= anyone 任何人,无论谁 anything任何事物,无论何事,任何东西 anywhere 在任何地方 nobody=no one 无一人 nothing 无一物,没有任何东西 everybody =everyone每人,大家,人人 everything每一个事物,一切 everywhere 到处 , 处处 , 每一处

of与for的用法以及区别

of与for的用法以及区别 for 表原因、目的 of 表从属关系 介词of的用法 (1)所有关系 this is a picture of a classroom (2)部分关系 a piece of paper a cup of tea a glass of water a bottle of milk what kind of football,American of soccer? (3)描写关系 a man of thirty 三十岁的人 a man of shanghai 上海人 (4)承受动作 the exploitation of man by man.人对人的剥削。 (5)同位关系 It was a cold spring morning in the city of London in England. (6)关于,对于 What do you think of Chinese food? 你觉得中国食品怎么样? 介词 for 的用法小结 1. 表示“当作、作为”。如: I like some bread and milk for breakfast. 我喜欢把面包和牛奶作为早餐。What will we have for supper? 我们晚餐吃什么?

2. 表示理由或原因,意为“因为、由于”。如: Thank you for helping me with my English. 谢谢你帮我学习英语。 Thank you for your last letter. 谢谢你上次的来信。 Thank you for teaching us so well. 感谢你如此尽心地教我们。 3. 表示动作的对象或接受者,意为“给……”、“对…… (而言)”。如: Let me pick it up for you. 让我为你捡起来。 Watching TV too much is bad for your health. 看电视太多有害于你的健康。 4. 表示时间、距离,意为“计、达”。如: I usually do the running for an hour in the morning. 我早晨通常跑步一小时。We will stay there for two days. 我们将在那里逗留两天。 5. 表示去向、目的,意为“向、往、取、买”等。如: let’s go for a walk. 我们出去散步吧。 I came here for my schoolbag.我来这儿取书包。 I paid twenty yuan for the dictionary. 我花了20元买这本词典。 6. 表示所属关系或用途,意为“为、适于……的”。如: It’s time for school. 到上学的时间了。 Here is a letter for you. 这儿有你的一封信。 7. 表示“支持、赞成”。如: Are you for this plan or against it? 你是支持还是反对这个计划? 8. 用于一些固定搭配中。如: Who are you waiting for? 你在等谁? For example, Mr Green is a kind teacher. 比如,格林先生是一位心地善良的老师。

(完整版)介词for用法归纳

介词for用法归纳 用法1:(表目的)为了。如: They went out for a walk. 他们出去散步了。 What did you do that for? 你干吗这样做? That’s what we’re here for. 这正是我们来的目的。 What’s she gone for this time? 她这次去干什么去了? He was waiting for the bus. 他在等公共汽车。 【用法说明】在通常情况下,英语不用for doing sth 来表示目的。如: 他去那儿看他叔叔。 误:He went there for seeing his uncle. 正:He went there to see his uncle. 但是,若一个动名词已名词化,则可与for 连用表目的。如: He went there for swimming. 他去那儿游泳。(swimming 已名词化) 注意:若不是表目的,而是表原因、用途等,则其后可接动名词。(见下面的有关用法) 用法2:(表利益)为,为了。如: What can I do for you? 你想要我什么? We study hard for our motherland. 我们为祖国努力学习。 Would you please carry this for me? 请你替我提这个东西好吗? Do more exercise for the good of your health. 为了健康你要多运动。 【用法说明】(1) 有些后接双宾语的动词(如buy, choose, cook, fetch, find, get, order, prepare, sing, spare 等),当双宾语易位时,通常用for 来引出间接宾语,表示间接宾语为受益者。如: She made her daughter a dress. / She made a dress for her daughter. 她为她女儿做了件连衣裙。 He cooked us some potatoes. / He cooked some potatoes for us. 他为我们煮了些土豆。 注意,类似下面这样的句子必须用for: He bought a new chair for the office. 他为办公室买了张新办公椅。 (2) 注意不要按汉语字面意思,在一些及物动词后误加介词for: 他们决定在电视上为他们的新产品打广告。 误:They decided to advertise for their new product on TV. 正:They decided to advertise their new product on TV. 注:advertise 可用作及物或不及物动词,但含义不同:advertise sth=为卖出某物而打广告;advertise for sth=为寻找某物而打广告。如:advertise for a job=登广告求职。由于受汉语“为”的影响,而此处误加了介词for。类似地,汉语中的“为人民服务”,说成英语是serve the people,而不是serve for the people,“为某人的死报仇”,说成英语是avenge sb’s death,而不是avenge for sb’s death,等等。用法3:(表用途)用于,用来。如: Knives are used for cutting things. 小刀是用来切东西的。 This knife is for cutting bread. 这把小刀是用于切面包的。 It’s a machine for slicing bread. 这是切面包的机器。 The doctor gave her some medicine for her cold. 医生给了她一些感冒药。 用法4:为得到,为拿到,为取得。如: He went home for his book. 他回家拿书。 He went to his friend for advice. 他去向朋友请教。 She often asked her parents for money. 她经常向父母要钱。

some和any的用法

some和any的用法: (1)两者修饰可数单数名词,表某一个;任何一个;修饰可数复数名词和不可数名词,表一些;有些。〔2)一般的用法:some用于肯定句;any用于疑问句,否定句或条件句。 I am looking for some matches. Do you have any matches? I do not have any matches. (3)特殊的用法: (A) 在期望对方肯定的回答时,问句也用some。 Will you lend me some money? (=Please lend me some money.) (B) any表任何或任何一个时,也可用于肯定句。 Come any day you like. (4)some和any后没有名词时,当做代名词,此外两者也可做副词。 Some of them are my students.〔代名词) Is your mother any better?(副词) 3. many和much的用法: (1)many修饰复数可数名词,表许多; much修饰不可数名词,表量或程度。 He has many friends, but few true ones. There hasn't been much good weather recently. (2)many a: many a和many同义,但语气比较强,并且要与单数名词及单数形动词连用。 Many a prisoner has been set free. (=Many prisoners have been set free.) (3)as many和so many均等于the same number of。前有as, like时, 只用so many。 These are not all the books I have. These are as many more upstairs.

常用介词用法(for to with of)

For的用法 1. 表示“当作、作为”。如: I like some bread and milk for breakfast. 我喜欢把面包和牛奶作为早餐。 What will we have for supper? 我们晚餐吃什么? 2. 表示理由或原因,意为“因为、由于”。如: Thank you for helping me with my English. 谢谢你帮我学习英语。 3. 表示动作的对象或接受者,意为“给……”、“对…… (而言)”。如: Let me pick it up for you. 让我为你捡起来。 Watching TV too much is bad for your health. 看电视太多有害于你的健康。 4. 表示时间、距离,意为“计、达”。如: I usually do the running for an hour in the morning. 我早晨通常跑步一小时。 We will stay there for two days. 我们将在那里逗留两天。 5. 表示去向、目的,意为“向、往、取、买”等。如: Let’s go for a walk. 我们出去散步吧。 I came here for my schoolbag.我来这儿取书包。 I paid twenty yuan for the dictionary. 我花了20元买这本词典。 6. 表示所属关系或用途,意为“为、适于……的”。如: It’s time for school. 到上学的时间了。 Here is a letter for you. 这儿有你的一封信。 7. 表示“支持、赞成”。如: Are you for this plan or against it? 你是支持还是反对这个计划? 8. 用于一些固定搭配中。如: Who are you waiting for? 你在等谁? For example, Mr Green is a kind teacher. 比如,格林先生是一位心地善良的老师。 尽管for 的用法较多,但记住常用的几个就可以了。 to的用法: 一:表示相对,针对 be strange (common, new, familiar, peculiar) to This injection will make you immune to infection. 二:表示对比,比较 1:以-ior结尾的形容词,后接介词to表示比较,如:superior ,inferior,prior,senior,junior 2: 一些本身就含有比较或比拟意思的形容词,如equal,similar,equivalent,analogous A is similar to B in many ways.

some和any的用法及练习题

some和any的用法及练习题 (一) 一、用法: some意思为:一些。可用来修饰可数名词和不可数名词,常常用于肯定句. any意思为:任何一些。它可以修饰可数名词和不可数名词,当修饰可数名词时要用复数形式。常用于否定句和疑问句。 注意:1、在表示请求和邀请时,some也可以用在疑问句中。 2、表示“任何”或“任何一个”时,也可以用在肯定句中。 3、和后没有名词时,用作代词,也可用作副词。 二、练习题: 1.There are ( )newspapers on the table. 2.Is there ( )bread on the plate. 3.Are there ( ) boats on the river? 4.---Do you have ( ) brothers ?---Yes ,I have two brothers. 5.---Is there ( ) tea in the cup? ---Yes,there is ( ) tea in it ,but there isn’t milk. 6.I want to ask you ( ) questions. 7.My little boy wants ( )water to drink. 8.There are ( ) tables in the room ,but there aren’t ( )chairs. 9.Would you like ( ) milk? 10.Will you give me ( ) paper? 复合不定代词的用法及练习 一.定义: 由some,any,no,every加上-body,-one,-thing,-where构成的不定代词,叫做复合不定代词. 二.分类: 1.指人:含-body或-one的复合不定代词指人. 2.含-thing的复合不定代词指物。 3.含-where的复合不定代词指地点。 三:复合不定代词: somebody =someone某人 something某物,某事,某东西 somewhere在某处,到某处 anybody= anyone任何人,无论谁 anything任何事物,无论何事,任何东西 anywhere在任何地方 nobody=no one无一人 nothing无一物,没有任何东西 everybody =everyone每人,大家,人人 everything每一个事物,一切 everywhere到处,处处,每一处

some和any的用法

some和any的用法 1.some adj.一些;某些;某个pron. 某些;若干;某些人 a.adj. some可以修饰可数名词或不可数名词,意为“某些”。 Some people are playing football. (some+可数名词) I ate some bread. (some+不可数名词) b.adj. some后面可以修饰可数名词的单数,意为“某(个)”。 Some day you will know. (some+可数名词的单数) 有一天你会知道的。 Some student cheated in the exam.(some+可数名词的单数) 有个学生考试作弊。 对比:Some students cheated in the exam.有些学生考试作弊。 c.pron. some此时作代词,后面不需要再加名词就可以表示“有些(人)”的意思。 All students are in the classroom, and some are doing their homework. d.pron. some作代词,意为“若干(…)”。 There are 10 apples on the table. You can take some. 桌上10个苹果,你可以拿走一些。 2.any adj.任何的;所有的pron.任何一个;任何 a.adj. any可以修饰可数名词和不可数名词,意为“任何的,所有的任何一(…)”。 (用于否定意义的陈述句、疑问句、条件状语从句if中) Do you have any ideas?(any+可数名词复数)(疑问句) 你有什么想法吗? I don’t have any bread.(any+不可数名词)(否定意义的陈述句) Please tell me if you have any problem.(if引导的条件状语从句) b.any后面可以加可数名词的单数,意为“任何一(…)”。 Any error would lead to failure.(any+可数名词单数) 任何(一个)错误都会导致失败。 c.pron. any此时作代词,与some里面c点的用法相似,只是表示这个意义的时候,any多用于否定句和疑问 句中。 比较:There are 10 apples on the table. You can take some. 桌子上有10个苹果,你可以拿走一些。 There are 10 apples on the table, but you can’t take any. 桌子上有10个苹果,但是你不能拿。 There are some apples on the table.桌上有些苹果。 There aren’t any apples on the table.桌上没有苹果。 由此,把陈述句变为否定句/一般疑问句的时候,要把some改成any。 思考:some只用于肯定句,any只用于否定句和疑问句中吗吗? 不一定,要看句子本身想表达的意思。 1.some可以用于肯定句和疑问句中。在表示请求、邀请、提建议等带有委婉语气的疑问句中,用some表示说话 人希望得到肯定的回答。例如: Would you like some coffee?你想喝咖啡吗? 这里用some而不用any,是因为说话人期待得到对方肯定的回答。 (因此Would you like…?你想要…吗?这个句型中多用some而不用any) 比较: Do you have any books?这里用any而不用some,说明这只是因为这只是纯粹的疑问。

of和for的用法

of 1....的,属于 One of the legs of the table is broken. 桌子的一条腿坏了。 Mr.Brown is a friend of mine. 布朗先生是我的朋友。 2.用...做成的;由...制成 The house is of stone. 这房子是石建的。 3.含有...的;装有...的 4....之中的;...的成员 Of all the students in this class,Tom is the best. 在这个班级中,汤姆是最优秀的。 5.(表示同位) He came to New York at the age of ten. 他在十岁时来到纽约。 6.(表示宾格关系) He gave a lecture on the use of solar energy. 他就太阳能的利用作了一场讲演。 7.(表示主格关系) We waited for the arrival of the next bus. 我们等待下一班汽车的到来。

I have the complete works of Shakespeare. 我有莎士比亚全集。 8.来自...的;出自 He was a graduate of the University of Hawaii. 他是夏威夷大学的毕业生。 9.因为 Her son died of hepatitis. 她儿子因患肝炎而死。 10.在...方面 My aunt is hard of hearing. 我姑妈耳朵有点聋。 11.【美】(时间)在...之前 12.(表示具有某种性质) It is a matter of importance. 这是一件重要的事。 For 1.为,为了 They fought for national independence. 他们为民族独立而战。 This letter is for you. 这是你的信。

Some和any的用法

Some和any的用法 some和any 既可以修饰可数名词又可以修饰不可数名词,some常用在肯定句中,而any则常用在否定和疑问句中。因此some和any 的用法主要是考虑用在肯定句、疑问句还是否定句中,与名词的可数与否无关。 some意为“一些”,可作形容词和代词。它常修饰可数名词复数。如:some books一些书,some boys一些男孩,也可修饰不可数名词,如:some water一些水,some tea一些茶叶,some常用在肯定句中。any意为“任何一些”,它也可修饰可数名词复数或不可数名词,常用于疑问句和否定句。如: --I have some tea here. 我这儿有些茶叶。--I can’t see any tea. 我没看见茶叶。 --Do you have any friends at school? 你在学校有些朋友吗? 但在表示建议,反问,请求的疑问句中,或期望得到肯定回答时,多用some而不用any。如: Would you like some coffee? 你要不要来点咖啡? What about some fruit juice? 来点水果汁如何? 当any表示“任何”的意义,起强调作用时,它可以用在肯定句中; Any student can answer this question.任何学生都可以回答这个问题。 辨析some和any的不同用法:some 常用在肯定句中,而any 则常用在否定和疑问句中。在表示建议,反问,请求的疑问句中,或期望得到肯定回答时,多用some而不用any。 Enough的用法 英语中enough表示“足够”,它可以用作名词、形容词和副词,它的具体用法有: 一、用作形容词,意思是“充足的; 足够的”;在句中可作定语和表语。作定语时它的位置较灵活,既可放在所修饰的词前,也可放在所修饰的词后。例如: We have enough seats(seats enough)for everyone.我们有足够的座位让大家都能坐。 二、用作副词,意思是“充分地;足够地”,修饰形容词、副词或动词,位于所修饰词的后面。例如: 1. He is not strong enough. 他不够强壮。 2. She is old enough to understand this. 她年纪已足够大了能了解这事。 3 .I didn't know her well enough. 我对她不够了解。4.He did not work hard enough. 他不够用功。 [提示]enough常用在“be+形容词+enough +for+sb.+to do.”结构中,注意do后面不接宾语。例如: The book is easy enough for you to read.这本书很简单,你们可以看懂。 三、作名词,意思是“足够; 充分”。例如: 1. —Would you like another cup of tea? 你想再来一杯茶吗? —I have had enough. Thank you very much. 我已经喝够了。非常感谢。 2. He couldn't earn enough money to keep a family. 他赚得钱不够养活家人。 我们在使用enough时还要注意以下几点: 1)enough不能与no连用。如不可以说:I have no enough money to buy a car.而应说:I don't have enough money to buy a car. 2)enough用作形容词时不可被very修饰,但可用quite修饰。例如: We have quite enough time. 我们有足够的时间。 3)can't / can never... enough表示“越……越好;无论怎样……也不过分”。例如: You can never be careful enough. 你越细心越好。 下面的“口诀”可能对大家理解和掌握enough的用法有所帮助:

some和any地用法

(1)some和any 的用法: some一般用于肯定句中,意思是“几个”、“一些”、“某个”作定语时可修饰可数名词或不可数名词。如:I have some work to do today. (今天我有些事情要做)/ They will go there some day.(他们有朝一日会去那儿) some 用于疑问句时,表示建议、请求或希望得到肯定回答。如:Would you like some coffee with sugar?(你要加糖的咖啡吗?) any 一般用于疑问句或否定句中,意思是“任何一些”、“任何一个”,作定语时可修饰可数或不可数名词。如:They didn’t have any friends here. (他们在这里没有朋友)/ Have you got any questions to ask?(你有问题要问吗?) any 用于肯定句时,意思是“任何的”。Come here with any friend.(随便带什么朋友来吧。) (2)no和none的用法: no是形容词,只能作定语表示,意思是“没有”,修饰可数名词(单数或复数)或不可数名词。如:There is no time left. Please hurry up.(没有时间了,请快点) / They had no reading books to lend.(他们没有阅读用书可以出借) none只能独立使用,在句子中可作主语、宾语和表语,意思是“没有一个人(或事物)”,表示复数或单数。如:None of them is/are in the

classroom.(他们当中没有一个在教室里) / I have many books, but none is interesting.(我有很多的书,但没有一本是有趣的) (3)all和both的用法: all指三者或三者以上的人或物,用来代替或修饰可数名词;也可用来代替或修饰不可数名词。 both指两个人或物,用来代替或修饰可数名词。all和both在句子中作主语、宾语、表语、定语等。如:I know all of the four British students in their school.(他们学校里四个英国学生我全认识) / --Would you like this one or that one? –Both.(你要这个还是那个?两个都要。) all和both既可以修饰名词(all/both+(the)+名词),也可以独立使用,采用“all/both + of the +名词(复数)”的形式,其中的of 可以省略。如:All (of) (the) boys are naughty.(是男孩都调皮) (4)every和each用法: every是形容词,只能作定语修饰单数名词,意思是“每一个”,表示整体概念; each是形容词、代词,可用作主语、宾语、定语等,意思是“每个”或者“各个”,表示单个概念;each可以放在名词前,可以后跟of 短语,与动词同时出现时要放在“be动词、助动词、情态动词”之后或者行为动词之前 every和each都用作单数理解,但是下文中既可以用单数的代词(如he/him/his)也可以用复数的代词(如they/them/their)替代。如:Every one of the students in his class studies very hard.(他班上每个学生学

for和of的用法

for的用法: 1. 表示“当作、作为”。如: I like some bread and milk for breakfast. 我喜欢把面包和牛奶作为早餐。 What will we have for supper? 我们晚餐吃什么? 2. 表示理由或原因,意为“因为、由于”。如: Thank you for helping me with my English. 谢谢你帮我学习英语。 Thank you for your last letter. 谢谢你上次的来信。 Thank you for teaching us so well. 感谢你如此尽心地教我们。 3. 表示动作的对象或接受者,意为“给……”、“对…… (而言)”。如: Let me pick it up for you. 让我为你捡起来。 Watching TV too much is bad for your health. 看电视太多有害于你的健康。 4. 表示时间、距离,意为“计、达”。如:

I usually do the running for an hour in the morning. 我早晨通常跑步一小时。 We will stay there for two days. 我们将在那里逗留两天。 5. 表示去向、目的,意为“向、往、取、买”等。如: Let’s go for a walk. 我们出去散步吧。 I came here for my schoolbag.我来这儿取书包。 I paid twenty yuan for the dictionary. 我花了20元买这本词典。 6. 表示所属关系或用途,意为“为、适于……的”。如: It’s time for school. 到上学的时间了。 Here is a letter for you. 这儿有你的一封信。 7. 表示“支持、赞成”。如: Are you for this plan or against it? 你是支持还是反对这个计划? 8. 用于一些固定搭配中。如:

some与any的用法区别

some与any的用法区别 一、一般说来,some用于肯定句,any用于否定句和疑问句。例如: She wants some chalk. She doesn’t want any chalk. Here are some beautiful flowers for you. Here aren’t any beautiful flowers. 二、any可与not以外其他有否定含义的词连用,表达否定概念。例如: He never had any regular schooling. In no case should any such idea be allowed to spread unchecked. The young accountant seldom (rarely, hardly, scarcely) makes any error in his books. I can answer your questions without any hesitation. 三、any可以用于表达疑问概念的条件句中。例如: If you are looking for any stamps, you can find them in my drawer. If there are any good apples in the shop, bring me two pounds of them. If you have any trouble, please let me know. 四、在下列场合,some也可用于疑问句。 1、说话人认为对方的答复将是肯定的。例如: Are you expecting some visitors this afternoon?(说话人认为下午有人要求,所以用some)Are you expecting any visitors this afternoon?(说话人不知道下午是否有人来,所以用any) Didn’t you give him some tickets?(说话人认为票已经给他了。问题的回答是:Sure I did) Did you give him any tickets?(说话人不知道是否给票了。回答可能是yes或no。) 2、款待用语或问句的实质等于提出一个要求并希望得到肯定的回答时。例如:

英语形容词和of for 的用法

加入收藏夹 主题: 介词试题It’s + 形容词 + of sb. to do sth.和It’s + 形容词 + for sb. to do sth.的用法区别。 内容: It's very nice___pictures for me. A.of you to draw B.for you to draw C.for you drawing C.of you drawing 提交人:杨天若时间:1/23/2008 20:5:54 主题:for 与of 的辨别 内容:It's very nice___pictures for me. A.of you to draw B.for you to draw C.for you drawing C.of you drawing 答:选A 解析:该题考查的句型It’s + 形容词+ of sb. to do sth.和It’s +形容词+ for sb. to do sth.的用法区别。 “It’s + 形容词+ to do sth.”中常用of或for引出不定式的行为者,究竟用of sb.还是用for sb.,取决于前面的形容词。 1) 若形容词是描述不定式行为者的性格、品质的,如kind,good,nice,right,wrong,clever,careless,polite,foolish等,用of sb. 例: It’s very kind of you to help me. 你能帮我,真好。 It’s clever of you to work out the maths problem. 你真聪明,解出了这道数学题。 2) 若形容词仅仅是描述事物,不是对不定式行为者的品格进行评价,用for sb.,这类形容词有difficult,easy,hard,important,dangerous,(im)possible等。例: It’s very dangerous for children to cross the busy street. 对孩子们来说,穿过繁忙的街道很危险。 It’s difficult for u s to finish the work. 对我们来说,完成这项工作很困难。 for 与of 的辨别方法: 用介词后面的代词作主语,用介词前边的形容词作表语,造个句子。如果道理上通顺用of,不通则用for. 如: You are nice.(通顺,所以应用of)。 He is hard.(人是困难的,不通,因此应用for.) 由此可知,该题的正确答案应该为A项。 提交人:f7_liyf 时间:1/24/2008 11:18:42

常用介词用法(for-to-with-of)

常用介词用法(for-to-with-of)

For的用法 1. 表示“当作、作为”。如: I like some bread and milk for breakfast. 我喜欢把面包和牛奶作为早餐。 What will we have for supper? 我们晚餐吃什么? 2. 表示理由或原因,意为“因为、由于”。如: Thank you for helping me with my English. 谢谢你帮我学习英语。 3. 表示动作的对象或接受者,意为“给……”、“对…… (而言)”。如: Let me pick it up for you. 让我为你捡起来。Watching TV too much is bad for your health. 看电视太多有害于你的健康。 4. 表示时间、距离,意为“计、达”。如: I usually do the running for an hour in the morning. 我早晨通常跑步一小时。 We will stay there for two days. 我们将在那里逗留两天。

5. 表示去向、目的,意为“向、往、取、买”等。如: Let’s go for a walk. 我们出去散步吧。 I came here for my schoolbag.我来这儿取书包。 I paid twenty yuan for the dictionary. 我花了20元买这本词典。 6. 表示所属关系或用途,意为“为、适于……的”。如: It’s time for school. 到上学的时间了。 Here is a letter for you. 这儿有你的一封信。 7. 表示“支持、赞成”。如: Are you for this plan or against it? 你是支持还是反对这个计划? 8. 用于一些固定搭配中。如: Who are you waiting for? 你在等谁? For example, Mr Green is a kind teacher. 比如,格林先生是一位心地善良的老师。

关于some和any的用法和区别

关于some和any的用法和区别 some和any都是常见词汇,他们有共同点也有很多不一样的地方,你们知道他们饿区别在哪里吗?接下来小编在这里给大家带来some和any的用法和区别,我们一起来看看吧! some和any的用法和区别 一、some和any作为形容词或代词,可以用来说明或代替复数名词或不可数名词,表示不定量,意为一些,其区别是:对其所说明或代替的名词持肯定态度时,用some;持非肯定(否定或疑问)态度时,用any。 在以下句子中使用some: 1.肯定句(包括肯定的陈述句和祈使句以及反意疑问句中肯定的陈述部分)。如: There are some new books on the teachers desk. We have a lot of sugar. Take some with you, please. He bought some bread, didnt he? 2.持肯定态度的一般疑问句。如: Are there some stamps in that drawer? Didnt she give you some money? 3.表示请求或建议的一般疑问句,通常都希望得到对方肯定的答复,所以也用some。如: May I ask you some questions?

Would you like some tea? 4.特殊疑问句及选择疑问句。因为特殊疑问句和选择疑问句并不对some所说明或代替的名词表示疑问。如: Where can I get some buttons? Do you have some pens or pencils? 在以下句子中使用ANY: 1.否定句(包括否定的陈述句和祈使句以及反意疑问句中否定的陈述部分)。如: I cant give you any help now. Do not make any noise. There werent any trees here, were there? 2.含有除not以外的其他否定词或否定结构的句子。如: Jim hardly makes any mistakes in his homework. He went to London without any money in his pocket. She was too poor to buy any new clothes. 3.一般疑问句(持肯定态度的除外)。如: Did she buy any tomatoes yesterday? I want some paper. Do you have any? 4.条件状语从句。如: If you are looking for any ink, you can find it on my desk. If there are any good apples there, get me two kilos, please.

some和any的用法教学内容

some 和any 的主要区别为:some和any都表示“一些” ,但是“some”用于肯 定句,any用于否定句和疑问句。例如: There are some apples in the basket. 篮子里有一些苹果。 变成否定句: There are not any apples in the basket. 篮子里没有苹果。 变成疑问句: Are there any apples in the basket? 篮子里有苹果吗? 特殊1:some:希望得到肯定的答复。 Will you lend me some money? (=Please lend me some money.) any:表任何或任何一个 Come any day you like. 特殊2:some和any后没有名词时,当做代名词,此外两者也可做副词。 Some of them are my students.〔代名词〕 Is your mother any better?(副词) 1. some用于疑问句或否定中: 1)在否定疑问句中,表示问话人的肯定倾向和对否定的惊讶和怀疑。如: Don't you have some new books? You have some new books, don't you? 你难道连几本新书 都没有吗。(在问话人心目中,"you"是有新书的,如今听说没有,因而表示惊讶和怀疑) 2)一般疑问句中,表示问话人盼望得到肯定的答复。如: -Can I have some apples? -Certainly! 3)表示建议。如: What about some fruit juice。喝点儿果汁怎么样。 2. any用于肯定句中: 1)表示三个或三个以上的人或事物中的一个。 如: You may take any one of these books.你可以随便拿一本书。 He studies harder than any of his classmates. (=He studies harder than any other students in his class.)他比班上任何一个学生都努力。 2)作"任何,无论谁"解。如: Any of them will do.他们中间的谁都行。 Any of them can tell you.他们无论谁都能告诉你。 我们知道,some通常用于肯定句,any则用于否定句或疑问句。但随着学习的深入,我们发现,情况并不完全如此,上述说法只能算是对some和any用法的一个不太准确和完整的概括。由于some和any是英语中比较常用的词,我们有必要对其用法作出较完善的归纳。 一、some和any作为形容词或代词,可以用来说明或代替复数名词或不可数名词,表示不定量,意为“一些”,其区别是:对其所说明或代替的名词持肯定态度时,用some;持非肯定(否定或疑问)态度时,用any。 在以下句子中使用some: 1.肯定句(包括肯定的陈述句和祈使句以及反意疑问句中肯定的陈述部分)。如: There are some new books on the teacher's desk. We have a lot of sugar. Take some with you, please. He bought some bread, didn't he? 2.持肯定态度的一般疑问句。如: Are there some stamps in that drawer? Didn't she give you some money? 3.表示请求或建议的一般疑问句,通常都希望得到对方肯定的答复,所以也用some。如: May I ask you some questions? Would you like some tea? 4.特殊疑问句及选择疑问句。因为特殊疑问句和选择疑问句并不对some所说明或代替的名词表示疑问。如: Where can I get some buttons? Do you have some pens or pencils? 在以下句子中使用ANY: 1.否定句(包括否定的陈述句和祈使句以及反意疑问句中否定的陈述部分)。如: I can't give you any help now. Do not make any noise. 精品文档

相关文档