Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: I need a non-web language that utilizes a database

  1. #11
    Join Date
    Jul 2007
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: I need a non-web language that utilizes a database

    As others have commented, you could implement your solution as a web application (provided one does not exist already).

    What has not been mentioned so far: you can install the web server and database server on your PC and use the broswer to access your recipes just as they were on the web.

    Apache, mySQL and PHP are not very difficult to install both in Linux and Windows. If you want your solution to be really portable, you could even consider packaging your application in a virtual machine.
    ch
    In Switzerland we make it other
    with apologies to Gerard Hoffnung


  2. #12
    Join Date
    Aug 2006
    Location
    Australia
    Beans
    1,438

    Re: I need a non-web language that utilizes a database

    Have you had a look at Gourmet Recipe Manager?
    http://grecipe-manager.sourceforge.net/
    It's written in phython, and should be able to do everything you want (and if it doesn't, it'll give you a good incentive to learn python so you can tinker with it).
    Work smart, not hard.

  3. #13
    Join Date
    Apr 2007
    Beans
    14,781

    Re: I need a non-web language that utilizes a database

    Quote Originally Posted by xlinuks View Post
    1) The only language that would let _me_ do what I want to do is C (nor Java either Python can do as fast and well as C, that's why I really wanna learn C)
    2) You don't need a database. You are not going to store hundreds of thousands of recipes I guess, thus storing every recipe in a (text) file would be just good. Why? Because your friends won't need to install and configure a database! Besides you can just redistribute your folder with files, this is very handy and simple. There's practically no difference in speed.
    How to search for a recipe? All your recipe-text-files should be stored into corresponding folders according to the most important criteria recipes might have, in folders with names like "sweet", "salty", "drinks" and alike. The name of the text file of the recipe might contain additional data, and finally the contents should describe the recipe itself.
    2) programs of true quality should require from little to none setup, not to mention that databases are required only for apps that will use > 10000 items.
    3) IMO the most important - your users will be happy to know that they can use your program without having to install (and configure) a database. I personally use a database for Desktop apps only in about 10% of my cases, and anyone is happy.
    1. That has nothing to do with the goals here...

    2.SQLite doesn't require installations, and comes with Python.

    3. Installing the ActivePython interpreter, and possible the GUI toolkit (single click installers for Windows) and making an installer for the script: http://www.jrsoftware.org/isinfo.php will make it very easy, even if the program is complicated.

    4. SQLite doesn't need to be configured.

    Programs of quality shouldn't be measured by how they are setup. If you do, Gentoo is the worst distro in the world, and Windows is the best. The quality of the software when it is running is what is important. Writing a little read me file isn't difficult.

  4. #14
    Join Date
    Oct 2006
    Location
    Austin, Texas
    Beans
    2,715

    Re: I need a non-web language that utilizes a database

    Quote Originally Posted by xlinuks View Post
    1) The only language that would let _me_ do what I want to do is C (nor Java either Python can do as fast and well as C, that's why I really wanna learn C)
    2) You don't need a database. You are not going to store hundreds of thousands of recipes I guess, thus storing every recipe in a (text) file would be just good. Why? Because your friends won't need to install and configure a database! Besides you can just redistribute your folder with files, this is very handy and simple. There's practically no difference in speed.
    How to search for a recipe? All your recipe-text-files should be stored into corresponding folders according to the most important criteria recipes might have, in folders with names like "sweet", "salty", "drinks" and alike. The name of the text file of the recipe might contain additional data, and finally the contents should describe the recipe itself.
    You should consider:
    1) nowadays computers can read very fast from the HDD.
    2) programs of true quality should require from little to none setup, not to mention that databases are required only for apps that will use > 10000 items.
    3) IMO the most important - your users will be happy to know that they can use your program without having to install (and configure) a database. I personally use a database for Desktop apps only in about 10% of my cases, and anyone is happy.
    a-1. The database modules for Python are almost guaranteed to be written in C anyway (thus would be just as fast as using C itself for most cases)

    a-2. That doesn't seem practical at all. What if something is sweet, salty, and is a snack (kettle corn, for instance)? Do you put it in each folder? Nope, you probably design a system of indexing them somehow. By the time you design a system that allows for easy searching / categorizing, you will probably have already designed a simple database. Don't reinvent the wheel!

    b-1. True, but this doesn't scale well and would obviously be a problem for any multithreaded app.

    b-2. Prove it!

    b-3. As LaRoza said, SQLite doesn't require configuration.

  5. #15
    Join Date
    Sep 2006
    Location
    Germany
    Beans
    403
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: I need a non-web language that utilizes a database

    If you know SQL-lite you can have a DB application up and running in 20 minutes, with a GUI, using the NetBeans IDE 6.0. Which is the Apache Derby database. From there use GlassFish if you want it as a networked number of workstations.

    Here a video:

    Video demo NetBeans DB

    Here is an online tutorial for the DB connectivity:

    NetBeans Tutorial IDE 6.0 DB connectivity
    "You don't do art because you want to, no, you do art because you have to." -- M. Buonarroti

  6. #16
    Join Date
    Feb 2007
    Location
    Heaven
    Beans
    486
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: I need a non-web language that utilizes a database

    Quote Originally Posted by Wybiral View Post
    a-1. The database modules for Python are almost guaranteed to be written in C anyway (thus would be just as fast as using C itself for most cases)

    a-2. That doesn't seem practical at all. What if something is sweet, salty, and is a snack (kettle corn, for instance)? Do you put it in each folder? Nope, you probably design a system of indexing them somehow. By the time you design a system that allows for easy searching / categorizing, you will probably have already designed a simple database. Don't reinvent the wheel!

    b-1. True, but this doesn't scale well and would obviously be a problem for any multithreaded app.

    b-2. Prove it!

    b-3. As LaRoza said, SQLite doesn't require configuration.
    )
    62°23′30″N 145°09′0″W
    ёёмаёё..

  7. #17
    Join Date
    Jun 2006
    Location
    CT, USA
    Beans
    5,267
    Distro
    Ubuntu 6.10 Edgy

    Re: I need a non-web language that utilizes a database

    Quote Originally Posted by xlinuks View Post
    1) The only language that would let _me_ do what I want to do is C (nor Java either Python can do as fast and well as C, that's why I really wanna learn C)
    so you don't know C, but you are so sure it is best for OP? Such app can be developed 10 times faster in Python than in C, from my experience in **both** languages. Additionally, most of the runtime would be spent accessing data, to I bet anything that Python+SQLite would beat your custom database wannabe engine in C.

    Remember, premature optimization is root of all evil.

    2) You don't need a database. ...Besides you can just redistribute your folder with files, this is very handy and simple. There's practically no difference in speed.
    I agree that full database server could be overkill - this is why I suggested SQLite. But unlike your proposal, program using SQLite can be later converted to using real DB server by just changing driver - SQLite is a library implementing SQL to access data in plain files (without a DB server).

    One important difference in speed is **speed of development** - and in this, Python beats C every time, no questions.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •