ActiveSalesforce development discussion

26 views
Skip to first unread message

Apex Sutherland

unread,
Jan 17, 2011, 3:16:53 PM1/17/11
to activesa...@googlegroups.com, rh...@salesforce.com, dcar...@salesforce.com, qw...@salesforce.com, Jeff Douglas
Happy New Year ActiveSalesforce community!

I'd like to welcome a couple of distinguished new/renewed members to our mailing list. The first is Doug Chasman from Salesforce.com, who is the original creator of the ActiveSalesforce project and code base! Secondly I'd like to welcome Richard Vanhook, the creator of the apex-lang open-source project that many of us rely on in our Force.com development work. I'm really glad to have both of you on-board/back on-board! 

I'd like to get a discussion going within the group about how we can move the ActiveSalesforce project forward to take advantage of all the new features of Rails 3 and Force.com/Database.com, and also help both new Ruby and new Force.com developers understand how to bring the two technologies together. I think we have an abundance of talent in this group but a scarcity of time to apply it to this project. How can we best facilitate this discussion and then collaborate together to accomplish the development efforts that are proposed? Should we have another large web conference to discuss the project in real time, or should we use some other communication medium?

Looking forward to working together,

Alex Sutherland

http://twitter.com/apexsutherland/

Scott Smith

unread,
Jan 17, 2011, 5:50:28 PM1/17/11
to activesa...@googlegroups.com, rh...@salesforce.com, dcar...@salesforce.com, qw...@salesforce.com, Jeff Douglas
Hi Alex,

1) Would it be worthwhile to have/start an IRC channel to hang out on?
2) In December there was an intention to "bring together" the myriad ActiveSalesforce adapter branches and features together.  Any progress on that?

Thanks for starting this up again.

 - Scott
 http://twitter.com/_ofd/ (OldFartDeveloper)

--
You received this message because you are subscribed to the Google Groups "ActiveSalesforce" group.
To post to this group, send email to activesa...@googlegroups.com.
To unsubscribe from this group, send email to activesalesfor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/activesalesforce?hl=en.

Abhinav Keswani

unread,
Jan 17, 2011, 6:12:03 PM1/17/11
to activesa...@googlegroups.com
Alex/Scott

> 1) Would it be worthwhile to have/start an IRC channel to hang out on?

Great idea. Easy comms for those of us who live on the other side of
the world to the predominantly US based rails+salesforce community.
(greetings from NZ)

Also, I would be up for attending DreamForce this year so if we could
align a gathering before/during or after the event in SFO that would
be great.

> 2) In December there was an intention to "bring together"
> the myriad ActiveSalesforce adapter branches and features together.  Any
> progress on that?

It would be great to reduce the proliferation of forks/clones and
unify the community with a single gem used to connect to the
Salesforce API. I'd happily contribute towards this effort.

Exciting stuff...very keen to be involved.

-Abhinav

--
Abhinav Keswani
@wasabhi
http://trineo.co.nz

Raymond Gao

unread,
Jan 17, 2011, 6:16:44 PM1/17/11
to activesa...@googlegroups.com, rayga...@yahoo.com, Joshua Birk, Nick Simha, Quinton Wall
Hi you guys,

Should check out my improved adapter (ASF-SOAP-ADAPTER, aka SF RubyToolKit) http://asf-soap-adapter.are4.us/asf-soap-adapter_files/slide0003.htm  which was used by Marc Benioff & Byron Sebastian @ their keynote announcing the merger of SF & Heroku, as well as on display at Moscone West SF Dev Zone.

I have made a number of improvements to the venerable adapter, including

In this release, following are achieved.

1. Bring the gem to v20 of the api, with 'database.yml', one can specify which version of the API to use, e.g. 19, 20, 21, etc. Really convenient for future upgrade.

2. Convenience objects, e.g. Salesforce::Account, Salesforce::User, Salesforce::Group, etc. That way, developers don't need to access the gut of the code. Really convenient for the future, as the abstraction protects the developer from changes. Previously, it was cumbersome to have to subclass objects. Now, all the wrapper objects inherit from the Salesforce::SfBase object. One change there, all others take the cue.

