Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane...
-
Upload
zander-hales -
Category
Documents
-
view
216 -
download
1
Transcript of Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane...
![Page 1: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/1.jpg)
Meteoroid
Towards a real MVC for the Web
Lautaro Fernández Santiago RoblesAndrés Fortier Stephane DucasseGustavo Rossi Silvia Gordillo
([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])
![Page 2: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/2.jpg)
Web: To Infinity And Beyond!
•Cheaper & Faster•Lots of services are provided via Web
•Mail•Home banking•Collaborative editors•Social networks•E-Commerce•Etc.
•Present on any device
![Page 3: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/3.jpg)
Web evolution
Beginning•Request/response•Static information
Now the Web is more complex, requiring •Complex models•Dynamic information•More interaction client/server•Client’s updates from the server
without the request
For the last one a new approach is needed
![Page 4: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/4.jpg)
Comet
•A way to push data from the server into Web browsers
•Umbrella of technologies•JavaScript•Ajax•Streaming
•Browser-dependent hack
Request/Response mechanism
Comet
mechanism
![Page 5: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/5.jpg)
Comet (cont.)
•Not an standard (yet)•Common technique for all browsers
• Waiting cursor issues• Throbber issues• Status bar issues
•Best techniques for browsers
Forever IFrame
XMLHttpRequest
Server-Sent Events
ActiveX + IFrame
(others)
![Page 6: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/6.jpg)
Understanding some background
![Page 7: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/7.jpg)
Seaside
•Framework to build Web applications•Characteristics:
•Nesting components •Hot debugging and recompilation•Multiple control flow •Stack reification for call and answer•Action callbacks
•Etc.
![Page 8: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/8.jpg)
Model-View-Controller
•Model•Independent from Views
•View•Displays Model information
•Controller•Processes events
![Page 9: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/9.jpg)
Announcements
•It is an observer framework simpler and more powerful than legacy frameworks
•Triggers robust objects instead of symbols, which make the concrete observer behaviour much easier
Vs.
self change: #value with: aValue
self announce: (ValueAnnouncement with: aValue)
![Page 10: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/10.jpg)
Value Models
•General idea•Holds a model•Understands #value and #value:•Notifies its dependents when its value changes•Simple, standard
• Useful for widgets•Widgets access the value independently of the model•Uniform way to access the value
![Page 11: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/11.jpg)
Meteoroid
•Framework to create Live Web applications•Combines
•Comet concept•Seaside features•Announcements•MVC pattern•Value Models
![Page 12: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/12.jpg)
Meteoroid Layers
•Meteoroid is divided in different layers•Every layer provides
•More functionality•More abstraction
![Page 13: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/13.jpg)
JavaScript Layer
•Bottom Layer, less abstraction•Provides
•A Comet connection•Message #pushScript: aScript•DOM manipulation
self pushScript: 'alert(“Hello World”);'
![Page 14: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/14.jpg)
Demo
![Page 15: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/15.jpg)
Announcement Layer
More abstraction•Through MVC this layer will handle the dependencies•Add & remove View-Model dependencies automatically•Messages to update and insert JavaScript automatically
MeteoroidComponent>>initializeself on: ValueChangedAnnouncement of: self model update: 'someDOM_ID' callback: [:html :announcement :announcer|
html text: announcer value ]
![Page 16: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/16.jpg)
Demo
![Page 17: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/17.jpg)
Web Value Model Layer
•Combines•Announcement layer•HTML widgets•Value Models
•Allows to create Web apps like Desktop apps
![Page 18: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/18.jpg)
Web Value Model Layer (cont.)
•WebValueModel•ValueModel Wrapper•Allows to use #change: and #announce:
•Updateables Widgets•Access a Value Model•Value Model notifies a WebValueModel which updates
the web widget
![Page 19: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/19.jpg)
Demo
![Page 20: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/20.jpg)
Demo
![Page 21: Meteoroid Towards a real MVC for the Web Lautaro Fernández Santiago Robles Andrés Fortier Stephane Ducasse Gustavo Rossi Silvia Gordillo ( lfernandez@lifia.info.unlp.edu.ar.](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649c7b5503460f9492ecda/html5/thumbnails/21.jpg)
That’s all,Thanks!