• 这些例模式原型模式中定义了

    These are defined as singleton and prototype.

    youdao

  • 坚信大多数框架中,使用单例模式时,考虑太少了。

    It is my true belief that Singleton patterns have been used with far too little thought in most frameworks.

    youdao

  • 模式确保只有一个提供一个全局访问

    The Singleton Pattern:ensures a class has only on instance, and provides a global point of access to it.

    youdao

  • 使用类来实现单例模式可以确保在任何时间只有一个对象

    Classes implementing Singleton pattern will ensure that only one instance of the object ever exists at any one time.

    youdao

  • 不同书本培训课程所提的单例模式真正的企业具有非常复杂数据架构

    Unlike the simplistic models in books and training courses, a real enterprise has a very complicated data architecture.

    youdao

  • 单例模式有用的控制访问途径他能保证只有个类存在

    Singletons are a useful way to control access to a class, making sure that only one instance can exist.

    youdao

  • 单例模式同样用于控制数据库连接或者sockets这样资源访问

    Singletons often control access to resources such as database connections or sockets.

    youdao

  • 一个可用创建需要每个特定的重写单例模式代码可重用的类。

    This is a class that can be used repeatedly to instantiate a class as a singleton without having to re-write the singleton pattern code for that specific class.

    youdao

  • 模式可能常用OOP设计模式之一了;限制了一个的对象只能1

    The singleton pattern is probably one of the most often used OOP design patterns; it restricts the number of object instances of a class to one.

    youdao

  • 相反Scala支持单例模式,可以应用于那些类型只有情况

    Instead, Scala supports a singleton object construct to support those cases where exactly one instance of a type is needed.

    youdao

  • 通常描述符起到不好影响使类似一个模式(singleton)。

    This has the usually undesirable effect of making the descriptor something like a singleton. For example.

    youdao

  • 同时如果使用创建方法实现单例模式还具有创建多个变通能力。

    Likewise, with a singleton implemented as single instance, you leave open the possibility of altering the class to create more instances in the future.

    youdao

  • 这样分离结构代码有利于保持按单例模式使用或不按单例模式使用类的灵活性。

    This has the added benefit of separating singleton code from the class code leaving the flexibility to use several instances of the class or using the class as a singleton.

    youdao

  • 前面已经地介绍了单例模式实现方式现在我们进入主题:两个对象如何同时存在

    Now that we've looked briefly at implementation, let's turn to the heart of this article: how two singletons can exist simultaneously.

    youdao

  • 最后,在例模式一些实现方式中,单例的子类能够动态地重载方法,这是静态方法不能办到的。

    With some implementations of the singleton, you allow writers of subclasses to override methods polymorphically, something not possible with static methods.

    youdao

  • 接下来UnitsConverter也是一个单例模式因为使用object关键词定义的。

    Next, UnitsConverter is also a singleton as it is defined using the object keyword.

    youdao

  • 增加数据库连接或者改而使用支持多线程JDBC驱动器时例模式能够容易地适应这一变化

    If you add database connections or use a JDBC driver that allows multithreading, the singleton can be easily adjusted to allow more connections.

    youdao

  • 本文讨论主题是例模式请将上述实现方式牢记于心,因为接下来现象可能出现任何一实现方式

    As I discuss the singleton, keep the above implementations in mind, although many of those phenomena can occur for any implementation of the singleton.

    youdao

  • 例模式目的在于控制对象创建限制对外提供对象数量1同时允许情况变化时创建更多的实

    The singleton's purpose is to control object creation, limiting the number to one but allowing the flexibility to create more objects if the situation changes.

    youdao

  • 例模式非常有用设计模式,它允许对外提供但是犯的错误在于不止一个实创建

    The singleton is a useful design pattern for allowing only one instance of your class, but common mistakes can inadvertently allow more than one instance to be created.

    youdao

  • 讨论了如何实现例模式之后,我会逐一介绍这些时而出现诡异现象讲解它们怎么出现以及如何去避免犯错

    After discussing how to implement the singleton, I'll go over the sometimes surprising causes for the phenomena one by one, showing you how they occur and how you can avoid making those mistakes.

    youdao

  • 例模式-每个依赖服务组件,都是获得服务工厂生成引用。服务是一个单例对象或函数,对外提供特定的功能。

    Singletons - Each component dependent on a service gets a reference to the single instance generated by the service factory.

    youdao

  • 使得它们使用起来非常方便,如果确实想要构建一个部件化、组件化环境单例模式用起来就不一定那么舒服了,有可能会坏事。

    This makes them very convenient, but they can come back to bite you if you are truly building for a widgetized, componentized environment.

    youdao

  • 创建模式一个通用编程习语

    The Singleton creation pattern is a common programming idiom.

    youdao

  • 然后展示PHPV5.3LSB特性给出单例活动记录设计模式

    Then it shows how PHP V5.3's LSB feature resolves those issues, while showing implementations of the singleton and active record design patterns.

    youdao

  • 生成器工厂方法设计模式视为是创建模式,因它们可协助对象构建

    The singleton, builder, and factory method design patterns are considered creational patterns, as they assist in the construction of objects.

    youdao

  • 比如数据库连接就是单例设计模式一个子:我们一般不想让应用程序具有连接池多个资源密集型

    An example use case for a singleton would be a database connection pool: you don't want your application to have multiple resource-intensive instances of a connection pool class.

    youdao

  • 尽管实现使用是子类其他模式比如稍后介绍的活动记录模式需要引用其他的静态属性

    Whereas the singleton implementation uses the subclass's class name, other patterns (such as active record, covered later) need to reference other static properties.

    youdao

  • 5 - 6章探究一些常见问题静态模式以及使用依赖注入解决方案调查web应用其它应用的范围

    They also explore problems with common idioms such as the static singleton anti-pattern and solutions using dependency injection, and examine scopes for web applications and other purposes.

    youdao

  • 5 - 6章探究一些常见问题静态模式以及使用依赖注入解决方案调查web应用其它应用的范围

    They also explore problems with common idioms such as the static singleton anti-pattern and solutions using dependency injection, and examine scopes for web applications and other purposes.

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定