3. Upgrade to Rforce 0.4.1, actually as a pre-req, rather than hard-code-in the RForce in the adapter, TODO upgrade to Rforce 0.5.0

4. Support for Chatter Feed, including search, see the Salesforce::ChatterFeed object for detail

5. Salesforce object lookup utility, given an object ID find the object type.

6. Support for non-traditional SQL, e.g. “LIMIT”, “GROUP BY”, “HAVING”, and “WITH DATA CATEGORY”, see Salesforce::SfBase.query_by_sql()  for detail.   TODO, rename it to query_by_SOQL().

7. An information home page: http://asf-soap-adapter.are4.us

8. Released the GEM on RubyGems and checkin the code on GitHub.

9. Documentation for the GEM  http://asf-soap-adapter.are4.us/doc/

10. etc.


The project source code is: https://github.com/raygao/asf-soap-adapter

I suggest the following for the upcoming releases.
1. REST support for both Database.com & Force.com, particularly transaction support
2. DataMapper enhancement, in addition to ActiveRecord
3. Automatic custom SF object generation, with Rake tool, particularly for the existing AR
4. Visual SOQL query builder, especially when it comes to quickly generate ROR classes (migration / schema). This is particularly important for the complex subqueries
5. More examples, 

So far, Joshua and Nick Simha has already wrote two excellent tutorials for the new adapter. See:

There are really lots to do. It's just we need to get organized on who's doing what?

Also, thanks to Scott, your tutorial was pretty excellent for the old adapter.

best,

-Ray

Scott Smith

unread,
Jan 17, 2011, 7:47:59 PM1/17/11
to activesa...@googlegroups.com, rayga...@yahoo.com, Joshua Birk, Nick Simha, Quinton Wall
Hi Ray,

Thanks for compiling all of the information in one email.  I've got bookmarks to all of them.

I've forked your project and look forward to making it work on our project.

Scott

http://twitter.com/_ofd/ (OldFartDeveloper)

Doug Chasman

unread,
Jan 17, 2011, 9:43:10 PM1/17/11
to ActiveSalesforce
Hi Everyone,

The news about Heroku has us at Salesforce.com pretty exited - been a
long road to get Ruby/Rails/etc some love inside SFDC but when we
decide to get into something we go big :-)

I have been away from the Rails community for a bit - never really
left but have gone into lurker mode with no direct Rails project work
in my day job - but the recent developments have piqued my interest
once again and I have been thinking about just what would make a
killer ASF 2.0 given that the following things did not even exist when
I started ASF 1.0 5+ years ago:

- SOQL relationship joins and so many other API enhancements
- Metadata API
- Bulk API
- REST API
- Apex Code and Visualforce
- Heroku
- any form of documented, supported, etc way to extend Rails in a
predictable/sane fashion (Rails 3 has made great strides in this
area!)

The proof of concept code base we have kept alive has taken us so much
farther than I ever expected without any form of real overhaul and I
think its time to think about all we have learned and design something
from the ground up that we can all enjoy working on. With that said I
am looking into just exactly what if anything we're planning on
building along these lines inside the sfdc mother ship before we all
spend our valuable after hours time developing something.

I hope to have more info I can share soon.

Doug

On Jan 17, 3:16 pm, Apex Sutherland <apexsutherl...@gmail.com> wrote:
> Happy New Year ActiveSalesforce community!
>
> I'd like to welcome a couple of distinguished new/renewed members to our
> mailing list. The first is Doug Chasman from Salesforce.com, who is the
> original creator of the ActiveSalesforce project and code base! Secondly I'd
> like to welcome Richard Vanhook, the creator of the
> apex-lang<http://code.google.com/p/apex-lang/> open-source

Doug Chasman

unread,
Jan 17, 2011, 9:50:54 PM1/17/11
to ActiveSalesforce
Hi Ray,

#1 is also on my short list - REST has a number of benefits to be sure

#3 is something I always wanted and now that we have the powerful
Metadata API we can finally leverage Migrations etc for automatic
schema management (not just custom object creation but custom fields
on both standard and custom objects, alters, etc).

