Docstoc

Building Beautiful and Scalable Applications

Document Sample
Building Beautiful and Scalable Applications Powered By Docstoc
					..............................................................................................................
                  Going the              Extra Mile in
              building Beautiful & Scalable
                                   Applications
..............................................................................................................

                                                                                                             1
                                                                                         Internet Addict for 11+ Years...




                                      Karthik Kastury
                                       24x7 Internet Geek | Unlucky in Cards
                                       B.E. Information Science
                                       Engineer / Hacker / Blogger / Apple fanboi
                                       and evil minded. *Pun Intended*
................................................................................................................................

              Blog                     http://karthik.kastury.in/
              Email                    hello@karthik.kastury.in
              Twitter                  @KarthikDot

................................................................................................................................
                                                                                                                               2
..............................................................................................................


                    #ExtraMileNitte
 ...........................................................................................................
                                                                                                               3
..............................................................................................................


      Ready to Dive in?
..............................................................................................................




                                                                                                             4
                          Extra Mile in
                  Going the
              building Beautiful & Scalable
                        Applications
..............................................................................................................

           What?                     >        Why?                  >         How?
..............................................................................................................

                                      Conclusion
..............................................................................................................
                                                                                                             5
..............................................................................................................



                            WHAT?
..............................................................................................................




                                                                                                             6
..............................................................................................................

       What we do today
       ‣ Traditional Development Tools like .NET or
         JAVA with their IDE’s.

       ‣ Development in teams can be tricky at best.

       ‣ Testing, Documentation are usually ignored, or
         need separate tools themselves.


..............................................................................................................
                                                                                                             7
..............................................................................................................


                             OUCH!
..............................................................................................................
                                                                                                             8
..............................................................................................................


                                 OMG!
..............................................................................................................



                                                                                                             9
..............................................................................................................




  Some might like this, but it's mostly
       because most Software
 Development Tools are designed
  for computers, not for human beings.


..............................................................................................................
                                                                                                            10
..............................................................................................................




They treat you like a Baby


..............................................................................................................
                                                                                                            11
..............................................................................................................


LEARNING TO WALK
..............................................................................................................



                                                                                                            12
..............................................................................................................




      When you are the

..............................................................................................................
                                                                                                            13
..............................................................................................................


                               BOSS
..............................................................................................................



                                                                                                            14
..............................................................................................................

       Is it Bad?
       ‣ Development, Testing, Debugging are different
         cycles. *

       ‣ Documentation is often ignored, or left to
         another team.

       ‣ Collaboration between teams,Version Control
         are different tools, and not standards based.

                                                                                    * Until VS 2010
..............................................................................................................
                                                                                                            15
..............................................................................................................




                          Extra Mile in
                  Going the
              building Beautiful & Scalable
                        Applications


..............................................................................................................
                                                                                                            16
..............................................................................................................



                                WHY?
..............................................................................................................




                                                                                                            17
..............................................................................................................




     “       There are no traffic jams
                 along the extra mile
                                                                                                      ”
                                                                             ROGER STAUBACH




..............................................................................................................
                                                                                                            18
..............................................................................................................

       Why?

       ‣Personal ambitions

       ‣Clients will                   you ( Yes, this is good )

       ‣You will get noticed

       ‣More opportunities ...


..............................................................................................................
                                                                                                            19
..............................................................................................................


CODING CAN BE FUN!
..............................................................................................................




                                                                                                            20
..............................................................................................................



                               HOW?
..............................................................................................................




                                                                                                            21
..............................................................................................................
       How?
       ‣Use modern Development Languages.

       ‣Go beyond Relational Databases (NoSQL)

       ‣The Internet (Mobile) is the ONLY
       platform going forward.

       ‣Social Coding Platforms is the key to
       Success.

        ‣Be bold enough to break the traditions.
..............................................................................................................
                                                                                                            22
..............................................................................................................




            Buzz
            Words
..............................................................................................................
                                                                                                            23
..............................................................................................................


                GET REAL
