LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-07-2005, 02:09 PM   #1
viniosity
Member
 
Registered: Oct 2001
Location: Washington, DC
Distribution: Debian, Archlinux, Ubuntu, Sidux
Posts: 244

Rep: Reputation: 30
starting to code.. with an objective


I'm not a programmer but now find myself needing to code a pretty complicated database driven app. Basically, the application will need to manage suppliers and customers that I have in a database and generate requests for quotation, orders, etc.

Is there some language that is powerful, and yet simple enough for me to tackle this in? Preferably something that would give good UI response time (so not web based), and have good documentation/forum support.

Cross-platform in not necessary but it would be nice. Otherwise as long as it runs on linux it would be great. I'd also like the app to be stable enough to support somebody upgrading their desktop. That is, it shouldn't break after an apt-get dist-upgrade changes a gcc version or gtk version or perl verison or whatever.

Possible?

TIA
 
Old 02-07-2005, 02:57 PM   #2
jrtayloriv
Member
 
Registered: Jun 2004
Location: Inland NW, US
Distribution: Ubuntu
Posts: 366
Blog Entries: 1

Rep: Reputation: 44
Simple, powerful, portable - sounds to me like you are looking for Perl...

to get perl and read documentation:
www.perl.org

to find the database modules:
www.cpan.org

great perl community and tutorials:
www.perlmonks.org

I believe perlmonks even has some tutorials specifically geared towards database programming.

good luck,
jrtayloriv
 
Old 02-07-2005, 03:27 PM   #3
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
viniosity, if you go with Perl, and since I see you're on Debian, you almost certainly already have Perl installed. You'll just want to grab the docs too though: 'apt-get install perl-doc' I believe.

There's also Python, which you may find easier to learn.
 
Old 02-08-2005, 01:37 AM   #4
AngryLlama
Member
 
Registered: Sep 2004
Location: /dev/urandom
Distribution: Gentoo
Posts: 171

Rep: Reputation: 31
I would go with Perl and MySQL (although Postgresql and others are just as good or better). Your database may be simple enough for flat files. However, relational databases provide much more room for groth and maintainance. I'm not sure about your experience but You'll need to learn some basics about databases design and SQL. As far as the interface goes, you can make it in anything capable of interfacing your database (C, C++, Perl, PHP, etc.)
 
Old 02-08-2005, 08:47 AM   #5
viniosity
Member
 
Registered: Oct 2001
Location: Washington, DC
Distribution: Debian, Archlinux, Ubuntu, Sidux
Posts: 244

Original Poster
Rep: Reputation: 30
I'd like to stick with one language (I'm not a programmer and so the less syntax the better) for both the interface and underpinnings. I had really thought Perl was only a scripting language.. <<braces for impact>> but so I'm intrigued by all the recommendations. My intial thought was to go with Python.

How do things like GTK2+ compare with this? Can they be used to code as well? Are they complementary or would they replace something like Perl/Python.
 
Old 02-08-2005, 01:00 PM   #6
AngryLlama
Member
 
Registered: Sep 2004
Location: /dev/urandom
Distribution: Gentoo
Posts: 171

Rep: Reputation: 31
Perl or Phython, take your pick. Yes, they are scripting languages. I would normally code it in a language such as C or C++ (because I am more comfortable with them). GTK2+ is not a language it is a graphical toolkit (just as Qt, Athena, etc..) So if you actually want to make "Windows" you should complement your language with a solution like GTK for your GUI. And back to the database, you can use flat files or a database solution such as MySQL, PostgreSQL, or even an embedded db like sqlite. I would choose to use an existing DB as it will take ALOT of the work out for you.

Thats all I have
 
Old 02-08-2005, 02:08 PM   #7
csfalcon
Member
 
Registered: Jun 2004
Location: MD
Distribution: Fedora Core
Posts: 269

Rep: Reputation: 31
I don't have much perl experience, that's why I am not sure if it is good for "a pretty complicated database driven app" "that would give good UI response time". To me this sounds more like something Java is better for, since crossplatform is also a plus.

For application development, I'd stick with an Object Oriented language rather than a script language. With good design, you will have an easier time developing and maintaining your application.

Here is what I have that might help you get started with Java, and there are GUI builders for Java apps you can find.

Java SDK
Eclipse IDE
JDBC

There are good tutorials on Java at http://java.sun.com

Last edited by csfalcon; 06-09-2008 at 01:44 PM.
 
