POV-Ray : Newsgroups : povray.off-topic : Web-based access to SQL database Server Time
4 Sep 2024 13:18:23 EDT (-0400)
  Web-based access to SQL database (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: clipka
Subject: Web-based access to SQL database
Date: 29 Apr 2010 04:26:52
Message: <4bd942cc$1@news.povray.org>
I might soon be faced with the task of writing a web-based application 
accessing an SQL database (MySQL probably) - unfortunately that's not 
really my special area of knowledge. I can hack together a HTML page 
with forms, even with CSS, and am somewhat familiar with JavaScript, but 
that's about it (yet).

Any sophisticated suggestions what technology to use? CGI? PHP? JSP (I 
can do some Java coding)? How about those fancy new frameworks like Ruby 
on Rails and some such?

Robustness is probably paramount. Database is likely to be MySQL; web 
server will probably be that ugly Microsoft thing (running on Windows of 
course), but easy portability to Apache on Linux would be a great 
benefit. (Then again, the guys might be more than willing to start on 
Linux right away.)


Post a reply to this message

From: Invisible
Subject: Re: Web-based access to SQL database
Date: 29 Apr 2010 04:39:18
Message: <4bd945b6$1@news.povray.org>
clipka wrote:

> Any sophisticated suggestions what technology to use? CGI? PHP? JSP (I 
> can do some Java coding)? How about those fancy new frameworks like Ruby 
> on Rails and some such?

Personally, I'd probably use Haskell. But then, I'm crazy.

If you use CGI then you can, in principle, use any programming language 
in the world. (Realistically, any programming language that already has 
a decent CGI library. You do *not* want to write this code yourself!)

It also depends on the complexity of what you want to do. If you just 
want to grab some rows from a DB and show them in an HTML table, you can 
probably do that pretty simply with just about _any_ technology. If you 
want something more sophisticated like session management and so on, you 
probably want something with prebuilt libraries to make the job easier.

When I was at uni, we used an Oracle DB which had some kind of plugin 
that allowed you to run an SQL query and then apply XSLT to the 
resultset to generate... well, you can generate HTML or XHTML or plain 
text or just about any text-based format, really. I don't think XSLT is 
Turing-complete, but for certain kinds of set-based transformations, 
it's pretty darn easy.

Other than that, you're looking at Perl, PHP, ASP and so forth. 
Personally I hate Perl, and PHP looks a mess, but I guess it depends on 
what you actually want to do. Certainly if you have a problem getting 
something like PHP to work, a quick Google search will probably give you 
a million web pages explaining how to fix it.

I can't comment on Ruby on Rails or similar. Never tried it.


Post a reply to this message

From: Gilles Tran
Subject: Re: Web-based access to SQL database
Date: 29 Apr 2010 05:43:44
Message: <4bd954d0$1@news.povray.org>
These days, one can setup an entire, complex web-based application in a 
short time without writing a single line of code, so it really depends on 
how specific your needs are. In most cases there's no need to reinvent the 
wheel, and popular frameworks and content management systems have 
modules/libraries (commercial or free) that take care of typical situations, 
each system being more or less easily customisable. They'll handle SQL 
queries, the display, theming, users management etc, and for the really 
specific stuff you can develop the required modules/libraries yourself. 
They're mostly OS-independent (and more or less SQL-engine-independent) too. 
On the other hand it may be possible that the application is so peculiar 
that it has to be built from scratch, or that using a framework/CMS is not a 
good idea (performance issues, dependency hell, security). Perhaps you 
should have a look at different frameworks and see what they offer (IIRC 
there's a comparison chart somewhere on Wikipedia).

G.



4bd942cc$1@news.povray.org...
>I might soon be faced with the task of writing a web-based application 
>accessing an SQL database (MySQL probably) - unfortunately that's not 
>really my special area of knowledge. I can hack together a HTML page with 
>forms, even with CSS, and am somewhat familiar with JavaScript, but that's 
>about it (yet).
>
> Any sophisticated suggestions what technology to use? CGI? PHP? JSP (I can 
> do some Java coding)? How about those fancy new frameworks like Ruby on 
> Rails and some such?
>
> Robustness is probably paramount. Database is likely to be MySQL; web 
> server will probably be that ugly Microsoft thing (running on Windows of 
> course), but easy portability to Apache on Linux would be a great benefit. 
> (Then again, the guys might be more than willing to start on Linux right 
> away.)


Post a reply to this message

From: Warp
Subject: Re: Web-based access to SQL database
Date: 29 Apr 2010 09:08:58
Message: <4bd984ea@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Any sophisticated suggestions what technology to use?

  PHP is nowadays what most use. I think some people use Python. Both have
libraries to easily interface with MySQL and to create http content.

-- 
                                                          - Warp


Post a reply to this message

From: Darren New
Subject: Re: Web-based access to SQL database
Date: 29 Apr 2010 12:40:19
Message: <4bd9b673$1@news.povray.org>
clipka wrote:
> Robustness is probably paramount. Database is likely to be MySQL; web 
> server will probably be that ugly Microsoft thing (running on Windows of 
> course), but easy portability to Apache on Linux would be a great 
> benefit.

You might want to peek at ASP.NET (and mono) to see if it'll do what you 
want. I don't know how good their mysql support is, but IIRC it's not terrible.

If you're interfacing with lots of other libraries and/or servers, PHP is 
probably the way to go, unfortunately.

-- 
Darren New, San Diego CA, USA (PST)
   Linux: Now bringing the quality and usability of
   open source desktop apps to your personal electronics.


Post a reply to this message

From: Sabrina Kilian
Subject: Re: Web-based access to SQL database
Date: 29 Apr 2010 19:34:05
Message: <4bda176d$1@news.povray.org>
clipka wrote:
> I might soon be faced with the task of writing a web-based application
> accessing an SQL database (MySQL probably) - unfortunately that's not
> really my special area of knowledge. I can hack together a HTML page
> with forms, even with CSS, and am somewhat familiar with JavaScript, but
> that's about it (yet).
> 
> Any sophisticated suggestions what technology to use? CGI? PHP? JSP (I
> can do some Java coding)? How about those fancy new frameworks like Ruby
> on Rails and some such?
> 
> Robustness is probably paramount. Database is likely to be MySQL; web
> server will probably be that ugly Microsoft thing (running on Windows of
> course), but easy portability to Apache on Linux would be a great
> benefit. (Then again, the guys might be more than willing to start on
> Linux right away.)

Take your pick, everything you mentioned and more are usable. Since you
are looking at MS stuff, you have all of .NET; ASP, C#, and so on.
http://en.wikipedia.org/wiki/List_of_web_application_frameworks is a
good place to start. JQuery is close to JavaScript, though I read about
it because someone asked 'how do I do addition of integers that are
class elements, in javascript' (or something similar to that) and the
answer was "Use JQuery" instead of something rational. A friend who uses
it says "It is the answer to everything. It will make a link so you
don't need to write HTML, it will shut down a computer, it will bake a
sweet potato pie."

There isn't really a limit to what languages work now. I like my
applications to be applications, so Adobe AIR, SQLite built in for what
ever you can cache, and talking through what ever middle-ware you want
(PHP in my case) or directly to the server via sockets.


Post a reply to this message

From: Darren New
Subject: Re: Web-based access to SQL database
Date: 29 Apr 2010 20:56:38
Message: <4bda2ac6$1@news.povray.org>
Sabrina Kilian wrote:
> JQuery is close to JavaScript, 

JQuery is a javascript library. I'm not sure it's a server-side thing.

JQuery is kind of "this is what javascript should have been in the first 
place."  Like, if you had to start over from scratch with CSS and JS, you'd 
do something like javascript.

-- 
Darren New, San Diego CA, USA (PST)
   Linux: Now bringing the quality and usability of
   open source desktop apps to your personal electronics.


Post a reply to this message

From: Neeum Zawan
Subject: Re: Web-based access to SQL database
Date: 29 Apr 2010 21:00:57
Message: <4bda2bc9@news.povray.org>
On 04/29/10 01:26, clipka wrote:
> Any sophisticated suggestions what technology to use? CGI? PHP? JSP (I
> can do some Java coding)? How about those fancy new frameworks like Ruby
> on Rails and some such?

	Django is the equivalent of Ruby on Rails in the Python world. I've
used it extensively.

	You could use PHP and write the SQL queries yourself (not fun). Stuff
like RoR and Django create the SQL queries for you (so it doesn't matter
much whether you use MySQL or some other supported database). *You*
write the "queries" in the language (Ruby or Python). No idea how good
the Windows support is - should be in the docs.

	There are some frameworks in PHP that do that for you, but I don't know
much about them.

	Even if you do use these frameworks to abstract away from SQL, you
still need to _design_ your database (what tables, what foreign keys,
etc). So you should learn the very basics of databases (I myself know
only as much).

	You may want to consider looking at CMS's like Drupal, Joomla, etc.
Using various modules/plugins, you may be able to set up your site
without writing any code.


-- 
I considered atheism but there weren't enough holidays.


Post a reply to this message

From: Sabrina Kilian
Subject: Re: Web-based access to SQL database
Date: 30 Apr 2010 12:09:03
Message: <4bdb009f$1@news.povray.org>
Darren New wrote:
> Sabrina Kilian wrote:
>> JQuery is close to JavaScript, 
> 
> JQuery is a javascript library. I'm not sure it's a server-side thing.
> 
> JQuery is kind of "this is what javascript should have been in the first
> place."  Like, if you had to start over from scratch with CSS and JS,
> you'd do something like javascript.
> 

It's something I haven't used. I looked at it, found people suggesting
it's use for things like "how do I add two numbers in javascript" and
figured it was, at best, vastly overused.

At worst, it is a joke played on us by it's creators. You know, like
C++. ;-)


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Web-based access to SQL database
Date: 30 Apr 2010 23:25:25
Message: <4bdb9f25$1@news.povray.org>
Invisible wrote:
> I don't think XSLT is
> Turing-complete, but for certain kinds of set-based transformations,
> it's pretty darn easy.

It is. Here is a XSLT stylesheet that can "convert" a TMML document
(Turing Machine Markup Language) into plaintext with the computation
result:

http://www.unidex.com/turing/utm.htm


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.