Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Merb compat / API change recommendations
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 48 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Nate Wiger  
View profile  
 More options May 28 2008, 9:31 am
From: Nate Wiger <nwi...@gmail.com>
Date: Wed, 28 May 2008 06:31:38 -0700 (PDT)
Local: Wed, May 28 2008 9:31 am
Subject: Merb compat / API change recommendations
Based on the previous Merb / Rails compatibility thread here:

http://groups.google.com/group/merb/browse_thread/thread/2327341145a4...

Ezra asked for a list of API nitpicks, pre-1.0.  So I'm establishing
this thread to do so.

Here is my list. Most are simple suggestions that can avoid potential
support timesinks.  I can help with patching if needed.

If others have recommendations, please post them here as well.  A
couple guidelines: (1) Be clear, (2) Be succinct, (3) Be nice.
Thanks.

===========================================================================
I'm basing this on Ngoc's blog/wiki port to Merb here:

http://openkh.rubyforge.org/svn/branches/merb-activerecord/app/contro...

As well as discussions and questions I've seen on this group so far.

Controllers
----------------------------------------
1. Merb.logger.debug - recommend dropping the "Merb.", it's repetitive
to look at and type

2. before/after - recommend using before_filter/after_filter since the
functionality is the same

3. This looks awkward

  def index
    render('', :layout => :application)
  end

Can we add a render() keyword for clarity?

    render :nothing, :layout => :application

4. The provides() vs only_provides() difference is confusing, just
because of the method inconsistency vs the rest of Merb.  I don't have
a suggestion yet that would be a workable method signature.

Helpers
----------------------------------------
1. I'm not sure if Ngoc's port is accurate, but why are the helpers
injecting into Merb's GlobalHelpers?  Seems monkey-patchy.  If Ngoc's
port is accurate, can't Merb do this under the covers, rather than
exposing it?  That would clean up the interface, and offer protection
for Merb in case Merb's internal API needs to change in the future.

Views
----------------------------------------
1. Provide a url_for wrapper around url().

2. Provide a heckuva Wiki page for everything else :-)

Configuration
----------------------------------------
1. Add support for the Rails-style initializers/ directory.  This is a
simple nicety that will be a "Why don't my initializers work?"
question otherwise (already popped up in this google group)

2. Standardize the "merb more" and "merb plugin" names to all use "_",
ie, "merb_assets", "merb_cache", etc.  Otherwise it'll be another
support timesink of answering, "No, it's merb *dash* cache, but merb
*underscore* paginate".

3. Change the default router.rb file to use "|map|" like Rails.
Everyone's used to "map.resources".  Yes, people can change it
themselves, but providing it the same as people are used to will save
support questions.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Julian Leviston  
View profile  
 More options May 28 2008, 10:21 am
From: Julian Leviston <jul...@leviston.net>
Date: Thu, 29 May 2008 00:21:57 +1000
Local: Wed, May 28 2008 10:21 am
Subject: Re: Merb compat / API change recommendations
I don't like ANY of those suggestions at all.

The merb equivalents are much more brief, and better.

If people want rails compatibility, why not offer a merb_rails plugin  
solely for this purpose.

Julian.

On 28/05/2008, at 11:31 PM, Nate Wiger wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Klishin  
View profile  
 More options May 28 2008, 10:22 am
From: "Michael Klishin" <michael.s.klis...@gmail.com>
Date: Wed, 28 May 2008 17:22:43 +0300
Local: Wed, May 28 2008 10:22 am
Subject: Re: Merb compat / API change recommendations
2008/5/28 Nate Wiger <nwi...@gmail.com>:

> 1. Merb.logger.debug - recommend dropping the "Merb.", it's repetitive
> to look at and type

Then if someone has logger method or variable in the app, it will clash.
If you want to save yourself some typing, use ctags/etags, Merb textmate
bundle or IDE.

Wrappers IMO go into plugin — not every app our there,
not every developer out there would need it.

I want to stress it again in this very same thread: if you want to
make transition from Rails simple for people, write in depth
tutorial and post it on Merbunity and help fix bugs. This is what's
important, not making API
exactly as in Rails. People who get off the rails hook usually know
what they do and what they need.

I don't know if I was nice, this "lets make Rails out of Merb" thing
seems insignificant to me.
--
MK


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthijs Langenberg  
View profile  
 More options May 28 2008, 10:30 am
From: "Matthijs Langenberg" <mlangenb...@gmail.com>
Date: Wed, 28 May 2008 16:30:12 +0200
Local: Wed, May 28 2008 10:30 am
Subject: Re: Merb compat / API change recommendations
I fully agree with Michael and Julian.
Merb shouldn't feel like a Rails drop-in, just because it isn't.

I actually prefer render('') above render(:nothing), because you
aren't returning nothing, you are returning an empty string, which
looks a bit awkward because it is a bit awkward to return an empty
response.

The other changes just don't matter.

On Wed, May 28, 2008 at 4:22 PM, Michael Klishin


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael D. Ivey  
View profile  
 More options May 28 2008, 10:47 am
From: "Michael D. Ivey" <michael.i...@gmail.com>
Date: Wed, 28 May 2008 09:47:20 -0500
Local: Wed, May 28 2008 10:47 am
Subject: Re: Merb compat / API change recommendations
On May 28, 2008, at 8:31 AM, Nate Wiger wrote:

> 4. The provides() vs only_provides() difference is confusing, just
> because of the method inconsistency vs the rest of Merb.  I don't have
> a suggestion yet that would be a workable method signature.

There are 3 methods:  provides, only_provides, and does_not_provide.  
They each do exactly what they say.  Obviously, I'm biased, since I  
wrote them, but I think they're perfect.  :)

The nice thing about provides not overwriting the list is that you can  
do "provides :foo" in a parent class, then only "provides :bar" in the  
controllers that do :bar.

> 1. Provide a url_for wrapper around url().

I don't get this one.  What would url_for do?

> 1. Add support for the Rails-style initializers/ directory.  This is a
> simple nicety that will be a "Why don't my initializers work?"
> question otherwise (already popped up in this google group)

This one is a good example of a real philosophy difference.  If you  
want to split up your application load process, you have complete  
control over init.rb ... Merb doesn't push you to do it any particular  
way.  It would be trivial to add a few lines to support an  
initializers/ directory ... so since it's trivial, we choose not to do  
it.  Trivial patches are sometimes a code smell...if it's trivial,  
maybe we don't need it at all.

> 2. Standardize the "merb more" and "merb plugin" names to all use "_",
> ie, "merb_assets", "merb_cache", etc.  Otherwise it'll be another
> support timesink of answering, "No, it's merb *dash* cache, but merb
> *underscore* paginate".

I think we need to have 1 final revisit of this one, and if we decide  
not to change, make a wiki page that explains why it is this way, and  
why we're not changing it.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jed Hurt  
View profile  
 More options May 28 2008, 11:03 am
From: "Jed Hurt" <jed.h...@gmail.com>
Date: Wed, 28 May 2008 09:03:37 -0600
Local: Wed, May 28 2008 11:03 am
Subject: Re: Merb compat / API change recommendations

On Wed, May 28, 2008 at 8:47 AM, Michael D. Ivey <michael.i...@gmail.com>
wrote:

> It would be trivial to add a few lines to support an
> initializers/ directory ...

That's what Collective does. No Big Deal.
http://github.com/meekish/collective/tree/master/config/init.rb#L40-43

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ngoc Dao  
View profile  
 More options May 28 2008, 12:38 pm
From: "Ngoc Dao" <ngocdaoth...@gmail.com>
Date: Thu, 29 May 2008 01:38:54 +0900
Local: Wed, May 28 2008 12:38 pm
Subject: Re: Merb compat / API change recommendations

> I'm not sure if Ngoc's port is accurate, but why are the helpers injecting into Merb's GlobalHelpers?  Seems monkey-patchy.

Hi.

I am doing this because of the module architecture of this CMS, I want
all the helpers to be horizontal: views of a controller/helper can
call helpers of others. Notice that helpers of module xxx are prefixed
with xxx_, ex: users_gravatar(user)

Ngoc.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nate Wiger  
View profile  
 More options May 28 2008, 12:50 pm
From: Nate Wiger <nwi...@gmail.com>
Date: Wed, 28 May 2008 09:50:41 -0700 (PDT)
Local: Wed, May 28 2008 12:50 pm
Subject: Re: Merb compat / API change recommendations

>> 1. Merb.logger.debug - recommend dropping the "Merb.", it's repetitive
>> to look at and type