Old 02-08-2005, 02:25 PM   #8
AngryLlama
Member
 
Registered: Sep 2004
Location: /dev/urandom
Distribution: Gentoo
Posts: 171

Rep: Reputation: 31
Java would be good. However one requirement is "that [it] would give good UI response time." I don't know if you've ever run Java on a Windows machine, but the VM is very slow. Especially while processing the gui.
 
Old 02-08-2005, 03:25 PM   #9
viniosity
Member
 
Registered: Oct 2001
Location: Washington, DC
Distribution: Debian, Archlinux, Ubuntu, Sidux
Posts: 244

Original Poster
Rep: Reputation: 30
Actually, the app I want to write is currently written in java. The UI is ok but whenever there's a lot of dbase activity (if I'm pulling up a GUI screen that requires lots of data) the response is really really slow. I'm not sure if that could be fixed by a better dbase design (using mysql) or what. Like I said, I'm no expert. In fact I'm happy just to know how to spell java...

Speaking of being a newbie, here are some stupid questions.. What's a toolkit? Can one use GTK with any language (java, perl, python)? Would I have to 'learn' GTK like I would learn to use bluefish (i.e. it's a tool that I need to learn how to use) or would I have to 'learn' it like I would python or java (in which case it may just be easier to not use it.)

thx..
 
Old 02-08-2005, 03:32 PM   #10
csfalcon
Member
 
Registered: Jun 2004
Location: MD
Distribution: Fedora Core
Posts: 269

Rep: Reputation: 31
Quote:
Actually, the app I want to write is currently written in java. The UI is ok but whenever there's a lot of dbase activity (if I'm pulling up a GUI screen that requires lots of data) the response is really really slow. I'm not sure if that could be fixed by a better dbase design (using mysql) or what.
When working with lots of data does take time, for example a search on LinuxQuestions.org would take a while. To find out if it is java that's slow or the way you are getting data from the database, try to run the exact SQL commands you are using in your Java application and see how long those take. Sometime you can improve the performance with smarter SQL commands.
 
Old 02-08-2005, 11:05 PM   #11
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
Actually, the app I want to write is currently written in java. The UI is ok but whenever there's a lot of dbase activity (if I'm pulling up a GUI screen that requires lots of data) the response is really really slow.

You've got to figure out where your bottleneck is. If it's the database access that's slowing you down, it doesn't matter *what* language you write your app in, it's still going to be slowed down by that db access.

Incidentally, Java apps are pretty fast once they've had time to load up (Java GUI apps tend to take a while to load and also use up a lot of memory though).

Speaking of being a newbie, here are some stupid questions.. What's a toolkit?

A library of code that someone else has already written -- all you need to do is make use of it (call the functions that the other person already wrote for you).

Can one use GTK with any language (java, perl, python)?

Yes, if someone else has already come along and written "bindings" for you (which, in this case, they have). GTK+ is written in C. There is a sort of "glue code" that makes it so you can call those C functions from your [insert preferred language] code.

Would I have to 'learn' GTK like I would learn to use bluefish (i.e. it's a tool that I need to learn how to use) or would I have to 'learn' it like I would python or java (in which case it may just be easier to not use it.)

Neither. You'd need to learn GTK+ in the sense that you'd need to learn about the GTK+ functions (eg. why you'd call them, what they do, which args to pass to pass to them) available in the GTK+ toolkit. It's not as bad as it sounds though -- you only need to learn about the ones that you need. ;)

BTW, if your existing Java code is written well, the database logic will be nicely compartmentalized away from the Java GUI code. It should be pretty easy for you to learn enough Java to chop out the GUI code (leaving just a command line program behind) and see how fast your existing app runs when it doesn't have to draw the GUI. It would probably be a very good learning experience for you anyway. Java's not hard to learn. C is somewhat difficult. C++ is complex and very difficult to learn; and harder to master. Perl is easy to get started with with but I didn't like its TMTOWTDI philosophy. Python in one sweet ride. :)

Last edited by johnMG; 02-08-2005 at 11:16 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rh033 Certification Objective rkdugar Linux - Certification 2 06-15-2006 08:47 AM
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 01:37 AM
Source Code for starting redhatrosh Programming 3 04-28-2005 07:12 AM
Objective-C dogn00dles Programming 2 11-29-2003 02:30 AM
using gnu c compiler to compile objective c qanopus Linux - Software 1 10-20-2003 11:06 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration