Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Platypus.jsEnterpriseJavaScript 
ContainerДоклад: Марат Гайнуллин
Чтение данных без ORM-а 
1.varresults = executeQuery(“some sqlselect text”); 
2.while(!results.eof()){ 
3.results.first();...
Использование ORM-а 
1.varcustomers = Models.find(“select * from customers …”); 
2.customers.forEach(function(aCustomer){ ...
Запрос как источник схемы данных4
Platypus.js ORM 
1./** 
2.* Devices communication module. 
3.* @acceptor asc6 
4.*/ 
5.function Asc6Acceptor() { 
6.varsel...
Knockout.js 
1.function TaskListViewModel() { 
2.// Data 
3.varself = this; 
4.self.tasks=ko.observableArray([]); 
5.self....
Bookshelf.js 
1.varCustomer =bookshelf.Model.extend({ 
2.initialize: function () { 
3.this.on('saving', this.validateSave)...
Backbone.js 
1.varSubject = {}; 
2._.extend(Subject, Backbone.Events); 
3.Subject.on("alert", function (msg) { 
4.alert("T...
Platypus.js Декларативный жизненный цикл 
1./** 
2.* @resident 
3.* 
4.*/ 
5.function GlobalModule() { 
6.} 
7./** 
8.* @s...
Platypus.js Декларативная безопасность 
1./** 
2.* @rolesAllowedbuh 
3.*/ 
4.function SessionModule() { 
5.varself = this;...
Platypus.js Чистый прикладной код 
1.function Packet(){ 
2.// Pure application class 
3.Packet.superclass.constructor.appl...
12
Platypus UI13
14
Java SE ClientBrowser15
16
17
Java EE18
Node19
Platypus20
Уровни параллелизма Platypus.jsBrowser 
Browser2BrowserBrowserStateless server moduleStateful server moduleResident server...
Архитектура Platypus.js22
Спасибо за внимание 
Platypus.js документация, дистрибутивы: 
http://www.platypus-platform.org 
Исходники: 
https://github...
Upcoming SlideShare
Loading in …5
×
Upcoming SlideShare
Meteor за 15 минут
Next
Download to read offline and view in fullscreen.

0

Share

Download to read offline

JavaScript в enterprise приложениях

Download to read offline

Слайды с выступления Марата Гайнуллина на MoscowJS 16

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

JavaScript в enterprise приложениях

  1. 1. Platypus.jsEnterpriseJavaScript ContainerДоклад: Марат Гайнуллин
  2. 2. Чтение данных без ORM-а 1.varresults = executeQuery(“some sqlselect text”); 2.while(!results.eof()){ 3.results.first(); 4.varaddress = results.fieldByName(“address”).asString(); 5.varphone = results.fieldByName(“phone”).asString(); 6.varemail = results.fieldByName(“phone”).asString(); 7.vardateOfBirth= results.fieldByName(“birth”).asDate(); 8.} 2
  3. 3. Использование ORM-а 1.varcustomers = Models.find(“select * from customers …”); 2.customers.forEach(function(aCustomer){ 3.… 4.}); 5.varfifthCustomer= customers[4]; 6.If(customers[2].name == =“”){ 7.varcName= prompt(“Введите имя”); 8.customers[2].name = cName; 9.} 3
  4. 4. Запрос как источник схемы данных4
  5. 5. Platypus.js ORM 1./** 2.* Devices communication module. 3.* @acceptor asc6 4.*/ 5.function Asc6Acceptor() { 6.varself = this; 7.varmodel = P.loadModel(this.constructor.name); 8.model.packets.elementClass= Packet; 9.varpackets = model.packets; 10. 11.self.flush= function () { 12.model.save(function (aAffected) { 13.log(“saved “); 14.}, function (e) { 15.log(“failed”); 16.}); 17.}; 18.} 5
  6. 6. Knockout.js 1.function TaskListViewModel() { 2.// Data 3.varself = this; 4.self.tasks=ko.observableArray([]); 5.self.newTaskText= ko.observable(); 6.self.incompleteTasks= ko.computed(function () { 7.return ko.utils.arrayFilter( 8.self.tasks(), 9.function (task) { 10.return !task.isDone() 11.}); 12.}); 13.} 14.ko.applyBindings(new TaskListViewModel()); 6
  7. 7. Bookshelf.js 1.varCustomer =bookshelf.Model.extend({ 2.initialize: function () { 3.this.on('saving', this.validateSave); 4.}, 5.validateSave: function () { 6.return checkit(rules).run(this.attributes); 7.} 8.}); 7
  8. 8. Backbone.js 1.varSubject = {}; 2._.extend(Subject, Backbone.Events); 3.Subject.on("alert", function (msg) { 4.alert("Triggered " + msg); 5.}); 6.Subject.trigger("alert", "an event"); 8
  9. 9. Platypus.js Декларативный жизненный цикл 1./** 2.* @resident 3.* 4.*/ 5.function GlobalModule() { 6.} 7./** 8.* @stateless 9.* 10.*/ 11.function SessionModule() { 12.} 9
  10. 10. Platypus.js Декларативная безопасность 1./** 2.* @rolesAllowedbuh 3.*/ 4.function SessionModule() { 5.varself = this; 6./** 7.* @rolesAllowedmanager 8.*/ 9.self.calcProfit= function () { 10.}; 11.} 10
  11. 11. Platypus.js Чистый прикладной код 1.function Packet(){ 2.// Pure application class 3.Packet.superclass.constructor.apply(this, arguments); 4.self = this; 5.self.calcVolume= function(){}; 6.self.logtitude= 67; 7.self.latitude= 34; 8.self.calcTime= function(){}; 9.} 10.//… 11.varp = new Packet(); 12.p. calcVolume(); 13.p. calcTime(); 14.//… 11
  12. 12. 12
  13. 13. Platypus UI13
  14. 14. 14
  15. 15. Java SE ClientBrowser15
  16. 16. 16
  17. 17. 17
  18. 18. Java EE18
  19. 19. Node19
  20. 20. Platypus20
  21. 21. Уровни параллелизма Platypus.jsBrowser Browser2BrowserBrowserStateless server moduleStateful server moduleResident server moduleBrowser3Browser1BrowserУровень 1Уровень 2Уровень 321
  22. 22. Архитектура Platypus.js22
  23. 23. Спасибо за внимание Platypus.js документация, дистрибутивы: http://www.platypus-platform.org Исходники: https://github.com/altsoft Направляйте вопросы по адресу: info@altsoft.biz Доклад: Марат Гайнуллин. mg@altsoft.biz 23

Слайды с выступления Марата Гайнуллина на MoscowJS 16

Views

Total views

705

On Slideshare

0

From embeds

0

Number of embeds

7

Actions

Downloads

2

Shares

0

Comments

0

Likes

0

×