Opensource ideas

Hey guys.

I'd like to spend some time working on open source for ruby on rails
community.

Before I start, I just wanted to know if there are any special open
source tools and products, you are missing?
I know, I can participate in existing projects (and I will), but I'd
also be glad to hear ideas about new open source projects.

Thanks in advance.

Hey guys.

I’d like to spend some time working on open source for ruby on rails

community.

Before I start, I just wanted to know if there are any special open

source tools and products, you are missing?

Maybe it is just me but I would think such ideas come from actually developing in Rails… so if you are developing, what is it you are missing, what could be better? And if you are not, maybe that is the first step. just my 2 cents or maybe I misunderstand the question.

Thanks for your reply, David.

Agree, I've got several ideas myself.
But most of them are kinda specific.
Well, one of ideas is to implement identity map for ActiveRecord.
I need it, but I am not sure, if community does. That's why I'm
asking.

golubevpavel wrote:

Thanks for your reply, David.

Agree, I've got several ideas myself.
But most of them are kinda specific.
Well, one of ideas is to implement identity map for ActiveRecord.
I need it, but I am not sure, if community does. That's why I'm
asking.

You're a member of the community. If you need it, write it, release it,
and see what happens!

Best,

Marnen Laibow-Koser wrote:

golubevpavel wrote:

Thanks for your reply, David.

Agree, I've got several ideas myself.
But most of them are kinda specific.
Well, one of ideas is to implement identity map for ActiveRecord.
I need it, but I am not sure, if community does. That's why I'm
asking.

You're a member of the community. If you need it, write it, release it,
and see what happens!

...however, if by "identity map" you mean caching queries so that you
don't retrieve the same DB query twice in the course of one HTTP
request, ActiveRecord already does this.

Since marmen is a veteran he my be able to correct me if im wrong but, i think right now there is no gem to interact with sass mixins from within rails controllers (simple I/O operations), that would be nice, to have kind of an observer that can change a sass file and concequently its generated css according to some variable, this could be achieved by adding classes to and html element but my css would requiere to have every possible class. This would allow me to do things like darken the color pallete of my site according to the hour of the day, if i go the way of adding multiple classes and adding removing them i would need several class for the effect. It would allow the sass file to be even smaller i think. It would awesome if it could make a fork per user and delete it when the session ends.

NOTE : the same effect can be done with JS but again i would need to have all the classes in my sass file or it would not be persistent. This is all a crazy idea but it my be handy.

But right now what i want to see is a text paging gem, that can split a block of text and save it on different pages on the DB, it would be a polymorphic table blahblah with an atc_as_text_pager ,the usual stuff, with the option of spliting by number of letters , words or an html container tag, like div or p. Then i could put this to work with will_paginate. It would be veeery handy.

@Marnen

If you can point me into a deep guide for extending ActiveRecord with gems i would appreciate it.

Radhames Brito wrote:

Since marmen is a veteran he my be able to correct me if im wrong but,
i
think right now there is no gem to interact with sass mixins from within
rails controllers (simple I/O operations),

Why should there be? The controllers shouldn't care one bit about CSS.

What are you envisioning here?

that would be nice, to have
kind
of an observer that can change a sass file and concequently its
generated
css according to some variable,

That might be nice. I'd love to be able to do dynamic Sass per user
more easily, to allow for custom styling.

this could be achieved by adding classes

to
and html element but my css would requiere to have every possible class.
This would allow me to do things like darken the color pallete of my
site
according to the hour of the day, if i go the way of adding multiple
classes
and adding removing them i would need several class for the effect.

No. Just have multiple CSS or Sass files (each one defining the same
classes), then do
= stylesheet_tag "hour_#{@hour}".

Or run a Rake task every hour to regenerate the CSS files from Sass with
the variable.

It
would
allow the sass file to be even smaller i think. It would awesome if it
could
make a fork per user and delete it when the session ends.

...whenever that is. Session ending is not always easy to determine,
which is why we need brute-force expiration logic.

[...]

But right now what i want to see is a text paging gem, that can split a
block of text and save it on different pages on the DB, it would be a
polymorphic table blahblah with an atc_as_text_pager ,the usual stuff,
with
the option of spliting by number of letters , words or an html container
tag, like div or p. Then i could put this to work with will_paginate. It
would be veeery handy.

And veeeeery wrong. The database should store the whole block of text.
The view and controller should decide how to split it. This makes the
presentation more flexible: what if you want short pages on the mobile
phone, long pages on the computer, and whole articles in the RSS feed?

