Possible to use Ruby for Dynamic HTML sites without Rails?

How easy is this to do? I’ve been going though a Ruby book again (was
going to get into Ruby before but got busy with other stuff awhile back)
and they don’t really cover using Ruby online, its just a foundation
book. Most books I’ve seen focus on Rails for online development, but
I’d like to learn rails good enough for web use and then maybe move into
Rails after I’m confortable with that.

Frank Peterson wrote:

How easy is this to do? I’ve been going though a Ruby book again (was
going to get into Ruby before but got busy with other stuff awhile back)
and they don’t really cover using Ruby online, its just a foundation
book. Most books I’ve seen focus on Rails for online development, but
I’d like to learn rails good enough for web use and then maybe move into
Rails after I’m confortable with that.

You have many good choices for doing Web development with Ruby. Check
out Ramaze, Rack, Merb, Sinatra, Swiftcore, Camping, Vintage, …

In fact, look at the list here:

 http://wiki.ramaze.net/Home#other-frameworks

The Ruby Way, 2nd ed., by Hal F., has a section (albeit now somewhat
dated) on Ruby Web development as well.


James B.

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff
www.neurogami.com - Smart application development

Ruby is perfect for web applications. If you want something familiar
(like ASP or PHP) then use eRuby, but you don’t need to use any
frameworks at all.

Rails has many good things about it but it means you have two mountains
to climb instead of one. I think working with simple Ruby first and then
going onto incorporate frameworks later is a good idea but that’s just a
personal opinion.

On Thu, Aug 27, 2009 at 9:08 PM, James B. [email protected]
wrote:

Sinatra in particular is quite Ruby-ish, more so than Rails, and there
is a
clean
separation between the web stuff and your Ruby code. Well worth diving
into
Rack when you have got your feet wet.

regards
Richard

Jack D. wrote:

How easy is this to do? I’ve been going though a Ruby book again (was
going to get into Ruby before but got busy with other stuff awhile back)
and they don’t really cover using Ruby online, its just a foundation
book. Most books I’ve seen focus on Rails for online development, but
I’d like to learn rails good enough for web use and then maybe move into
Rails after I’m confortable with that.

You can start with ruby’s cgi module. If you need to store stuff in a
database, you can do that too, using for instanced the mysql gem. If
instead, you want to use a complex, bloated framework that will cause
you to pull your hair out and require reading long books on how to use
it, then try some of the other suggestions.

You can start with ruby’s cgi module. If you need to store stuff in a
database, you can do that too, using for instanced the mysql gem. If
instead, you want to use a complex, bloated framework that will cause
you to pull your hair out and require reading long books on how to use
it, then try some of the other suggestions.

if then of course you want to do something like session or user
management in a secure way or if your site has more than a couple
of pages or there are suddenly more than two tables in your database,
feel
free to
switch to one of the frameworks, which are not that hard to learn
(it took me longer to learn ruby than to get the hang of, say, ramze,
let alone that once you’ve seen one, you’ve pretty much seen all of
them)
and which will make, like, 80% of your code just vanish, because you’ve
been reinventing the wheel a hundred times over… :slight_smile:

Just my two cents…

2009/8/28 7stud – [email protected]

Fabian S. wrote:

if your site has more than a couple
of pages or there are suddenly more than two tables in your database,

Would you care to expand on why the number of pages/tables swings the
balance? You see I always go back to the fact that 20+ years ago ‘we’
built big complex systems (eg hundreds of tables/pages) and we didn’t
need Rails.

On Fri, Aug 28, 2009 at 5:25 AM, 7stud –[email protected] wrote:

instead, you want to use a complex, bloated framework that will cause
you to pull your hair out and require reading long books on how to use
it, then try some of the other suggestions.


Posted via http://www.ruby-forum.com/.

Would something like Sinatra be qualified as a framework? It stays out
of the way without imposing many constraints like frameworks do.

cheers
nilesh

On Fri, Aug 28, 2009 at 3:16 AM, Mike S.[email protected]
wrote:

Fabian S. wrote:

Would you care to expand on why the number of pages/tables swings the
balance? You see I always go back to the fact that 20+ years ago ‘we’
built big complex systems (eg hundreds of tables/pages) and we didn’t
need Rails.

How clean was the code in those systems? Was it easy to find something
that you were looking for if you were unfamiliar with the codebase?

Would you care to expand on why the number of pages/tables swings the
balance? You see I always go back to the fact that 20+ years ago ‘we’
built big complex systems (eg hundreds of tables/pages) and we didn’t
need Rails.

Well, 20+ years ago was 20+ years ago and if you’re still stuck there
and
want
to build a Web 2.0 website with CGI-only and still try to comply to all
the
legal stuff, offer good security for your customers and maybe want to
extend
your business to some not yet known regions or provide additional
features;

well then good luck with that…
You must either be a fearless man or the best programmer ever born…

As Jason S. pointed out: It’s really hard to keep the code clean
and readable/maintainable – let alone fix bugs.

Then you can just as well go back further and write everything in C.
I mean it’s fast and it was already there 20 years ago as well, so why
bother with Ruby at all?

So here’s my point:
I can understand, if you want to do a small thing using only CGI if you
are
learning and want to understand the basics, but refusing to use a
framework
and all the security and maintainability it offers, just because you did
so
20 years
ago doesn’t seem like a wise choice to me…

Greetz!

nice poem :-)… I’m sure glad I was born so late g

Have a nice weekend!

2009/8/28 Rick DeNatale [email protected]

On Fri, Aug 28, 2009 at 10:07 AM, Fabian
Streitel[email protected] wrote:

Well, 20+ years ago was 20+ years ago

http://talklikeaduck.denhaven2.com/2009/08/26/the-more-things-change


Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

Fabian S. wrote:

if your site has more than a couple
of pages or there are suddenly more than two tables in your database,

I think you’re wrong but not only that, I think you argue against your
case.

The way systems were built pre-1990 relied on stepwise
refinement/modularisation. You continually broke down the functionality
of the system into small chunks obeying the rules of coupling etc. In
the early 70s I recall Kodak UK having a rule that no module (PL/I)
should be more than a page of source. Systems could grow to enormous
size but still remain in highly digestible pieces. Spaghetti was not on
the menu.

What you are implying is that a programmer can only be trusted to fill
in gaps created by the designer of a framework. On the contrary, they
must first learn how to develop in an modular way. A framework shouldn’t
be a crutch.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs