intersystems caché rest forms

17
© 2016 InterSystems Corporation. All rights reserved. RESTForms Лебедюк Эдуард

Upload: intersystems

Post on 15-Jan-2017

102 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: InterSystems Caché REST Forms

© 2016 InterSystems Corporation. All rights reserved.

RESTFormsЛебедюк Эдуард

Page 2: InterSystems Caché REST Forms

2 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/

Что такое RESTForms?

Проект для создания новых REST API с помощью обобщённого REST провайдера для хранимых классов

Цели проекта• Новые REST API без написания кода• Минимальные изменения в хранимых классов

Page 3: InterSystems Caché REST Forms

3 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/

Use cases

• У вас уже есть данные в Caché и вы хотите предоставить часть

данных (или все) в виде REST API

• Вам нужно создать REST API для нового приложения

Page 4: InterSystems Caché REST Forms

4 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/

Архитектура приложения

JS клиент RESTForms Классы Caché

Page 5: InterSystems Caché REST Forms

5 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/

CRUD

• Операции над объектом или набором объектов:

• Create

• Read

• Update

• Delete

Page 6: InterSystems Caché REST Forms

6 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/

Возможности• CRUD над объектом

• CRUD над классом

• R над коллекциями (через SQL)

• Работа с файлами

Page 7: InterSystems Caché REST Forms

7 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/

Особенности

• JS работает сразу

• Документация

• Примеры

• СПО, доступно на GitHub

Page 8: InterSystems Caché REST Forms

8 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/

Как начать использовать RESTForms?

• Импортировать проект с GitHub (желательно как субмодуль)

• Для каждого хранимого класса, который вы хотите предоставить через REST API

• Наследуйте его от Form.Adaptor

• Укажите права доступа (например read-only или read-write)

• Укажите свойство названия объекта класса

• Укажите названия для свойств, которые нужно отображать

Page 9: InterSystems Caché REST Forms

9 | © 2016 InterSystems Corporation. All Rights Reserved.

RESTFormsUI

Page 10: InterSystems Caché REST Forms

10 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/

RESTFormsUI

• Просмотр данных RESTForms

• Поддержка мобильных устройств

• Адаптивный дизайн

Page 11: InterSystems Caché REST Forms

11 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/

Список форм

Page 12: InterSystems Caché REST Forms

12 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/

Просмотр объектов формы

Page 13: InterSystems Caché REST Forms

13 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/

Просмотр и редактирование объекта

Page 14: InterSystems Caché REST Forms

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

Page 15: InterSystems Caché REST Forms

15 | © 2016 InterSystems Corporation. All Rights Reserved. https://github.com/intersystems-ru/RESTForms/

Выводы

• RESTForms упрощает создание нового REST API

• RESTFormsUI позволяет сразу посмотреть на данные,

предоставляемые RESTForms

Page 16: InterSystems Caché REST Forms

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/

Page 17: InterSystems Caché REST Forms

© 2016 InterSystems Corporation. All rights reserved.

Конец

http://176.112.210.99:57772/csp/restforms/index.htmlЛогин: demo Пароль: demo