> Then if someone has logger method or variable in the app, it will clash.

Obviously.  But the same can be said of all Merb methods. I'm sure you
wouldn't want to have to say

  class MyController
    Merb.before ...
    Merb.provides
    def index
      Merb.logger.debug "foo"
      Merb.render :layout => :application
    end
  end

You're also missing the point that "logger.debug" is not only easier
on the eyes, but One Less Thing to have to explain is different.

> > It would be trivial to add a few lines to support an
> > initializers/ directory ...

> That's what Collective does. No Big Deal.http://github.com/meekish/collective/tree/master/config/init.rb#L40-43

Sure. But it probably took more time to mention it in this thread than
it would just to integrate that into Merb.

Here's a scenario: Some people using Merb like "initializers", but
others decide "startups" is better.  Now, some Merb plugins use a
startups/ directory, whereas others use initializers/. So now you have
two (or more!) ways that people have to learn... that have to be
documented, Wiki'ed, and answered in mailing lists such as this.

> I want to stress it again in this very same thread: if you want to
> make transition from Rails simple for people, write in depth
> tutorial and post it on Merbunity and help fix bugs.

I think you are underestimating the amount of a time that superficial
compatibility can save - in development, documentation, and support.
Writing a new framework is the fun part, but supporting it can be
hell, and your support timesinks are almost always seemingly inane
differences ("before" instead of "before_filter").

Putting on my manager hat, I'm a bit concerned by the tone of the
responses in this thread, and whether Merb will be properly
supported.  I'm not trying to throw stones, but if you haven't had the
"joy" of supporting a large piece of software, used in ways you never
intended or even forsaw, I would urge you to rethink some of the
suggestions I made above.

Nate Wiger
PlayStation


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Aimonetti  
View profile  
 More options May 28 2008, 12:59 pm
From: "Matt Aimonetti" <mattaimone...@gmail.com>
Date: Wed, 28 May 2008 09:59:45 -0700
Local: Wed, May 28 2008 12:59 pm
Subject: Re: Merb compat / API change recommendations

Good listing Nate, thanks a lot.

4. The provides() vs only_provides() difference is confusing, just
because of the method inconsistency vs the rest of Merb.  I don't have
a suggestion yet that would be a workable method signature.

http://merbunity.com/tutorials/9

By default, all actions *provide* :html

There's a number of methods to help make this not only easy, but flexible.

   - provides<http://merbivore.com/documentation/merb-core/head/index.html?a=M00048...>-
provides each of the given formats + :html
   - only_provides<http://merbivore.com/documentation/merb-core/head/index.html?a=M00048...>-
only provides the supplied formats. It does not include the default of
   :html or any other previously set formats.
   - does_not_provide<http://merbivore.com/documentation/merb-core/head/index.html?a=M00048...>-
turns off responses for this format
   - clear_provides<http://merbivore.com/documentation/merb-core/head/index.html?a=M00048...>removes
all response formats. You won't get very far in your app if you use
   this in a controller. But it can be a handy spec'ing tool
   - reset_provides<http://merbivore.com/documentation/merb-core/head/index.html?a=M00049...>-
resets the provided formats to the defaults. :html

Each of these methods are called with a list of symbols representing the
formats to operate on.

2. before/after - recommend using before_filter/after_filter since the

> functionality is the same

I personally don't like before_filter I think before and after are easier to
use. If it doesn't affect the code complexity and performances, I don't see
a problem with adding an alias tho.

1. Provide a url_for wrapper around url().

url_for is really not something we have in Merb since we don't guess urls
based on the attributes passed. Our url method isn't as smart but is very
efficient.

2. Provide a heckuva Wiki page for everything else :-)


Totally agree on that one!

3. Change the default router.rb file to use "|map|" like Rails.
Everyone's used to "map.resources".  Yes, people can change it
themselves, but providing it the same as people are used to will save
support questions.

I think the reason because we use Merb::Router.prepare do |r| is because you
are passing the router (r) not a map. Your routes will end up looking like
that:

Merb::Router.prepare do |r|
  # RESTful routes

  r.namespace :admin do |admin|
    admin.resources :content_owners
    admin.resources :publishers do |publisher|
      publisher.resources :assets
      publisher.resources :content_partners
    end
    admin.resources :users
    admin.resources :stats
  end
