• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
RubyConfBD 2013   decouple, bundle and share with ruby gems
 

RubyConfBD 2013 decouple, bundle and share with ruby gems

on

  • 1,105 views

This presentation is about explaining what is decoupling

This presentation is about explaining what is decoupling

Statistics

Views

Total Views
1,105
Views on SlideShare
1,098
Embed Views
7

Actions

Likes
1
Downloads
8
Comments
2

1 Embed 7

http://www.linkedin.com 7

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

12 of 2 previous next

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

    RubyConfBD 2013   decouple, bundle and share with ruby gems RubyConfBD 2013 decouple, bundle and share with ruby gems Presentation Transcript

    • Decouple, Bundle and Share with Ruby Gems Nhm Tanveer Hossain Khan (Hasan)
    • Things on the table• What is decoupling ?• What is Gem ?• Create RubyConf2013_Hello Gem.• Publish on RubyGems Repository.• And share with fellow ruby developers
    • About me!• Working with Ruby for last 6 years.• Currently working with “Genweb2 Ltd.” as “Systems Architect”• Passionate about Ruby, Java, Nodejs, Creative idea and FOOD!• Built http://www.khadok.com• My Github profile - https://github.com/we4tech
    • Decoupling!
    • What is decoupling Coupling?
    • What is decoupling ?
    • Direct benefits!
    • Benefits (contd.)• Creates reusable code• Modularizes structure• Responds to polymorphic behavior• Possible to integrate with other projects
    • Trade-offs• Requires common sense• Requires expertise on understanding “What’s enough?”• It should be derived from a real project.• Requires tune up and adjustment based on real requirements.
    • Ruby Gems!
    • What is Ruby Gems ?
    • Or This!
    • Real Ruby Stone!Collected from wikipedia - http://en.wikipedia.org/wiki/File:Ruby_-_Winza,_Tanzania.jpg
    • Ruby Gem/Gemstone!Collected from wikipedia - http://en.wikipedia.org/wiki/File:Cardinal_gems.png
    • Finally a complete Necklace!
    • Ruby Gems Repository Publish Gem "mysql" Ruby Dev Over the Internet Publish GemRubyGems Repository "user_auth" Ruby Dev Publish Gem "factory_girl" Ruby Dev
    • A complete ruby application
    • Create RubyConf2013_hello gem!
    • $ gem install bundle$ bundle gem rubyconfbd2013_hello
    • Generated files
    • Code it!# File: lib/rubyconfbd2013_hello.rbrequire "rubyconfbd2013_hello/version"module Rubyconfbd2013Hello def rubyconfbd_year 2013 end def rubyconfbd_location Bangladesh endendObject.send(:extend, Rubyconfbd2013Hello)Object.send(:include, Rubyconfbd2013Hello)
    • Add Gem information# File: rubyconfbd2013_hello.gemspec# Other codes …… gem.authors = ["nhm tanveer hossain khan"] gem.email = ["hasan83bd@gmail.com"] gem.description = %q{A very basic gem demonstration for RubyConfBD 2013} gem.summary = %q{A very basic gem demonstration for RubyConfBD 2013} gem.homepage = "https://github.com/we4tech/rubyconfbd2013_hello"
    • $ rake release
    • Result!
    • Usages!• $ gem install rubyconfbd2013_hello• $ irb• require “rubyconfbd2013_hello”• Object.rubyconfbd_year• => 2013• Object.rubyconfbd_location• => „Bangladesh”
    • You can check it yourself!• Rubygems link - https://rubygems.org/gems/rubyconfbd2013_ hello• Github link - https://github.com/we4tech/rubyconfbd2013 _hello
    • That’s It! ( Question.any? ) 