Ruby on Rails version of osCommerce in PHP?

P

petermichaux

Hi,

I'm just new to Ruby but after only a few hours I can see that I want
to switch from PHP to Ruby. Rails is so good! :D

I was getting involved with a SourceForge project to write a modern
version of osCommerce with MVC, ORM, CSS layout etc. But I think I'd
rather work in Rails. Is there already an open source project like
osCommerce in the Rails world? If not where do Rails open source
projects usually reside? Something like SourceForge?

Thanks,
Peter
 
S

snacktime

------=_Part_2336_4499696.1129880440608
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Anyone interested in joining a new open source project to write this? I
wrote down a few thoughts

http://members.shaw.ca/petermichaux/store/store-rb.html

-Peter


Hi Peter,

Search the list archives for oscommerce, there is at least one good long
thread there with some good ideas on this. So far no one seems interested
enough to actually write it though. IMO it's going to take one person to ge=
t
the ball rolling and be able to get out an initial release on their own.
That just seems to be how it goes..

Chris

------=_Part_2336_4499696.1129880440608--
 
C

Corey Lawson

------=_Part_8392_27518770.1130165497303
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Yes. I'd like to help with the database part at least (to make it non-MySQL
dependent).

Anyone interested in joining a new open source project to write this? I
wrote down a few thoughts

http://members.shaw.ca/petermichaux/store/store-rb.html

-Peter

------=_Part_8392_27518770.1130165497303--
 
D

Douglas Livingstone

2005/10/24 said:
Yes. I'd like to help with the database part at least (to make it non-MyS= QL
dependent).

Isn't that for-free with Rails?

Douglas
 
D

Dave Burt

Douglas Livingstone wondered:
Isn't that for-free with Rails?

Douglas

Sort of. It's not fool-proof, though, especially if you use big magical
find_by_sql queries.

Also, for an app like this, you will need a script to create the database,
and that is platform-specific. Although Og provides this capability, and
there's also a separate Schema Generator (designed for Rails use) on
RubyForge.

Cheers,
Dave
 
P

petermichaux

Joe said:
I think it's better to extract a framework from an existing store,
than to try to build a generalized framework from scratch.

This is what I want to do. I'm planning on building a demo store that
uses all the application features. The demo store is essential to
making sure that the application works well. Then someone implementing
the application can change the database data, images, css, store
options and extend the functionality if they have a particular need.
Then they are in business.
 
P

petermichaux

Unless you by "existing" you mean one that exists today. If you mean
this then which existing store? Is there a good, open source store app
that is avalible?
 
P

petermichaux

A

Austin Ziegler

Here is David Heinemeier Hanson's thoughts about why it is best to keep
the database dumb

http://www.loudthinking.com/arc/000516.html

As much as I respect David's work on Rails, he can't be more wrong on
this matter -- *unless* you're talking a single-app database. The
moment you need more than one application talking to your database,
those constraints he considers "wrong" are vital.

There are a number of good reasons to have strong constraint support
in the database. I mostly agree with him about putting business logic
in the database -- but that's triggers and stored procedures, not
constraints. There are, however, times when it is important to have
that sort of behaviour available.

-austin
 
S

snacktime

------=_Part_9292_1878262.1130355975280
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

As much as I respect David's work on Rails, he can't be more wrong on
this matter -- *unless* you're talking a single-app database. The
moment you need more than one application talking to your database,
those constraints he considers "wrong" are vital.

There are a number of good reasons to have strong constraint support
in the database. I mostly agree with him about putting business logic
in the database -- but that's triggers and stored procedures, not
constraints. There are, however, times when it is important to have
that sort of behaviour available.

Frankly, I trust postgresql more than I do rails to ensure the integrity of
my data. I'll keep my constraints thank you:)

Chris

------=_Part_9292_1878262.1130355975280--
 
J

Jeremy Kemper

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

As far as I can tell, you have a moot point: David assumes the
ApplicationDatabase pattern.

Plus, I am sure he could be more wrong-- give him time ;-)


There are a number of good reasons for strong typing too.

Especially when there is more than one application working with your
classes.


Frankly, I trust postgresql more than I do rails to ensure the
integrity of
my data. I'll keep my constraints thank you:)

Guns don't kill, people do?

jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDX+LsAQHALep9HFYRAnqUAJ9WOM3oCEoFW0noe0sLkBovUF1vRQCfcy7Q
RaRDzGC9h20+PV6wT/vhfbo=
=8RP5
-----END PGP SIGNATURE-----
 
P

Paul

David's argument is for a single-app database, because he doesn't
believe that applications should integrate directly with each other's
databases. As such, all databases are single-app databases.

The alternative being integration by specific hooks, RPC, object
brokering, etc might take more time, yes, but is also ultimately more
flexible. Systems do not have to be physically as near and the
protocols used can be much better protected. HTTP, used by SOAP and
XMLRPC for example, is far easier to secure and firewall then SQLnet
used by Oracle.