I would also add that with the Metadata API we have a much more
manageable mechanism compared to describes for reflection to allow
integration into scaffolding related tools.

Doug

On Jan 17, 6:16 pm, Raymond Gao <rayga...@gmail.com> wrote:
> Hi you guys,
>
> Should check out my improved adapter (ASF-SOAP-ADAPTER, aka SF RubyToolKit)http://asf-soap-adapter.are4.us/asf-soap-adapter_files/slide0003.htm which
> was used by Marc Benioff & Byron Sebastian @ their keynote announcing the
> merger of SF & Heroku, as well as on display at Moscone West SF Dev Zone.
>
> I have made a number of improvements to the venerable adapter, including
>
>    In this release, following are achieved.
>
> 1. Bring the gem to *v20* of the api, with 'database.yml', one can specify
> which version of the API to use, e.g. 19, 20, 21, etc. Really convenient for
> future upgrade.
>
> 2. *Convenience objects*, e.g. Salesforce::Account, Salesforce::User,
> Salesforce::Group, etc. That way, developers don't need to access the gut of
> the code. Really convenient for the future, as the abstraction protects the
> developer from changes. Previously, it was cumbersome to have to subclass
> objects. Now, all the wrapper objects inherit from the Salesforce::SfBase
> object. One change there, all others take the cue.
>
> 3. Upgrade to *Rforce 0.4.1*, actually as a pre-req, rather than
> hard-code-in the RForce in the adapter, TODO upgrade to Rforce 0.5.0
>
> 4. Support for Chatter Feed, including search, see the *
> Salesforce::ChatterFeed* object for detail
>
> 5. Salesforce *object lookup utility*, given an object ID find the object
> type.
>
> 6. Support for non-traditional SQL, e.g. “LIMIT”, “GROUP BY”, “HAVING”, and
> “WITH DATA CATEGORY”, see Salesforce::SfBase.query_by_sql()  for detail.
> TODO, rename it to query_by_SOQL().
>
> 7. An information home page:http://asf-soap-adapter.are4.us
>
> 8. Released the GEM on RubyGems and checkin the code on GitHub.
>
> 9. Documentation for the GEM  http://asf-soap-adapter.are4.us/doc/
>
> 10. etc.
>
> The project source code is:https://github.com/raygao/asf-soap-adapter
>
> I suggest the following for the upcoming releases.
> 1. REST support for both Database.com & Force.com, particularly transaction
> support
> 2. DataMapper enhancement, in addition to ActiveRecord
> 3. Automatic custom SF object generation, with Rake tool, particularly for
> the existing AR
> 4. Visual SOQL query builder, especially when it comes to quickly generate
> ROR classes (migration / schema). This is particularly important for the
> complex subqueries
> 5. More examples,
>
> So far, Joshua and Nick Simha has already wrote two excellent tutorials for
> the new adapter. See:
> -http://wiki.developerforce.com/index.php/Getting_Started_with_the_For...
> -http://blog.sforce.com/sforce/2010/12/setting-up-your-ruby-on-rails-e...
>
> There are really lots to do. It's just we need to get organized on who's
> doing what?
>
> Also, thanks to Scott, your tutorial was pretty excellent for the old
> adapter.
>
> best,
>
> -Ray
>
> On Mon, Jan 17, 2011 at 4:50 PM, Scott Smith <scottnelsonsm...@gmail.com>wrote:
>
>
>
> > Hi Alex,
>
> > 1) Would it be worthwhile to have/start an IRC channel to hang out on?
> > 2) In December there was an intention to "bring together"
> > the myriad ActiveSalesforce adapter branches and features together.  Any
> > progress on that?
>
> > Thanks for starting this up again.
>
> >  - Scott
> >  http://twitter.com/_ofd/(OldFartDeveloper)
>
> > On Mon, Jan 17, 2011 at 12:16 PM, Apex Sutherland <
> > apexsutherl...@gmail.com> wrote:
>
> >> Happy New Year ActiveSalesforce community!
>
> >> I'd like to welcome a couple of distinguished new/renewed members to our
> >> mailing list. The first is Doug Chasman from Salesforce.com, who is the
> >> original creator of the ActiveSalesforce project and code base! Secondly I'd
> >> like to welcome Richard Vanhook, the creator of the apex-lang<http://code.google.com/p/apex-lang/> open-source
> >> project that many of us rely on in our Force.com development work. I'm
> >> really glad to have both of you on-board/back on-board!
>
> >> I'd like to get a discussion going within the group about how we can move
> >> the ActiveSalesforce project forward to take advantage of all the new
> >> features of Rails 3 and Force.com/Database.com, and also help both new Ruby
> >> and new Force.com developers understand how to bring the two technologies
> >> together. I think we have an abundance of talent in this group but a
> >> scarcity of time to apply it to this project. How can we best facilitate
> >> this discussion and then collaborate together to accomplish the development
> >> efforts that are proposed? Should we have another large web conference to
> >> discuss the project in real time, or should we use some other communication
> >> medium?
>
> >> Looking forward to working together,
>
> >> Alex Sutherland
>
> >>http://twitter.com/apexsutherland/
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "ActiveSalesforce" group.
> >> To post to this group, send email to activesa...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> activesalesfor...@googlegroups.com<activesalesforce%2Bunsubscrib e...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/activesalesforce?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "ActiveSalesforce" group.
> > To post to this group, send email to activesa...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > activesalesfor...@googlegroups.com<activesalesforce%2Bunsubscrib e...@googlegroups.com>
> > .

