ITT Flisol 2013
Upcoming SlideShare
Loading in...5
×
 

ITT Flisol 2013

on

  • 424 views

Presentación dada en el Flisol 2013 en el ITT en Mayo de 2013

Presentación dada en el Flisol 2013 en el ITT en Mayo de 2013

Statistics

Views

Total Views
424
Views on SlideShare
424
Embed Views
0

Actions

Likes
2
Downloads
8
Comments
1

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

ITT Flisol 2013 ITT Flisol 2013 Presentation Transcript

  • El presente y futuro deldesarrollo web y APIs RESTFlisol, ITToluca, Abril 2013
  • Web developmentPHPRubyPython.NETJava
  • 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)
  • ProsVery simple to developAll the app code in a single placeUnique development modelWell know patternsTons of libraries and framewoks out there
  • 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)
  • Modern featuresMobile supportAsynchronous processing (server side & client side)Content negotiation (JSON, XML, html, SOAP?)View technologies independence (JavaScript, Template engines)NoSql support (MongoDB, Redis, Cassandra, etc)DevelopmentFull stackSpecific stackCloud deployment
  • Is your framework friendly?
  • 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)
  • Real life webapp, web traffic
  • Real life web system• API:WebServices REST for informationexchange• Admin.Web application for internal use• WebSite.A totally static HTML application builtwith Chaplin and several JavaScriptmicroframewoks
  • WebApps architectureBuilt your complete solution using several logicalcomponentsEach component has a single responsabilityBuilt each component with the right tech stack
  • Apps• API• Typical Grails application, with no GSPs.• Speaks only JSON• Used by partners (remote services) andHipStore• Admin• Typical Grails application
  • Developmentenhancements• Increased test cases in both Grails apps• Spock• Jasmine for JavaScript code• Introduced Jenkins• Jenkins Jobs to deploy automatically to QA &Production environments• Bash shell scripts
  • HipStore• Static HTML application built with Chaplin• Chaplin is an architecture for JavaScriptapplications using the Backbone.js library
  • HipStore• Developed in CoffeeScript• Uses PushState• RequireJS (AMD Support)• HandleBars (Template Engine)• JQuery• Underscore• Twitter Bootstrap• Build and packaged with Jake
  • 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.
  • 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 files (HTML) in thewebserver document root• The best cache ever
  • Why do this?• When the user visit our website, thewebserver will respond with completelystatic HTML, CSS, JavaScript files• Very fast• The user never hits the Tomcats, we reducethe load in the app servers.• The webserver always responds very fast
  • ZombieJS
  • HTML harvesting• The Node app receives the JSON message• Navigates to HipStore with ZombieJS• Executes the JavaScript (Chaplin app)• Extracts the generated HTML with jQuery• Saves to disk in the web server documentroot
  • Things to consider• When an item in the Store is modified, we need toregenerate the appropriate HTML file only once.• Then all the users will receive the same file• The user only hits the Tomcat when really need it(CheckOut, Registration)• When the user click in some action in the app, theinteraction is handled by Chaplin controller if thebrowser supports JavaScript• Remember in our website the content is almost static?
  • 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
  • Photo creditshttp://flic.kr/p/7gerV8http://flic.kr/p/5yZGvb