PureMVC - реализация, идиомы и лучшие практики.

Cliff Hall, “PureMVC Implementation Idioms and Best Practices”, public translation into Russian from English More about this translation.

Another translations: into English, into French, into Japanese. Translate into another language.

Participants

og331 points
Lloyd63 points
SWayf38 points
And others...
Join Translated.by to translate! If you already have a Translated.by account, please sign in.
If you do not want to register an account, you can sign in with OpenID.
Pages: ← previous Ctrl next next untranslated

PureMVC Implementation Idioms and Best Practices

PureMVC - реализация, идиомы и лучшие практики.

History of edits (Latest: og 3 years, 3 months ago) §

Inspiration

Вдохновляющая идея

History of edits (Latest: og 3 years, 3 months ago) §

PureMVC is a pattern-based framework originally driven by the currently relevant need to design high-performance RIA clients. It has now been ported to other languages and platforms including server environments. This document focuses on the client-side.

PureMVC - это основанный на шаблонах фреймворк , изначально созданный в ответ на необходимость проектирования высоко-производительных RIA (Rich Internet Applications) клиентов. Он уже реализован на нескольких языках программирования и платформах, включая серверные окружения. Этот документ фокусируется на клиентской части.

History of edits (Latest: lightalloy 3 years, 2 months ago) §

While the interpretation and implementations are specific to each platform supported by PureMVC, the patterns employed are well defined in the infamous ‘Gang of Four’ book: Design Patterns: Elements of Reusable Object-Oriented Software

Хотя интерпретации и реализации PureMVC могут быть различными для каждой платформы, задействованные шаблоны хорошо определены в известной книге "Банды Четырех": "Design Patterns — Elements of Reusable Object-Oriented Software".

History of edits (Latest: lightalloy 3 years, 2 months ago) §

(ISBN 0-201-63361-2)

(ISBN 0-201-63361-2)

History of edits (Latest: og 3 years, 3 months ago) §

Highly recommended.

Настоятельно рекомендуется к прочтению.

History of edits (Latest: og 3 years, 3 months ago) §

PureMVC Gestalt

Структура PureMVC

History of edits (Latest: og 3 years, 3 months ago) §

The PureMVC framework has a very narrow goal. That is to help you separate your application’s coding interests into three discrete tiers; Model, View and Controller.

PureMVC имеет очень конкретную цель: помочь вам разделить код приложения по на три раздела: Модель, Представление и Контроллер (MVC).

History of edits (Latest: lightalloy 3 years, 2 months ago) §

This separation of interests, and the tightness and direction of the couplings used to make them work together is of paramount importance in the building of scalable and maintainable applications.

Это разделение интересов и плотных взаимосвязей, заставлявшее их работать вместе, и является наиважнейшей задачей при построении масштабируемых и легких в сопровождении приложений.

History of edits (Latest: og 3 years, 3 months ago) §

In this implementation of the classic MVC Design meta-pattern, these three tiers of the application are governed by three Singletons (a class where only one instance may be created) called simply Model, View and Controller. Together, they are referred to as the ‘Core actors’.

В данной реализации классического мета-шаблона MVC, эти три уровня приложения обслуживаются тремя синглетонами (класс, в котором только одна сущность может быть создана), называемых Модель, Представление и Контроллер. Все вместе они они будут упоминаться как "основные актеры".

History of edits (Latest: og 3 years, 3 months ago) §

A fourth Singleton, the Façade simplifies development by providing a single interface for communication with the Core actors.

Четвертый синглетон, Фасад, упрощает разработку предоставляя единый интерфейс для взаимодействия с основными актерами.

History of edits (Latest: og 3 years, 3 months ago) §

Model & Proxies

Модель и Прокси (модуль-посредник).

History of edits (Latest: og 3 years, 3 months ago) §

The Model simply caches named references to Proxies. Proxy code manipulates the data model, communicating with remote services if need be to persist or retrieve it.

Модель просто кэширует именованные ссылки на прокси. Код посредника манипулирует данными модели, взаимодействуя с удаленными сервисами в случае необходимости их сохранения или восстановления.

History of edits (Latest: lightalloy 3 years, 2 months ago) §

This results in portable Model tier code.

Таким образом формируется переносимый код для Модели.

History of edits (Latest: lightalloy 3 years, 2 months ago) §

View & Mediators

Представление и Посредники.

History of edits (Latest: og 3 years, 3 months ago) §

The View primarily caches named references to Mediators. Mediator code stewards View Components, adding event listeners, sending and receiving notifications to and from the rest of the system on their behalf and directly manipulating their state.

Представление в основном кэширует именованные ссылки на Посредников(Mediators). Код посредника обслуживает компоненты Представления, добавляя слушателей событий, отправляя или принимая за них сообщения от остальной системы и напрямую управляя их состоянием.

History of edits (Latest: og 3 years, 3 months ago) §

This separates the View definition from the logic that controls it.

Таким образом достигается разделение между определением Представления и управляющей логикой.

History of edits (Latest: lightalloy 3 years, 2 months ago) §

PureMVC Gestalt

Структура PureMVC

History of edits (Latest: SWayf 3 years ago) §

Controller & Commands

Контроллер и Команды.

History of edits (Latest: og 3 years, 3 months ago) §

The Controller maintains named mappings to Command classes, which are stateless, and only created when needed.

Контроллер хранит список отображений на классы Команд, которые сами по себе не имеют состояния и создаются только тогда, когда нужно.

History of edits (Latest: Lloyd 3 years, 3 months ago) §
Pages: ← previous Ctrl next next untranslated