end

it personally makes more sense to me. But maybe I didn't understand what you
meant.

2. Standardize the "merb more" and "merb plugin" names to all use "_",
ie, "merb_assets", "merb_cache", etc.  Otherwise it'll be another
support timesink of answering, "No, it's merb *dash* cache, but merb
*underscore* paginate".

Yeah that became a bit of a mess. underscore was reserved to "not core"
plugin and dash was for core supported stuff.... we might want to review
that soon.

-Matt

On 5/28/08, Nate Wiger <nwi...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ngoc Dao  
View profile  
 More options May 28 2008, 1:11 pm
From: "Ngoc Dao" <ngocdaoth...@gmail.com>
Date: Thu, 29 May 2008 02:11:44 +0900
Local: Wed, May 28 2008 1:11 pm
Subject: Re: Merb compat / API change recommendations
I prefer xxx_filter. If it is a filter then why not call it a filter?
If you look at the log output, for every request you will see
something like:
{:action_time=>0.011294, :before_filters_time=>0.00018,
:after_filters_time=>4.5e-05, :dispatch_time=>0.011568}

> underscore was reserved to "not core" plugin and dash was for core supported stuff.... we might want to review that soon

In Merb 2.0, things might go into or out of the core (who knows? :D).
This might cause renaming problems.

Ngoc.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Aimonetti  
View profile  
 More options May 28 2008, 1:23 pm
From: "Matt Aimonetti" <mattaimone...@gmail.com>
Date: Wed, 28 May 2008 10:23:44 -0700
Local: Wed, May 28 2008 1:23 pm
Subject: Re: Merb compat / API change recommendations

good points Ngoc. Anyone intersted in adding an alias and submit a patch for
before_filter and :after_filter? (if an alias is doable)

-Matt

On 5/28/08, Ngoc Dao <ngocdaoth...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael D. Ivey  
View profile  
 More options May 28 2008, 1:33 pm
From: "Michael D. Ivey" <michael.i...@gmail.com>
Date: Wed, 28 May 2008 12:33:19 -0500
Local: Wed, May 28 2008 1:33 pm
Subject: Re: Merb compat / API change recommendations
On May 28, 2008, at 11:50 AM, Nate Wiger wrote:

> You're also missing the point that "logger.debug" is not only easier
> on the eyes, but One Less Thing to have to explain is different.

"One Less Thing to have to explain is different" isn't a compelling  
argument for the core team.  I understand that you wish it were, but  
it just isn't.  We're not building Merb to be a "Better Rails" or any  
kind of "n Rails" (for your favorite values of n).

We're building Merb to be the awesomeness.  So arguments based on "Do  
X and Merb will be more awesome" will be well received.  Let's focus  
on those things, and stop worrying about the Rails comparisons.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Supporting Merb (was: Re: Merb compat / API change recommendations)" by Dudley Flanders
Dudley Flanders  
View profile  
 More options May 28 2008, 1:40 pm
From: Dudley Flanders <dud...@misnomer.us>
Date: Wed, 28 May 2008 12:40:03 -0500
Local: Wed, May 28 2008 1:40 pm
Subject: Supporting Merb (was: Re: Merb compat / API change recommendations)

> Putting on my manager hat, I'm a bit concerned by the tone of the
> responses in this thread, and whether Merb will be properly
> supported.  I'm not trying to throw stones, but if you haven't had the
> "joy" of supporting a large piece of software, used in ways you never
> intended or even forsaw, I would urge you to rethink some of the
> suggestions I made above.

One of the biggest advantages that Merb has is its comprehensibility.  
If you need someone else to "support" your software, you should be  
using a bigger framework like Rails, or possibly Struts. I chose Merb  
because using Merb meant I didn't need to depend on someone for  
support. If Merb-the-community disappeared tomorrow, I would still  
have a chunk of well-written, easy-to-understand code underlying my  
application. At any given point, I could stop following the changes  
coming from upstream, and simply treat the Merb code as part of my  
application that someone saved me the trouble of writing myself. Merb  
is (and hopefully will remain) a hacker's framework, not a manager's  
framework.
Having said that, I was also pretty disappointed by the tone of this  
thread. I don't think it's representative of the core team's attitude  
in general.

