четверг, 4 ноября 2010 г.

Подготовка к экзамену 70-506: Silverlight 4, Development. Часть 1: Laying Out a User Interface

В начало

Что нужно знать:

  • Arrange content with panels.
    This objective may include but is not limited to: arranging content with panels (grid, stack panels, canvas, border, scroll viewer, ViewBox), managing grid properties (autosizing, star sizing, column definitions, row definitions, gridlines), setting Z order, setting visibility, setting orientation, setting positioning

  • Implement and configure core controls.
    This objective may include but is not limited to: implementing and configuring core controls (textbox, button, text block, checkbox) and content controls, referencing namespaces

  • Create user controls.
    This objective may include but is not limited to: creating user controls, creating control parts, mapping control parts

  • Implement a navigation framework.
    This objective may include but is not limited to: implementing caching on a frame, modifying journal mode, handling navigation events (Navigating, Navigated, NavigationFailed, NavigationStopped),  implementing and configuring deep linking

  • Display collections of items.
    This objective may include but is not limited to: implementing and configuring item controls (datagrid, listbox, items control, combo box, tree view), working with selected items and indices

  • Play media files.
    This objective may include but is not limited to: implementing digital rights management (DRM), playing streams, creating timeline markers, playing multiple audio tracks, displaying closed captioning, responding to timeline marker events, handling media playback events


    MSDN:

    1. Arrange content with panels.
    Элементы управления:
    Grid
    StackPanel
    Canvas
    Border
    ScrollViewer
    ViewBox

    Управление свойствами таблицы:
    Autosizing,Star sizing
    Column definitions
    Row definitions
    Gridlines

    Манипулирование элементами
    Setting Z order
    Setting visibility
    Setting orientation
    Setting positioning

    2. Implement and configure core controls.
    Textbox
    Button
    Text block
    Checkbox
    Content controls
    Referencing namespaces

    3. Create user controls
    Creating user controls (класс), пример создания 
    Creating control parts
    Mapping control parts

    4. Implement a navigation framework.
    Собственно, основные классы: NavigationService, Frame и Page
    Implementing caching on a frame
    Modifying journal mode, CanGoBack
    Handling navigation events:
    Navigating
    Navigated
    NavigationFailed
    NavigationStopped
    Implementing and configuring deep linking

    5. Display collections of items.
    Datagrid
    Listbox
    Items control
    Combo box
    Tree view
    Working with selected items and indices (см. также SelectionMode, SelectedValuePath, SelectedValue, SelecedItem)

    6. Play media files.
    MediaElement
    Implementing digital rights management (DRM)
    Playing streams
    Creating timeline markers
    Playing multiple audio tracks  (или имелись ввиду списки вопроизведения?)
    Displaying closed captioning
    Responding to timeline marker events
    Handling media playback events (MediaOpened, MediaEnded, MediaFailed)

    Блоги/Статьи (в основном RU):
    Mark Monster (EN)
    Управление внешним видом (Layout Management) в Silverlight 2
    Контролы - контейнеры
    Введение в SilverLight 4: Элемент управления ViewBox
    Вводное руководство по WPF – Layout
    CustomControl
    Navigation Framework
    Многостраничные приложения в Silverlight
    Навигация между страницами

    Видео (RU):
    Менеджер размещения Grid
    Менеджер размещения StackPanel
    Менеджер размещения Canvas
    Модель содержимого(Content Controls)
    Навигация в Silverlight-приложениях. Поисковая оптимизация
    Возможности по работе с элементами управления в Silverlight 2
    Создание элементов управления для платформы Silverlight 2
    MediaElement. Часть 1
    MediaElement. Часть 2

    Видео (EN):
    Grid Control Design-Time Row and Column Manipulation Features
    Intro To Xaml
    Adding Controls to an Application
    Using the ViewBox Control
    Embedding Video and Audio
    How to Build a Simple User Control
    Laying out Content with StackPanel
    UserControls
    Dynamic UserControl
    Using the Silverlight Canvas
    StandardGrid
    Navigation Framework
    Introduction to Media Players
    Creating a Media Player
    Implementing Audio Controls
    Loading Media at Runtime

    Книги:
    Книга “Введение в Silverlight 3” главы 8 и 9.

    Подготовка к экзамену 70-506: Silverlight 4, Development. Часть 0: Введение

    Пока готовился к beta экзамену накопилось много материалов и ссылок на материалы. Отстрелявшись решил все упорядочить и выложить. Может кому пригодится.

    Основная страница экзамена находится здесь.


    Итак, знания которые следует подтвердить при сдаче:

    Laying Out a User Interface (15%)

    • Arrange content with panels.
    • Implement and configure core controls.
    • Create user controls.
    • Implement a navigation framework.
    • Display collections of items.
    • Play media files.

    Enhancing  the User Interface (14%)

    • Create or modify control styles.
    • Create control templates.
    • Create or modify data templates.
    • Manipulate visuals.
    • Animate visuals.
    • Implement behaviors.
    • Manage the visual state.

    Implementing Application Logic (16%)

    • Handle events.
    • Consume services asynchronously.
    • Work with background threads.
    • Work with dependency properties.
    • Interact with attached properties.
    • Implement ICommand.

    Working with Data (17%)

    • Format data.
    • Implement data binding.
    • Create and consume value converters.
    • Implement data validation.

    Interacting with a Host Platform (11%)

    • Implement the printing API.
    • Create out-of-browser applications.
    • Access isolated storage.
    • Interact with the HTML DOM.
    • Access the clipboard.
    • Read from and write to the host file system.
    • Handle alternative input methods.

    Structuring Applications (13%)

    • Create and consume resource dictionaries.
    • Implement localization and globalization.
    • Handle application-level events.

    Deploying Applications (13%)

    • Configure the Silverlight plug-in.
    • Dynamically load application resources.
    • Create a client access policy.

    Итак, основные ссылки:

    Сайты/нужности:
    The Official Microsoft Silverlight Site (EN)
    Silverlight 4 Training Course на 9-ом канале (EN)
    Silverlight 4 Training Course (для скачивания) (EN)
    Автономная документация по Silverlight 4 (RU)
    То же самое, но он-лайн (RU)
    Книга “Введение в Silverlight 3” (RU)
    Центр разработчиков Silverlight (RU)
    Сильверлайтер (RU)
    Все о Microsoft Silverlight (RU)

    Блоги:
    Silverlight Team Blog (EN)
    Silverlight Tips of the Day (EN)
    Mark Monster (EN)
    Блог Сергея Пугачева (RU)
    Sergey Lutay's Blog (RU)
    Блог Сергея Байдачного (RU)
    А здесь весь список MVP по сильверлайту, почти у всех есть блоги, так что можно найти много интересной информации.

    Агрегаторы:
    SilverlightCream (EN)
    GotDotNet (RU)
    Хабра (RU)
    Доклады на TechDays (RU)

     Кажется, ничего не забыл… 


    А если все-таки забыл, шлите линки…

    вторник, 14 июля 2009 г.

    Postgres 8.4 и VC++ runtime error

    Собрался я тут было перевести рабочий сервер на Postgres 8.4. Для проверки решил поставить на своей машине, а он сволочь выдает сообщение "An error occured executing the Microsoft VC++ runtime installer".
    Немного покрутив пальцем у виска обнаружил, что в этом случае следует пускать инсталяху с ключом "--install_runtimes 0".

    А вот полный список ключей:
    • --prefix <путь>: директория в которую инсталировать postgres (по умолчанию %PROGRAMFILES%\PostgreSQL\8.X в Windows, /opt/PostgreSQL/8.X в Linux и /Library/PostgreSQL/8.X в Mac OS X);
    • --datadir <путь к директории данных>: определеяет где создавать диретокрию для храниня данных (по умолчанию $PREFIX/data) ;
    • --superpassword <пароль>: определяет пароль суперюзера (postgres который). Для Windows заодно и пароль пользователя от которого пускается сервис;
    • --port <номер порта>: определяет номер порта, по умолчанию 5432, но если порту уже занят установленым посгрисом то 5433 и тд;
    • --locale <локаль>: локаль по умолчанию;
    • --create_shortcuts [1|0]: определяет создавать ли ярлыки в меню "Пуск". По умолчанию 1;
    • --install_plpgsql [1|0]:определяет устанавливать ли pl/pgsql в template1. По умолчанию 1;
    • --install_runtimes [1|0]: (только Windows): определяет устинавливать или нет Microsoft Visual C++ runtimes перед установкой.По умолчанию 1.
    В принципе все данные по инсталции можно посмотреть на сайте EnterpriseDB

    пятница, 27 марта 2009 г.

    NPGSQL и Notification

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

    Вроде бы все просто:
    Делаем таблицу для хранения сообщений, пишем функции для отправки и получения, и через listen и notify организуем оповещения о поступлении сообщения. Серверная часть вроде заработала быстро, а вот с клиентом возникли затруднения.

    В FormLoad написали:
    NpgsqlCommand listener = new NpgsqlCommand("listen "+ username,this.npgsqlConnection1);
    listener.ExecuteNonQuery();<
    this.npgsqlConnection1.Notification += new NotificationEventHandler(npgsqlConnection1_Notification);


    И в обработчике сообщения:
    NpgsqlCommand getmes = new NpgsqlCommand("select _функция_забора_сообщения_();", this.npgsqlConnection1);
    MessageBox.Show(getmes.ExecuteScalar().ToString(), "Срочное сообщение");


    Сообщение получалось почему то далеко не всегда, не смотря на то, что соединение использовало SyncNotification, и при закрытии конекшена прога подвисала, при этом сам NPGSQL не вызывал никаких эксепшенов.

    Немного порывшись в инете обнаружил какую то пространную фразу о thread'инге и переписал все так:
    Thread thread_new = new Thread(delegate()
    {
    NpgsqlCommand getmes = new NpgsqlCommand("select _функция_забора_сообщения_();", this.npgsqlConnection1);
    MessageBox.Show(getmes.ExecuteScalar().ToString(), "Срочное сообщение");
    });
    thread_new.Start();

    После чего эксепшен отловлен и был.

    Видимо, я снова что-то не дочитал в документации к NPGSQLю.