Quinton Wall

unread,
Jan 17, 2011, 10:05:38 PM1/17/11
to timfo...@gmail.com, activesa...@googlegroups.com, joshu...@salesforce.com
Tim, sorry I thought you were all up and running. I'll work on your app tonight to make sure you are good! The issue appears to be when using two databases and deploying to Heroku. I have already spoken to the Heroku support guys about your case. My bad for not following up sooner. I n my defense, I also wrote a howto article with steps on deploying your apps onto Heroku. This is currently making its way through the approval processes internally. 

Re the Force.com for Ruby Toolkit, the official  codebase, based on Ray's great work, is hosted on github. Collaboration is certainly encouraged.


We are also actively (excuse the pun) looking at the best option for rails v3 support. Current thinking is REST, but would appreciate thoughts/ideas and feedback.

Q

On Mon, Jan 17, 2011 at 5:57 PM, Quinton Wall <qw...@salesforce.com> wrote:


---------- Forwarded message ----------
From: Timothy <timfo...@gmail.com>
Date: Mon, Jan 17, 2011 at 5:49 PM
Subject: Re: [ActiveSalesforce] ActiveSalesforce development discussion
To: activesa...@googlegroups.com
Cc: rayga...@yahoo.com, Joshua Birk <joshu...@salesforce.com>, Nick Simha <nsi...@gmail.com>, Quinton Wall <qw...@salesforce.com>


Ray,

I've been using your adapter via a Gemfile (although it sounds like I should run an update to get your latest) -- I like all the objects you use and the convenience.

I do have a quetion: I want to do some things with Tasks, where can I find outu what fields I need to fill out and how they map?

And it sounds like this was run on heroku...I'm trying to run the adapter on heroku and having some challenges.  It works great in development by adding to the environment.rb, but on heroku they write their own .yml file for the database and I haven't been able to get my app to access both SFDC and the heroku postgres.

Do you have example files I could check out to show how to set up to run on heroku?

Thanks.

Abhinav Keswani

unread,
Jan 17, 2011, 10:17:06 PM1/17/11
to activesa...@googlegroups.com, timfo...@gmail.com, joshu...@salesforce.com
Tim in a nutshell this is what is happening

- you define an ASF adapter in your database.yml
- this works great on localhost or your own dev host
- as soon as you deploy to Heroku, they will understandably replace
all your database credentials with their own
- the way around this is a bit of a hack - to define connectivity at
the model level by creating a sfbase model where you supply login
credentials, extending all other models from sf_base ... etc ...

I'll let Quentin's post bubble up through the system to describe how
to do this - but rest assured Tim it is possible.