:dudley


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Merb compat / API change recommendations" by Ezra Zygmuntowicz
Ezra Zygmuntowicz  
View profile  
 More options May 28 2008, 1:49 pm
From: Ezra Zygmuntowicz <ezmob...@gmail.com>
Date: Wed, 28 May 2008 10:49:56 -0700
Local: Wed, May 28 2008 1:49 pm
Subject: Re: Merb compat / API change recommendations
Hi~

On May 28, 2008, at 6:31 AM, Nate Wiger wrote:

Add your own helper method if you want this to be shorter:

def logger
   Merb.logger
end

> 2. before/after - recommend using before_filter/after_filter since the
> functionality is the same

Definitely *not* going to happen. I always hated before_filter when  
before/after is plenty good enough. This definitely will not change.

> 3. This looks awkward

>  def index
>    render('', :layout => :application)
>  end

> Can we add a render() keyword for clarity?

>    render :nothing, :layout => :application

Why do you want to render an empty layout with nothing inside? I don't  
see a good reason to add yet another magic keyword here. Merb's render  
philosophy is completely different from rails since return values of  
merb actions are sent to the browser.

> 4. The provides() vs only_provides() difference is confusing, just
> because of the method inconsistency vs the rest of Merb.  I don't have
> a suggestion yet that would be a workable method signature.

I don't see any confusion here, these methods always made perfect  
sense to me. Maybe we just need more docs but this is not going to  
change either, it is one of merb's nicer features.

> Helpers
> ----------------------------------------
> 1. I'm not sure if Ngoc's port is accurate, but why are the helpers
> injecting into Merb's GlobalHelpers?  Seems monkey-patchy.  If Ngoc's
> port is accurate, can't Merb do this under the covers, rather than
> exposing it?  That would clean up the interface, and offer protection
> for Merb in case Merb's internal API needs to change in the future.

I don't know what know what you are talking about here.

> Views
> ----------------------------------------
> 1. Provide a url_for wrapper around url().

Merb does not have url_for so this makes no sense

> 2. Provide a heckuva Wiki page for everything else :-)

We're working on this, the wiki is starting to get a lot of content.

> Configuration
> ----------------------------------------
> 1. Add support for the Rails-style initializers/ directory.  This is a
> simple nicety that will be a "Why don't my initializers work?"
> question otherwise (already popped up in this google group)

I'm still on the fence on this one. I might be swayed to add it but  
it's so trivial that it's easy for folks to add themselves.

> 2. Standardize the "merb more" and "merb plugin" names to all use "_",
> ie, "merb_assets", "merb_cache", etc.  Otherwise it'll be another
> support timesink of answering, "No, it's merb *dash* cache, but merb
> *underscore* paginate".

This is probably a good idea to cleanup soon.

3. Change the default router.rb file to use "|map|" like Rails.

> Everyone's used to "map.resources".  Yes, people can change it
> themselves, but providing it the same as people are used to will save
> support questions.

Merb's router is fundamentaly a different beast then rails router. It  
is not a map so map has no meaning here. You are free to change this  
if you want but you are not passing a map to the block you are passing  
a route set.

        I'm happy to see people thinking about these things but merb is not  
rails and never will be. Some of these changes need to be made but  
most of them are just rails habits that need to be retrained.

Cheers-

- Ezra Zygmuntowicz
-- Founder & Software Architect
-- e...@engineyard.com
-- EngineYard.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ezra Zygmuntowicz  
View profile  
 More options May 28 2008, 1:52 pm
From: Ezra Zygmuntowicz <ezmob...@gmail.com>
Date: Wed, 28 May 2008 10:52:52 -0700
Local: Wed, May 28 2008 1:52 pm
Subject: Re: Merb compat / API change recommendations

On May 28, 2008, at 9:50 AM, Nate Wiger wrote:

> Putting on my manager hat, I'm a bit concerned by the tone of the
> responses in this thread, and whether Merb will be properly
> supported.  I'm not trying to throw stones, but if you haven't had the
> "joy" of supporting a large piece of software, used in ways you never
> intended or even forsaw, I would urge you to rethink some of the
> suggestions I made above.

        Merb will be properly supported because it is *way* simpler to  
support than rails. The code base is simple and that is a huge  
advantage. I've supported many large pieces of software and I will  
take maintaining merb over rails any day of the week. You have nothing  
to worry about here.

        The thing to keep in mind is that merb is not rails, there are some  
