|
Home > Archive > PostgreSQL Discussion > March 2006 > Implementation Suggestions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Implementation Suggestions
|
|
| Rory Hart 2006-03-29, 3:27 am |
| Hi,
I'm wanting to build a database and interface for a small business to
keep track of things such as clients, suppliers etc. The database will
be served on a Linux box, with users accessing/updating it over the
network from both Linux and windows.
I'm wondering if I could get some suggestions as to how implement this
quickly and simply? I was thinking a web interface using PHP would be
the fastest way of going about it.
I have a understanding of SQL and can program but I don't want to spend
an eternity working on it and maintaining it.
Thank you
--
Rory Hart
Lifestyle Management Consultant
Professional Lifestyle Management
http://www.lifestylemanage.com
Phone 03 9879 5643 PO Box 4179
Fax 03 9879 6743 Ringwood Vic 3134
Mobile 0412 821030 Australia
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
| |
|
| Rory Hart wrote:
> Hi,
>
> I'm wanting to build a database and interface for a small business to
> keep track of things such as clients, suppliers etc. The database will
> be served on a Linux box, with users accessing/updating it over the
> network from both Linux and windows.
>
> I'm wondering if I could get some suggestions as to how implement this
> quickly and simply? I was thinking a web interface using PHP would be
> the fastest way of going about it.
A web interface will make it easy for others to use (and from anywhere).
OTOH, if you're comfortable with C# or Java or "X" you could do it that
way, however that will mean either installing an app or applet on each PC.
> I have a understanding of SQL and can program but I don't want to spend
> an eternity working on it and maintaining it.
What languages are you comfortable with? PHP, Ruby, Python, Perl all
work well for web interfaces. C#, Java (and others) work fine as client
apps..
--
Postgresql & php tutorials
http://www.designmagick.com/
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
| |
| Rory Hart 2006-03-29, 3:27 am |
| Chris wrote:
> Rory Hart wrote:
>
>
>
> A web interface will make it easy for others to use (and from
> anywhere). OTOH, if you're comfortable with C# or Java or "X" you
> could do it that way, however that will mean either installing an app
> or applet on each PC.
>
>
>
> What languages are you comfortable with? PHP, Ruby, Python, Perl all
> work well for web interfaces. C#, Java (and others) work fine as
> client apps..
>
PHP would be my choice i think, there are libraries and tools for using
pgsql and php aren't there?
--
Rory Hart
Lifestyle Management Consultant
Professional Lifestyle Management
http://www.lifestylemanage.com
Phone 03 9879 5643 PO Box 4179
Fax 03 9879 6743 Ringwood Vic 3134
Mobile 0412 821030 Australia
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
|
|
|
|
| Ian Harding 2006-03-29, 9:28 am |
| > >> I'm wondering if I could get some suggestions as to how implement[color=dark
red]
If you used Ruby on Rails, you'd be finished by now. It slices, it
dices, it makes julienne fries.
Seriously, it's not too bad if you don't mind it's plentiful
shortcomings. I was getting carpal tunnel syndrome from typing
<scripting language> pages so I switched to RoR for a hobby app. It
works fine, but you have to do it "The Rails Way" and expect no help
from the "Community" because they are a fanboi cheerleader squad, not
interested in silly stuff like referential integrity, functions,
triggers, etc. All that nonsense belongs in the application!
Check this out, there is no stale connection detection or handling in
rails. I'm not kidding. If you connection drops out, restart your
web server. Sorry. Blah.
Anyway, besides its warts, it is dead easy to use, and does make
putting together web applications in a "green field" scenario quite
painless. Just don't try to do anything outside the box like trying
to access an existing database that uses RDBMS features heavily and
uses normal object naming.
- Ian
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
| |
| Kenneth Downs 2006-03-29, 11:28 am |
| Ian Harding wrote:
I am fascinated by your post. I have never heard a bad thing said about
RoR.
I have been meaning to investigate it because it is the only system I've
heard of that makes the same claim that I do, which is to have
eliminated entire categories of labor through automation.
Except that I built mine on a database foundation. Systematize and
automate database handling and UI creation should follow. I did not
know that RoR was so cavalier w/respect to the database, is that really
true? Is it really just yet-another-UI system?
IMHO the problem with all blink-of-an-eye dev tools is that they are not
built on a foundation of solid database design, but now we're drifting
OT....
>
>If you used Ruby on Rails, you'd be finished by now. It slices, it
>dices, it makes julienne fries.
>
>Seriously, it's not too bad if you don't mind it's plentiful
>shortcomings. I was getting carpal tunnel syndrome from typing
><scripting language> pages so I switched to RoR for a hobby app. It
>works fine, but you have to do it "The Rails Way" and expect no help
>from the "Community" because they are a fanboi cheerleader squad, not
>interested in silly stuff like referential integrity, functions,
>triggers, etc. All that nonsense belongs in the application!
>
>Check this out, there is no stale connection detection or handling in
>rails. I'm not kidding. If you connection drops out, restart your
>web server. Sorry. Blah.
>
>Anyway, besides its warts, it is dead easy to use, and does make
>putting together web applications in a "green field" scenario quite
>painless. Just don't try to do anything outside the box like trying
>to access an existing database that uses RDBMS features heavily and
>uses normal object naming.
>
>- Ian
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: explain analyze is your friend
>
>
| |
| Tomi NA 2006-03-29, 11:28 am |
| On 3/29/06, Ian Harding < iharding@destinydata
.com> wrote:
>
> Seriously, it's not too bad if you don't mind it's plentiful
> shortcomings. I was getting carpal tunnel syndrome from typing
> <scripting language> pages so I switched to RoR for a hobby app. It
> works fine, but you have to do it "The Rails Way" and expect no help
> from the "Community" because they are a fanboi cheerleader squad, not
> interested in silly stuff like referential integrity, functions,
> triggers, etc. All that nonsense belongs in the application!
> ...
That's an eye opener, thanks Ian.
t.n.a.
| |
| Bernhard Weisshuhn 2006-03-29, 11:28 am |
| Kenneth Downs wrote:
> I have been meaning to investigate it because it is the only system I've
> heard of that makes the same claim that I do, which is to have
> eliminated entire categories of labor through automation.
Have you looked at http://catalyst.perl.org/ lately?
IMHO it's "Rails done right" and it's perl, so it just /has/ to be good ;-)
sorry, couldn't resist.
bkw
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
| |
| Steve Atkins 2006-03-29, 1:28 pm |
|
On Mar 29, 2006, at 8:03 AM, Kenneth Downs wrote:
> Ian Harding wrote:
>
> I am fascinated by your post. I have never heard a bad thing said
> about RoR.
>
> I have been meaning to investigate it because it is the only system
> I've heard of that makes the same claim that I do, which is to have
> eliminated entire categories of labor through automation.
>
> Except that I built mine on a database foundation. Systematize and
> automate database handling and UI creation should follow. I did
> not know that RoR was so cavalier w/respect to the database, is
> that really true? Is it really just yet-another-UI system?
Pretty much, AFAICT, it's designed to run with anything that supports
SQL as it's
embedded store, rather than allowing you to talk to an RDBMS with an
existing
schema easily.
It's the exact opposite there of OpenACS, which puts tentacles deep
into the database,
and really relies on embedded functions and well crafted SQL. And
only supports
Oracle and PostgreSQL, not MySQL. I'm playing with Perl+Catalyst+DBIx
at the
moment, which seems to be a reasonable compromise, as long as you
really like
perl. :).
For the original poster - a web interface might well be the simplest
to put together,
but if a client turns out to be a better solution I'd strongly
suggest looking at Qt.
It has nice SQL support and it's very quick to turn around a simple
database
access application, if you've a passing acquaintance with C++. And
it'll compile
to Windows, Linux and OS X from the same source.
Cheers,
Steve
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Vivek Khera 2006-03-29, 1:28 pm |
|
On Mar 29, 2006, at 11:03 AM, Kenneth Downs wrote:
> I am fascinated by your post. I have never heard a bad thing said
> about RoR.
Most of what you read about RoR is written from a very superficial
view of what it promises, as tainted by the simplistic uses of mysql
people are familiar with.
Last summer at the O'Reilly OSCON, the author of RoR gave a
presentation. My colleagues and I just sat there stunned at how one
of the great features of RoR he was showing off was basically
referential integrity. Except that you were *only* allowed to access
the DB using the RoR tools. No direct connections were ever
allowed. He brushed off any comments about that as "I consider the
DB to be just a dumb object store". So why bother using an SQL
engine then? Silly.
That was the end of us even bothering to investigate it as a serious
platform, though we have borrowed some of the ideas and concepts in
our own in-house platform we have built since then.
My take on RoR is that it makes the simple things simpler (kind of
how the Daily Show is now Dailier) and the moderate to hard things
impossible. If you have a simple project then by all means use it to
full advantage. But if you have complex data models then
fugeddaboutit. :-(
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly
| |
| Vivek Khera 2006-03-29, 1:28 pm |
|
On Mar 29, 2006, at 12:33 PM, Steve Atkins wrote:
> For the original poster - a web interface might well be the
> simplest to put together,
> but if a client turns out to be a better solution I'd strongly
> suggest looking at Qt.
> It has nice SQL support and it's very quick to turn around a simple
> database
There's also XUL built into Mozilla derived browsers if you want a
middle-ground to full custom app and web app.
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly
| |
| Ron Mayer 2006-03-29, 8:26 pm |
| Ian Harding wrote:
> ...
> works fine, but you have to do it "The Rails Way" and expect no help
> from the "Community" because they are a fanboi cheerleader squad, not
> interested in silly stuff like referential integrity, functions,
> triggers, etc. All that nonsense belongs in the application!
You exaggerate. There's nothing that says you need to only
use ActiveRecord's out-of-the-box configuration with rails apps.
All of our models directly use their postgresql library which
is just a wrapper around libpq; and from there you can use whatever
postgresql specific tricks you'd like (postgis types was the main
reason we used that instead of ActiveRecord).
> Check this out, there is no stale connection detection or handling in
> rails. I'm not kidding. If you connection drops out, restart your
> web server. Sorry. Blah.
Which is a reasonable default. If you want to catch the
exception and re-set the connection, you surely can do so.
We prefer to catch the exception and make the machine take
itself out of the load-balancing pool so we can diagnose
the problem rather than trying to automatically do (whatever
it is you expected it to do).
We're drifting way off topic so I'll stop here. I'd be happy
to discuss further via email or on the rails lists.
| |
| Rory Hart 2006-03-29, 8:26 pm |
| Bernhard Weisshuhn wrote:
> Kenneth Downs wrote:
>
>
>
> Have you looked at http://catalyst.perl.org/ lately?
> IMHO it's "Rails done right" and it's perl, so it just /has/ to be
> good ;-)
>
> sorry, couldn't resist.
> bkw
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
Just had a look and it seems rather interesting! I had a soft spot for
perl since it was my first "proper" programing language (I learnt
pascal when I was 8 but never did anything more than four or five part
pick a path adventures ^_^).
Thanks
--
Rory Hart
Lifestyle Management Consultant
Professional Lifestyle Management
http://www.lifestylemanage.com
Phone 03 9879 5643 PO Box 4179
Fax 03 9879 6743 Ringwood Vic 3134
Mobile 0412 821030 Australia
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Rory Hart 2006-03-29, 8:26 pm |
| Thanks for all the suggestions I now have a lot better idea of my
options. It is nice to fire off a question at a mailing list and get so
many positive helpful answers, gives me a warm and fuzzy glow.
Thank you all
--
Rory Hart
Lifestyle Management Consultant
Professional Lifestyle Management
http://www.lifestylemanage.com
Phone 03 9879 5643 PO Box 4179
Fax 03 9879 6743 Ringwood Vic 3134
Mobile 0412 821030 Australia
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly
| |
| Reid Thompson 2006-03-29, 8:26 pm |
| Ian Harding wrote:
>
> If you used Ruby on Rails, you'd be finished by now. It slices, it
> dices, it makes julienne fries.
>
> Seriously, it's not too bad if you don't mind it's plentiful
> shortcomings. I was getting carpal tunnel syndrome from typing
> <scripting language> pages so I switched to RoR for a hobby app. It
> works fine, but you have to do it "The Rails Way" and expect no help
> from the "Community" because they are a fanboi cheerleader squad, not
> interested in silly stuff like referential integrity, functions,
> triggers, etc. All that nonsense belongs in the application!
>
> Check this out, there is no stale connection detection or handling in
> rails. I'm not kidding. If you connection drops out, restart your
> web server. Sorry. Blah.
>
> Anyway, besides its warts, it is dead easy to use, and does make
> putting together web applications in a "green field" scenario quite
> painless. Just don't try to do anything outside the box like trying
> to access an existing database that uses RDBMS features heavily and
> uses normal object naming.
>
> - Ian
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
re: ruby && postgres -- i'll throw nitro and og into the hat.
http://nitrohq.com
nitro is the web presentation framework, Og is the ORM...
----------------------------------------------
require 'og'
class Comment
property :title, String, :sql => 'VARCHAR(60) NOT NULL'
property :body, String
property :author, String
property :create_time, Time
def initialize( title = '', body = '', author = '', time = Time.now )
@title = title
@body = body
@author = author
@create_time = time
end
end
og_psql = {
:destroy_tables => true, # don't use this on a DB with tables that
you DO NOT want to lose -- or set to false
:store => :psql,
:user => 'rthompso',
:password => 'rthompso',
:name => 'test'
}
#Og.table_prefix = '' # remove og generated table prefix
db = Og.setup(og_psql)
c = Comment.new('Title', 'Body', 'Author')
# or
# c = Comment.new
# c.title = 'Hello'
# c.body = 'World'
# c.create_time = Time.now
# c.author = 'tml'
c.save
------------------------------
$ ruby -rubygems pgtest.rb
I, [2006-03-29T20:16:50.278205 #16029] INFO -- : Og uses the Psql store.
D, [2006-03-29T20:16:50.637238 #16029] DEBUG -- : Dropped database table
ogcomment
I, [2006-03-29T20:16:50.943499 #16029] INFO -- : Created table 'ogcomment'.
D, [2006-03-29T20:16:50.963087 #16029] DEBUG -- : PostgreSQL processing
foreign key constraints
D, [2006-03-29T20:16:50.963532 #16029] DEBUG -- : PostgreSQL finished
setting constraints. No action was taken in 0.00 seconds.
rthompso@yos:/home/rthompso>
$ psql test -c "select * from ogcomment;"
title | body | author | create_time | oid
-------+------+--------+---------------------+-----
Title | Body | Author | 2006-03-29 20:16:50 | 1
(1 row)
$ psql test -c "\d ogcomment;"
Table "public.ogcomment"
Column | Type |
Modifiers
-------------+-----------------------------+---------------------------------------------------------
title | character varying(60) | not null
body | text |
author | text |
create_time | timestamp without time zone |
oid | integer | not null default
nextval('ogcomment_o
id_seq'::regclass)
Indexes:
"ogcomment_pkey" PRIMARY KEY, btree (oid)
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
|
|
|
|
|