This ultimately boils down to a difference in opinion on design.
 
A

Austin Ziegler

As far as I can tell, you have a moot point: David assumes the
ApplicationDatabase pattern.

That's why, in part, I put the caveat in there. I still think that his
position is a mistake, even for a single-app database, but it's less
problematic.
Plus, I am sure he could be more wrong-- give him time ;-)

I'm not sure on that.
There are a number of good reasons for strong typing too.

Good thing Ruby has strong typing, then.

-austin
 
A

Austin Ziegler

David's argument is for a single-app database, because he doesn't
believe that applications should integrate directly with each other's
databases. As such, all databases are single-app databases.

Ah ... but at that point, in many ways, he's wrong. The moment you have
data to migrate, there's a second program working on the database.
Unless -- as appears to be the case with Rails at this point -- your
migration is done using the exact same database access layer as your
primary application, you will get garbage data at some point.

[...]
This ultimately boils down to a difference in opinion on design.

Not really. It boils down to good and bad practices. I think that the
decoupling that David advocates is a good practice, but he advocates it
with a healthy dose of a bad practice -- ignoring the capabilities that
relational databases (even the limited ones available today) give you.
Constraints -- especially foreign keys -- can help database query
optimizers (and with large enough data sets, you can even partition the
data horizontally because you have useful constraints). You'd never know
this from MySQL, because it's crap all the way through, but it's true.

Additionally, just as VB promoted bad UI, PHP and MySQL have promoted
nonsense data models. I'd rather not see Rails help people further down
that direction -- data modelling is an *important* thing, and it can't
be properly driven from the object oriented side (Og's failing) and it
can't be done without proper constraint support (especially foreign
keys).

Remember -- I'm neutral about triggers and stored procedures. I have, in
fact, worked on systems where triggers were limited and where triggers
were important. They both worked well for different reasons -- but the
ultimate point behind both is that the databases were *very* well
designed and the constraints were well managed, too. It left the heavy
lifting of the business logic to the programs, but it made it harder for
ad-hoc queries to break the programs.

-austin
 
P

Paul

I can certainly agree with foreign key constraints; where possible
these do help assure data integrity at the lowest possible layer. But
these shouldn't replace similar contraints in the business logic. In
particular, the UI is improved by better error reporting from the
business logic which means catching problems there first.

As for triggers and stored procedures, I'm not so neutral. Just as VB's
promoted bad UI, I've seen DBAs go wild with stored procedures and you
can have a mess on your hands there too. Any tool or system in the
hands of the inexperienced can promote bad something-or-other. Good
design is key.

And rails and family do consistently access the database in the same
way which may be how David rationalizes to himself what he says. If so,
then that makes sense because rails also provides the ability to add
messaging hooks (via ActiveWebService) to implement the integration
mechanizms that he advocates. In another system, if this full stack
weren't in place, then other mechanizms would be required because you'd
be integrating at some point or other in the database (even if its only
one system for web and other for messaging). Martin Fowler talks about
this http://martinfowler.com/bliki/DatabaseStyles.html.
 
C

Corey Lawson

------=_Part_8125_22075675.1130426792365
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

As for triggers and stored procedures, I'm not so neutral. Just as VB's
promoted bad UI, I've seen DBAs go wild with stored procedures and you
can have a mess on your hands there too. Any tool or system in the
hands of the inexperienced can promote bad something-or-other. Good
design is key.


Some DBAs may go wild with SPs, but the worst by far is Access. I love it
for what it is (a very accessible[sic] database environment, but I hate
having to deal with apps other people make that have grown into
business-essential apps. The least problem is the "Excel" mentality of some
"developers". The hardest problems are that it is not possible to decouple
data integrity at the database level from the user interface (i.e.,
triggers/procs). It's been like this for about 15 or so years. You think
someone might have figured out a better way to do it?

And rails and family do consistently access the database in the same
way which may be how David rationalizes to himself what he says. If so,
then that makes sense because rails also provides the ability to add
messaging hooks (via ActiveWebService) to implement the integration
mechanizms that he advocates. In another system, if this full stack
weren't in place, then other mechanizms would be required because you'd
be integrating at some point or other in the database (even if its only
one system for web and other for messaging). Martin Fowler talks about
this http://martinfowler.com/bliki/DatabaseStyles.html.



If only there were a Rails-based data transporter mechanism (ala DTS for SQ=
L
Server), a multiplatform Rails-based ad hoc query system, several
Rails-based reporting and data analysis systems (Crystal Reports, Hyperion,
et al), or a Rails-based "glue" layer that could easily provide a homogenou=
s
access layer for heterogenous data sources to external applications (ala
ODBC. AR works within Rails, but not for things outside of Rails).

The messaging hooks will work with Rails, but what about external
applications?

------=_Part_8125_22075675.1130426792365--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top