fundamental differences in opinion and that is ok, you just have to  
learn to accept it. Merb will pay huge dividends whenever you have to  
peek under the hood and I cannot stress enough how much of an  
advantage this is

Cheers-

- Ezra Zygmuntowicz
-- Founder & Software Architect
-- e...@engineyard.com
-- EngineYard.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
j3tch1u  
View profile  
 More options May 28 2008, 2:11 pm
From: j3tch1u <bch...@gmail.com>
Date: Wed, 28 May 2008 11:11:52 -0700 (PDT)
Local: Wed, May 28 2008 2:11 pm
Subject: Re: Merb compat / API change recommendations
1. one could argue caches_page/caches_action (instead of cache_page/
cache_action) are more correct in the sense that "to cache" (the verb)
is not actually caching anything at that moment but rather setting up
something to be cached.
2. i think before_filter/after_filter should be aliased and deprecated
down the road (btw, what happened to around?). like ms does, embrace
and extend.
3. render file doesn't work in views, i've had to rewrite a lot of
those.
4. i like js_include_tag, css_include_tag, but i still think the old
ones could be aliased and deprecated. you'd be surprised at how many
ppl a couple of lines can help. remember, ppl's rails apps are like
their babies too--they wanna get their feet wet before diving in.
5. sometimes it's not the syntax but rather the behavior. ex, if i do
partial('p', :foo=>'funny') and in my partial: foo ||= 'not funny' (i
expect: funny, but get: not funny).

i think the key is to have the most elegant/concise syntax while
aliasing/deprecating the close calls (i don't believe there are that
many). what ez needs are the names and numbers rather then full-on
debates over each (let him be the decider). no need to search for
them, just report em if you come across em. hopefully by 1.0 this
group will have logger.silence do again; end.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Supporting Merb (was: Re: Merb compat / API change recommendations)" by Matt Aimonetti
Matt Aimonetti  
View profile  
 More options May 28 2008, 2:20 pm
From: "Matt Aimonetti" <mattaimone...@gmail.com>
Date: Wed, 28 May 2008 11:20:04 -0700
Local: Wed, May 28 2008 2:20 pm
Subject: Re: Supporting Merb (was: Re: Merb compat / API change recommendations)

Dudley,  I agree with your comments. I think it's good to acknowledge
realize that there have been a lot of tension lately caused by a lot of
people migrating from Rails to Merb and some hardcore Merbists.

Rails is very opinionated (which is totally ok) but so is Merb ;) In a
different way tho.
Merb's philosophy is that we don't want to force you to do things one way
because we think it's the best thing ever and that will make your life
easier. Generally, things are a bit harder in Merb, often different than
Rails but we can "usually" find a valid justification and that's why Merb is
faster/leaner.

Because we want to keep things flexible, the Merb framework doesn't have all
the easy tools Rails would provide you with... but at the same time, it's
quite easy to maintain Merb's fresh, simple and clean code compared to
Rails, older/crustier code.

Anyway, to come back to the tone of the thread, I think some people are
getting a bit upset by the newcomers who want to change Merb to be more like
Rails. I personally think it's totally normal to want some similarities when
you never had any issues with Rails. Same thing happens with people coming
from Django.
However instead of just saying no, we probably should justify a bit better
why we are saying no ;)

A potential solution would be to have a wiki page explaining some of the
decisions so we wouldn't constantly have to repeat the same things over and
over. ( plus we could get quotes from some of the core team members ;) )

-Matt

On 5/28/08, Dudley Flanders <dud...@misnomer.us> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Merb compat / API change recommendations" by j3tch1u
j3tch1u  
View profile  
 More options May 28 2008, 2:28 pm
From: j3tch1u <bch...@gmail.com>
Date: Wed, 28 May 2008 11:28:34 -0700 (PDT)
Local: Wed, May 28 2008 2:28 pm
Subject: Re: Merb compat / API change recommendations
didn't see your post ez (was writing mine). all your points are valid
and i wouldn't dare disagree. with all due respect tho,

def logger
   Merb.logger
end

is three locs for merb and 3 * (who knows how many apps) locs for
something as common/short/sweet/as/logger. i can totally see where
you're coming from tho..i just don't wanna dirty my babies up either
man! hmmm merb_is_not_rails gem is not sounding so bad after all.
cheers.