..............................................................................................................




                                                                                                            24
..............................................................................................................

       GETTING REAL
       ‣Build the Real thing first.

       ‣Stay Small and Agile

       ‣Start with Interface, and build
       backwards.

       ‣Do what’s needed, and nothing that’s not.

..............................................................................................................
                                                                                                            25
..............................................................................................................


                  BE AGILE
..............................................................................................................




                                                                                                            26
..............................................................................................................

       BE AGILE!
       ‣Start building right away.

       ‣It’s easier to throw something away, when
       you didn’t spend time doing it.

       ‣Build, Test, Gather Feedback and iterate.

       ‣Lower the cost of change.

..............................................................................................................
                                                                                                            27
..............................................................................................................


       LESS IS MORE
..............................................................................................................




                                                                                                            28
..............................................................................................................

       LESS IS MORE!

       ‣Don’t try to one up Competitors.

       ‣Solve the simple problems, and leave the
       rest.

       ‣Think ahead, and build what’s best for
       your users, rather than build everything.


..............................................................................................................
                                                                                                            29
..............................................................................................................


 KEEP IT SIMPLE,
..............................................................................................................




                                                                                                            30
..............................................................................................................


                          STUPID
..............................................................................................................

                                                                                                            31
..............................................................................................................

       KEEP IT SIMPLE, STUPID!

       ‣Each time you increase your code, you
       increase complexity exponentially.

       ‣Complex code => More Bugs

       ‣So, write Less Code, Less Features in short
       Keep it Simple, Stupid. (K.I.S.S  )


..............................................................................................................
                                                                                                            32
..............................................................................................................

                 DON’T REPEAT
                           YOURSELF
..............................................................................................................




                                                                                                            33
..............................................................................................................

       Don’t Repeat Yourself
       ‣Reduce Duplicate Code.

       ‣Changing one component should not have
       cascading effects.

       ‣Modularize, Use Code Generators.

       ‣Single Source of Truth.

..............................................................................................................
                                                                                                            34
..............................................................................................................


    COLLABORATE
..............................................................................................................
                                                                                                            35
..............................................................................................................

       COLLABORATE
       ‣Share your code. (Don’t be a jerk)

       ‣Take feedback from the end users during
       development.

       ‣Make sure you get the product right,
       before its too late.

       ‣Help others, and help yourself.

..............................................................................................................
                                                                                                            36
..............................................................................................................



GEN ‘Y’ TOOLS
..............................................................................................................




                                                                                                            37
..............................................................................................................
       Use the Next Generation Tools
       ‣The world no longer relies on one
       Language.

       ‣Performance, Scalability are the key.

       ‣Ruby on Rails (Web), WPF(Windows),
       Cocoa (iPhone and MacOSX)

       ‣MVC (Model View Controller)

        ‣Zero Dependency, and easy Configuration
..............................................................................................................
                                                                                                            38
39
..............................................................................................................




  “
         Ruby on Rails is astounding. Using it is
         like watching a kung-fu movie, where a
         dozen bad-ass frameworks prepare to
         beat up the little newcomer only to be
         handed their asses in a variety of


                                                      ”
         imaginative ways.

                                     Nathan Torkington, O'Reilly Program Chair for OSCON




..............................................................................................................
                                                                                                            40
..............................................................................................................

  Ruby on Rails is an open-source
  web framework that’s optimized
  for programmer happiness and
  sustainable productivity.

  It lets you write beautiful code by
  favoring convention over
  configuration.
..............................................................................................................
                                                                                                            41
..............................................................................................................

  Ruby on Rails is an open-source
  web framework that’s optimized
  for programmer happiness and
  sustainable productivity.

  It lets you write beautiful code by
  favoring convention over
  configuration.
..............................................................................................................
                                                                                                            42
..............................................................................................................

  Ruby on Rails is an open-source
  web framework that’s optimized
  for programmer happiness and
  sustainable productivity.

  It lets you write beautiful code by
  favoring convention over
  configuration.
