API Framework overview

From DevSummit
Revision as of 22:48, 15 May 2015 by Vivian (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

API frameworks

when people need an application (assuming they don't just need a website)

functionality driven (an application is)

gmail is an application

usually when people want an application they are wrong


cms with strength of a framework behind it would be cool 'symphony' is a framework 'drupal' is a cms – part is object oriented

early web dev – ppl wrote cgis in c++ most of web is strings – so they switched to perl then php came along – php – low brow web, java became high brow web

yahoo runs on php, and php can scale php is messy, not well architected, funky – ex 'process payment gateway' – part of core language or randomly having different orders of parameters

most flickr code is front end, normal php 20% is javascript front end 40% java image manipulation code

php – proves you can make unstructured complicated things without a framework, fast, hard to maintain java – opposite extreme [how so?] – reliable, but hard to maintain as well

javabeans – restructuring rethinking

spring – java web development framework – had object mapper thing -

ruby on rails: - said (2004) design patterns, unit testing, monoview controllers desktop design patterns – business logic and display to users (most web apps are this format)

visual presention, control flow, business logic – all separate and don't communicate with each other

can make different interfaces to logic

core model all web frameworks today

'control flow authorization' rails made web dev fast – rules of what you were supposed to do – preset everything you had to do - figuring out schema automatically by what the database was

no ideas in ruby on rails was new – but it was cherry picked ideas from all of web dev – make developing applications 10x faster

code igniter cake php grails

concurrent with rails: django – in python - a web app framework for a newspaper in kansas – lawrence something world – that company could invest – build code on top of newspaper

rails built for developing basecamp rails not cms like – application centric django built for sites that were cms like ruby on rails doesn't have users (install plugin) no template inheritance - django gives you users and debug bar

debate – how much magic to do how much of your stack should be rails, vs how much to integrate with other things

pylons – framework – does code resuse – uses existing object relational mapper – glue between parts of language – all parts of pylongs was more mature because it used exising code

grails – took parts of other things too

used tools from java tool box – tools didn't gel right, but better than working from scratch

php – tried this too - erasmus things templates and somtehing else is php – is AK-47 of programming languages – not smart, not fancy, works everywhere – php is simple and fast – can copy and paste it -

people used php without knowing anything – but people also got a lot of stuff done –

code igniter (minimalist) and symphony (bigger, more like rails, all-encompassing) – php frameworks (best practices – help prevent bad use of php

php5 is a more real programming language than php4 -

c++ = visual basic – upgraded to be like java

java programmers tend to overengineer and have giant teams that work more slowly jRuby – and some in java – (hybrid solution)

faster lighter quicker java -

ant author now does rails (he abandoned java)

people switch languages all the time

recommended language to learn – php + java programmers recommended to switch)

python/django and rails/ruby both have test driven development, communities,

cohanna – for a specific php version

cdbaby – tried to port what worked in php to rails – that was lots of bending over backwards

sapphire – things starting in php5 with people coming back from rails – potentially new frameworks

rhino -v8 - jvm

'javascript the good parts'

key bad parts of javascript – global variables – not scoped by default

eval is nasty and bad javascript gave us json

javascript object serialization – javascript object notation write object out in code (hashes, arrayes - ) is in text format – can parse in any language – dynamically types – nothing specific to javascript -

python can eval json, eval'ing things over network is a bad idea using a parser -

javascript frameworks – jquery – common set of tools - js and ruby you can restrucutre how it works in runtime

jquery – resets browser javascript funkiness – updated to make easier to deal with dom, and high level interface stuff – yui gives you tools, jquery – messes with core concepts of js language -

prototype – older and losing sway

yui – mootols, dojo – heavy front end user interface front end frameworks

frankie – projects with this already – a route system in javascript app – pings routers, controller, model backed up and lives in browser, accepts ping and does stuff with them

gmail – all built with javascript

firefox has sqllite database – so you can have persistence in firefox

google gears – to do persistence -

everyone gives you html, css, js, json –

web server that handles network connection

twitter as example – twitter would be an application that spits out html

mod rails – like mod php, or mod perl -

system for sending mail, store usernames, generate permalinks – programmer connects lowlevel parts into an application

plugins – lots of them – all lower level -

ruby had been used for simulations – ex. Uc berkeley traffic flow

ruby – is perl syntax and perl values on a small talk backend – with some prototype and scheme

everything is an object – can mix things into classes – 12 keywords and everything else is methods on a class

ruby lets you restucutre the language python won't let you do that – pythons communcity values consistency and order ruby value being able to restructure laugnage to focus on solving problem in niche way python will always look consistent -

ex. in ruby/rails you can redefine what print does on the spot

ruby community strongly believes in test coverage – full test coverage is important plugins – extracting what are reused

to do things in any framework – you have to understand can use rail in less magical way – (than the blog screencast)

magic – solving problems

wsgi and rack – wsgi is python – web servces general integration (maybe) rack – (ruby) racking in different parts of your web application

json pipelining http request – lightweight applications – handing user authenticate merv, sinatra – lightweight applications -

'gives you httpstack' – jack tomcat – has filters – that request goes through chained set of filters