-ben


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael D. Ivey  
View profile  
 More options May 28 2008, 3:49 pm
From: "Michael D. Ivey" <michael.i...@gmail.com>
Date: Wed, 28 May 2008 14:49:28 -0500
Local: Wed, May 28 2008 3:49 pm
Subject: Re: Merb compat / API change recommendations
On May 28, 2008, at 1:11 PM, j3tch1u wrote:

> i still think the old ones could be aliased and deprecated

The key point to take away here is that there are no old ones.

Merb != (Rails += 1)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Nevile  
View profile  
 More options May 28 2008, 4:15 pm
From: "Ben Nevile" <ben.nev...@gmail.com>
Date: Wed, 28 May 2008 13:15:14 -0700
Local: Wed, May 28 2008 4:15 pm
Subject: Re: Merb compat / API change recommendations

> > i still think the old ones could be aliased and deprecated

> The key point to take away here is that there are no old ones.

> Merb != (Rails += 1)

Hi Michael and other core contributors,

I understand what you are saying above.  And it certainly is up to you, as
framework heavyweights, to decide what is important and what isn't.

I don't want to belabor this point further.  I just want to say that like
the English language, the Rails "language" is a common set of symbols that
many of us understand. As merb's popularity grows - and it will! - this
community is going to be inundated with programmers migrating from Rails.
 Design of any sort - architecture, web interface, and framework API - is
about the relationship between whatever it is that you're designing and the
people using it.

Ben


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ezra Zygmuntowicz  
View profile  
 More options May 28 2008, 4:16 pm
From: Ezra Zygmuntowicz <ezmob...@gmail.com>
Date: Wed, 28 May 2008 13:16:51 -0700
Local: Wed, May 28 2008 4:16 pm
Subject: Re: Merb compat / API change recommendations
        Yes it is just a few lines, but the bigger issue is that to make this  
'logger' method available everywhere we would have to add it to Kernel  
which makes it effectively global. So if any other gems or piece of  
code you use defines a logger method then things break.

        Merb very much so wants to play nice with *any* ruby code you may  
want to run in your app, so I'd like to avoid adding more methods to  
Kernel, we have too many already. Maybe we could add it to the  
application controller or a mixin that you could explicitely mixin.  
I'm up for ideas here, but don;t want to make another global method.

        I don't want anyone to think that Merb is not open for new ideas. But  
I really think all of these make merb more like rails requests belong  
in plugins. Merb id definitely *not* rails and the sooner you can stop  
leaning on rails crutches the sooner you will become one with the merb  
codebase.

        I have a fundamental difference of opinion in merb, in rails hardly  
any users ever go into the framework code. In merb I don't want this  
to be the case, merb is a hackers framework, It is not and never will  
be batteries and training wheels included like rails is.

        But the upside of all this is that merb is extremely easy to extend  
to make it do whatever you want. It would be very easy for some  
enterprising individual to make a  
merb_acts_like_rails_with_training_wheels plugin that makes the life  
of folks porting their rails apps to merb easier. But merb does not  
exist as a rails alike that is only meant for porting apps to.

        Fundamentally, Merb is a platform rather then a full stack framework.  
Use the pieces you want, leave the rest alone. This makes merb a more  
scalable solution for the future as we can leave all the bloat out of  
the core and plugins have clearly defined API's for hooking into the  
framework.

        I think the best solution for all of this is for folks who really  
want this stuff to make the merb_as_rails plugin and use that. But I  
highly encourage folks to only do something like that if they have a  
large app to port. If you start with merb from scratch or are porting  
a small app, it may take you a few hours extra but you will be better  
off using the real merb idioms that have a lot of thought and  
experience put into them.

Cheers-
-Ezra

On May 28, 2008, at 11:28 AM, j3tch1u wrote:

- Ezra Zygmuntowicz
-- Founder & Software Architect
-- e...@engineyard.com
-- EngineYard.com

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ezra Zygmuntowicz  
View profile  
 More options May 28 2008, 4:24 pm
From: Ezra Zygmuntowicz <ezmob...@gmail.com>
Date: Wed, 28 May 2008 13:24:29 -0700
Local: Wed, May 28 2008 4:24 pm
Subject: Re: Merb compat / API change recommendations