Perhaps we could add a clean Heroku deployment methodology to our TODO list.

I'd also vote for working towards using the REST API ... so much
nicer. There are also things to consider like a solid test suite
using something like webmock (or mocha) + factory_girl ..

-Abhinav

--
Abhinav Keswani

Apex Sutherland

unread,
Jan 17, 2011, 10:24:42 PM1/17/11
to activesa...@googlegroups.com, rh...@salesforce.com, dcar...@salesforce.com, qw...@salesforce.com, Jeff Douglas
Hi Scott,

1) Great idea on the IRC channel! A bunch of us have recently started hanging out on a general purpose Salesforce IRC channel on Freenode, but it would be useful to have one going for ActiveSalesforce as well. I just registered #activesalesforce on Freenode:


I'll try to lurk there consistently to keep the channel open.

2) Lots of great discussion on this point already!


http://twitter.com/apexsutherland/

Siva Shanmukh Vetcha

unread,
Jan 18, 2011, 3:04:30 AM1/18/11
to activesa...@googlegroups.com
I am really excited to know the plans for the v2.0. I am always interested in contributing to it. I was even thinking about making rails -d salesforce <project_name> to create models of all standard and custom objects using the metadata API. Although I haven't done good research on how feasible this idea would be and pardon me if this is a subset of one of the suggestions made Ray or Doug.

@Abhinav
You probably wouldn't have to go that far to do that. It is a case similar to when you have multiple database.yml like files, right? So you just need to add the following line in the initializer in environment.rb

  config.database_configuration_file = File.join(RAILS_ROOT, 'config', 'sf.yml')

where sf.yml contains salesforce login credentials.

It even worked for me.

Not sent from my iPhone or my Blackberry or anyone else's

Richard Vanhook

unread,
Jan 18, 2011, 9:23:07 AM1/18/11
to activesa...@googlegroups.com
Thanks for letting me join folks!  I believe the integration between Ruby and Salesforce is going to prove very important for us all.  

--

Abhinav Keswani

unread,
Jan 18, 2011, 12:53:06 PM1/18/11
to activesa...@googlegroups.com
Hi Siva

On 18 January 2011 21:04, Siva Shanmukh Vetcha <siva.s...@gmail.com> wrote:
> @Abhinav
> You probably wouldn't have to go that far to do that. It is a case similar
> to when you have multiple database.yml like files, right? So you just need
> to add the following line in the initializer in environment.rb
>   config.database_configuration_file = File.join(RAILS_ROOT, 'config',
> 'sf.yml')
> where sf.yml contains salesforce login credentials.

Nice solution...much easier to implement and maintain.

-Abhinav

--
Abhinav Keswani

raygao-gmail

unread,
Jan 18, 2011, 5:41:02 PM1/18/11
to activesa...@googlegroups.com
Hi Tim,

I believe Abhinav has the solution on your problem.

The only thing that I like to added is that, with the SOQL DescribeSObject, you can reflect on a table by doing "Salesforce::XXXObject.column_names", you will find the columns of the underlying SF object.

Hope that helps.

-Ray

Quinton Wall

unread,
Jan 18, 2011, 5:58:16 PM1/18/11
to activesa...@googlegroups.com, activesa...@googlegroups.com
I believe Tim's issue was more around using multiple databases. I posted a solution here this morning:

http://boards.developerforce.com/t5/Perl-PHP-Python-Ruby-Development/getting-error-when-trying-to-use-activesalesforce-adapter-on/m-p/236403

Q

raygao-gmail

unread,
Jan 18, 2011, 8:47:58 PM1/18/11
to activesa...@googlegroups.com
Q, Thanks a lot. We definitely need some kind of knowledge base for this solution. Now, we have it. It's cool. -R

Siva Shanmukh Vetcha

unread,
Jan 19, 2011, 4:07:17 AM1/19/11
to activesa...@googlegroups.com
Moving the conversation back to the development of asf-soap-adapter v2.0. Should we also consider making it rails 3 compatible?

Not sent from my iPhone or my Blackberry or anyone else's


Reply all
Reply to author
Forward
0 new messages