1. El presente y futuro deldesarrollo web y APIs RESTFlisol, ITToluca, Abril 2013
2. Web developmentPHPRubyPython.NETJava
3. Typical webdevelopment approachServer side frameworkThe framework handles all the incoming http request andprocess themExtract data from request and generates response to the userThe framework generates data representation mostly inhtmlWe can use the framework to generate only data (JSON,XML)
4. ProsVery simple to developAll the app code in a single placeUnique development modelWell know patternsTons of libraries and framewoks out there
5. ConsThe server needs to handle several thingsdatabase connectionFailure and recoveryUser sessionrender all the time the response to the usersframeworks limitations (user interface, scaling,adopting new technologies, support lacking)
7. Is your framework friendly?
8. Beware‘Full stack frameworks’Do you really need a ‘full stack’ framework?Are you using all the features provided by the fullstack framework?Sometimes we don’t need a full stack frameworkex. Simple app or service (REST)
9. Real life webapp, web trafﬁc
11. WebApps architectureBuilt your complete solution using several logicalcomponentsEach component has a single responsabilityBuilt each component with the right tech stack
12. Apps• API• Typical Grails application, with no GSPs.• Speaks only JSON• Used by partners (remote services) andHipStore• Admin• Typical Grails application
15. HipStore• Developed in CoffeeScript• Uses PushState• RequireJS (AMD Support)• HandleBars (Template Engine)• JQuery• Underscore• Twitter Bootstrap• Build and packaged with Jake
16. HipStore• Single Page Application• Chaplin consumes JSON from the API torender the store items.• Uses PushState to update the URL in thebrowser.Very useful for bookmarking andsocial media sharing, even for SEO.
17. Our approach• Write to disk all the possible links inHipStore. Crazy?• We use ZombieJS to navigate the websiteand then write to disk the generated HTML• Put those static ﬁles (HTML) in thewebserver document root• The best cache ever
22. Results• The load in our Web Servers was reduce alot.• The load in the database reduced a lot.• The users can share the links.• Store becomes very search engine friendly