SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Downloaden Sie, um offline zu lesen
how does go about performing

rapid web dev,
the right way.
$ whoami




Steven Goh
ctrleff
what makes it rapid?
what is the right way?
1. super easy to prototype
  aka, does not get in your way.
python

print(“hello world”)
java
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}
2. scalable
2. scalable
  collaborators will not be cursing (that much) at your shitty code base
2. scalable
  collaborators will not be cursing (that much) at your shitty code base
  proven technology that is actually used by huge infrastructures. (no rewriting needed)
3. fun!!!!!!!!
   nuff said.
android dev hackathon
android dev hackathon
solo dev vs groups of 5
wouldn't mind a new android tablet
so... cheat!
radar = phonegap = webapp
web app = client-side + backend
web app = client-side + backend
web app = client-side + backend
          html
          css
          javascript
HTML
is !@$#ing ugly and boring. i also think it is verbose.
<body>
        <div id="wrap">
            <div class="bodycontainer" id="main">
                <div class="left">
                    <img src="/static/images/menu_less_shadow.png"
class="appimg" />
                </div>
                <div class="right">
                    <div class="intro">
                        Hello You,
                    </div>
                    <div class="content">
                        <div class="graybox">
                            <span class="first">
                                Remember that dingy burger place around the
remote corner that was surprisingly cheap and good ?
                            </span>
                            <span class="meneither">
                                Me Neither.
                            </span>
                            <span class="bestfriend">
                                Nor your best friend.
                            </span>
                            <span class="last">
                                Soon you can. We are <text>launching
soon</text>.
                            </span>
                        </div>
                    </div>
Disgusting eh?
i wish...
i have a pythonic html. indentation for nesting.
something that's nice to work with css.
Hello SHPAML.
360 line python library.
body
        div#wrap
            div.bodycontainer#main
                div.left
                    > img.appimg src="/static/images/menu_less_shadow.png"
                div.right
                    div.intro
                        Hello You,
                    div.content
                        div.graybox
                            span.first
                                Remember that dingy burger place around the
remote corner that was surprisingly cheap and good ?
                            span.meneither
                                Me Neither.
                            span.bestfriend
                                Nor your best friend.
                            span.last
                                Soon you can. We are <text>launching