On May 28, 2008, at 1:15 PM, Ben Nevile wrote:

Ben-

        I don't want anyone to think that merb core folks are resistant to  
change and are just downplaying folks concerns. We hear you loud and  
clear. But if merb just copies everything rails does then what is the  
point? Merb is an evolution of rails it is not a port or copy. I do  
not want to hinder merb's clean api with concerns about porting apps  
from rails. If merb just adopts all of rails apis it will be no better  
off then rails itself is.

        So I think the best thing for folks all around is to make a plugin  
that is a rails compatibility shim that folks porting apps can use.  
Also we should add a few wiki pages with descriptions of why and how  
merb's api's differ from Rails apis to help folks coming from rails to  
merb.

        I understand how people fresh off the rails boat may get confused  
about some of this stuff, but we will just have to document the  
differences and why they exist. Rails IMHO has grown *way* to big for  
a framework, this is why people run into the wall when they need to do  
something that is not "on the golden path". I will not make this same  
mistake in merb.

Cheers-

- Ezra Zygmuntowicz
-- Founder & Software Architect
-- e...@engineyard.com
-- EngineYard.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Klishin  
View profile  
 More options May 28 2008, 4:39 pm
From: "Michael Klishin" <michael.s.klis...@gmail.com>
Date: Wed, 28 May 2008 23:39:04 +0300
Local: Wed, May 28 2008 4:39 pm
Subject: Re: Merb compat / API change recommendations
2008/5/28 Ben Nevile <ben.nev...@gmail.com>:

> I don't want to belabor this point further.  I just want to say that like
> the English language, the Rails "language" is a common set of symbols that
> many of us understand.

Ben,

As person who can read 4 (natural) languages I should say nothing
benefits your brain
as much as learning a new language or living in a country that has
different culture from
your home land.

It even makes you understand your mother tongue better in some ways. This is
just another point of keeping Merb's "post Rails" decision around for years.
--
MK


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Supporting Merb (was: Re: Merb compat / API change recommendations)" by Michael Klishin
Michael Klishin  
View profile  
 More options May 28 2008, 4:53 pm
From: "Michael Klishin" <michael.s.klis...@gmail.com>
Date: Wed, 28 May 2008 23:53:03 +0300
Local: Wed, May 28 2008 4:53 pm
Subject: Re: Supporting Merb (was: Re: Merb compat / API change recommendations)
2008/5/28 Dudley Flanders <dud...@misnomer.us>:

> Having said that, I was also pretty disappointed by the tone of this
> thread. I don't think it's representative of the core team's attitude
> in general.

Attitude of most active Merb contributors is to keep Merb's philosophy
in place => keep Merb's benefits for those who need it. Nothing else.

To keep your ideas in place you have to give up on some of the
opposite ideas. And it
pisses someone off.

What's I especially like about that thread is that no one from people
who need "Rails compatibility"
so bad they spend hours arguing actually submitted a few lines patch,
kicked off merb plugin project
at github or ever asked what *they* can do about it.

They just give recommendations.
--
MK


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Aimonetti  
View profile  
 More options May 28 2008, 5:12 pm
From: "Matt Aimonetti" <mattaimone...@gmail.com>
Date: Wed, 28 May 2008 14:12:47 -0700
Local: Wed, May 28 2008 5:12 pm
Subject: Re: Supporting Merb (was: Re: Merb compat / API change recommendations)

Michael, take it easy :)

People didn't submit patches because they wanted to know why we were not
doing things the way they expected us to do it. Now that they have a clearer
answer from Ezra, I'm sure we will see few patches and hopefully a rails
idioms plugin for Merb.

I actually thought that the people asking for the Rails syntax were quite
nice about it. I do disagree with the reasoning, but I really appreciated
Ezra's reply explaining the reasons why things are the way they are right
now.

I'm off to the Rails Conf, I know for a fact that at least Yehuda and Ezra
should be around if you have any questions regarding Merb. I think Yehuda
also has a Merb BoF talk scheduled.

Finally, we'll more than likely announce the first Merb Camp planned for
October 08 (planning on 10-11) in San Diego California. So if you couldn't
make it to Rails Conf, plan a trip to Southern California!

-Matt

On 5/28/08, Michael Klishin <michael.s.klis...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 48   Newer >
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google