@Marnen

If you can point me into a deep guide for extending ActiveRecord with
gems i
would appreciate it.

Why do you think I know how to do this? :slight_smile: I'm just starting to write
my first AR plugin.

Best,

That might be nice. I’d love to be able to do dynamic Sass per user

more easily, to allow for custom styling.

No. Just have multiple CSS or Sass files (each one defining the same

classes), then do

= stylesheet_tag “hour_#{@hour}”.

Or run a Rake task every hour to regenerate the CSS files from Sass with

the variable.

This is what the gem is for, to avoid all the above.

…whenever that is. Session ending is not always easy to determine,

which is why we need brute-force expiration logic.

that is to have a sass per client during session so they can style the thier profile page
an such. And only if they want to save it.

And veeeeery wrong. The database should store the whole block of text.

The view and controller should decide how to split it. This makes the

presentation more flexible: what if you want short pages on the mobile

phone, long pages on the computer, and whole articles in the RSS feed?

I dont care about how to create the solution i just want the result , that i could have my view
of one specific size and paginate the text, i dont care how is done i just want a gem to do it,

right now i am using ajax for this.

Why do you think I know how to do this? :slight_smile: I’m just starting to write

my first AR plugin.

Because you are very active in the forum and have been programing ruby longer than me =).
Where are you getting the info for your plugin? how are you figuring out how to do it? right now

i jsut look at other polugins but reverse engineering is not fun.

Radhames Brito wrote:
[...]

And veeeeery wrong. The database should store the whole block of text.
The view and controller should decide how to split it. This makes the
presentation more flexible: what if you want short pages on the mobile
phone, long pages on the computer, and whole articles in the RSS feed?

I dont care about how to create the solution i just want the result ,
that i
could have my view
of one specific size and paginate the text, i dont care how is done i
just
want a gem to do it,
right now i am using ajax for this.

I don't see why you need Ajax here. What I think you want -- and I've
never done this, so I could be wrong -- is something like this:

class Article
  def paginate(format = :web)
    case format
      when :web
        content.in_big_chunks
      when :mobile
        content.in_smaller_chunks
      when :rss
        content
    end
  end
end

class ArticlesController
  def show
    @paginated_content = Article.find(params[:id]).paginate(:web)

    # then use will_paginate or something to display all the pages
  end
end

That's if you really want to do this at all. In most cases, I believe
that splitting an article into multiple pages on the Web is poor UI
design. If it's one article, I'd much rather read it on one long page
than 10 short ones.

Why do you think I know how to do this? :slight_smile: I'm just starting to write
my first AR plugin.

Because you are very active in the forum and have been programing ruby

longer than me =).
Where are you getting the info for your plugin? how are you figuring out
how
to do it? right now
i jsut look at other polugins but reverse engineering is not fun.

Same way I learn anything else in Rails: read the rdoc and search the
Web for whatever information I can find.

Best,

This is not about query caching, but about having only one instance of
the object within a session.
Say, Post.find(1) and User.find(1).posts.detect{|it| it.id == 1} would
return you different objects.
Ideal identity map would fix that problem.

This is not about query caching, but about having only one instance of
the object within a session.
Say, Post.find(1) and User.find(1).posts.detect{|it| it.id == 1} would
return you different objects.

...at the cost of a huge amount of overhead: every object ever touched
in the session would have to be cached, if I understand you correctly.

Ideal identity map would fix that problem.

Or maybe just punt to something like MagLev.

Best,

Which, being the single biggest current Rails deficiency (IMO), would
be an awesome project for someone to take on. :slight_smile:

(Yes, it's on my own to-do list, but that list is far too long already...)

> ... Session ending is not always easy to determine,
> which is why we need brute-force expiration logic.

Which, being the single biggest current Rails deficiency (IMO), would
be an awesome project for someone to take on. :slight_smile:

It's not so much a Rails deficiency as a conceptual mismatch between
HTTP and session-oriented logic. Since HTTP is stateless, the concept
of a session is really something grafted on top of it and not too
compatible with it.

(Yes, it's on my own to-do list, but that list is far too long already...)

--
Hassan Schroeder ------------------------ hassan.schroe...@gmail.com
twitter: @hassan

Best,

Perhaps. But Java servlet containers do just fine at managing the
concept of session timeout, which is what I'd like to see in Rails.