intersystems caché rest forms
TRANSCRIPT
© 2016 InterSystems Corporation. All rights reserved.
RESTFormsЛебедюк Эдуард
2 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
Что такое RESTForms?
Проект для создания новых REST API с помощью обобщённого REST провайдера для хранимых классов
Цели проекта• Новые REST API без написания кода• Минимальные изменения в хранимых классов
3 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
Use cases
• У вас уже есть данные в Caché и вы хотите предоставить часть
данных (или все) в виде REST API
• Вам нужно создать REST API для нового приложения
4 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
Архитектура приложения
JS клиент RESTForms Классы Caché
5 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
CRUD
• Операции над объектом или набором объектов:
• Create
• Read
• Update
• Delete
6 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
Возможности• CRUD над объектом
• CRUD над классом
• R над коллекциями (через SQL)
• Работа с файлами
7 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
Особенности
• JS работает сразу
• Документация
• Примеры
• СПО, доступно на GitHub
8 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
Как начать использовать RESTForms?
• Импортировать проект с GitHub (желательно как субмодуль)
• Для каждого хранимого класса, который вы хотите предоставить через REST API
• Наследуйте его от Form.Adaptor
• Укажите права доступа (например read-only или read-write)
• Укажите свойство названия объекта класса
• Укажите названия для свойств, которые нужно отображать
9 | © 2016 InterSystems Corporation. All Rights Reserved.
RESTFormsUI
10 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
RESTFormsUI
• Просмотр данных RESTForms
• Поддержка мобильных устройств
• Адаптивный дизайн
11 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
Список форм
12 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
Просмотр объектов формы
13 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
Просмотр и редактирование объекта
14 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
Демо
http://176.112.210.99:57772/csp/restforms/index.html
Логин: demoПароль: demo
15 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
Выводы
• RESTForms упрощает создание нового REST API
• RESTFormsUI позволяет сразу посмотреть на данные,
предоставляемые RESTForms
16 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/
Где скачать?
https://github.com/intersystems-ru/RESTForms/
https://github.com/intersystems-ru/RESTFormsUI/
© 2016 InterSystems Corporation. All rights reserved.
Конец
http://176.112.210.99:57772/csp/restforms/index.htmlЛогин: demo Пароль: demo