So what is this merb stuff
This presentation is the property of its rightful owner.
Sponsored Links
1 / 18

A Little Bit Of Merb PowerPoint PPT Presentation


  • 43 Views
  • Uploaded on
  • Presentation posted in: General

So what is this Merb stuff?. A Little Bit Of Merb. Merb = Mongrel + Embedded Ruby. A Little Bit Of Merb. Created by Ezra Zygmuntowicz (http://brainspl.at). A Little Bit Of Merb. When you really, really, need performance. A Little Bit Of Merb. Why You Need Some Merb Mini-applications

Download Presentation

A Little Bit Of Merb

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


So what is this merb stuff

So what is this Merb stuff?

A Little Bit Of Merb


Merb mongrel embedded ruby

Merb = Mongrel + Embedded Ruby

A Little Bit Of Merb


Created by ezra zygmuntowicz http brainspl at

Created by Ezra Zygmuntowicz

(http://brainspl.at)

A Little Bit Of Merb


When you really really need performance

When you really, really, need performance

A Little Bit Of Merb


A little bit of merb

Why You Need Some Merb

Mini-applications

Servicing API calls

File uploading

Improving performance intensive sections of Rails applications

A Little Bit Of Merb


A little bit of merb

Some Similarities To Rails

Model View Controller

Project files structured like Rails

ActiveRecord(migrations, many plugins work)

Testing (Test::Unit, RSpec)

A Little Bit Of Merb


Some differences from rails no thread blocking faster routing view rendering

Some Differences From Rails

No thread blocking

Faster routing

View rendering

A Little Bit Of Merb


A little bit of merb1

A Little Bit Of Merb

Controller

class UserLogin < Application

def new

render

end

def create

@result = User.authorized?(params[:user_name], params[:user_password])

render

end

end


A little bit of merb2

A Little Bit Of Merb

View Rendering

  • HTML (new.herb)

  • XML (create.xerb)

  • JavaScript (no_example_today.jerb)


A little bit of merb3

A Little Bit Of Merb

HTML View (new.herb)

<form method="post" action="/userlogin/create">

<p><%= Time.now.to_s %></p>

<p><label for="user_name">user_name</label>

<input type="text" id="user_name" name="user_name"></p>

<p><label for="user_password">user_password</label>

<input type="password" id="user_password" name="user_password"></p>

<p><input type="submit" value="User Login"></p>

</form>


A little bit of merb4

A Little Bit Of Merb

XML View (create.xerb)

xml.userlogin {

xml.result @result

}


How to get merb gem install merb

How to get Merb:

gem install merb

A Little Bit Of Merb


How to generate a new merb application merb g myapp

How to generate a new Merb application

merb -g myapp

A Little Bit Of Merb


How to run a merb application cd path to myapp merb

How to run a Merb application

cd /path/to/myapp

merb

A Little Bit Of Merb


How to start a merb cluster merb p 3000 c 3

How to start a Merb cluster

merb -p 3000 -c 3

A Little Bit Of Merb


A little bit of merb5

A Little Bit Of Merb

Smoking Merb


A little bit of merb6

Sample Applications

mrblog

http://merb.devjavu.com/projects/merb/browser/mrblog/trunk

RESTful sample

http://svn.depixelate.com/applications/invoice_tracker/

A Little Bit Of Merb


Occasional blogging about merb at the dead programmer society www deadprogramersociety com

Occasional blogging about Merb at the Dead Programmer Society

www.deadprogramersociety.com

A Little Bit Of Merb


  • Login