soon</text>.
CSS
body {
  background-color: #d2d2d2; }
  body .bodycontainer {
    width: 1200px; }
    body .bodycontainer .left {
      width: 430px;
      float: left; }
      body .bodycontainer .left .appimg {
        width: 430px; }
    body .bodycontainer .right {
      width: 770px;
      float: left; }
Not DRY.
i wish...
for variables. for functions. mixins.
Hello SASS.
its a gem.
body
   background-color: #d2d2d2

  .bodycontainer
     width: 1200px

     .left
        width: 430px
        float: left

        .appimg
           width: 430px

     .right
        width: 770px
        float: left
//mixins for typography

=subheader-font
  font-family: "Trebuchet MS"

=content-font
  font-family: "Verdana"
Javascript
just use JQuery, and you are all good.
shpaml + sass + javascript
  != html + css + javascript
Hello             transcompiler-watcher
https://github.com/nubela/transcompiler-watcher
(v_env)nubela@nubela-envy:~/Workspace/ctrleff-landing-page/scripts$ ./watcher
Trasnscompiling: /home/nubela/Workspace/ctrleff-landing-
page/src/templates/influence.shpaml
Trasnscompiling: /home/nubela/Workspace/ctrleff-landing-
page/src/templates/home.shpaml
Trasnscompiling: /home/nubela/Workspace/ctrleff-landing-
page/src/static/css/colors.sass
Trasnscompiling: /home/nubela/Workspace/ctrleff-landing-
page/src/static/css/typography.sass
Trasnscompiling: /home/nubela/Workspace/ctrleff-landing-
page/src/static/css/main.sass
web app = client-side + backend
                       ReST
                       database
Backend
easy to implement ReSTFUL interface
ORM
unit-testing
templating
super small overhead.
Hello Flask.
python microframework.
declare the schema
class Ad(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    location_id = db.Column(db.Integer, db.ForeignKey('location.id'))
    location = db.relationship("Location")
    created_timestamp = db.Column(db.DateTime)
    contact_email = db.Column(db.String(255))

   #meta below
   description = db.Column(db.String(255))
   title = db.Column(db.String(255))
   price = db.Column(db.Float(asdecimal=True))
   image = db.Column(db.String(255))
   category_id = db.Column(db.Integer, db.ForeignKey('category.id'))
   category = db.relationship("Category")
make em serializable
 @property
 def serialize(self):
     return {
             "id": self.id,
             "location": self.location.serialize,
             "created_timestamp": self.created_timestamp.isoformat() ,
             "contact_email": self.contact_email,
             "description": self.description,
             "title": self.title,
             "price": str(int(self.price)),
             "image": self.image,
             "category": self.category.serialize ,
             }
make it ReSTFUL
@app.route('/ad/get', methods=['POST'])
def get_ad():
    """
    Retrieves all the information about an ad.
    """
    from db import Ad
    ad = Ad.query.get(request.form.get("id"))
    if ad:
        return jsonify({"res": ad.serialize })
    else:
        return jsonify({
                        "res": False,
                        "error": "We are unable to find any classifieds near
you!",
                        })
create the tables
def init_db():
    from db import db
    db.create_all()
write the unit-tests
def test_ad_creation(self):
        """
        Tests the API to create ads. Conveniently, also tests get ad api call.
        """
        data = {
                "long": randint(-360000000,360000000),
                "lat": randint(-360000000,360000000),
                "category": 5,
                "email": "test@test.com",
                "title": "Test Item " + random_string(),
                "price": str(randint(0,1000)),
                "image": open_file("sample_upload_pic.jpg"),
                "description": " ".join([random_string() for i in range(10)]),
                }

       #create it
       create_response = self.app.post("/ad/create", data=data)
       response_dict = json.loads(create_response.data)
       ad_id = response_dict["res"]

       #retrieve it
       res = self.app.post("/ad/get", data={"id": ad_id})
       assert "id" in res.data
web app = client-side + backend
software stack:
software stack:
1. SHPAML
software stack:
1. SHPAML
2. SASS
software stack:
1. SHPAML
2. SASS
3. transcompiler-watcher
software stack:
1. SHPAML
2. SASS
3. transcompiler-watcher
4. Flask + its derivatives
software stack:
1. SHPAML
2. SASS
3. transcompiler-watcher
4. Flask + its derivatives
?. virtualenv
?. git
how does go about performing

rapid web dev,                 Questions?
the right way.
+       +

    +
looking for a developers , and a marketing person.
        nubela@ctrleff.com / @nubela / @ctrleff

Weitere ähnliche Inhalte

Was ist angesagt?

Temporary Cache Assistance (Transients API): WordCamp Birmingham 2014
Temporary Cache Assistance (Transients API): WordCamp Birmingham 2014Temporary Cache Assistance (Transients API): WordCamp Birmingham 2014
Temporary Cache Assistance (Transients API): WordCamp Birmingham 2014Cliff Seal
 
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)err
 
Kickin' Ass with Cache-Fu (with notes)
Kickin' Ass with Cache-Fu (with notes)Kickin' Ass with Cache-Fu (with notes)
Kickin' Ass with Cache-Fu (with notes)err
 
Memcached Presentation @757rb
Memcached Presentation @757rbMemcached Presentation @757rb
Memcached Presentation @757rbKen Collins
 
Perlmagickを使った画像処理
Perlmagickを使った画像処理Perlmagickを使った画像処理
Perlmagickを使った画像処理Toshimitsu YAMAGUCHI
 
Модерни езици за програмиране за JVM (2011)
Модерни езици за програмиране за JVM (2011)Модерни езици за програмиране за JVM (2011)
Модерни езици за програмиране за JVM (2011)Bozhidar Batsov
 
Nodejs mongoose
Nodejs mongooseNodejs mongoose
Nodejs mongooseFin Chen
 
Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB jhchabran
 
High Performance Django
High Performance DjangoHigh Performance Django
High Performance DjangoDjangoCon2008
 
날로 먹는 Django admin 활용
날로 먹는 Django admin 활용날로 먹는 Django admin 활용
날로 먹는 Django admin 활용KyeongMook "Kay" Cha
 
Make your own wp cli command in 10min
Make your own wp cli command in 10minMake your own wp cli command in 10min
Make your own wp cli command in 10minIvelina Dimova
 
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...Axway Appcelerator
 
Node.js in action
Node.js in actionNode.js in action
Node.js in actionSimon Su
 
Dart : one language to rule them all - MixIT 2013
Dart : one language to rule them all - MixIT 2013Dart : one language to rule them all - MixIT 2013
Dart : one language to rule them all - MixIT 2013Sébastien Deleuze
 
WordPress Capabilities Magic
WordPress Capabilities MagicWordPress Capabilities Magic
WordPress Capabilities Magicmannieschumpert
 
Coffeescript: No really, it's just Javascript
Coffeescript: No really, it's just JavascriptCoffeescript: No really, it's just Javascript
Coffeescript: No really, it's just JavascriptBrian Mann
 

Was ist angesagt? (20)

Jquery examples
Jquery examplesJquery examples
Jquery examples
 
Temporary Cache Assistance (Transients API): WordCamp Birmingham 2014
Temporary Cache Assistance (Transients API): WordCamp Birmingham 2014Temporary Cache Assistance (Transients API): WordCamp Birmingham 2014
Temporary Cache Assistance (Transients API): WordCamp Birmingham 2014
 
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
 
Kickin' Ass with Cache-Fu (with notes)
Kickin' Ass with Cache-Fu (with notes)Kickin' Ass with Cache-Fu (with notes)
Kickin' Ass with Cache-Fu (with notes)
 
Memcached Presentation @757rb
Memcached Presentation @757rbMemcached Presentation @757rb
Memcached Presentation @757rb
 
Perlmagickを使った画像処理
Perlmagickを使った画像処理Perlmagickを使った画像処理
Perlmagickを使った画像処理
 
Модерни езици за програмиране за JVM (2011)
Модерни езици за програмиране за JVM (2011)Модерни езици за програмиране за JVM (2011)
Модерни езици за програмиране за JVM (2011)
 
Nodejs mongoose
Nodejs mongooseNodejs mongoose
Nodejs mongoose
 
Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB
 
High Performance Django
High Performance DjangoHigh Performance Django
High Performance Django
 
날로 먹는 Django admin 활용
날로 먹는 Django admin 활용날로 먹는 Django admin 활용
날로 먹는 Django admin 활용
 
Perl object ?
Perl object ?Perl object ?
Perl object ?
 
Make your own wp cli command in 10min
Make your own wp cli command in 10minMake your own wp cli command in 10min
Make your own wp cli command in 10min
 
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
 
Node.js in action
Node.js in actionNode.js in action
Node.js in action
 
Dart : one language to rule them all - MixIT 2013
Dart : one language to rule them all - MixIT 2013Dart : one language to rule them all - MixIT 2013
Dart : one language to rule them all - MixIT 2013
 
WordPress Capabilities Magic
WordPress Capabilities MagicWordPress Capabilities Magic
WordPress Capabilities Magic
 
HTML5 - Pedro Rosa
HTML5 - Pedro RosaHTML5 - Pedro Rosa
HTML5 - Pedro Rosa
 
Puppet modules for Fun and Profit
Puppet modules for Fun and ProfitPuppet modules for Fun and Profit
Puppet modules for Fun and Profit
 
Coffeescript: No really, it's just Javascript
Coffeescript: No really, it's just JavascriptCoffeescript: No really, it's just Javascript
Coffeescript: No really, it's just Javascript
 

Andere mochten auch

ctrl-EFF Pitch
ctrl-EFF Pitchctrl-EFF Pitch
ctrl-EFF Pitchnubela
 
SUCCESS = ATTITUDE + EMOTION !
SUCCESS = ATTITUDE + EMOTION !SUCCESS = ATTITUDE + EMOTION !
SUCCESS = ATTITUDE + EMOTION !Luis Valente
 
никуда я не хочу идти
никуда я не хочу идти  никуда я не хочу идти
никуда я не хочу идти ko63ar
 
Start Smart in Russia
Start Smart in RussiaStart Smart in Russia
Start Smart in Russiaiorrrrr
 
Aprendiendo uml en_24_horas
Aprendiendo uml en_24_horasAprendiendo uml en_24_horas
Aprendiendo uml en_24_horascesaraugusta
 
Capabilities short
Capabilities shortCapabilities short
Capabilities shortTaps
 
Mary Moser: LOLcats, Celebrities, and (Red Panda) Bears -- Oh, My!!
Mary Moser: LOLcats, Celebrities, and (Red Panda) Bears -- Oh, My!!Mary Moser: LOLcats, Celebrities, and (Red Panda) Bears -- Oh, My!!
Mary Moser: LOLcats, Celebrities, and (Red Panda) Bears -- Oh, My!!oxfordcollegelibrary
 
"Be the Thunder" Tampa Bay Lightning Case Study
"Be the Thunder" Tampa Bay Lightning Case Study"Be the Thunder" Tampa Bay Lightning Case Study
"Be the Thunder" Tampa Bay Lightning Case StudyJohn Luecke
 
Primary maker for sd36
Primary maker for sd36Primary maker for sd36
Primary maker for sd36Kevin Amboe
 
Indonesia friendly memory championship i mengasah daya ingat lewat kompetisi
Indonesia friendly memory championship i  mengasah daya ingat lewat kompetisiIndonesia friendly memory championship i  mengasah daya ingat lewat kompetisi
Indonesia friendly memory championship i mengasah daya ingat lewat kompetisiYudi Lesmana
 
Toi theo-dao-chua, lm. doan quang, cmc
Toi theo-dao-chua, lm. doan quang, cmcToi theo-dao-chua, lm. doan quang, cmc
Toi theo-dao-chua, lm. doan quang, cmcThịnh Vũ
 
Семинар Модели автоматизации и оптимизации бизнеса
Семинар Модели автоматизации и оптимизации бизнесаСеминар Модели автоматизации и оптимизации бизнеса
Семинар Модели автоматизации и оптимизации бизнесаАльберт Коррч
 
2011 How to Prepare for the First Avenue Career & Grad School Fair
2011 How to Prepare for the First Avenue Career & Grad School Fair 2011 How to Prepare for the First Avenue Career & Grad School Fair
2011 How to Prepare for the First Avenue Career & Grad School Fair Mary Beth Snell
 
Aliens in Our Uplands: Managing Past Mistakes, Preventing New Recruits
Aliens in Our Uplands: Managing Past Mistakes, Preventing New RecruitsAliens in Our Uplands: Managing Past Mistakes, Preventing New Recruits
Aliens in Our Uplands: Managing Past Mistakes, Preventing New RecruitsCary Institute of Ecosystem Studies
 

Andere mochten auch (20)

ctrl-EFF Pitch
ctrl-EFF Pitchctrl-EFF Pitch
ctrl-EFF Pitch
 
SUCCESS = ATTITUDE + EMOTION !
SUCCESS = ATTITUDE + EMOTION !SUCCESS = ATTITUDE + EMOTION !
SUCCESS = ATTITUDE + EMOTION !
 
никуда я не хочу идти
никуда я не хочу идти  никуда я не хочу идти
никуда я не хочу идти
 
Start Smart in Russia
Start Smart in RussiaStart Smart in Russia
Start Smart in Russia
 
Aprendiendo uml en_24_horas
Aprendiendo uml en_24_horasAprendiendo uml en_24_horas
Aprendiendo uml en_24_horas
 
Louise Cohen | PROJECTS
Louise Cohen | PROJECTSLouise Cohen | PROJECTS
Louise Cohen | PROJECTS
 
Capabilities short
Capabilities shortCapabilities short
Capabilities short
 
Mary Moser: LOLcats, Celebrities, and (Red Panda) Bears -- Oh, My!!
Mary Moser: LOLcats, Celebrities, and (Red Panda) Bears -- Oh, My!!Mary Moser: LOLcats, Celebrities, and (Red Panda) Bears -- Oh, My!!
Mary Moser: LOLcats, Celebrities, and (Red Panda) Bears -- Oh, My!!
 
"Be the Thunder" Tampa Bay Lightning Case Study
"Be the Thunder" Tampa Bay Lightning Case Study"Be the Thunder" Tampa Bay Lightning Case Study
"Be the Thunder" Tampa Bay Lightning Case Study
 
Primary maker for sd36
Primary maker for sd36Primary maker for sd36
Primary maker for sd36
 
Conclusions
ConclusionsConclusions
Conclusions
 
Lorena restrepo
Lorena restrepoLorena restrepo
Lorena restrepo
 
Jayb
JaybJayb
Jayb
 
Indonesia friendly memory championship i mengasah daya ingat lewat kompetisi
Indonesia friendly memory championship i  mengasah daya ingat lewat kompetisiIndonesia friendly memory championship i  mengasah daya ingat lewat kompetisi
Indonesia friendly memory championship i mengasah daya ingat lewat kompetisi
 
Manifesto Assistenza Sessuale
Manifesto Assistenza SessualeManifesto Assistenza Sessuale
Manifesto Assistenza Sessuale
 
Economy katalog
Economy katalogEconomy katalog
Economy katalog
 
Toi theo-dao-chua, lm. doan quang, cmc
Toi theo-dao-chua, lm. doan quang, cmcToi theo-dao-chua, lm. doan quang, cmc
Toi theo-dao-chua, lm. doan quang, cmc
 
Семинар Модели автоматизации и оптимизации бизнеса
Семинар Модели автоматизации и оптимизации бизнесаСеминар Модели автоматизации и оптимизации бизнеса
Семинар Модели автоматизации и оптимизации бизнеса
 
2011 How to Prepare for the First Avenue Career & Grad School Fair
2011 How to Prepare for the First Avenue Career & Grad School Fair 2011 How to Prepare for the First Avenue Career & Grad School Fair
2011 How to Prepare for the First Avenue Career & Grad School Fair
 
Aliens in Our Uplands: Managing Past Mistakes, Preventing New Recruits
Aliens in Our Uplands: Managing Past Mistakes, Preventing New RecruitsAliens in Our Uplands: Managing Past Mistakes, Preventing New Recruits
Aliens in Our Uplands: Managing Past Mistakes, Preventing New Recruits
 

Ähnlich wie Rapid web development, the right way.

Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application DesignBryce Kerley
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVCAlive Kuo
 
The Best (and Worst) of Django
The Best (and Worst) of DjangoThe Best (and Worst) of Django
The Best (and Worst) of DjangoJacob Kaplan-Moss
 
Intro to Ruby - Twin Cities Code Camp 7
Intro to Ruby - Twin Cities Code Camp 7Intro to Ruby - Twin Cities Code Camp 7
Intro to Ruby - Twin Cities Code Camp 7Brian Hogan
 
Real life-coffeescript
Real life-coffeescriptReal life-coffeescript
Real life-coffeescriptDavid Furber
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopShoshi Roberts
 
Good practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimizationGood practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimizationPrestaShop
 
Ruby on Rails 3.1: Let's bring the fun back into web programing
Ruby on Rails 3.1: Let's bring the fun back into web programingRuby on Rails 3.1: Let's bring the fun back into web programing
Ruby on Rails 3.1: Let's bring the fun back into web programingBozhidar Batsov
 
mongodb-introduction
mongodb-introductionmongodb-introduction
mongodb-introductionTse-Ching Ho
 
Crossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkCrossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkDaniel Spector
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebJames Rakich
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasminePaulo Ragonha
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e bigAndy Peterson
 
Nanoformats
NanoformatsNanoformats
Nanoformatsrozario
 
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpOptimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpMatthew Davis
 
PostgreSQL Open SV 2018
PostgreSQL Open SV 2018PostgreSQL Open SV 2018
PostgreSQL Open SV 2018artgillespie
 
JavaScript for Flex Devs
JavaScript for Flex DevsJavaScript for Flex Devs
JavaScript for Flex DevsAaronius
 

Ähnlich wie Rapid web development, the right way. (20)

Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application Design
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
The Best (and Worst) of Django
The Best (and Worst) of DjangoThe Best (and Worst) of Django
The Best (and Worst) of Django
 
Intro to Ruby - Twin Cities Code Camp 7
Intro to Ruby - Twin Cities Code Camp 7Intro to Ruby - Twin Cities Code Camp 7
Intro to Ruby - Twin Cities Code Camp 7
 
Real life-coffeescript
Real life-coffeescriptReal life-coffeescript
Real life-coffeescript
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop
 
Accelerated Stylesheets
Accelerated StylesheetsAccelerated Stylesheets
Accelerated Stylesheets
 
Good practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimizationGood practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimization
 
Jquery
JqueryJquery
Jquery
 
Ruby on Rails 3.1: Let's bring the fun back into web programing
Ruby on Rails 3.1: Let's bring the fun back into web programingRuby on Rails 3.1: Let's bring the fun back into web programing
Ruby on Rails 3.1: Let's bring the fun back into web programing
 
mongodb-introduction
mongodb-introductionmongodb-introduction
mongodb-introduction
 
Crossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkCrossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end Framework
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e big
 
Nanoformats
NanoformatsNanoformats
Nanoformats
 
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpOptimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
 
PostgreSQL Open SV 2018
PostgreSQL Open SV 2018PostgreSQL Open SV 2018
PostgreSQL Open SV 2018
 
JavaScript for Flex Devs
JavaScript for Flex DevsJavaScript for Flex Devs
JavaScript for Flex Devs
 

Kürzlich hochgeladen

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Kürzlich hochgeladen (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

Rapid web development, the right way.

  • 1. how does go about performing rapid web dev, the right way.
  • 3. what makes it rapid? what is the right way?
  • 4. 1. super easy to prototype aka, does not get in your way.
  • 6. java class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); } }
  • 8. 2. scalable collaborators will not be cursing (that much) at your shitty code base
  • 9. 2. scalable collaborators will not be cursing (that much) at your shitty code base proven technology that is actually used by huge infrastructures. (no rewriting needed)
  • 10. 3. fun!!!!!!!! nuff said.
  • 12. android dev hackathon solo dev vs groups of 5 wouldn't mind a new android tablet so... cheat!
  • 13. radar = phonegap = webapp
  • 14. web app = client-side + backend
  • 15. web app = client-side + backend
  • 16. web app = client-side + backend html css javascript
  • 17. HTML is !@$#ing ugly and boring. i also think it is verbose.
  • 18. <body> <div id="wrap"> <div class="bodycontainer" id="main"> <div class="left"> <img src="/static/images/menu_less_shadow.png" class="appimg" /> </div> <div class="right"> <div class="intro"> Hello You, </div> <div class="content"> <div class="graybox"> <span class="first"> Remember that dingy burger place around the remote corner that was surprisingly cheap and good ? </span> <span class="meneither"> Me Neither. </span> <span class="bestfriend"> Nor your best friend. </span> <span class="last"> Soon you can. We are <text>launching soon</text>. </span> </div> </div>
  • 19. Disgusting eh? i wish... i have a pythonic html. indentation for nesting. something that's nice to work with css.
  • 20. Hello SHPAML. 360 line python library.
  • 21. body div#wrap div.bodycontainer#main div.left > img.appimg src="/static/images/menu_less_shadow.png" div.right div.intro Hello You, div.content div.graybox span.first Remember that dingy burger place around the remote corner that was surprisingly cheap and good ? span.meneither Me Neither. span.bestfriend Nor your best friend. span.last Soon you can. We are <text>launching soon</text>.
  • 22. CSS
  • 23. body { background-color: #d2d2d2; } body .bodycontainer { width: 1200px; } body .bodycontainer .left { width: 430px; float: left; } body .bodycontainer .left .appimg { width: 430px; } body .bodycontainer .right { width: 770px; float: left; }
  • 24. Not DRY. i wish... for variables. for functions. mixins.
  • 26. body background-color: #d2d2d2 .bodycontainer width: 1200px .left width: 430px float: left .appimg width: 430px .right width: 770px float: left
  • 27. //mixins for typography =subheader-font font-family: "Trebuchet MS" =content-font font-family: "Verdana"
  • 28. Javascript just use JQuery, and you are all good.
  • 29. shpaml + sass + javascript != html + css + javascript
  • 30. Hello transcompiler-watcher https://github.com/nubela/transcompiler-watcher
  • 31. (v_env)nubela@nubela-envy:~/Workspace/ctrleff-landing-page/scripts$ ./watcher Trasnscompiling: /home/nubela/Workspace/ctrleff-landing- page/src/templates/influence.shpaml Trasnscompiling: /home/nubela/Workspace/ctrleff-landing- page/src/templates/home.shpaml Trasnscompiling: /home/nubela/Workspace/ctrleff-landing- page/src/static/css/colors.sass Trasnscompiling: /home/nubela/Workspace/ctrleff-landing- page/src/static/css/typography.sass Trasnscompiling: /home/nubela/Workspace/ctrleff-landing- page/src/static/css/main.sass
  • 32. web app = client-side + backend ReST database
  • 33. Backend easy to implement ReSTFUL interface ORM unit-testing templating super small overhead.
  • 35. declare the schema class Ad(db.Model): id = db.Column(db.Integer, primary_key=True) location_id = db.Column(db.Integer, db.ForeignKey('location.id')) location = db.relationship("Location") created_timestamp = db.Column(db.DateTime) contact_email = db.Column(db.String(255)) #meta below description = db.Column(db.String(255)) title = db.Column(db.String(255)) price = db.Column(db.Float(asdecimal=True)) image = db.Column(db.String(255)) category_id = db.Column(db.Integer, db.ForeignKey('category.id')) category = db.relationship("Category")
  • 36. make em serializable @property def serialize(self): return { "id": self.id, "location": self.location.serialize, "created_timestamp": self.created_timestamp.isoformat() , "contact_email": self.contact_email, "description": self.description, "title": self.title, "price": str(int(self.price)), "image": self.image, "category": self.category.serialize , }
  • 37. make it ReSTFUL @app.route('/ad/get', methods=['POST']) def get_ad(): """ Retrieves all the information about an ad. """ from db import Ad ad = Ad.query.get(request.form.get("id")) if ad: return jsonify({"res": ad.serialize }) else: return jsonify({ "res": False, "error": "We are unable to find any classifieds near you!", })
  • 38. create the tables def init_db(): from db import db db.create_all()
  • 39. write the unit-tests def test_ad_creation(self): """ Tests the API to create ads. Conveniently, also tests get ad api call. """ data = { "long": randint(-360000000,360000000), "lat": randint(-360000000,360000000), "category": 5, "email": "test@test.com", "title": "Test Item " + random_string(), "price": str(randint(0,1000)), "image": open_file("sample_upload_pic.jpg"), "description": " ".join([random_string() for i in range(10)]), } #create it create_response = self.app.post("/ad/create", data=data) response_dict = json.loads(create_response.data) ad_id = response_dict["res"] #retrieve it res = self.app.post("/ad/get", data={"id": ad_id}) assert "id" in res.data
  • 40. web app = client-side + backend
  • 44. software stack: 1. SHPAML 2. SASS 3. transcompiler-watcher
  • 45. software stack: 1. SHPAML 2. SASS 3. transcompiler-watcher 4. Flask + its derivatives
  • 46. software stack: 1. SHPAML 2. SASS 3. transcompiler-watcher 4. Flask + its derivatives ?. virtualenv ?. git
  • 47. how does go about performing rapid web dev, Questions? the right way.
  • 48. + + +
  • 49.
  • 50. looking for a developers , and a marketing person. nubela@ctrleff.com / @nubela / @ctrleff