Possible to use Ruby for Dynamic HTML sites without Rails?

F

Frank Peterson

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.
 
J

James Britt

Frank said:
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 Fulton, has a section (albeit now somewhat
dated) on Ruby Web development as well.


--
James Britt

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
 
M

Mike Stephens

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.
 
R

Richard Conroy

[Note: parts of this message were removed to make it a legal post.]

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 Fulton, has a section (albeit now somewhat
dated) on Ruby Web development as well.


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
 
7

7stud --

Jack said:
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.
 
F

Fabian Streitel

[Note: parts of this message were removed to make it a legal post.]
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... :)

Just my two cents...
 
M

Mike Stephens

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.
 
N

Nilesh Trivedi

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. =A0 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.

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

cheers
nilesh
 
J

Jason Stewart

Fabian Streitel 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?
 
F

Fabian Streitel

[Note: parts of this message were removed to make it a legal post.]
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 Stewart 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!
 
F

Fabian Streitel

[Note: parts of this message were removed to make it a legal post.]

nice poem :)... I'm sure glad I was born so late *g*

Have a nice weekend!
 
M

Mike Stephens

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.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top