..............................................................................................................
                                                                                                            43
..............................................................................................................

  Ruby on Rails is an open-source
  web framework that’s optimized
  for programmer happiness and
  sustainable productivity.

  It lets you write beautiful code by
  favoring convention over
  configuration.
..............................................................................................................
                                                                                                            44
..............................................................................................................

  Ruby on Rails is an open-source
  web framework that’s optimized
  for programmer happiness and
  sustainable productivity.

  It lets you write beautiful code by
  favoring convention over
  configuration.
..............................................................................................................
                                                                                                            45
..............................................................................................................

  Ruby on Rails is an open-source
  web framework that’s optimized
  for programmer happiness and
  sustainable productivity.

  It lets you write beautiful code by
  favoring convention over
  configuration.
..............................................................................................................
                                                                                                            46
..............................................................................................................




     80/20                                                        Like the 69 of the real world!




..............................................................................................................
                                                                                                            47
..............................................................................................................


                                     MVC
..............................................................................................................




                                                                                                            48
           Controller
            Structures
            Application




Provides                   Provides
  Data                    UX and UI



Model                     View
                                      49
..............................................................................................................




     Programmer’s
   A Programmer’s
   A
     Best Friend
     Best Friend
..............................................................................................................
                                                                                                            50
..............................................................................................................



     say = “I love Ruby”
     puts say

     => “I love Ruby”
..............................................................................................................
                                                                                                            51
..............................................................................................................
      no type
    declarations.
      string...                               no “main” method



     say = “I love Ruby”
     puts say        no end of
                                                                                        instruction
  no “superfluous”                                                                         marker
  keywords (“var”)

..............................................................................................................
                                                                                                            52
..............................................................................................................



     say = “I love Ruby”
     say[‘love’] = “*love*”
     puts say.upcase

     => “I *LOVE* RUBY”

..............................................................................................................
                                                                                                            53
..............................................................................................................


     3.times { puts say }

     => “I *love* Ruby”
     => “I *love* Ruby”
     => “I *love* Ruby”
..............................................................................................................
                                                                                                            54
..............................................................................................................

[Ruby is] a dynamic, open source
programming language with a
focus on simplicity and
productivity.

It has an elegant syntax that is
natural to read and easy to write.
..............................................................................................................
                                                                                                            55
..............................................................................................................

[Ruby is] a dynamic, open source
programming language with a
focus on simplicity and
productivity.

It has an elegant syntax that is
natural to read and easy to write.
..............................................................................................................
                                                                                                            56
..............................................................................................................

[Ruby is] a dynamic, open source
programming language with a
focus on simplicity and
productivity.

It has an elegant syntax that is
natural to read and easy to write.
..............................................................................................................
                                                                                                            57
..............................................................................................................

[Ruby is] a dynamic, open source
programming language with a
focus on simplicity and
productivity.

It has an elegant syntax that is
natural to read and easy to write.
..............................................................................................................
                                                                                                            58
..............................................................................................................

[Ruby is] a dynamic, open source
programming language with a
focus on simplicity and
productivity.

It has an elegant syntax that is
natural to read and easy to write.
..............................................................................................................
                                                                                                            59
   TAKING THE PAIN OUT OF
THINGS YOU DON’T LIKE DOING

                              60
61
..............................................................................................................


                  EXPLORE
..............................................................................................................

                                                                                                            62
..............................................................................................................

    VERSION CONTROL
..............................................................................................................
                                                                                                            63
..............................................................................................................

       VERSION CONTROL
       ‣One of the most overlooked features of
       modern development.

       ‣A time machine for your code.

       ‣Easy to setup, Zero Headaches.

       ‣Examples Git(Github.com), SVN,
       Mercurial

..............................................................................................................
                                                                                                            64
..............................................................................................................

   DISASTERS STRIKE
..............................................................................................................
                                                                                                            65
..............................................................................................................

           BUT DON’T CRY!
..............................................................................................................
                                                                                                            66
..............................................................................................................

       Git to the Rescue!
       ‣Git is the simplest Version Control tool
       you’ll ever use.

       ‣Scales beautifully to any number of
       developers.

       ‣Online Community Support and Code
       repo at Github.com

..............................................................................................................
                                                                                                            67
..............................................................................................................

       Git Magic!

        Step 1:           git init
        Step 2:           git add .
        Step 3:           git commit -a -m “Your Message”

       Go back in Time!
        git reset --hard <hash>

..............................................................................................................
                                                                                                            68
..............................................................................................................


         DATABASES
..............................................................................................................

                                                                                                            69
..............................................................................................................
       Beyond SQL and RDBMS
       ‣Relational Databases are hard to scale.

       ‣Concepts from the 1980’s, don’t work in
       the internet era.

       ‣Adopt NoSQL i.e. Not only SQL

       ‣No one Database fits the bill, so
       experiment.

        ‣SQL will be what COBOL is to our
        generation.
..............................................................................................................
                                                                                                            70
................................................................................................................................



    Let’s take an example
    Come up with a simple database schema for Facebook
         to store profile information and friends.
...............................................................................................................................




                                                                                                                                  71
................................................................................................................................

It Probably Looks like..
                        User                                                         Friends
               id    Name DOB            ....                                   fid1       fid2     state




  Select * from Friends where fid1= ‘myid’ OR fid2= ‘myid’ AND state=1

...............................................................................................................................
                                                                                                                                  72
................................................................................................................................


                How about this...



            A Representation of how Facebook stores Data.

...............................................................................................................................
                                                                                                                                  73
..............................................................................................................

       Consider Twitter...
       ‣Averages about 1000 tweets per second.
       (~1000 inserts per second)

       ‣Contains metadata such as Hashtags, and
       Mentions.

       ‣About 1 Billion Searches per day or 11k
       searches per second

..............................................................................................................
                                                                                                            74
..............................................................................................................

       The World of NoSQL
       ‣Cassandra DB
       ‣VoltDB
       ‣MongoDB
       ‣MemcacheDB
       ‣Redis
       ‣CouchDB

       and many more...

..............................................................................................................
                                                                                                            75
..............................................................................................................



  READY TO JUMP?
..............................................................................................................




                                                                                                            76
..............................................................................................................

       Let’s build an app
       ‣We are going to build an application in
       Rails.

       ‣A Simple blog, with comments and access
       control.

       ‣Sounds complex? Should take ~15mins
       with Rails magic.

       ‣Let’s use Git for good measure.
..............................................................................................................
                                                                                                            77
78
..............................................................................................................

       Final Words...
       ‣Modern Software Development is fun.

       ‣Uncomplicate and Simplify

       ‣Bid Goodbye to Complex IDEs and general
       purpose languages like C, Java.

       ‣Build applications in bottom up fashion,
       rather than top down!

..............................................................................................................
                                                                                                            79
..............................................................................................................

 LIVE ON THE EDGE
..............................................................................................................




                                                                                                            80
..............................................................................................................

      CODE IS POETRY
..............................................................................................................




                                                                                                            81
..............................................................................................................




                Q+A
..............................................................................................................

                                                                                                            82
..............................................................................................................




 Get the Related Resources
           kit@karthik.kastury.in

..............................................................................................................
                                                                                                            83
 I’m available to help
................................................................................................................................

              Blog                     http://karthik.kastury.in/
              Email                    hello@karthik.kastury.in
              Twitter                  @KarthikDot
              Ask                      http://karthik.kastury.in/ask
................................................................................................................................


                                                                                                                              84
                               Footnotes
................................................................................................................................

     All images are creative commons licensed from Flickr.

      37 Signals Signals vs Noise Blog.

      Agile Programming Tips
................................................................................................................................


                                                                                                                              85
..............................................................................................................


               THE END
              Or the start of something new.
..............................................................................................................




                                                                                                            86

				
DOCUMENT INFO
Description: Great presentation for web developers, programmers and other technology enthusiasts.